/* elite-theme.css */
* { box-sizing: border-box; }
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,600;0,700;1,400;1,700&display=swap');

:root {
    --bg-deep-slate: #0F172A;
    --bg-slate-800: #1E293B;
    --bg-slate-900: #0B1120;
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --accent-gold: #D4AF37;
    --accent-gold-hover: #C5A028;
    --accent-cyan: #06B6D4;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep-slate);
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-gold-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* Glassmorphism Header */
.elite-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Breadcrumbs */
.elite-breadcrumbs {
    padding: 0.4rem 5% 0.8rem 5%;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    position: relative;
}

.elite-breadcrumbs a {
    color: var(--accent-gold);
    opacity: 0.8;
    text-decoration: none;
}

.elite-breadcrumbs a:hover {
    opacity: 1;
}

.elite-breadcrumbs .separator {
    color: var(--text-secondary);
    opacity: 0.3;
}

.elite-breadcrumbs span.active {
    opacity: 0.5;
    pointer-events: none;
}

.elite-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.elite-logo:hover {
    color: var(--text-primary);
    opacity: 0.9;
}

.elite-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.elite-nav a {
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.elite-nav a:hover {
    color: var(--accent-gold);
}

/* Buttons */
.elite-btn {
    background: linear-gradient(135deg, #E5C354, #D4AF37);
    color: #000 !important;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.elite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.elite-btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
}

.elite-btn-outline {
    background: transparent;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.elite-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

/* Layout utilities */
.container,
.elite-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.section {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

/* Hero Section */
.elite-hero {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: 3.2rem 5%;
    position: relative;
    overflow: hidden;
}

.elite-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.elite-hero-content {
    flex: 1;
    z-index: 1;
    padding-right: 2rem;
}

.elite-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.elite-hero-badge .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    margin-right: 0.5rem;
    box-shadow: 0 0 10px #22c55e;
}

.elite-hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.elite-hero h1 span.gold {
    color: var(--accent-gold);
    font-style: italic;
    font-weight: 300;
}

.elite-hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.elite-hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.elite-hero-image {
    flex: 1;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.elite-hero-image img,
.elite-hero-image iframe,
.elite-hero-image video {
    max-width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

/* Trust Bar */
.elite-trust-bar {
    background: var(--bg-slate-900);
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.elite-trust-bar h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.elite-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.elite-logos img {
    height: 35px;
    filter: grayscale(100%) opacity(0.5); /* Refined for better visibility */
    transition: all 0.3s ease;
}

.elite-logos img:hover {
    filter: grayscale(0%) brightness(100%) opacity(1);
}

/* Feature/Content Sections */
.elite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.elite-grid-3-col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 991px) {
    .elite-grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .elite-grid-3-col {
        grid-template-columns: 1fr;
    }
    .elite-grid {
        gap: 1.5rem;
    }
}

.elite-section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.elite-section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.elite-section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.elite-card {
    background: var(--bg-slate-800);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(212, 175, 55, 0.15); /* Pronounced base border */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* stretch to row height so all buttons baseline at the same y */
    align-self: stretch;
}

/* Card CTA Button — always bottom-aligned, compact and uniform */
.elite-card-btn {
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.elite-card:hover {
    background: rgba(212, 175, 55, 0.12) !important;
    border-color: var(--accent-gold) !important;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.4) !important;
}

.elite-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Premium Glow & Featured Utilities */
.elite-card-glow {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s ease;
}

.elite-card-glow:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(6, 182, 212, 0.15) !important;
    border-color: rgba(6, 182, 212, 0.25) !important;
}

.elite-card-featured {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.12), inset 0 0 15px rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    position: relative;
}

.elite-card-featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.08);
    pointer-events: none;
}

.elite-card-featured:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.2) !important;
    border-color: rgba(212, 175, 55, 0.5) !important;
}

.elite-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.elite-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Testimonial Card */
.elite-testimonial {
    background: linear-gradient(180deg, var(--bg-slate-800) 0%, rgba(30, 41, 59, 0.5) 100%);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.elite-testimonial-stars {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.elite-testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    flex-grow: 1;
}

.elite-testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.elite-testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.elite-testimonial-author h4 {
    margin: 0;
    font-size: 1rem;
}

.elite-testimonial-author p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* CTA Section */
.elite-cta-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(15, 23, 42, 0) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6rem 0;
    text-align: center;
    position: relative;
}

