/* =============================================
   FAMILY LEGACY - LUXURY MINIMALIST DESIGN SYSTEM
   ============================================= */

/* ---------------------------------------------
   1. CSS VARIABLES & DESIGN TOKENS
   --------------------------------------------- */
:root {
    /* Luxurious Black & White Palette */
    --pure-black: #000000;
    --rich-black: #0A0A0A;
    --charcoal: #1A1A1A;
    --dark-gray: #2A2A2A;
    --medium-gray: #666666;
    --light-gray: #E5E5E5;
    --off-white: #F8F8F8;
    --pure-white: #FFFFFF;

    /* Accent Colors - Subtle Gold/Amber */
    --accent-gold: #D4A574;
    --accent-gold-light: #E6C9A8;
    --accent-gold-dark: #B8935F;
    --success-green: #4CAF50;
    --warning-amber: #FFA726;
    --danger-red: #EF5350;

    /* Typography Scale */
    --font-hero: clamp(2.5rem, 5vw, 4.5rem);
    --font-h1: clamp(2rem, 4vw, 3.5rem);
    --font-h2: clamp(1.75rem, 3vw, 2.5rem);
    --font-h3: clamp(1.5rem, 2.5vw, 2rem);
    --font-h4: clamp(1.25rem, 2vw, 1.5rem);
    --font-body: 1.125rem;
    --font-small: 0.95rem;

    /* Spacing - Golden Ratio */
    --space-xs: 0.5rem;
    --space-s: 0.8rem;
    --space-m: 1.3rem;
    --space-l: 2.1rem;
    --space-xl: 3.4rem;
    --space-2xl: 5.5rem;
    --space-3xl: 8.9rem;

    /* Animation */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------------------------------------------
   2. RESET & BASE STYLES
   --------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal overflow on mobile */
img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--pure-white);
    color: var(--rich-black);
    line-height: 1.6;
    font-weight: 300;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ---------------------------------------------
   3. TYPOGRAPHY
   --------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 200;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: var(--space-m);
}

h1 {
    font-size: var(--font-h1);
}

h2 {
    font-size: var(--font-h2);
}

h3 {
    font-size: var(--font-h3);
}

h4 {
    font-size: var(--font-h4);
}

p {
    margin-bottom: var(--space-m);
    font-size: var(--font-body);
    font-weight: 300;
}

strong {
    font-weight: 500;
}

/* ---------------------------------------------
   4. LAYOUT CONTAINERS
   --------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-l);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-l);
}

/* ---------------------------------------------
   5. NAVIGATION
   --------------------------------------------- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--light-gray);
    z-index: 1000;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: var(--space-m) var(--space-l);
    max-width: 1400px;
    margin: 0 auto;
    gap: var(--space-l);
    position: relative;
    z-index: 1001;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.nav-container>* {
    min-width: 0;
    max-width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 200;
    letter-spacing: 0.05em;
    color: var(--rich-black);
    cursor: pointer;
    z-index: 10;
    position: relative;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo span {
    color: var(--accent-gold);
}

.logo img {
    animation: fadeIn 1s ease-out;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
    justify-content: center;
    align-items: center;
}

.nav-links a {
    color: var(--charcoal);
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 0.02em;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Active navigation link */
.nav-links a.active {
    color: var(--accent-gold);
}

.nav-links a.active::after {
    width: 100%;
}

/* Hide mobile CTA on desktop - only show desktop CTA */
.nav-links .mobile-cta {
    display: none;
}

/* Desktop CTA button styling */
.desktop-cta {
    display: inline-block;
    white-space: nowrap;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--rich-black);
    margin: 3px 0;
    transition: var(--transition-smooth);
}

/* ---------------------------------------------
   6. SECTIONS
   --------------------------------------------- */
section {
    padding: var(--space-3xl) 0;
    position: relative;
}

section:nth-child(odd) {
    background: var(--pure-white);
}

