/* ========================================
   Navigation Styles - すごいAI道場
   ヘッダーナビゲーション専用スタイル
   ======================================== */

/* Main Navigation */
.main-nav {
    background: white;
    border-bottom: 3px solid #625147;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease-in-out;
}

.main-nav.nav-hidden {
    transform: translateY(-100%);
}

.main-nav.nav-visible {
    transform: translateY(0);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000814;
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #000814;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0;
    margin: 0;
}

.main-nav a {
    text-decoration: none;
    color: #000814;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    color: white;
    transform: translateY(-2px);
}

/* Category-specific navigation colors */
.main-nav a.nav-ai:hover,
.main-nav a.nav-ai.active {
    background: #f46434;
    color: white;
}

.main-nav a.nav-startup:hover,
.main-nav a.nav-startup.active {
    background: #4a90e2;
    color: white;
}

.main-nav a.nav-creative:hover,
.main-nav a.nav-creative.active {
    background: #27ae60;
    color: white;
}

.main-nav a.nav-community:hover,
.main-nav a.nav-community.active {
    background: #9b59b6;
    color: white;
}

.main-nav a.nav-mypage:hover,
.main-nav a.nav-mypage.active {
    background: #ffd700;
    color: white;
}

.main-nav a.nav-tutorial:hover,
.main-nav a.nav-tutorial.active {
    background: #495057;
    color: white;
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   Responsive Design - Navigation
   ======================================== */

/* Mobile and Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .nav-logo {
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .nav-container {
        padding: 10px 20px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 20px 20px;
        gap: 10px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 12px 20px;
        font-size: 1.2rem;
    }

    .main-nav a:hover {
        transform: translateX(5px);
    }

    /* Mobile menu - category colors maintained */
    .main-nav a.nav-ai:hover,
    .main-nav a.nav-ai.active {
        background: #f46434;
        color: white;
    }

    .main-nav a.nav-startup:hover,
    .main-nav a.nav-startup.active {
        background: #4a90e2;
        color: white;
    }

    .main-nav a.nav-creative:hover,
    .main-nav a.nav-creative.active {
        background: #27ae60;
        color: white;
    }

    .main-nav a.nav-community:hover,
    .main-nav a.nav-community.active {
        background: #9b59b6;
        color: white;
    }

    .main-nav a.nav-mypage:hover,
    .main-nav a.nav-mypage.active {
        background: #ffd700;
        color: white;
    }

    .main-nav a.nav-tutorial:hover,
    .main-nav a.nav-tutorial.active {
        background: #495057;
        color: white;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.3rem;
    }

    .nav-menu {
        width: 80%;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .main-nav a:hover {
        transform: none;
    }

    .main-nav a:active {
        color: white;
    }

    /* Touch - category colors */
    .main-nav a.nav-ai:active {
        background: #f46434;
        color: white;
    }

    .main-nav a.nav-startup:active {
        background: #4a90e2;
        color: white;
    }

    .main-nav a.nav-creative:active {
        background: #27ae60;
        color: white;
    }

    .main-nav a.nav-community:active {
        background: #9b59b6;
        color: white;
    }

    .main-nav a.nav-mypage:active {
        background: #ffd700;
        color: white;
    }

    .main-nav a.nav-tutorial:active {
        background: #495057;
        color: white;
    }
}
