/* ===== UNIVERSAL MOBILE NAVIGATION & TOP-BAR RESPONSIVENESS ===== */

html,
body {
    overflow-x: clip;
    max-width: 100%;
}

/* 1. Keep top disclaimer bar cleanly visible and responsive on ALL viewports (never hide data on mobile/tablet) */
.top-bar-centered .top-bar-inner,
.top-bar-inner:has(> :only-child) {
    justify-content: center !important;
    text-align: center !important;
}

@media (max-width: 1024px) {
    .top-bar,
    #topBar,
    div.top-bar {
        display: block !important;
        padding: 7px 0 !important;
        font-size: 11px !important;
        line-height: 1.4 !important;
    }

    .top-bar-inner {
        padding: 0 14px !important;
        flex-direction: column !important;
        gap: 2px !important;
        text-align: center !important;
    }

    .top-bar-inner span {
        display: block;
        max-width: 100%;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .top-bar,
    #topBar,
    div.top-bar {
        font-size: 10.5px !important;
        padding: 6px 0 !important;
    }

    .top-bar-inner {
        padding: 0 10px !important;
        gap: 1px !important;
    }
}

/* 2. Header Layout & Right Actions */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    box-sizing: border-box;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Responsive CTA text */
.cta-text-short {
    display: none;
}

.cta-text-full {
    display: inline;
}

/* 3. Modern 3-line Hamburger Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #ffffff;
    border: 1.5px solid rgba(18, 62, 53, 0.2);
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: all 0.25s ease;
    z-index: 10002;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    box-sizing: border-box;
}

.mobile-menu-btn:hover {
    background: #f0fdf4;
    border-color: #278b7d;
}

.mobile-menu-btn .hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #123e35;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform-origin: center;
}

/* Animated 'X' state */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

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

/* Show hamburger and adjust header on screens <= 1024px */
@media (max-width: 1024px) {
    .header-nav {
        display: none !important;
    }

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

    .header-cta {
        padding: 8px 16px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
}

/* Mobile Header Constraints (<= 768px) */
@media (max-width: 768px) {
    .header-inner {
        min-height: 60px !important;
        height: auto !important;
        padding: 10px 14px !important;
        gap: 8px !important;
    }

    .logo {
        gap: 8px !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }

    .logo-icon {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
    }

    .logo-text {
        min-width: 0 !important;
    }

    .logo-name {
        font-size: 18px !important;
        line-height: 1.1 !important;
    }

    .logo-sub {
        display: block !important;
        font-size: 8.5px !important;
        letter-spacing: 1px !important;
        line-height: 1.15 !important;
        margin-top: 1px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 150px !important;
    }

    .header-right-actions {
        gap: 8px !important;
    }

    .header-cta {
        padding: 8px 12px !important;
        font-size: 12.5px !important;
    }

    .mobile-menu-btn {
        width: 38px !important;
        height: 38px !important;
    }
}

/* Extra-narrow screens (<= 440px) */
@media (max-width: 440px) {
    .header-inner {
        min-height: 56px !important;
        padding: 8px 12px !important;
        gap: 6px !important;
    }

    .cta-text-full {
        display: none !important;
    }

    .cta-text-short {
        display: inline !important;
    }

    .logo-name {
        font-size: 17px !important;
    }

    .logo-sub {
        font-size: 8px !important;
        letter-spacing: 0.6px !important;
        max-width: 135px !important;
    }

    .header-cta {
        padding: 7px 11px !important;
        font-size: 12px !important;
    }

    .mobile-menu-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .mobile-menu-btn .hamburger-line {
        width: 18px !important;
    }
}

@media (max-width: 330px) {
    .logo-name {
        font-size: 15px !important;
    }

    .logo-icon {
        width: 24px !important;
        height: 24px !important;
    }

    .header-cta {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .mobile-menu-btn {
        width: 34px !important;
        height: 34px !important;
    }
}

/* 4. Backdrop Overlay */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* 5. Mobile Drawer */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    background: #ffffff;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-drawer.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

/* Drawer Header */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.drawer-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Drawer Navigation Links */
.drawer-nav-list {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    gap: 4px;
    flex: 1;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #1e293b;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.drawer-nav-item svg {
    color: #278b7d;
    flex-shrink: 0;
}

.drawer-nav-item:hover,
.drawer-nav-item.active {
    background: #f0fdf4;
    color: #16655a;
}

.drawer-nav-item.active svg {
    color: #16655a;
}

.drawer-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 10px 14px;
}

.drawer-sublink {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    padding: 8px 14px;
}

.drawer-sublink:hover {
    color: #0f172a;
}

/* Drawer Footer */
.drawer-footer {
    padding: 18px 20px 24px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    background: linear-gradient(135deg, #278b7d 0%, #1e6d62 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(39, 139, 125, 0.3);
    transition: all 0.2s ease;
}

.drawer-cta-btn:hover {
    background: linear-gradient(135deg, #1e6d62 0%, #165348 100%);
}

.drawer-footer-note {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.drawer-footer-note .live-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
}


/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 850px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px 22px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid #334155;
    z-index: 10050 !important;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-sizing: border-box;
}

.cookie-text {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e1;
}

.cookie-text a {
    color: #38bdf8;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background: #2563eb;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-cookie-accept:hover {
    background: #1d4ed8;
}

.btn-cookie-essential {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #475569;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cookie-essential:hover {
    background: #1e293b;
    color: white;
}

@media (max-width: 1080px) {
    body.has-cookie-banner {
        padding-bottom: var(--cookie-banner-offset, 140px);
    }

    body.has-cookie-banner .floating-chat-btn {
        bottom: var(--cookie-banner-offset, 150px) !important;
    }

    body.has-cookie-banner .floating-chat-panel {
        bottom: calc(var(--cookie-banner-offset, 150px) + 72px) !important;
        max-height: calc(100dvh - var(--cookie-banner-offset, 150px) - 88px) !important;
    }
}

@media (max-width: 900px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
        bottom: 12px;
        width: calc(100% - 24px);
    }

    .cookie-text {
        font-size: 12px;
        line-height: 1.45;
    }

    .cookie-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    .cookie-actions .btn-cookie-essential,
    .cookie-actions .btn-cookie-accept {
        flex: 1 1 0;
        text-align: center;
        padding: 10px 12px;
        font-size: 12.5px;
    }
}

@media (max-width: 360px) {
    .cookie-actions {
        flex-direction: column;
        gap: 8px;
    }
}