section:nth-child(even) {
    background: var(--off-white);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-label {
    font-size: var(--font-small);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    margin-bottom: var(--space-m);
}

.section-title {
    font-size: var(--font-h2);
    font-weight: 200;
    margin-bottom: var(--space-l);
}

.section-subtitle {
    font-size: var(--font-body);
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------------------------------------------
   7. HERO SECTION
   --------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--pure-white) 0%, var(--off-white) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
    opacity: 0.03;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--font-hero);
    font-weight: 100;
    margin-bottom: var(--space-l);
    letter-spacing: -0.03em;
    animation: fadeInUp 1s ease-out;
}

.hero-title .accent {
    color: var(--accent-gold);
    font-weight: 300;
}

.hero-subtitle {
    font-size: var(--font-h4);
    font-weight: 200;
    color: var(--medium-gray);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.stat-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--light-gray);
    padding: var(--space-l);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-gold);
}

.stat-number {
    font-size: var(--font-h2);
    font-weight: 200;
    color: var(--accent-gold);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: var(--font-small);
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---------------------------------------------
   8. CARDS & COMPONENTS
   --------------------------------------------- */
.card {
    background: var(--pure-white);
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    padding: var(--space-xl);
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-l);
    color: var(--accent-gold);
}

.card-title {
    font-size: var(--font-h4);
    margin-bottom: var(--space-m);
    font-weight: 300;
}

.card-description {
    color: var(--medium-gray);
    line-height: 1.8;
}

/* Interactive Cards */
.interactive-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.interactive-card:hover::before {
    width: 600px;
    height: 600px;
}

/* ---------------------------------------------
   9. GRID LAYOUTS
   --------------------------------------------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.grid-2>div {
    display: flex;
    flex-direction: column;
}

.grid-2-centered {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.grid-2-centered>div {
    display: flex;
    flex-direction: column;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-l);
}

/* ---------------------------------------------
   10. BUTTONS
   --------------------------------------------- */
.btn {
    display: inline-block;
    padding: var(--space-m) var(--space-xl);
    font-size: var(--font-body);
    font-weight: 300;
    text-decoration: none;
    border: 1px solid var(--charcoal);
    border-radius: 2px;
    transition: var(--transition-smooth);
    cursor: pointer;
    letter-spacing: 0.05em;
    background: transparent;
    white-space: nowrap;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background: var(--rich-black);
    color: var(--pure-white);
    border-color: var(--rich-black);
}

.btn-primary:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

.btn-outline {
    color: var(--rich-black);
    border-color: var(--rich-black);
}

.btn-outline:hover {
    background: var(--rich-black);
    color: var(--pure-white);
}

.btn-gold {
    background: var(--accent-gold);
    color: var(--rich-black);
    border-color: var(--accent-gold);
}

.btn-gold:hover {
    background: var(--accent-gold-dark);
    border-color: var(--accent-gold-dark);
}

/* ---------------------------------------------
   11. TIMELINE
   --------------------------------------------- */
.timeline {
    position: relative;
    padding: var(--space-xl) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--light-gray);
}

