/* =========================================
   HEADER
========================================= */

body {
    padding-top: 96px;
}

@media (max-width: 900px) {
    body {
        padding-top: 80px;
    }
}

.site-header {
    width: 100%;
    background: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 25px rgba(15, 23, 42, 0.08);
    border-bottom-color: rgba(226, 232, 240, 0.7);
}

.header-container {
    width: 100%;
    max-width: none;
    height: 96px;
    margin: 0;
    padding-left: clamp(24px, 4vw, 70px);
    padding-right: clamp(24px, 4vw, 70px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;
}


/* =========================================
   LOGO
========================================= */

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;

    text-decoration: none;
    color: #0f172a;
    transition: transform 0.25s ease;
}

.site-logo:hover {
    transform: scale(1.02);
}

.site-logo-img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
}

.logo-icon {
    width: 42px;
    height: 42px;

    border: 3px solid #0047ff;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #0047ff;
    font-size: 17px;
}

.logo-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.logo-text span {
    color: #d97706;
}


/* =========================================
   NAVIGATION
========================================= */

.main-navigation {
    display: flex;
    align-items: center;
    gap: 38px;
}

.nav-link {
    position: relative;

    border: none;
    background: none;

    padding: 12px 0;

    color: #334155;
    text-decoration: none;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #0047ff;
}

.nav-link.active {
    color: #0047ff;
}

.nav-link.active::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 3px;
    border-radius: 3px 3px 0 0;

    background: #0047ff;
}


/* =========================================
   DROPDOWN
========================================= */

.nav-dropdown {
    position: relative;
}

.dropdown-button {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dropdown-button i {
    font-size: 10px;
}

.dropdown-menu {
    position: absolute;

    top: calc(100% + 15px);
    left: 50%;

    transform: translateX(-50%);

    width: 210px;

    padding: 10px;

    background: white;

    border-radius: 12px;
    border: 1px solid #e2e8f0;

    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.1);

    opacity: 0;
    visibility: hidden;

    transition: 0.25s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;

    padding: 11px 13px;

    color: #334155;
    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    border-radius: 7px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: #eff4ff;
    color: #0047ff;
}


/* =========================================
   HEADER ACTIONS
========================================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-button {
    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: #f1f5f9;
    color: #0f172a;

    font-size: 16px;

    cursor: pointer;

    transition: 0.25s ease;
}

.search-button:hover {
    background: #0047ff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 71, 255, 0.3);
}


/* =========================================
   READ GUIDE
========================================= */

.read-guide-button {
    height: 48px;

    padding: 4px 18px 4px 5px;

    display: flex;
    align-items: center;
    gap: 12px;

    background: linear-gradient(135deg, #0047ff 0%, #0038c7 100%);
    color: white;

    border-radius: 30px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;

    box-shadow: 0 4px 14px rgba(0, 71, 255, 0.25);
    transition: 0.25s ease;
}

.read-guide-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 71, 255, 0.35);
}

.read-guide-button,
.read-guide-button:hover,
.read-guide-button:focus,
.read-guide-button span:not(.read-guide-icon) {
    color: #ffffff !important;
}

.read-guide-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: white;
    color: #0047ff;

    border-radius: 50%;
}

.read-guide-icon i {
    color: #0047ff !important;
}


/* =========================================
   MOBILE MENU BUTTON
========================================= */

.mobile-menu-button {
    display: none;

    width: 45px;
    height: 45px;

    border: none;
    border-radius: 50%;

    background: #0047ff;
    color: white;

    cursor: pointer;
}


/* =========================================
   MOBILE NAV
========================================= */

.mobile-navigation {
    display: none;
}


/* =========================================
   BUY NOW NAV LINK
========================================= */

.buy-now-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    background: linear-gradient(135deg, #0047ff 0%, #0038c7 100%);
    color: #ffffff !important;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 71, 255, 0.28);
    transition: all 0.25s ease;
}

.buy-now-nav-link i {
    font-size: 13px;
}

.buy-now-nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 71, 255, 0.38);
    color: #ffffff !important;
}

.buy-now-nav-link::after {
    display: none !important;
}


/* =========================================
   MOBILE BUY NOW
========================================= */

.mobile-buy-now {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0047ff 0%, #0038c7 100%);
    color: white !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    margin: 6px 0;
    transition: all 0.2s ease;
}

