@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hybrid-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.logo a:hover h1 {
    color: #667eea;
}

.logo .highlight {
    color: #ff4444;
}

.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-root {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 400;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: normal;
}

.nav-link:hover {
    background: #f3f4ff;
    color: #111827;
}

.mega-trigger {
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    color: #4b5563;
    font-weight: 400;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    white-space: normal;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.mega-trigger::after {
    content: '';
    border-width: 4px 4px 0 4px;
    border-style: solid;
    border-color: #9ca3af transparent transparent transparent;
    margin-top: 2px;
}

.mega-trigger:hover {
    background: #f3f4ff;
    color: #111827;
}

.nav-item.has-mega.is-open .mega-trigger {
    background: #111827;
    color: white;
}

.nav-item.has-mega.is-open .mega-trigger::after {
    border-color: white transparent transparent transparent;
    transform: rotate(180deg);
}

.mega-panel {
    position: absolute;
    left: 0;
    right: auto;
    top: 100%;
    margin-top: 12px;
    padding: 1.25rem 1.75rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(15,23,42,0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}

/* Dropdown / mega / submenu */
.submenu,
.mega-panel {
    width: max-content;
    min-width: 240px;
    max-width: min(360px, 92vw);
}

.nav-item.has-mega.is-open .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-col {
    flex: 1 1 180px;
    min-width: 160px;
}

.mega-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: #111827;
    text-decoration: none;
    margin-bottom: 0.45rem;
    word-break: break-word;
}

.mega-col a:not(.mega-title) {
    display: block;
    font-size: 0.86rem;
    color: #4b5563;
    text-decoration: none;
    padding: 0.18rem 0;
    border-radius: 6px;
    word-break: break-word;
}

.mega-col a:not(.mega-title):hover {
    color: #111827;
    background: #f3f4ff;
}

.hybrid-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,0.12);
    background: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
}

.hybrid-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #111827;
}

.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.mobile-drawer.is-open {
    pointer-events: auto;
    opacity: 1;
}

.drawer-backdrop {
    flex: 1;
    background: rgba(15,23,42,0.45);
}

.drawer-panel {
    width: min(320px, 85vw);
    background: white;
    padding: 1.25rem 1.25rem 1.5rem 1.25rem;
    box-shadow: -18px 0 40px rgba(15,23,42,0.35);
    transform: translateX(100%);
    transition: transform 0.2s ease-out;
}

.mobile-drawer.is-open .drawer-panel {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.drawer-title {
    font-weight: 700;
    font-size: 1rem;
    color: #111827;
}

.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,0.12);
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drawer-close span {
    position: absolute;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: #111827;
}

.drawer-close span:first-child {
    transform: rotate(45deg);
}

.drawer-close span:last-child {
    transform: rotate(-45deg);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.m-acc {
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.6);
    background: #f9fafb;
    overflow: hidden;
}

.m-acc-btn {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
}

.m-acc-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.m-acc-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 0.9rem;
}

.m-acc-label {
    font-size: 0.9rem;
    font-weight: 400;
    color: #111827;
    word-break: break-word;
}

.m-acc-arrow {
    font-size: 0.8rem;
    color: #9ca3af;
}

.m-acc-panel {
    max-height: 0;
    overflow: hidden;
    padding: 0 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: max-height 0.18s ease;
}

.m-acc.is-open .m-acc-panel {
    max-height: 500px;
    padding-bottom: 0.6rem;
}

.m-acc-panel a {
    display: block;
    padding: 0.18rem 0;
    font-size: 0.88rem;
    color: #4b5563;
    text-decoration: none;
}

.m-acc-panel a:hover {
    color: #111827;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.6);
    background: #f9fafb;
    text-decoration: none;
}

.mobile-link .m-acc-label {
    font-weight: 600;
}

@media (max-width: 900px) {
    .hybrid-inner {
        padding: 0.75rem 1rem;
    }

    .desktop-nav {
        display: none;
    }

    .hybrid-toggle {
        display: inline-flex;
    }
}
