/* ==========================================================================
   Header — White Bar: Full-width at top → shrinks to pill on scroll
   ========================================================================== */

/* Dropdown Alignment */
.nav-item-wrapper {
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-item-wrapper:hover {
    transform: translateY(-1px);
}

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
    z-index: 1050;
    min-width: 230px;
    padding: 0.55rem !important;
    border-radius: 22px !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(108, 130, 147, 0.2) !important;
    box-shadow: none !important;
}

/* Individual Dropdown Minimum Widths for Balanced Geometry */
.nav-item-wrapper[data-nav="about"] .header-dropdown-menu {
    min-width: 205px;
}
.nav-item-wrapper[data-nav="trainings"] .header-dropdown-menu {
    min-width: 245px;
}
.nav-item-wrapper[data-nav="calculators"] .header-dropdown-menu {
    min-width: 290px;
}

/* Invisible bridge centered under button - scoped width prevents collision with neighboring tabs */
.header-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 110px);
    height: 20px;
}

.nav-item-wrapper:hover .header-dropdown-menu,
.nav-item-wrapper:focus-within .header-dropdown-menu,
.nav-item-wrapper.is-open .header-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.header-dropdown-link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.65rem 1.15rem !important;
    margin: 0.15rem 0 !important;
    border-radius: 10px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    color: #0B132B !important;
    text-decoration: none !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    white-space: nowrap !important;
}

.header-dropdown-link span {
    transition: color 0.2s ease !important;
    color: inherit !important;
}

.header-dropdown-link .link-arrow {
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease !important;
    font-size: 0.75rem !important;
    color: #6C8293 !important;
}

/* Dropdown Item Icons matching mobile drawer design */
.dropdown-item-icon,
.dropdown-item-svg {
    font-size: 0.95rem;
    color: #6C8293;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.dropdown-item-svg {
    width: 15px;
    height: 15px;
}

.header-dropdown-link:hover:not(.active) .dropdown-item-icon,
.header-dropdown-link:hover:not(.active) .dropdown-item-svg,
.header-dropdown-link:focus-visible:not(.active) .dropdown-item-icon,
.header-dropdown-link:focus-visible:not(.active) .dropdown-item-svg {
    color: #0B132B !important;
    transform: scale(1.08);
}

.header-dropdown-link.active .dropdown-item-icon,
.header-dropdown-link.active .dropdown-item-svg,
.header-dropdown-menu .header-dropdown-link.active .dropdown-item-icon,
.header-dropdown-menu .header-dropdown-link.active .dropdown-item-svg,
.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active .dropdown-item-icon,
.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active .dropdown-item-svg {
    color: #FFFFFF !important;
}

.header-dropdown-link:hover:not(.active),
.header-dropdown-link:focus-visible:not(.active) {
    background-color: rgba(108, 130, 147, 0.12) !important;
    color: #0B132B !important;
    border-radius: 10px !important;
    transform: translateX(2px) !important;
}

.header-dropdown-link:hover:not(.active) span,
.header-dropdown-link:focus-visible:not(.active) span {
    color: #0B132B !important;
}

.header-dropdown-link:hover:not(.active) .link-arrow,
.header-dropdown-link:focus-visible:not(.active) .link-arrow {
    opacity: 1 !important;
    transform: translateX(2px) !important;
    color: #6C8293 !important;
}

/* Active Dropdown Item: Refined Rectangular Selection with Curved Edges (10px) - Unified for All Dropdowns */
.header-dropdown-link.active,
.header-dropdown-menu .header-dropdown-link.active,
.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active {
    background-color: #6C8293 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transform: none !important;
}

.header-dropdown-link.active span,
.header-dropdown-menu .header-dropdown-link.active span,
.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active span {
    color: #FFFFFF !important;
}

.header-dropdown-link.active .link-arrow,
.header-dropdown-menu .header-dropdown-link.active .link-arrow,
.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active .link-arrow {
    opacity: 1 !important;
    color: #FFFFFF !important;
    transform: translateX(2px) !important;
}

