/* ===== Header / Navigation ===== */
.main-header {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    box-shadow: 0 1px 0 var(--border-color), 0 2px 8px var(--shadow-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 72px;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    height: 100%;
    gap: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-image {
    height: 44px;
    width: 44px;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 0;
    z-index: 1000;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-list {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    min-width: max-content;
    align-items: center;
}

.nav-item {
    position: relative;
    display: inline-block;
}

.nav-item > a,
.nav-item-toggle {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.55rem;
    color: var(--light-text);
    transition: transform 0.25s ease;
}

.nav-item > a:hover,
.nav-item-toggle:hover {
    color: var(--primary-color);
    background-color: var(--section-bg);
}

.dropdown {
    position: relative;
    overflow: visible;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px var(--shadow-color);
    padding: 0.4rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 9999;
    overflow: visible;
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-menu li {
    padding: 0;
    position: relative;
    z-index: 9999;
    overflow: visible;
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    z-index: 9999;
    overflow: visible;
}

.dropdown-menu a:hover {
    background-color: var(--section-bg);
    color: var(--primary-color);
}

.nav-external-icon {
    font-size: 0.75em;
    margin-left: 0.2rem;
    color: var(--light-text);
}

/* ===== Responsive ===== */

@media (max-width: 1024px) {
.mobile-menu-btn {
        display: flex;
    }

.main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        height: calc(100vh - 72px);
        background-color: white;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        display: block;
        border: none;
    }

.main-nav.active {
        transform: translateX(0);
    }

.nav-list {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

.nav-item {
        width: 100%;
        display: block;
        border-bottom: 1px solid var(--border-color);
    }

.nav-item > a,
    .nav-item-toggle {
        padding: 1rem 0.25rem;
        width: 100%;
        justify-content: space-between;
        border-radius: 0;
    }

.nav-item > a:hover,
    .nav-item-toggle:hover {
        background-color: transparent;
    }

.dropdown-menu {
        position: static;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        background-color: var(--section-bg);
        min-width: auto;
    }

.dropdown.active .dropdown-menu {
        display: block;
    }
}

@media (max-width: 768px) {
.main-header {
        height: auto;
        min-height: 60px;
    }

.header-container {
        padding: 0.5rem 1rem;
        justify-content: space-between;
    }

.mobile-menu-btn {
        display: flex;
    }

.main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: white;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        display: block;
        border: none;
    }
}
