/* ========== Announcement bar ========== */
.nav-announcement {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-announcement a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}
.nav-announcement a:hover { color: #7b9bff; }
.nav-announcement__arrow { opacity: 0.7; }

/* Nav offset when announcement present */
body.has-nav-announcement .site-nav,
body.has-nav-announcement .modern-nav,
body.has-nav-announcement .site-nav {
    top: 2rem;
}
body.has-nav-announcement .hero-section {
    padding-top: 9rem;
}
body.has-nav-announcement .mega-menu {
    top: calc(2rem + 5rem);
}
body.has-nav-announcement .modern-nav {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* ========== Site nav enhancements ========== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.site-nav--dark {
    background: rgba(10, 14, 39, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}
.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
    gap: 1.5rem;
}
.site-nav__logo img { height: 3rem; width: auto; }
.site-nav--dark .site-nav__logo img {
    filter: brightness(0) invert(1);
}
.site-nav--dark .site-nav__search,
.site-nav--dark .site-nav__lang,
.site-nav--dark .site-nav__hamburger {
    color: rgba(255, 255, 255, 0.75);
}
.site-nav--dark .site-nav__search:hover,
.site-nav--dark .site-nav__lang:hover,
.site-nav--dark .site-nav__hamburger:hover {
    color: #fff;
}
.site-nav--dark #lang-dropdown {
    background: #fff;
}
.site-nav__links {
    display: none;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 768px) {
    .site-nav__links { display: flex; }
}
.site-nav__link {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: #374151;
    transition: color 0.2s ease;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}
.site-nav--dark .site-nav__link { color: rgba(255, 255, 255, 0.7); }
.site-nav__link:hover,
.site-nav__link.active,
.site-nav__link[aria-expanded="true"] {
    color: #1C39BB;
}
.site-nav--dark .site-nav__link:hover,
.site-nav--dark .site-nav__link.active,
.site-nav--dark .site-nav__link[aria-expanded="true"] {
    color: #fff;
}
.site-nav__item-mega { position: static; }
.site-nav__link[aria-expanded="true"] {
    color: #1C39BB !important;
}
.site-nav--dark .site-nav__link[aria-expanded="true"] {
    color: #fff !important;
}
.site-nav__item-mega:hover .site-nav__link,
.site-nav__item-mega:focus-within .site-nav__link {
    color: #1C39BB;
}
.site-nav--dark .site-nav__item-mega:hover .site-nav__link,
.site-nav--dark .site-nav__item-mega:focus-within .site-nav__link {
    color: #fff;
}
.site-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.site-nav__cta {
    display: none;
    align-items: center;
    gap: 0.5rem;
}
@media (min-width: 1024px) {
    .site-nav__cta { display: flex; }
}
.site-nav__btn {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.55rem 1.1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.site-nav__btn--ghost {
    color: #374151;
    border: 1px solid #d1d5db;
    background: transparent;
}
.site-nav--dark .site-nav__btn--ghost {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.25);
}
.site-nav__btn--ghost:hover {
    border-color: #1C39BB;
    color: #1C39BB;
}
.site-nav__btn--solid {
    background: #1C39BB;
    color: #fff;
    border: 1px solid #1C39BB;
}
.site-nav__btn--solid:hover {
    background: #153A7A;
    border-color: #153A7A;
}

/* ========== Mega menu panel ========== */
.mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: 5rem;
    z-index: 999;
    pointer-events: none;
    visibility: hidden;
}
body.has-nav-announcement .mega-menu { top: 7rem; }
.mega-menu.is-open {
    pointer-events: auto;
    visibility: visible;
}
.mega-menu__backdrop {
    position: fixed;
    inset: 0;
    top: 5rem;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.28s ease;
    cursor: default;
}
body.has-nav-announcement .mega-menu__backdrop { top: 7rem; }
.mega-menu.is-open .mega-menu__backdrop { opacity: 1; }
.mega-menu__panel {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid rgba(28, 57, 187, 0.08);
    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.04),
        0 24px 48px -12px rgba(15, 23, 42, 0.18);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-12px) scale(0.995);
    transition:
        opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.mega-menu.is-open .mega-menu__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.mega-menu__inner { padding: 2rem 1.5rem 2.25rem; }