.timeline-item {
    display: flex;
    margin-bottom: var(--space-2xl);
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-content {
    flex: 1;
    padding: var(--space-l);
    background: var(--pure-white);
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    margin: 0 var(--space-xl);
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: var(--space-xl);
    width: 16px;
    height: 16px;
    background: var(--accent-gold);
    border: 3px solid var(--pure-white);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-date {
    font-size: var(--font-small);
    color: var(--medium-gray);
    margin-bottom: var(--space-s);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.timeline-link {
    color: var(--rich-black);
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    display: inline-block;
}

.timeline-link:hover {
    color: var(--accent-gold);
}

.timeline-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: var(--transition-smooth);
}

.timeline-link:hover::after {
    width: 100%;
}

/* Gold glow effect for timeline links */
.timeline-link.in-view {
    animation: goldGlowPulse 3s ease-in-out infinite;
}

@keyframes goldGlowPulse {
    0%, 100% {
        text-shadow: 0 0 5px rgba(212, 165, 116, 0.3),
                     0 0 10px rgba(212, 165, 116, 0.2),
                     0 0 15px rgba(212, 165, 116, 0.1);
        color: var(--rich-black);
    }
    50% {
        text-shadow: 0 0 10px rgba(212, 165, 116, 0.6),
                     0 0 20px rgba(212, 165, 116, 0.4),
                     0 0 30px rgba(212, 165, 116, 0.3),
                     0 0 40px rgba(212, 165, 116, 0.2);
        color: var(--accent-gold);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .timeline-link.in-view {
        animation: none;
        /* Still show a subtle static glow for accessibility */
        text-shadow: 0 0 8px rgba(212, 165, 116, 0.4);
        color: var(--accent-gold);
    }
}

/* Next Steps Cards */
.next-step-card {
    transition: var(--transition-smooth);
    border-radius: 4px;
    padding: 1rem;
}

.next-step-card:hover {
    transform: translateY(-5px);
}

.next-step-card:hover h4 {
    color: var(--accent-gold);
}

.next-step-card:hover p {
    color: var(--pure-white);
}

/* ---------------------------------------------
   12. RISK MANAGEMENT
   --------------------------------------------- */
.risk-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-l);
    margin: var(--space-xl) 0;
}

.risk-item {
    background: var(--pure-white);
    border-left: 4px solid var(--light-gray);
    padding: var(--space-l);
    transition: var(--transition-smooth);
}

.risk-item.low {
    border-left-color: var(--success-green);
}

.risk-item.medium {
    border-left-color: var(--warning-amber);
}

.risk-item.high {
    border-left-color: var(--danger-red);
}

.risk-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.risk-label {
    font-size: var(--font-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-s);
    opacity: 0.6;
}

.risk-title {
    font-size: var(--font-h4);
    margin-bottom: var(--space-m);
    font-weight: 400;
}

.risk-mitigation {
    color: var(--medium-gray);
    line-height: 1.8;
}

/* ---------------------------------------------
   13. FAQ SECTION
   --------------------------------------------- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--light-gray);
    padding: var(--space-l) 0;
}

.faq-question {
    font-size: var(--font-h4);
    font-weight: 300;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.faq-question:hover {
    color: var(--accent-gold);
}

.faq-question::after {
    content: '+';
    font-size: var(--font-h3);
    font-weight: 200;
    transition: var(--transition-smooth);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    padding-top: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: var(--space-l);
}

.faq-answer p {
    color: var(--medium-gray);
    line-height: 1.8;
}

/* ---------------------------------------------
   14. TRUST INDICATORS
   --------------------------------------------- */
.trust-indicators {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
    margin: var(--space-2xl) 0;
}

.trust-item {
    text-align: center;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.trust-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

.trust-logo {
    height: 40px;
    margin-bottom: var(--space-s);
}

.trust-text {
    font-size: var(--font-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--medium-gray);
}

/* ---------------------------------------------
   15. COMPARISON TABLE
   --------------------------------------------- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
}

.comparison-table thead {
    background: var(--rich-black);
    color: var(--pure-white);
}

.comparison-table th {
    padding: var(--space-l);
    text-align: left;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition-smooth);
}

.comparison-table tbody tr:hover {
    background: var(--off-white);
}

.comparison-table td {
    padding: var(--space-l);
    font-weight: 300;
}

.comparison-table .highlight {
    background: var(--accent-gold);
    color: var(--rich-black);
    font-weight: 400;
}

/* ---------------------------------------------
   16. FOOTER
   --------------------------------------------- */
footer {
    background: var(--rich-black);
    color: var(--pure-white);
    padding: var(--space-2xl) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-brand h3 {
    font-weight: 200;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.footer-brand p {
    color: var(--medium-gray);
    font-weight: 300;
    line-height: 1.8;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.footer-brand img {
    animation: fadeIn 1s ease-out;
}

.footer-links h4 {
    font-weight: 400;
    margin-bottom: var(--space-l);
    color: var(--accent-gold);
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 300;
    line-height: 2;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--accent-gold);
    transform: translateX(5px);
    display: inline-block;
}

/* Email links - white color */
a[href^="mailto:"] {
    color: var(--pure-white) !important;
}

.footer-bottom {
    border-top: 1px solid var(--dark-gray);
    padding-top: var(--space-l);
    text-align: center;
    color: var(--medium-gray);
    font-size: var(--font-small);
}

/* ---------------------------------------------
   17. ANIMATIONS
   --------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--light-gray);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin 1s ease-in-out infinite;
}

/* ---------------------------------------------
   18. UTILITY CLASSES
   --------------------------------------------- */
.accent-line {
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: var(--space-l) auto;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(212, 165, 116, 0.05) 100%);
    border-left: 3px solid var(--accent-gold);
    padding: var(--space-l);
    margin: var(--space-xl) 0;
    border-radius: 2px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--light-gray);
    z-index: 1001;
}

.scroll-progress {
    height: 100%;
    background: var(--accent-gold);
    width: 0;
    transition: width 0.3s;
}

/* Counter */
.counter {
    font-size: var(--font-h2);
    font-weight: 200;
    color: var(--accent-gold);
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--rich-black);
    color: var(--pure-white);
    text-align: center;
    border-radius: 4px;
    padding: var(--space-s);
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: var(--font-small);
    font-weight: 300;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ---------------------------------------------
   19. ACCESSIBILITY IMPROVEMENTS
   --------------------------------------------- */
/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-gold);
    color: var(--rich-black);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles for accessibility */
/* Remove outline from regular links */
a:focus {
    outline: none;
}

/* Keep outline for square/rectangular interactive elements */
button:focus,
.btn:focus,
.btn-primary:focus,
.btn-outline:focus,
.btn-gold:focus,
.next-step-card:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Skip link always needs focus for accessibility */
.skip-link:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
}