.mobile-buy-now:hover {
    opacity: 0.9;
}

/* =========================================
   BUY NOW — NORMAL NAVIGATION
========================================= */

.main-navigation .nav-link.buy-now-nav-link,
.main-navigation .buy-now-nav-link {
    background: transparent;
    color: #334155;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.main-navigation .nav-link.buy-now-nav-link:hover,
.main-navigation .buy-now-nav-link:hover {
    background: transparent;
    color: #0d47ff;
}


/* =========================================
   FREE TRIAL BUTTON
   Fixed height + line-height:1 + inline-flex/center
   locked with !important so page-specific CSS
   (about.css, signin.css, support.css, etc.)
   cannot shift its vertical alignment.
========================================= */

.free-trial-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 8px;

    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 18px !important;
    box-sizing: border-box;

    border-radius: 999px;

    background: #0d47ff;
    color: #ffffff;

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;
    line-height: 1 !important;
    vertical-align: middle;

    box-shadow: 0 8px 20px rgba(13, 71, 255, 0.20);

    transition: all 0.25s ease;
}

.free-trial-button:hover {
    background: #083bd8;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 71, 255, 0.28);
}

.free-trial-button i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    line-height: 1 !important;
    font-size: 14px;
}

.free-trial-button span {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
}


/* =========================================
   PROFILE BUTTON
   Fixed height + line-height:1 + inline-flex/center
   locked with !important so page-specific CSS
   cannot shift its vertical alignment.
========================================= */

.profile-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;

    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 15px 0 7px !important;
    box-sizing: border-box;

    border: 1px solid #000000;
    border-radius: 999px;

    background: #ffffff;
    color: #334155;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
    line-height: 1 !important;
    vertical-align: middle;

    transition: all 0.25s ease;
}

.profile-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    line-height: 1 !important;

    border-radius: 50%;

    background: #0d47ff;
    color: #ffffff;

    font-size: 14px;
}

.profile-button:hover {
    color: #0d47ff;
}

.profile-button:hover .profile-icon {
    transform: scale(1.05);
}

.profile-text {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    white-space: nowrap;
}


/* =========================================
   MOBILE BUY NOW
========================================= */

.mobile-navigation .mobile-buy-now {
    background: transparent;
    color: #334155;
    padding: 13px 0;
    border-radius: 0;
    box-shadow: none;
}

.mobile-navigation .mobile-buy-now:hover {
    background: transparent;
    color: #0d47ff;
}


/* =========================================
   MOBILE FREE TRIAL
   Same fixed-height / line-height:1 lock as the
   desktop Free Trial button for consistency.
========================================= */

.mobile-free-trial {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 10px;

    height: 48px !important;
    padding: 0 18px !important;
    box-sizing: border-box;

    border-radius: 10px;

    background: #0d47ff;
    color: #ffffff;

    text-decoration: none;

    font-weight: 600;
    line-height: 1 !important;
}

.mobile-free-trial:hover {
    background: #083bd8;
    color: #ffffff;
}

.mobile-free-trial i,
.mobile-free-trial span {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
}


/* =========================================
   MOBILE PROFILE
   Same fixed-height / line-height:1 lock as the
   desktop Profile button for consistency.
========================================= */

.mobile-profile-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 10px;

    height: 48px !important;
    padding: 0 18px !important;
    box-sizing: border-box;

    border-radius: 10px;

    background: #f1f5f9;
    color: #334155;

    text-decoration: none;

    font-weight: 600;
    line-height: 1 !important;
}

.mobile-profile-button:hover {
    background: #e8eefc;
    color: #0d47ff;
}