/* Active Navigation Indicators (Rounded Blue-Gray Pill) */
.nav-item-wrapper {
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-item-wrapper:hover {
    transform: translateY(-1px);
}

.header-nav-btn {
    position: relative;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    outline: none;
    box-shadow: none !important;
}
.header-nav-btn:hover:not(.active) {
    background-color: rgba(108, 130, 147, 0.12);
    color: #0B132B !important;
}
.header-nav-btn:focus-visible {
    outline: 2px solid #6C8293 !important;
    outline-offset: 2px !important;
}

/* Active Nav Pill: Blue-Gray Pill with Contrasting White Text */
.header-nav-btn.active {
    background-color: #6C8293 !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}
.header-nav-btn.active .context-arrow {
    color: #FFFFFF !important;
}

.nav-item-wrapper:hover .context-arrow,
.nav-item-wrapper.is-open .context-arrow {
    transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════
   Option C: Floating Pill Menu for Calculators
   - Refined rounded pill container (22px radius)
   - Deep navy, blue-gray, and subtle borders
   - Blue-gray pill highlights for active/hover states
   - Zero orange accents, clean, restrained and accessible
   ═══════════════════════════════════════════════════════════════ */
.header-dropdown-menu.floating-pill-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
    z-index: 1050;
    padding: 0.55rem !important;
    border-radius: 22px !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(108, 130, 147, 0.2) !important;
    box-shadow: none !important;
}

/* Seamless bridge centered under button - scoped width prevents accidental collisions */
.header-dropdown-menu.floating-pill-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 110px);
    height: 20px;
}

.nav-item-wrapper:hover .header-dropdown-menu.floating-pill-menu,
.nav-item-wrapper:focus-within .header-dropdown-menu.floating-pill-menu,
.nav-item-wrapper.is-open .header-dropdown-menu.floating-pill-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.header-dropdown-menu.floating-pill-menu .header-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.15rem !important;
    margin: 0.15rem 0;
    border-radius: 10px !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    color: #0B132B !important;
    text-decoration: none;
    background-color: transparent;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    white-space: nowrap;
}

.header-dropdown-menu.floating-pill-menu .header-dropdown-link:hover:not(.active),
.header-dropdown-menu.floating-pill-menu .header-dropdown-link:focus-visible:not(.active) {
    background-color: rgba(108, 130, 147, 0.12) !important;
    color: #0B132B !important;
    border-radius: 10px !important;
    transform: translateX(2px);
}

.header-dropdown-menu.floating-pill-menu .header-dropdown-link:focus-visible {
    outline: 2px solid #6C8293 !important;
    outline-offset: 1px !important;
}

.header-dropdown-menu.floating-pill-menu .header-dropdown-link .link-arrow {
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    font-size: 0.75rem;
    color: #6C8293;
}