.mega-menu__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .mega-menu__layout {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 2.75rem;
        align-items: start;
    }
}
.mega-menu__heading {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.35rem;
    letter-spacing: -0.03em;
}
.mega-menu__subheading {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 1.35rem;
    line-height: 1.5;
    max-width: 36rem;
}
.mega-menu__left-head {
    margin-bottom: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Subcategory tabs */
.mega-menu__subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}
.mega-menu__subtabs.hidden { display: none; }
.mega-menu__subtab {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.22s ease;
    font-family: inherit;
}
.mega-menu__subtab:hover {
    border-color: #c7d2fe;
    color: #1C39BB;
    background: #f8fafc;
}
.mega-menu__subtab.is-active {
    background: linear-gradient(135deg, #1C39BB 0%, #2563eb 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(28, 57, 187, 0.25);
}

/* Category grid */
.mega-menu__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}
@media (min-width: 640px) {
    .mega-menu__grid { grid-template-columns: repeat(3, 1fr); }
}
.mega-menu.is-open .mega-menu__card {
    animation: mega-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.mega-menu.is-open .mega-menu__card:nth-child(1) { animation-delay: 0.03s; }
.mega-menu.is-open .mega-menu__card:nth-child(2) { animation-delay: 0.06s; }
.mega-menu.is-open .mega-menu__card:nth-child(3) { animation-delay: 0.09s; }
.mega-menu.is-open .mega-menu__card:nth-child(4) { animation-delay: 0.12s; }
.mega-menu.is-open .mega-menu__card:nth-child(5) { animation-delay: 0.15s; }
.mega-menu.is-open .mega-menu__card:nth-child(6) { animation-delay: 0.18s; }

@keyframes mega-card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu__card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: auto;
    padding: 1rem 0.85rem 1rem 1rem;
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    transition:
        border-color 0.25s ease,
        box-shadow 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.25s ease;
    position: relative;
    overflow: hidden;
}
.mega-menu__card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #1C39BB, #00A693);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.mega-menu__card:hover,
.mega-menu__card.is-active {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
    transform: translateY(-3px);
    box-shadow:
        0 4px 6px -2px rgba(28, 57, 187, 0.06),
        0 12px 28px -8px rgba(28, 57, 187, 0.18);
}
.mega-menu__card:hover::before,
.mega-menu__card.is-active::before {
    opacity: 1;
}
.mega-menu__card:hover .mega-menu__card-arrow,
.mega-menu__card.is-active .mega-menu__card-arrow {
    opacity: 1;
    transform: translateX(2px);
    color: #1C39BB;
}
.mega-menu__card-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1C39BB;
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 10px;
    transition: transform 0.3s ease, background 0.3s ease;
}
.mega-menu__card:hover .mega-menu__card-icon,
.mega-menu__card.is-active .mega-menu__card-icon {
    transform: scale(1.05);
    background: linear-gradient(145deg, #1C39BB 0%, #3b5bdb 100%);
    color: #fff;
}
.mega-menu__card-icon-svg { width: 1.5rem; height: 1.5rem; }
.mega-menu__card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.1rem;
}
.mega-menu__card-label {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
}
.mega-menu__card-desc {
    font-size: 0.7rem;
    line-height: 1.45;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mega-menu__card-arrow {
    flex-shrink: 0;
    align-self: center;
    opacity: 0.35;
    color: #94a3b8;
    transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

/* Distributors bar */
.mega-menu__distributors {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.15rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(90deg, #f8fafc 0%, #fff 50%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    transition: border-color 0.25s ease, box-shadow 0.28s ease, transform 0.25s ease;
}
.mega-menu__distributors:hover {
    border-color: #a5b4fc;
    box-shadow: 0 8px 24px rgba(28, 57, 187, 0.1);
    transform: translateY(-1px);
}
.mega-menu__distributors-icon {
    color: #1C39BB;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 10px;
}
.mega-menu__distributors-icon svg { width: 1.25rem; height: 1.25rem; }
.mega-menu__distributors-text {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
}
.mega-menu__distributors-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1C39BB;
}
.mega-menu__distributors-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #1C39BB;
    color: #fff;
    font-size: 0.8rem;
    transition: transform 0.25s ease;
}
.mega-menu__distributors:hover .mega-menu__distributors-arrow {
    transform: translateX(3px);
}

/* Right: story slider */
.mega-menu__right {
    padding-top: 0.25rem;
}
.mega-menu__right .mega-menu__heading {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}
.mega-menu__slider { position: relative; }
.mega-menu__slides { position: relative; min-height: 300px; }
.mega-menu__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}
.mega-menu__slide--active {
    position: relative;
    opacity: 1;
    visibility: visible;
}
.mega-menu__story {
    display: block;
    position: relative;
    min-height: 300px;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
}
.mega-menu__story-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.mega-menu__story:hover .mega-menu__story-bg { transform: scale(1.06); }
.mega-menu__story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(15, 23, 42, 0.05) 0%,
        rgba(15, 23, 42, 0.45) 45%,
        rgba(15, 23, 42, 0.92) 100%
    );
}
.mega-menu__story-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.65rem;
    z-index: 1;
}
.mega-menu__story-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.55rem;
    padding: 0.25rem 0.55rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.mega-menu__story-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}