.table-responsive table {
    min-width: 600px;
    width: 100%;
    margin: 0;
}

/* Wrap all comparison tables in responsive container */
.comparison-table {
    width: 100%;
    max-width: 100%;
    display: table;
}

@media (max-width: 768px) {

    /* Make comparison tables scrollable on mobile */
    .comparison-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table tr {
        display: table;
        width: 100%;
        min-width: 600px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.6rem 0.4rem;
        white-space: normal;
        word-wrap: break-word;
    }

    .table-responsive::after {
        content: '← Scroll for more →';
        display: block;
        text-align: center;
        color: var(--medium-gray);
        font-size: 0.8rem;
        padding: 0.5rem;
        background: var(--off-white);
    }
}

/* YouTube Facade Styles (for lazy loading) */
.youtube-facade {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    cursor: pointer;
    border-radius: 8px;
    background: #000;
}

.youtube-facade-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-facade-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.youtube-facade:hover .youtube-facade-thumbnail img {
    opacity: 0.8;
}

.youtube-facade-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.youtube-facade:hover .youtube-facade-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-facade iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-facade.active {
    cursor: default;
}

/* ---------------------------------------------
   20. RESPONSIVE DESIGN
   --------------------------------------------- */
@media (max-width: 768px) {

    /* Base container adjustments */
    .container,
    .container-wide {
        padding: 0 var(--space-m);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Navigation */
    .nav-container {
        grid-template-columns: auto 1fr auto;
        gap: var(--space-s);
        padding: var(--space-s) var(--space-m);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    .nav-container>* {
        min-width: 0;
        max-width: 100%;
    }

    .logo {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: visible;
        text-overflow: ellipsis;
        max-width: 180px;
        min-width: 0;
        position: relative;
    }

    .logo img {
        height: 60px !important;
        max-width: 100%;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--pure-white);
        flex-direction: column;
        padding: var(--space-l);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: var(--space-s);
        box-sizing: border-box;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        list-style: none;
        width: 100%;
    }

    .nav-links li a {
        display: block;
        padding: var(--space-m) 0;
        width: 100%;
    }

    /* Show mobile CTA in mobile menu */
    .nav-links .mobile-cta {
        display: block;
        margin-top: var(--space-m);
        padding-top: var(--space-m);
        border-top: 1px solid var(--light-gray);
    }

    .nav-links .mobile-cta .btn {
        width: 100%;
        text-align: center;
        display: block;
        padding: var(--space-m) var(--space-l);
        font-size: var(--font-body);
    }

    /* Hide desktop CTA button on mobile - use mobile menu version instead */
    .desktop-cta {
        display: none !important;
    }

    .menu-toggle {
        display: flex;
    }

    /* Ensure nav container doesn't overflow */
    .nav-container .btn-gold.desktop-cta {
        display: none !important;
    }

    /* Grids */
    .grid-2,
    .grid-2-centered,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-l);
    }

    /* Timeline */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
    }

    .timeline-content {
        margin-left: 60px;
        margin-right: 0;
    }

    .timeline-dot {
        left: 20px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Trust Indicators */
    .trust-indicators {
        flex-direction: column;
        gap: var(--space-l);
    }

    /* Hero */
    .hero-title {
        font-size: clamp(1.75rem, 5vw, 2rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.1rem);
        line-height: 1.7;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtitle br {
        display: none;
        /* Remove line breaks on mobile for better wrapping */
    }

    /* Hero buttons */
    .hero-content>div[style*="margin-top"] {
        margin-top: 2rem !important;
        text-align: center !important;
    }

    .hero-content .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    /* Tables - wrapped in scrollable container */
    .comparison-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }

    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table tr {
        display: table;
        width: 100%;
        min-width: 600px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.6rem 0.4rem;
        white-space: normal;
        word-wrap: break-word;
    }

    /* Inline style overrides for mobile */
    [style*="font-size: 1.2rem"],
    [style*="font-size: 1.1rem"] {
        font-size: clamp(0.95rem, 2.5vw, 1.1rem) !important;
    }

    [style*="margin-top: 3rem"] {
        margin-top: 2rem !important;
    }

    [style*="margin-top: 5rem"] {
        margin-top: 3rem !important;
    }

    [style*="margin-top: 4rem"] {
        margin-top: 2.5rem !important;
    }

    [style*="gap: 4rem"] {
        gap: 2rem !important;
    }

    [style*="max-width: 900px"] {
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {

    /* Make flexbox sections stack on mobile */
    .two-column-flex {
        flex-direction: column !important;
        gap: 2rem !important;
    }
}

@media (max-width: 480px) {

    /* Further mobile optimizations */
    .container,
    .container-wide {
        padding: 0 var(--space-s);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    section {
        padding: var(--space-2xl) 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero {
        min-height: 90vh;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--space-l);
        width: 100%;
        max-width: 100%;
    }

    /* Navigation - Extra small screens */
    .nav-container {
        grid-template-columns: 1fr auto auto;
        gap: var(--space-xs);
        padding: var(--space-xs) var(--space-s);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .logo {
        font-size: 0.95rem;
        max-width: 150px;
        overflow: visible;
        min-width: 0;
    }

    .logo img {
        height: 50px !important;
        max-width: 100%;
    }

    .nav-container .desktop-cta {
        display: none !important;
        /* Hide desktop button on very small screens, accessible via menu */
    }

    /* Ensure navigation doesn't overflow */
    .nav-container {
        overflow: visible;
    }

    .nav-container>* {
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    /* Ensure logo has enough space and isn't clipped */
    .nav-container .logo {
        overflow: visible;
    }

    /* Hero text wrapping */
    .hero-subtitle {
        font-size: clamp(0.9rem, 4vw, 1rem);
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtitle br {
        display: none;
        /* Remove line breaks on mobile for better wrapping */
    }

    .hero-title {
        font-size: clamp(1.5rem, 6vw, 1.75rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Ensure stat cards don't overflow */
    .stat-card {
        min-width: 0;
        word-wrap: break-word;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .stat-number {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
        word-wrap: break-word;
    }

    /* Button adjustments */
    .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: var(--space-m) var(--space-l);
        font-size: clamp(0.9rem, 3vw, 1rem);
    }

    /* Card adjustments */
    .card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Table adjustments for very small screens */
    .comparison-table {
        font-size: 0.75rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.3rem;
    }

    /* Section headers */
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .section-subtitle {
        font-size: clamp(0.95rem, 3vw, 1.1rem);
    }

    /* Two column flex adjustments */
    .two-column-flex {
        flex-direction: column !important;
        gap: 1.5rem !important;
        margin-top: 2rem !important;
    }

    .two-column-flex>div {
        width: 100%;
        max-width: 100%;
    }

    .two-column-flex ol,
    .two-column-flex ul {
        font-size: clamp(0.95rem, 3vw, 1.1rem) !important;
    }
}

/* ---------------------------------------------
   20. PRINT STYLES
   --------------------------------------------- */
@media print {

    nav,
    .scroll-indicator,
    .menu-toggle,
    footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    section {
        page-break-inside: avoid;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }
}