.header-dropdown-menu.floating-pill-menu .header-dropdown-link:hover:not(.active) .link-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* Active Dropdown Item: Refined Rectangular Selection with Curved Edges (10px) */
.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active,
.header-dropdown-menu .header-dropdown-link.active,
.header-dropdown-link.active {
    background-color: #6C8293 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active span,
.header-dropdown-menu .header-dropdown-link.active span,
.header-dropdown-link.active span {
    color: #FFFFFF !important;
}

.header-dropdown-menu.floating-pill-menu .header-dropdown-link.active .link-arrow,
.header-dropdown-menu .header-dropdown-link.active .link-arrow,
.header-dropdown-link.active .link-arrow {
    opacity: 1 !important;
    color: #FFFFFF !important;
    transform: translateX(2px) !important;
}

/* Secondary Context Nav Pill & Desktop Header - Applied to Desktop, Tablet & Mobile Desktop Mode (min-width: 740px) */
@media (min-width: 740px) {
    header.desktop-header,
    .desktop-header {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: start !important;
        visibility: visible !important;
    }
    .desktop-header > :first-child {
        justify-self: start !important;
    }
    .desktop-header > :nth-child(2) {
        justify-self: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        position: relative !important;
        transform: translateX(-49px);
    }
    .desktop-header > :last-child {
        justify-self: end !important;
    }

    /* Hide mobile header and drawer on tablets and mobile desktop mode */
    .mobile-pill-nav,
    .mobile-dropdown-panel,
    .mobile-dropdown-backdrop {
        display: none !important;
        visibility: hidden !important;
    }

    .secondary-nav-pill {
        position: absolute;
        top: calc(100% + 8px);
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        white-space: nowrap;
        z-index: 1005;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        max-width: 95vw;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        transition: top 0.2s ease, opacity 0.2s ease;
    }
    .secondary-nav-pill::-webkit-scrollbar {
        display: none;
    }

    /* ═══════════════════════════════════════════════════════════════
       Pages with Secondary Nav: Dropdown Positioning Under Secondary Nav Pill
       - Specifically for the 3 dropdown-having headers: About, Trainings, and Fitness Tools
       - Uses dynamically measured --secondary-nav-dropdown-top (fallback 46px)
       - Zero overlap, zero collision with the secondary navigation pill
       - Pages without secondary nav preserve default positioning
       ═══════════════════════════════════════════════════════════════ */
    body.has-secondary-nav .nav-item-wrapper[data-nav="about"] .header-dropdown-menu,
    body.has-secondary-nav .nav-item-wrapper[data-nav="trainings"] .header-dropdown-menu,
    body.has-secondary-nav .nav-item-wrapper[data-nav="services"] .header-dropdown-menu,
    body.has-secondary-nav .nav-item-wrapper[data-nav="calculators"] .header-dropdown-menu,
    body.calculator-page .nav-item-wrapper[data-nav="about"] .header-dropdown-menu,
    body.calculator-page .nav-item-wrapper[data-nav="trainings"] .header-dropdown-menu,
    body.calculator-page .nav-item-wrapper[data-nav="services"] .header-dropdown-menu,
    body.calculator-page .nav-item-wrapper[data-nav="calculators"] .header-dropdown-menu {
        top: calc(100% + var(--secondary-nav-dropdown-top, 46px)) !important;
        z-index: 1060 !important;
    }

    body.has-secondary-nav .nav-item-wrapper[data-nav="about"] .header-dropdown-menu.floating-pill-menu,
    body.has-secondary-nav .nav-item-wrapper[data-nav="trainings"] .header-dropdown-menu.floating-pill-menu,
    body.has-secondary-nav .nav-item-wrapper[data-nav="services"] .header-dropdown-menu.floating-pill-menu,
    body.has-secondary-nav .nav-item-wrapper[data-nav="calculators"] .header-dropdown-menu.floating-pill-menu,
    body.calculator-page .nav-item-wrapper[data-nav="about"] .header-dropdown-menu.floating-pill-menu,
    body.calculator-page .nav-item-wrapper[data-nav="trainings"] .header-dropdown-menu.floating-pill-menu,
    body.calculator-page .nav-item-wrapper[data-nav="services"] .header-dropdown-menu.floating-pill-menu,
    body.calculator-page .nav-item-wrapper[data-nav="calculators"] .header-dropdown-menu.floating-pill-menu {
        top: calc(100% + var(--secondary-nav-dropdown-top, 46px)) !important;
        z-index: 1060 !important;
    }

    /* Seamless bridge spanning from header nav button down across secondary nav pill to dropdown */
    body.has-secondary-nav .nav-item-wrapper[data-nav="about"] .header-dropdown-menu::before,
    body.has-secondary-nav .nav-item-wrapper[data-nav="trainings"] .header-dropdown-menu::before,
    body.has-secondary-nav .nav-item-wrapper[data-nav="services"] .header-dropdown-menu::before,
    body.has-secondary-nav .nav-item-wrapper[data-nav="calculators"] .header-dropdown-menu::before,
    body.calculator-page .nav-item-wrapper[data-nav="about"] .header-dropdown-menu::before,
    body.calculator-page .nav-item-wrapper[data-nav="trainings"] .header-dropdown-menu::before,
    body.calculator-page .nav-item-wrapper[data-nav="services"] .header-dropdown-menu::before,
    body.calculator-page .nav-item-wrapper[data-nav="calculators"] .header-dropdown-menu::before {
        top: -55px !important;
        height: 60px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: min(100%, 110px) !important;
    }
}

/* Tablet & Mobile Desktop Mode (740px to 1024px) Header Proportions - Full Desktop Design */
@media (min-width: 740px) and (max-width: 1024px) {
    .desktop-header {
        width: 1440px !important;
        max-width: 1440px !important;
        padding: 1.25rem 3rem !important;
    }
}

.secondary-nav-link {
    font-size: 0.7rem;
    font-weight: 700;
    color: #8798A4;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}
.secondary-nav-link:hover, .secondary-nav-link.active {
    color: #0B132B;
}

/* Hover scales for icons */
.desktop-actions-pill .action-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.desktop-actions-pill .action-icon:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

.desktop-logo {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: none !important;
}
.desktop-logo:hover {
    transform: scale(1.05);
    box-shadow: none !important;
}


/* --- Mobile Floating Pill (Top) --- */
.mobile-pill-nav {
    position: fixed;
    top: 1rem;
    top: max(1rem, env(safe-area-inset-top, 1rem));
    bottom: auto;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: calc(100vw - 2rem);
    max-width: 420px;
    z-index: var(--z-mobile-nav, 1001);
    transition: width 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.mobile-pill-nav.is-scrolled {
    width: calc(100vw - 2rem);
    max-width: 420px;
}

.pill-inner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    padding: 0.4rem 0.5rem 0.4rem 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: none !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 0.65rem;
}

.mobile-pill-nav.is-scrolled .pill-inner {
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
}

.pill-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pill-logo img {
    height: 28px;
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease;
}

.mobile-pill-nav.is-scrolled .pill-logo img {
    height: 24px;
}

/* Mobile Header Pill "Book Trial" Button */
.mobile-header-btn {
    background: #0B132B;
    color: #FFFFFF !important;
    border-radius: 100px;
    padding: 0.42rem 0.95rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-header-btn:hover {
    background: #6C8293;
    color: #FFFFFF !important;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: #0B132B !important;
    border: none !important;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    cursor: pointer;
    box-shadow: none !important;
    line-height: 1;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: rgba(108, 130, 147, 0.12) !important;
    color: #0B132B !important;
    outline: none;
}

.menu-toggle i,
.menu-toggle .menu-icon-open,
.menu-toggle .menu-icon-close {
    font-size: 1.45rem;
    line-height: 1;
    color: #0B132B;
    pointer-events: none;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hamburger span {
    display: block;
    width: 12px;
    height: 1.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* --- Mobile Dropdown Backdrop (Subtle dim overlay behind panel) --- */
.mobile-dropdown-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 19, 43, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-dropdown-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- Compact Mobile Dropdown Panel (Attached Directly To Header) --- */
.mobile-pill-nav {
    position: fixed;
    top: 1rem;
    top: max(1rem, env(safe-area-inset-top, 1rem));
    bottom: auto;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: calc(100vw - 2rem);
    max-width: 420px;
    z-index: var(--z-mobile-nav, 1001);
    display: flex;
    flex-direction: column;
    filter: none !important;
    box-shadow: none !important;
    transition: none;
}

.mobile-pill-nav.is-active {
    filter: none !important;
    box-shadow: none !important;
}

.pill-inner {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #E2E8F0;
    border-radius: 100px;
    padding: 0.35rem 0.5rem 0.35rem 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 10;
    box-shadow: none !important;
    transition: border-radius 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                border-bottom-color 0.25s ease,
                background 0.25s ease;
}

/* Attached header effect: pill-inner smoothly adopts 20px top corners when menu is open to prevent deformation */
.mobile-pill-nav.is-active .pill-inner {
    border-radius: 20px 20px 0 0 !important;
    border-bottom: 1px solid #EEF2F6 !important;
    background: #FFFFFF;
}

.mobile-dropdown-panel {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-top: none;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
    box-shadow: none !important;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transform: translateY(-8px);
    transform-origin: top center;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.28s ease,
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s ease;
    z-index: 5;
    position: relative;
    margin-top: -1px;
}

.mobile-dropdown-panel.is-active {
    max-height: calc(100vh - max(1rem, env(safe-area-inset-top, 1rem)) - 75px);
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(0);
}

.mobile-dropdown-inner {
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mobile-nav-item {
    border-radius: 12px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    width: 100%;
    background: transparent;
    border: none;
    color: #0B132B;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: none !important;
    transition: all 0.15s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    background: #F1F5F9;
    color: #0B132B;
    outline: none;
}

.mobile-nav-link.active,
.mobile-nav-item.active > .mobile-nav-link:not(.mobile-nav-accordion-btn) {
    background: rgba(108, 130, 147, 0.12) !important;
    color: #6C8293 !important;
    font-weight: 700 !important;
}

.mobile-nav-link.active .nav-icon,
.mobile-nav-link.active .nav-icon-svg,
.mobile-nav-item.active > .mobile-nav-link:not(.mobile-nav-accordion-btn) .nav-icon,
.mobile-nav-item.active > .mobile-nav-link:not(.mobile-nav-accordion-btn) .nav-icon-svg {
    color: #6C8293 !important;
}

.mobile-nav-link .nav-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-link .nav-icon {
    font-size: 18px;
    color: #0B132B;
    width: 22px;
    display: inline-flex;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-nav-link .nav-icon-svg {
    width: 20px;
    height: 20px;
    color: #0B132B;
    flex-shrink: 0;
}

/* Down-facing arrow for dropdown items only */
.mobile-nav-link .sub-chevron {
    font-size: 13px;
    color: #64748B;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

/* Accordion Open State & Active Section Highlighting in Header List */
.mobile-nav-item.is-expanded {
    background: #F1F5F9;
    border-radius: 14px;
}

.mobile-nav-item.has-subnav.active:not(.is-expanded) {
    background: rgba(108, 130, 147, 0.12);
    border-radius: 14px;
}

.mobile-nav-item.is-expanded > .mobile-nav-accordion-btn {
    color: #0B132B;
    background: transparent;
}

.mobile-nav-item.is-expanded > .mobile-nav-accordion-btn .sub-chevron {
    transform: rotate(180deg);
    color: #0B132B;
}

/* Parent accordion button active highlights (tells which section is active in the header list) */
.mobile-nav-item.active > .mobile-nav-accordion-btn,
.mobile-nav-accordion-btn.active,
.mobile-nav-item.is-expanded > .mobile-nav-accordion-btn.active,
.mobile-nav-item.is-expanded.active > .mobile-nav-accordion-btn {
    color: #6C8293 !important;
    font-weight: 700 !important;
}

.mobile-nav-item.active > .mobile-nav-accordion-btn .nav-icon,
.mobile-nav-item.active > .mobile-nav-accordion-btn .nav-icon-svg,
.mobile-nav-item.active > .mobile-nav-accordion-btn .sub-chevron,
.mobile-nav-accordion-btn.active .nav-icon,
.mobile-nav-accordion-btn.active .nav-icon-svg,
.mobile-nav-accordion-btn.active .sub-chevron,
.mobile-nav-item.is-expanded > .mobile-nav-accordion-btn.active .nav-icon,
.mobile-nav-item.is-expanded > .mobile-nav-accordion-btn.active .nav-icon-svg,
.mobile-nav-item.is-expanded > .mobile-nav-accordion-btn.active .sub-chevron,
.mobile-nav-item.is-expanded.active > .mobile-nav-accordion-btn .nav-icon,
.mobile-nav-item.is-expanded.active > .mobile-nav-accordion-btn .nav-icon-svg,
.mobile-nav-item.is-expanded.active > .mobile-nav-accordion-btn .sub-chevron {
    color: #6C8293 !important;
}

/* Subnav Collapsible Drawer (Smooth Slide-down Expansion) */
.mobile-subnav-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 10px 0 44px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                padding 0.3s ease;
}

.mobile-nav-item.is-expanded .mobile-subnav-panel {
    max-height: 420px;
    opacity: 1;
    padding: 4px 10px 10px 44px;
}

.mobile-subnav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #334155;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: none !important;
    transition: all 0.15s ease;
}

.mobile-subnav-link:hover,
.mobile-subnav-link:focus-visible {
    background: rgba(108, 130, 147, 0.1);
    color: #0B132B;
    font-weight: 600;
    outline: none;
}

/* Active Subnav Link: Light Tinted Brand Highlight with Crisp Icon & Typography (No Shadow) */
.mobile-subnav-link.active {
    background-color: rgba(108, 130, 147, 0.14) !important;
    color: #6C8293 !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.mobile-subnav-link.active span,
.mobile-subnav-link.active .sub-icon,
.mobile-subnav-link.active .sub-icon-svg {
    color: #6C8293 !important;
}

.mobile-subnav-link.active:hover,
.mobile-subnav-link.active:focus-visible {
    background-color: rgba(108, 130, 147, 0.22) !important;
    color: #6C8293 !important;
    box-shadow: none !important;
}

.mobile-subnav-link .sub-icon {
    font-size: 15px;
    color: #6C8293;
    width: 18px;
    display: inline-flex;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-subnav-link .sub-icon-svg {
    width: 16px;
    height: 16px;
    color: #6C8293;
    flex-shrink: 0;
}

/* Mobile Dropdown Trial CTA & Offer Note */
.mobile-menu-cta {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #E2E8F0;
    text-align: center;
}

.mobile-menu-cta .book-trial-btn {
    background: #0B132B !important;
    color: #FFFFFF !important;
    border: none !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 11px 20px !important;
    border-radius: 9999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    width: 100% !important;
    transition: background-color 0.2s ease !important;
}

.mobile-menu-cta .book-trial-btn:hover,
.mobile-menu-cta .book-trial-btn:focus-visible {
    background: #6C8293 !important;
    color: #FFFFFF !important;
}

.mobile-trial-note {
    margin-top: 8px;
    font-size: 11.5px;
    color: #64748B;
    line-height: 1.4;
}

.mobile-trial-note .trial-highlight-red {
    color: #E63946 !important;
    font-weight: 700 !important;
}

.mobile-trial-note .terms-link {
    color: #6C8293;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.15s ease;
}

.mobile-trial-note .terms-link:hover {
    color: #0B132B;
}

/* --- Fallback Fullscreen Menu Overlay --- */
.fullscreen-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: var(--color-bg-primary, #F7F7F5);
    z-index: calc(var(--z-mobile-nav, 1001) - 1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
    transition: all 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.fullscreen-menu.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    padding: 5rem 1.5rem 2rem;
    overflow-y: auto;
    max-height: 100vh;
}

.fullscreen-menu .mobile-nav-link {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-primary, #111);
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fullscreen-menu .mobile-nav-link:hover, .fullscreen-menu .mobile-nav-link.active {
    color: #6C8293;
}
/* Social Tooltips */
.action-icon {
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #6C8293 !important;
}
.action-icon:hover {
    transform: translateY(-2px) scale(1.1);
}
.action-icon.instagram:hover { color: #E1306C !important; filter: none !important; }
.action-icon.whatsapp:hover { color: #25D366 !important; filter: none !important; }

.action-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #1C1E21;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.05em;
    pointer-events: none;
    box-shadow: none !important;
}
.action-icon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Header Zero-Shadow System
   Removes box-shadow, text-shadow, and drop-shadows across all header components
   ========================================================================== */
.desktop-header,
.desktop-header *,
.desktop-header .shadow-sm,
.desktop-header .shadow,
.desktop-header .shadow-lg,
.desktop-logo,
.desktop-menu-pill,
.desktop-actions-pill,
.secondary-nav-pill,
.header-dropdown-menu,
.floating-pill-menu,
.header-nav-btn,
.mobile-pill-nav .shadow-sm,
.mobile-pill-nav .shadow,
.mobile-pill-nav .shadow-lg,
.fullscreen-menu,
.fullscreen-menu * {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Mobile Header Zero-Shadow */
.pill-inner,
.mobile-dropdown-panel,
.mobile-pill-nav,
.mobile-pill-nav.is-active {
    box-shadow: none !important;
    filter: none !important;
}

.desktop-header .action-icon,
.desktop-header .action-icon:hover,
.mobile-pill-nav .action-icon,
.mobile-pill-nav .action-icon:hover {
    filter: none !important;
}

/* Mobile scroll offset so calculator results stop cleanly below top floating nav pill */
@media (max-width: 739.98px) {
    .rt-tool-result-panel,
    .dashboard-panel,
    .output-panel,
    #resultState,
    [data-calculator-result] {
        scroll-margin-top: 85px !important;
    }
}

/* ==========================================================================
   Desktop Header CTA: Professional Attention-Seeking "Book Trial" Button
   - Perfectly balanced size, proportions, and optical vertical text alignment
   - High-end periodic micro-shake nudge (calm 3.2s pause, elegant 0.7s shake)
   - Synchronized luxury glass shimmer sweep & ambient pulse
   - Rich interactive hover & active tactical press states
   ========================================================================== */

.desktop-actions-pill .book-trial-btn {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 1.35rem !important;
    margin: 0 !important;
    background: #0B132B !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 9999px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.055em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(11, 19, 43, 0.22) !important;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.25s ease,
                box-shadow 0.28s ease !important;
    animation: ctaAttentionShake 4.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite,
               ctaAttentionGlow 4.2s ease-out infinite !important;
    transform-origin: center center !important;
}

/* Text Span: Optical Baseline Alignment */
.desktop-actions-pill .book-trial-btn .btn-text {
    display: inline-block !important;
    line-height: 1 !important;
    letter-spacing: inherit !important;
    color: #FFFFFF !important;
    transform: translateY(-0.5px) !important;
    transition: color 0.25s ease !important;
    pointer-events: none !important;
}

/* Arrow Icon: Centered Line-Height & Glide Animation */
.desktop-actions-pill .book-trial-btn .cta-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    color: #FFFFFF !important;
    transform: translateY(-0.5px) !important;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    pointer-events: none !important;
}

/* Luxury Diagonal Shimmer Sweep Overlay */
.desktop-actions-pill .book-trial-btn::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 65% !important;
    height: 100% !important;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    ) !important;
    pointer-events: none !important;
    transform: translateX(-160%) skewX(-20deg) !important;
    animation: ctaShimmerSweep 4.2s ease-in-out infinite !important;
}

/* Hover State: Elevation, Midnight Glow & Arrow Glide */
.desktop-actions-pill .book-trial-btn:hover {
    animation-play-state: paused !important;
    transform: translateY(-2px) scale(1.025) !important;
    background: #142247 !important;
    box-shadow: 0 6px 20px rgba(11, 19, 43, 0.35), 0 0 14px rgba(108, 130, 147, 0.25) !important;
    color: #FFFFFF !important;
}

.desktop-actions-pill .book-trial-btn:hover::after {
    animation-play-state: paused !important;
    opacity: 0 !important;
}

.desktop-actions-pill .book-trial-btn:hover .cta-arrow {
    transform: translateX(4.5px) translateY(-0.5px) !important;
}

/* Active / Press State */
.desktop-actions-pill .book-trial-btn:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 2px 6px rgba(11, 19, 43, 0.22) !important;
}

/* ═══════════════════════════════════════════════════════════════
   Keyframe Animations for Desktop Header CTA
   ═══════════════════════════════════════════════════════════════ */

/* 1. Periodic Professional Micro-Shake (Organic Attention Nudge) */
@keyframes ctaAttentionShake {
    0%, 72%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    74% {
        transform: translateY(-1.5px) rotate(-2deg) scale(1.02);
    }
    77% {
        transform: translateY(0) rotate(2deg) scale(1.02);
    }
    80% {
        transform: translateY(-1px) rotate(-1.4deg) scale(1.015);
    }
    83% {
        transform: translateY(0) rotate(1.2deg) scale(1.01);
    }
    86% {
        transform: translateY(-0.5px) rotate(-0.5deg) scale(1);
    }
    89% {
        transform: translateY(0) rotate(0deg);
    }
}

/* 2. Glass Shimmer Sweep (Synchronized with Micro-Shake) */
@keyframes ctaShimmerSweep {
    0%, 71% {
        transform: translateX(-160%) skewX(-20deg);
        opacity: 0;
    }
    73% {
        opacity: 1;
    }
    87% {
        transform: translateX(260%) skewX(-20deg);
        opacity: 1;
    }
    88%, 100% {
        transform: translateX(260%) skewX(-20deg);
        opacity: 0;
    }
}

/* 3. Subtle Ambient Pulse Glow (Synchronized with Micro-Shake) */
@keyframes ctaAttentionGlow {
    0%, 72%, 100% {
        box-shadow: 0 2px 8px rgba(11, 19, 43, 0.22);
    }
    76% {
        box-shadow: 0 2px 14px rgba(11, 19, 43, 0.32), 0 0 0 4px rgba(108, 130, 147, 0.25);
    }
    86% {
        box-shadow: 0 2px 8px rgba(11, 19, 43, 0.22), 0 0 0 8px rgba(108, 130, 147, 0);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .desktop-actions-pill .book-trial-btn,
    .desktop-actions-pill .book-trial-btn::after {
        animation: none !important;
    }
}