.mega-menu__story-excerpt {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mega-menu__story-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #93c5fd;
    transition: color 0.2s ease, gap 0.2s ease;
}
.mega-menu__story:hover .mega-menu__story-cta {
    color: #fff;
    gap: 0.5rem;
}

/* Top sales slide */
.mega-menu__topsales {
    min-height: 300px;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 55%, #1C39BB 100%);
    border-radius: 14px;
    padding: 1.5rem 1.5rem 1.35rem;
    color: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
}
.mega-menu__topsales-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #93c5fd;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
.mega-menu__topsales-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0 1.1rem;
    line-height: 1.45;
}
.mega-menu__topsales-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.mega-menu__topsales-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.8125rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    transition: background 0.2s ease;
}
.mega-menu__topsales-item:hover {
    background: rgba(255, 255, 255, 0.04);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 6px;
}
.mega-menu__topsales-item:last-child { border-bottom: none; }
.mega-menu__topsales-rank {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(147, 197, 253, 0.9);
    letter-spacing: 0.05em;
    min-width: 1.5rem;
}
.mega-menu__topsales-name {
    line-height: 1.4;
}
.mega-menu__topsales-sub {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.15rem;
}
.mega-menu__topsales-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #93c5fd;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}
.mega-menu__topsales-link:hover {
    color: #fff;
    gap: 0.5rem;
}

.mega-menu__slider-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.85rem;
    gap: 1rem;
}
.mega-menu__slider-dots {
    display: flex;
    gap: 0.4rem;
}
.mega-menu__slider-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
    font-family: inherit;
}
.mega-menu__slider-dot.is-active {
    width: 1.35rem;
    background: linear-gradient(90deg, #1C39BB, #3b5bdb);
}
.mega-menu__slider-nav {
    display: flex;
    gap: 0.4rem;
}
.mega-menu__slider-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.22s ease;
    font-family: inherit;
}
.mega-menu__slider-btn:hover {
    background: #1C39BB;
    border-color: #1C39BB;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 57, 187, 0.25);
}

/* Mobile mega accordion */
.mobile-mega { border-top: 1px solid #e5e7eb; margin-top: 0.5rem; padding-top: 0.5rem; }
.mobile-mega__toggle {
    width: 100%;
    text-align: left;
    font-weight: 600;
    color: #1C39BB;
    background: none;
    border: none;
    padding: 0.5rem 0;
    font-family: inherit;
    cursor: pointer;
}
.mobile-mega__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0 1rem;
}
.mobile-mega__grid a {
    font-size: 0.8rem;
    padding: 0.5rem;
    background: #f1f5f9;
    color: #374151;
    text-decoration: none;
    border-radius: 4px;
}
.mobile-mega__grid a:hover { background: #e8ecf8; color: #1C39BB; }

/* Top sales image rotator inside slide 2 */
.mega-menu__topsales-visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.mega-menu__topsales-thumb {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    text-align: center;
    padding: 0.35rem;
    color: rgba(255, 255, 255, 0.75);
    transition: opacity 0.4s ease, transform 0.3s ease;
}
.mega-menu__topsales-thumb:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

@media (prefers-reduced-motion: reduce) {
    .mega-menu__panel,
    .mega-menu__backdrop,
    .mega-menu__card,
    .mega-menu__story-bg {
        transition: none;
        animation: none;
    }
    .mega-menu.is-open .mega-menu__card {
        animation: none;
    }
}
