@charset "UTF-8";

/* ===================================
   Navigation Component
=================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 50px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav__logo {
    text-decoration: none;
}

.nav__logo-img {
    height: 45px;
    width: auto;
    transition: filter 0.3s ease;
    filter: brightness(0) invert(1);
}

.nav.scrolled .nav__logo-img {
    filter: none;
}

/* Menu */
.nav__menu {
    display: flex;
    list-style: none;
    gap: 50px;
}

.nav__item {
    position: relative;
}

.nav__link {
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
    display: block;
}

.nav__link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.nav.scrolled .nav__link {
    color: #333;
}

.nav.scrolled .nav__link:hover {
    color: #0066cc;
}

/* Dropdown */
.nav__sub {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 15px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.nav__sub::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.nav__item--has-sub:hover .nav__sub {
    opacity: 1;
    visibility: visible;
    margin-top: 5px;
}

.nav__sub-link {
    display: block;
    padding: 10px 25px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav__sub-link:hover {
    background: #f5f5f5;
    color: #0066cc;
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav__hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.nav.scrolled .nav__hamburger-line {
    background: #333;
}

.nav__hamburger.active .nav__hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.active .nav__hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.active .nav__hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile */
@media (max-width: 768px) {
    .nav__container {
        padding: 0 20px;
    }
    
    .nav__hamburger {
        display: flex;
    }
    
    .nav__menu {
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: #fff;
        padding: 20px;
        gap: 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav__menu.active {
        display: flex;
    }
    
    .nav__item {
        border-bottom: 1px solid #eee;
    }
    
    .nav__item:last-child {
        border-bottom: none;
    }
    
    .nav__link {
        color: #333;
        padding: 15px 0;
    }
    
    .nav__sub {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        opacity: 1;
        visibility: visible;
        display: none;
        background: #f9f9f9;
    }
    
    .nav__sub::before {
        display: none;
    }
    
    .nav__item--has-sub.active .nav__sub {
        display: block;
    }
    
    .nav__sub-link {
        padding: 12px 20px;
        font-size: 14px;
    }
}