.mobile-profile-button i,
.mobile-profile-button span {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

/* =========================================
   FULL RESPONSIVE HEADER — DESKTOP / TABLET / MOBILE
   FIXED: full mobile menu always stays inside viewport
========================================= */

:root {
    --header-desktop-height: 96px;
    --header-tablet-height: 80px;
    --header-mobile-height: 70px;
}

.site-header {
    overflow: visible !important;
    z-index: 10000 !important;
}

.site-logo {
    flex-shrink: 0;
    min-width: 0;
}

.main-navigation {
    min-width: 0;
}

.header-actions {
    flex-shrink: 0;
}

.mobile-navigation {
    box-sizing: border-box;
}

/* Compact desktop / laptop */
@media (max-width: 1180px) {
    .header-container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .main-navigation {
        gap: 22px;
    }

    .nav-link {
        font-size: 14px;
    }

    .free-trial-button {
        padding: 0 14px !important;
    }

    .profile-button {
        padding-right: 12px !important;
    }
}

/* =========================================
   TABLET + MOBILE MENU
========================================= */
@media (max-width: 980px) {
    html,
    body {
        max-width: 100%;
    }

    body {
        padding-top: var(--header-tablet-height) !important;
    }

    .site-header {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    .header-container {
        width: 100% !important;
        height: var(--header-tablet-height) !important;
        min-height: var(--header-tablet-height) !important;
        padding-left: clamp(16px, 3vw, 28px) !important;
        padding-right: clamp(16px, 3vw, 28px) !important;
    }

    .site-logo-img {
        display: block;
        max-height: 44px;
        max-width: 210px;
        width: auto;
        height: auto;
    }

    .main-navigation {
        display: none !important;
    }

    .header-actions {
        gap: 10px;
    }

    .header-actions > .free-trial-button,
    .header-actions > .profile-button {
        display: none !important;
    }

    .mobile-menu-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto;
        font-size: 18px;
        line-height: 1;
    }

    /*
       IMPORTANT:
       bottom:0 makes the menu occupy the complete space below the header.
       overflow-y:auto keeps every item reachable on short-height phones.
    */
    .mobile-navigation {
        display: flex !important;
        position: fixed !important;
        top: var(--header-tablet-height) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 4px;

        padding: 12px clamp(16px, 3vw, 28px) max(20px, env(safe-area-inset-bottom)) !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;

        background: #ffffff !important;
        border-top: 1px solid #e2e8f0;
        border-bottom: 0;
        box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity .22s ease, transform .22s ease, visibility .22s ease;

        z-index: 9999 !important;
    }

    .mobile-navigation.open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }

    .mobile-navigation > a {
        flex: 0 0 auto;
        box-sizing: border-box;
    }

    .mobile-navigation > a:not(.mobile-free-trial):not(.mobile-profile-button) {
        display: flex !important;
        align-items: center !important;
        min-height: 46px;
        padding: 11px 4px !important;
        color: #334155 !important;
        background: transparent !important;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-navigation > a.active {
        color: #0d47ff !important;
    }

    /* Prevent page-specific .active / button rules from making Buy Now invisible */
    .mobile-navigation .mobile-buy-now {
        display: flex !important;
        align-items: center !important;
        min-height: 46px;
        margin: 0 !important;
        padding: 11px 4px !important;
        background: transparent !important;
        color: #334155 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .mobile-navigation .mobile-buy-now.active,
    .mobile-navigation .mobile-buy-now:hover {
        color: #0d47ff !important;
        background: transparent !important;
    }

    .mobile-navigation .mobile-free-trial,
    .mobile-navigation .mobile-profile-button {
        display: flex !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        min-height: 48px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .mobile-navigation .mobile-free-trial {
        margin-top: 8px !important;
        color: #ffffff !important;
        background: #0d47ff !important;
    }

    .mobile-navigation .mobile-profile-button {
        margin-top: 4px !important;
        margin-bottom: max(4px, env(safe-area-inset-bottom)) !important;
        color: #334155 !important;
        background: #f1f5f9 !important;
    }

    body.mobile-menu-open {
        overflow: hidden !important;
        touch-action: none;
    }

    body.mobile-menu-open .mobile-navigation {
        touch-action: pan-y;
    }
}

/* =========================================
   SMALL PHONES
========================================= */
@media (max-width: 560px) {
    body {
        padding-top: var(--header-mobile-height) !important;
    }

    .header-container {
        height: var(--header-mobile-height) !important;
        min-height: var(--header-mobile-height) !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .site-logo-img {
        max-height: 38px;
        max-width: min(190px, 58vw);
    }

    .mobile-menu-button {
        width: 42px;
        height: 42px;
    }

    .mobile-navigation {
        top: var(--header-mobile-height) !important;
        padding: 10px 14px max(16px, env(safe-area-inset-bottom)) !important;
    }
}

/* Very narrow phones */
@media (max-width: 360px) {
    .site-logo-img {
        max-width: 165px;
    }

    .header-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* =========================================
   SHORT VIEWPORTS
   Makes ALL menu items visible without large vertical gaps.
========================================= */
@media (max-width: 980px) and (max-height: 650px) {
    .mobile-navigation {
        gap: 0 !important;
        padding-top: 4px !important;
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    }

    .mobile-navigation > a:not(.mobile-free-trial):not(.mobile-profile-button),
    .mobile-navigation .mobile-buy-now {
        min-height: 38px !important;
        padding-top: 7px !important;
        padding-bottom: 7px !important;
        font-size: 13px !important;
    }

    .mobile-navigation .mobile-free-trial,
    .mobile-navigation .mobile-profile-button {
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        font-size: 13px !important;
    }

    .mobile-navigation .mobile-free-trial {
        margin-top: 4px !important;
    }

    .mobile-navigation .mobile-profile-button {
        margin-top: 3px !important;
    }
}

/* Extra-short landscape / browser-preview heights */
@media (max-width: 980px) and (max-height: 430px) {
    .mobile-navigation > a:not(.mobile-free-trial):not(.mobile-profile-button),
    .mobile-navigation .mobile-buy-now {
        min-height: 32px !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
        font-size: 12px !important;
    }

    .mobile-navigation .mobile-free-trial,
    .mobile-navigation .mobile-profile-button {
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        font-size: 12px !important;
    }
}

/* =========================================
   MOBILE ACTION BUTTONS — FINAL RESPONSIVE FIX
   Free Trial + Profile resize cleanly on every viewport.
========================================= */
@media (max-width: 980px) {
    .mobile-action-buttons {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 8px;
        padding: 0 !important;
    }

    .mobile-action-buttons .mobile-free-trial,
    .mobile-action-buttons .mobile-profile-button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: clamp(44px, 6vw, 48px) !important;
        min-height: clamp(44px, 6vw, 48px) !important;
        max-height: 48px !important;
        margin: 0 !important;
        padding: 0 clamp(10px, 2.4vw, 18px) !important;
        box-sizing: border-box !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: clamp(7px, 1.4vw, 10px) !important;

        border-radius: 10px !important;
        font-size: clamp(12.5px, 1.7vw, 14px) !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 1 !important;
    }

    .mobile-action-buttons .mobile-free-trial {
        background: #0d47ff !important;
        color: #ffffff !important;
        border: 1px solid #0d47ff !important;
        box-shadow: 0 5px 14px rgba(13, 71, 255, 0.18) !important;
    }

    .mobile-action-buttons .mobile-free-trial:hover,
    .mobile-action-buttons .mobile-free-trial:focus-visible {
        background: #083bd8 !important;
        border-color: #083bd8 !important;
        color: #ffffff !important;
    }

    .mobile-action-buttons .mobile-profile-button {
        background: #f1f5f9 !important;
        color: #334155 !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
    }

    .mobile-action-buttons .mobile-profile-button:hover,
    .mobile-action-buttons .mobile-profile-button:focus-visible {
        background: #e8eefc !important;
        color: #0d47ff !important;
        border-color: #d8e2fb !important;
    }

    .mobile-action-buttons .mobile-free-trial i,
    .mobile-action-buttons .mobile-profile-button i {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 16px !important;
        height: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 13px !important;
        line-height: 1 !important;
    }

    .mobile-action-buttons .mobile-free-trial span,
    .mobile-action-buttons .mobile-profile-button span {
        min-width: 0 !important;
        display: inline-block !important;
        line-height: 1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Normal phones: stack actions so neither button becomes squeezed. */
@media (max-width: 479px) {
    .mobile-action-buttons {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 7px !important;
        margin-top: 7px !important;
    }

    .mobile-action-buttons .mobile-free-trial,
    .mobile-action-buttons .mobile-profile-button {
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        font-size: 13px !important;
    }
}

/* Very small phones. */
@media (max-width: 360px) {
    .mobile-action-buttons {
        gap: 6px !important;
    }

    .mobile-action-buttons .mobile-free-trial,
    .mobile-action-buttons .mobile-profile-button {
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 12.5px !important;
        border-radius: 9px !important;
    }
}

/* Short-height devices / landscape preview. */
@media (max-width: 980px) and (max-height: 650px) {
    .mobile-action-buttons {
        margin-top: 4px !important;
        gap: 5px !important;
    }

    .mobile-action-buttons .mobile-free-trial,
    .mobile-action-buttons .mobile-profile-button {
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        font-size: 12px !important;
    }
}