.elite-cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.elite-footer {
    background: var(--bg-slate-900);
    padding: 5rem 5% 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.elite-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.elite-footer-brand p {
    margin-top: 1.5rem;
    max-width: 300px;
}

.elite-footer h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.elite-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.elite-footer li {
    margin-bottom: 0.75rem;
}

.elite-footer a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.elite-footer a:hover {
    color: var(--text-primary);
}

.elite-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.elite-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.elite-input:focus {
    border-color: var(--accent-gold);
}

.elite-footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: rgba(203, 213, 225, 0.6);
}

/* Responsive */
@media (max-width: 992px) {
    .elite-hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
    }

    .elite-hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }

    .elite-hero-actions {
        justify-content: center;
    }

    .elite-hero h1 {
        font-size: 3rem;
    }

    .elite-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .elite-nav {
        display: none;
        /* In a real scenario, implement a hamburger menu */
    }

    .elite-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Connect Modal Styles */
.connect-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.connect-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.connect-modal {
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.connect-modal-overlay.active .connect-modal {
    transform: translateY(0);
}

.connect-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.connect-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 700;
}

.connect-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.connect-close-btn:hover {
    color: var(--text-primary);
}

.connect-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.connect-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
    border: 1px solid transparent;
}

.connect-item.telegram { background: #0b1a24; border-color: rgba(0, 136, 204, 0.1); }
.connect-item.whatsapp { background: #0a1c11; border-color: rgba(37, 211, 102, 0.1); }
.connect-item.tiktok { background: #1a1a1a; border-color: rgba(255, 255, 255, 0.05); }
.connect-item.email { background: #0c1a24; border-color: rgba(6, 182, 212, 0.1); }

.connect-item:hover {
    transform: translateY(-2px);
}

.connect-item.telegram:hover { background: #0e202d; border-color: rgba(0, 136, 204, 0.3); }
.connect-item.whatsapp:hover { background: #0c2415; border-color: rgba(37, 211, 102, 0.3); }
.connect-item.tiktok:hover { background: #222; border-color: rgba(255, 255, 255, 0.15); }
.connect-item.email:hover { background: #0e202d; border-color: rgba(6, 182, 212, 0.3); }

.connect-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    margin-right: 1.2rem;
}

.connect-item.telegram .connect-icon { background: rgba(0, 136, 204, 0.15); color: #0088cc; }
.connect-item.whatsapp .connect-icon { background: rgba(37, 211, 102, 0.15); color: #25D366; }
.connect-item.tiktok .connect-icon { background: rgba(255, 255, 255, 0.05); color: #FFFFFF; }
.connect-item.email .connect-icon { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.connect-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.connect-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.connect-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.connect-external {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.connect-item:hover .connect-external {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 480px) {
    .connect-modal {
        padding: 1.5rem;
    }
}

/* Infinite Ticker Animation */
.elite-ticker-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.elite-ticker-track {
    display: flex;
    flex-direction: row !important;
    white-space: nowrap;
    width: max-content;
    animation: elite-ticker-scroll 60s linear infinite;
}

.elite-ticker-item {
    display: flex;
    align-items: center;
    padding-right: 4rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

@keyframes elite-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================
   MOBILE NAVIGATION
   ========================= */

/* Hamburger toggle button — hidden on desktop */
.elite-mobile-toggle {
    display: none;
    background: transparent;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.65rem;
    z-index: 1001;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.elite-mobile-toggle:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    /* Show the hamburger button */
    .elite-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Header layout adjustment */
    .elite-header {
        padding: 0.75rem 1.25rem;
        position: relative; /* needed for absolute nav dropdown */
    }

    /* Hide nav links by default on mobile */
    .elite-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 17, 32, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1.5rem 2rem;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    /* Reveal nav when menu is active */
    .elite-nav.mobile-active {
        display: flex;
    }

    /* Stack nav links vertically */
    .elite-nav a {
        font-size: 1rem;
        padding: 0.25rem 0;
        text-align: center;
    }

    /* Keep CTA button visible */
    .elite-btn {
        width: 100%;
        text-align: center;
    }

    /* Logo text size on mobile */
    .elite-logo {
        font-size: 1rem;
    }

    /* General content padding for mobile */
    .elite-section {
        padding: 3rem 1.25rem;
    }

    .elite-container {
        padding: 0 1.25rem;
    }

    .elite-grid {
        grid-template-columns: 1fr;
    }

    /* Fix hero headings on mobile */
    .elite-hero h1 {
        font-size: 2rem;
    }
}

/* =========================
   MOBILE: OVERFLOW & LAYOUT FIXES
   ========================= */
@media (max-width: 768px) {
    /* Prevent horizontal scrollbar globally */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    section, .elite-section, .elite-hero, main, .elite-main, footer, .elite-footer {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Fix card overstretching */
    .elite-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    /* Fix broken/oversized images */
    img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    /* Fix trust bar logos on mobile */
    .elite-logos img, .elite-trust-bar img {
        max-height: 36px;
        width: auto;
    }

    /* Stack hero layout vertically on mobile */
    .elite-hero {
        flex-direction: column !important;
        padding: 2rem 1.25rem !important;
        min-height: unset !important;
    }

    .elite-hero-content {
        max-width: 100%;
    }

    /* Hide large hero images that cause overflow */
    .elite-hero-image img {
        max-width: 100%;
        border-radius: 12px;
    }

    /* Ensure all grid containers collapse to single col */
    .elite-grid,
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Prevent wide fixed-width elements from overflowing */
    table, iframe {
        max-width: 100%;
    }
}

/* =========================
   MOBILE MODAL FIX (Bottom Sheet Style)
   ========================= */
@media (max-width: 768px) {
    /* Overlay: push modal to bottom of screen */
    .connect-modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    /* Modal: take at most 85% screen height, never full */
    .connect-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 85vh !important;
        overflow-y: auto;
        border-radius: 20px 20px 0 0 !important; /* Bottom sheet style */
        padding: 1.5rem !important;
        margin: 0 !important;
    }

    .connect-modal h2 {
        font-size: 1.15rem;
    }

    .connect-item {
        padding: 0.85rem 1rem;
    }

    .connect-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        flex-shrink: 0;
    }
}

/* =========================
   NUCLEAR MOBILE OVERRIDES FOR LEGACY PAGES
   ========================= */
@media (max-width: 768px) {
    /* 1. Prevent Horizontal Flow in Layout Containers */
    /* Target legacy inline flex containers */
    .container[style*="display: flex"], 
    section[style*="display: flex"], 
    .elite-hero[style*="display: flex"],
    div[style*="display: flex"]:not(.elite-header):not(.elite-nav):not(.elite-breadcrumbs):not(.connect-modal-header) {
        flex-direction: column !important;
        gap: 2rem !important;
        flex-wrap: wrap !important;
    }
    
    /* Ensure Header always horizontal */
    .elite-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0.75rem 1.25rem !important;
        box-sizing: border-box !important;
    }

    /* 2. Global Typography Scaling */
    h1[style*="font-size"], 
    h2[style*="font-size"],
    h1, h2, h3, h4 {
        font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }

    /* 3. Global Padding/Margin Resets (Scale down massive desktop gaps) */
    [style*="padding-top: 6rem"], 
    [style*="padding-top: 80px"] {
        padding-top: 3rem !important;
    }
    
    [style*="margin-bottom: 6rem"],
    [style*="margin-bottom: 4rem"] {
        margin-bottom: 2.5rem !important;
    }
    
    /* Ensure padding so edges don't bleed */
    section, .section, .container, main, .elite-main {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* 4. Aggressive Image & Iframe constraints */
    img, iframe, video {
        max-width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Explicit iframe ratio container fix for iframe videos */
    div[style*="padding-bottom: 56.25%"] {
        height: auto !important;
        padding-bottom: 56.25% !important; 
        max-width: 100% !important;
    }

    /* 5. Fix Elite Grid forcing 1 col */
    .elite-grid,
    .elite-grid[style*="grid-template-columns"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    
    .elite-card {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* =========================
   FURTHER MOBILE POLISH (MODAL & COURSES GRID)
   ========================= */
@media (max-width: 768px) {
    /* Absolute guard against horizontal bleed */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    /* Ensure containers are boxed */
    .elite-container, .container, .elite-section, section {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box !important;
    }

    /* Force grids to single-column flex to guarantee no grid blowout */
    .elite-grid, .elite-grid-3-col, .elite-grid-2-col, [class*="elite-grid"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 2.5rem !important;
        padding: 0 !important;
    }

    .elite-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Guarantee internal elements of cards don't break the flex width */
    .elite-card > * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================
   ABSOLUTE FINAL MOBILE POLISH (MODAL & CARDS)
   ========================= */
@media (max-width: 768px) {
    /* Floating, non-boxy bottom-sheet modal */
    #connectModalOverlay.connect-modal-overlay {
        padding: 1rem !important;
        align-items: flex-end !important;     
    }
    #connectModalOverlay .connect-modal {
        margin: 0 auto 1.5rem auto !important;
        width: 100% !important;
        max-width: calc(100vw - 2rem) !important; /* Enforces 1rem margin safely */
        border-radius: 20px !important;
        box-sizing: border-box !important;
        max-height: 80vh !important;
        padding: 1.75rem !important;
    }

    /* Fix Courses Grid Cards Bleeding / Chopping Text */
    .elite-card, .elite-card-featured {
        transform: scale(1) !important; /* Stop featured card from scaling wider than screen */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Crush the massive inline 2.5rem paddings forcing text out */
    .elite-card > div[style*="padding"] {
        padding: 1.5rem !important; 
        box-sizing: border-box !important;
        width: 100% !important;
        overflow: hidden !important; 
    }
    
    /* Force text wrapping to prevent cutoff */
    .elite-card h3, .elite-card h2, .elite-card p, .elite-card span {
        white-space: normal !important; /* Fixes 'The 15-Minute Action Plan' cutoff */
        word-wrap: break-word !important; 
        overflow-wrap: break-word !important;
        width: 100% !important;
    }
}

/* =========================
   MOBILE BANNER ALIGNMENT HOTFIX
   ========================= */
@media (max-width: 768px) {
    /* Restore the original width and behavior for course tags */
    /* This overrides the global width: 100% applied to spans previously */
    .elite-card .course-tag {
        width: auto !important;
        max-width: max-content !important;
        white-space: nowrap !important;
        right: 1rem !important;
        left: auto !important;
        text-align: center !important;
    }
}

/* =========================
   TRUST BAR LOGO POLISH
   ========================= */
.elite-logos img {
    background: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 12px !important;
    height: 60px !important;
    width: 140px !important;
    object-fit: contain !important;
    filter: grayscale(100%) opacity(0.8) !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.elite-logos img:hover {
    filter: grayscale(0%) opacity(1) !important;
    transform: translateY(-2px) !important;
}

@media (max-width: 768px) {
    .elite-logos {
        gap: 1.25rem !important;
        padding: 0 1rem !important;
    }
    .elite-logos img {
        width: 120px !important;
        height: 55px !important;
        padding: 0.4rem 0.8rem !important;
    }
    .elite-trust-bar h4 {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
        padding: 0 1rem !important;
        margin-bottom: 1.5rem !important;
    }
}

/* =========================
   TESTIMONIAL MOBILE TYPOGRAPHY POLISH
   ========================= */
@media (max-width: 768px) {
    .elite-testimonial {
        padding: 1.5rem !important; /* Scale down padding slightly for mobile */
    }
    
    .elite-testimonial-text {
        font-size: 0.95rem !important; /* Scale down the main review text */
        line-height: 1.6 !important;
        margin-bottom: 1.25rem !important;
    }
    
    .elite-testimonial-author h4 {
        font-size: 1.1rem !important; /* Down from typical 1.3rem+ */
        margin-bottom: 0.15rem !important;
    }
    
    .elite-testimonial-author span {
        font-size: 0.75rem !important; /* Scale down "Client" subtext */
    }
}

/* =========================
   GLOBAL ELITE CARD TYPOGRAPHY MOBILE FIX
   ========================= */
@media (max-width: 768px) {
    /* Scale down titles inside all cards site-wide */
    .elite-card h1,
    .elite-card h2,
    .elite-card h3,
    .elite-card h4 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
        letter-spacing: -0.3px !important;
    }
    
    /* Scale down all text inside cards site-wide */
    .elite-card p, 
    .elite-card li,
    .elite-card-text {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.25rem !important;
    }
    
    /* Scale down card icons slightly */
    .elite-card-icon {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Adjust uniform list gap in cards */
    .elite-card ul {
        gap: 0.75rem !important;
    }
}

/* =========================
   COMPREHENSIVE TYPOGRAPHY & BUTTON SWEEP (MOBILE)
   ========================= */
@media (max-width: 768px) {
    /* Retain massive sizes ONLY for true Hero headers */
    .elite-hero h1, 
    .elite-page-header h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }
    
    /* Force sensible, elegant max-sizes on all other generic headers site-wide */
    /* This overrides the previous global h1,h2,h3,h4 nuclear rule */
    h2, h2[style*="font-size"] { font-size: 1.6rem !important; line-height: 1.3 !important; }
    h3, h3[style*="font-size"] { font-size: 1.3rem !important; line-height: 1.4 !important; }
    h4, h4[style*="font-size"] { font-size: 1.1rem !important; line-height: 1.5 !important; }
    
    /* Scale down large standalone CTA text */
    .elite-container h2 { margin-bottom: 1rem !important; }
    .elite-container p { font-size: 0.95rem !important; line-height: 1.6 !important; margin-bottom: 1.5rem !important; }
    
    /* Globally refine all Elite buttons for smaller phone thumbs without bloating */
    .elite-btn {
        font-size: 0.9rem !important;
        padding: 0.75rem 1.5rem !important;
        letter-spacing: 0.5px !important;
    }
}

/* =========================
   COMPREHENSIVE FOOTER TYPOGRAPHY SWEEP (MOBILE)
   ========================= */
@media (max-width: 768px) {
    /* Prevent generic h2/h3 global rules from bloating the footer */
    .elite-footer h2 {
        font-size: 1.35rem !important;
        margin-bottom: 1rem !important;
    }
    
    .elite-footer h3 {
        font-size: 1.15rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Scale down footer text and links for better thumb-scrolling UX */
    .elite-footer p, 
    .elite-footer a, 
    .elite-footer li {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
    
    /* Adjust footer grid gaps so it's compact */
    .elite-footer-grid {
        gap: 2rem !important;
    }
}

/* =========================
   ULTIMATE MOBILE SHRINK: NAV, BUTTONS, & WIDGETS
   ========================= */
@media (max-width: 768px) {
    /* 1. HAMBURGER MENU CSS OVERRIDES */
    .mobile-nav-link {
        font-size: 0.95rem !important; /* Scale down generic nav links */
        padding: 0.75rem !important;
    }
    .mobile-nav-menu .elite-btn {
        font-size: 0.85rem !important; /* Scale down get in touch button */
        padding: 0.6rem 1.2rem !important;
    }
    .mobile-nav-header h3, .mobile-nav-header span {
        font-size: 0.95rem !important;
    }
    
    /* 2. UNIVERSAL BUTTON CRASH */
    a.elite-btn, button.elite-btn, .elite-btn-outline, .elite-card-btn {
        font-size: 0.85rem !important;
        padding: 0.65rem 1.25rem !important;
        letter-spacing: 0.5px !important;
    }
    
    /* 3. HERO SIDE-BY-SIDE BUTTON FIX */
    /* If buttons are stacked in a flex container within the hero, force column wrap on mobile */
    .elite-hero [style*="display: flex"],
    .elite-hero [style*="display:flex"],
    .elite-page-header [style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.85rem !important;
        align-items: center !important;
        width: 100% !important;
    }
    .elite-hero .elite-btn, .elite-page-header .elite-btn {
        width: 100% !important;
        max-width: 280px !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* 4. CHAT WIDGET DYNAMIC SCALING */
    /* Target Tidio or generic chat iframes */
    #tidio-chat-iframe, iframe[id*="tidio"] {
        transform: scale(0.75) !important;
        transform-origin: bottom right !important;
        margin-bottom: -10px !important; /* offset scale reduction gap */
        margin-right: -10px !important;
    }
    
    /* 5. LEFTOVER HEADERS / AUTHOR TITLES */
    h3, h4, .elite-profile h3, .elite-profile h4 {
        margin-bottom: 0.5rem !important;
    }
}

/* =========================
   ABSOLUTE BULLETPROOF BUTTON CONTAINER STACKING (ALL PAGES)
   ========================= */
@media (max-width: 768px) {
    /* Explicitly target hero action containers everywhere */
    .elite-hero-actions, 
    .hero-actions, 
    .elite-hero [style*="display: flex"],
    .elite-page-header [style*="display: flex"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.85rem !important;
        width: 100% !important;
    }
    
    .elite-hero-actions a.elite-btn,
    .hero-actions a.elite-btn {
        width: 100% !important;
        max-width: 280px !important;
        display: block !important;
        margin: 0 auto !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure no residual generic sizes escape inside modal or nav */
    .elite-nav-link, .modal-link, .connect-modal-link {
        font-size: 0.95rem !important;
    }
}

/* =========================
   ABSOLUTE IMAGE UNCROP FIX (COURSES PAGE)
   ========================= */
@media (max-width: 768px) {
    /* Override inline heights that slice images containing text */
    .elite-card .course-header,
    div[style*="height: 160px; overflow: hidden"] {
        height: auto !important;
        min-height: 100px !important;
    }
    
    .elite-card .course-header img,
    div[style*="height: 160px"] img {
        height: auto !important;
        object-fit: contain !important;
        object-position: center top !important;
        width: 100% !important;
    }
}

/* =========================
   PRECISE 200PX IMAGE UNCROP FIX (COURSES)
   ========================= */
@media (max-width: 768px) {
    /* The course cards use exactly height: 200px inline styles */
    .elite-card > div[style*="height: 200px"],
    .elite-card > div[style*="overflow: hidden"] {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* Release the image height from 100% (200px) to auto aspect ratio */
    .elite-card > div img {
        height: auto !important;
        object-fit: contain !important;
        object-position: center top !important;
        width: 100% !important;
    }
}
