/* Reset and Base Styles */

/* How It Works Page Styles */
.section-subtitle {
    font-family: 'Playfair Display', serif !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: var(--charcoal);
    margin-top: 0; /* Ensure spacing is controlled by section-title margin-bottom */
    margin-bottom: calc(6rem + 100px); /* Add padding after subheading to push body title down */
    line-height: 1.3 !important;
    text-align: center !important;
}

.highlight-jade {
    color: var(--jade);
    font-weight: 500;
}

.steps-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    padding-bottom: 5rem;
    margin-bottom: 5rem;
}

/* Jade divider after step boxes */
.steps-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--jade);
    opacity: 0.22;
}

.step {
    text-align: center;
    background: transparent;
    padding: 2rem;
    border: 1px solid rgba(17, 17, 18, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.step:hover {
    border-color: rgba(17, 17, 18, 0.2);
    transform: translateY(-2px);
}

/* Step 1 top left, Step 2 top right, Step 3 bottom left, Step 4 bottom right */
.step:nth-child(2) { grid-row: 1; grid-column: 1; }
.step:nth-child(3) { grid-row: 1; grid-column: 2; }
.step:nth-child(4) { grid-row: 2; grid-column: 1; }
.step:nth-child(5) { grid-row: 2; grid-column: 2; }

.step-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.875rem; /* Increased from 1.5rem */
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1.5rem;
    width: 100%;
    min-height: 4.5rem; /* Accommodate two lines of text */
    text-align: center;
}

.step-jade {
    color: var(--jade);
}

.step-headline {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem;
    width: 100%;
}

.step-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--charcoal-60);
    opacity: 1;
    margin: 0;
    width: 100%;
}

/* Additional content styling */
.additional-content {
    margin-top: 0; /* Spacing handled by steps-container margin-bottom */
    max-width: 1200px; /* Match nav-container and container max-width */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* Match nav-container and container padding */
    box-sizing: border-box;
}

.content-section {
    margin-bottom: 4rem;
    text-align: center; /* Center align all content sections */
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 2rem;
    line-height: 1.3;
    text-align: center; /* Center align subtitles */
}

/* Ensure consistent spacing for How It Works page content sections */
.additional-content .content-section {
    margin-top: 0;
}

.content-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--charcoal-60);
    opacity: 1;
    margin-bottom: 1.5rem;
    text-align: center; /* Center align body text */
}

.content-body:last-child {
    margin-bottom: 0;
}

.content-cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 3rem;
    min-width: 280px;
    background-color: var(--jade);
    color: var(--bone);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-align: center;
    text-transform: capitalize;
    white-space: nowrap;
    box-sizing: border-box;
}

.content-cta:hover {
    background-color: var(--jade);
    color: var(--bone);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.2);
}

html[lang="es"] .content-cta {
    min-width: 300px;
}

a#about-download-btn.content-cta {
    margin-top: 0;
}

/* Consistent CTA wrapper for all tab pages */
.section-cta-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

/* Mobile adjustments for steps */
@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-bottom: 20px; /* Reduce space above divider on mobile */
    }

    /* On mobile, single column layout */
    .step:nth-child(2) { grid-row: auto; grid-column: auto; }
    .step:nth-child(3) { grid-row: auto; grid-column: auto; }
    .step:nth-child(4) { grid-row: auto; grid-column: auto; }
    .step:nth-child(5) { grid-row: auto; grid-column: auto; }

    .step-number {
        font-size: 1.625rem; /* Increased from 1.375rem */
        min-height: auto; /* Reset min-height on mobile for single column layout */
    }
    
    .step {
        padding: 1.5rem; /* Match card mobile padding */
        height: auto; /* Revert height on mobile */
    }

    .step-headline {
        font-size: 1.125rem;
    }

    .step-body {
        font-size: 0.95rem;
    }

    .additional-content {
        margin-top: 1.5rem; /* Decreased distance from steps container on mobile */
        max-width: 1200px; /* Match nav-container and container max-width on mobile */
        margin-left: auto;
        margin-right: auto;
        padding: 0 20px; /* Match nav-container and container padding on mobile */
        box-sizing: border-box;
    }

    .content-section {
        margin-bottom: 3rem;
    }

    .content-subtitle {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .content-body {
        font-size: 1.125rem;
        margin-bottom: 1.25rem;
    }

    .content-cta {
        padding: 0.875rem 2rem;
        font-size: 1.125rem;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bone: #EFEBDD;
    --charcoal: #111112;
    --charcoal-60: rgba(17, 17, 18, 0.6); /* Match hero store text – applied to body/subtitle copy */
    --jade: #00A86B;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bone);
    color: var(--charcoal);
    min-height: 100vh;
    overflow-x: hidden;
}


/* Initial Landing Page */
.landing-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.landing-content {
    text-align: center;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-container {
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: center;
}

.logo {
    width: 400px;
    height: auto;
    max-width: 100%;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 5.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
}

.language-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.language-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 2px solid var(--jade);
    opacity: 1; /* Match footer jade appearance */
    color: var(--charcoal);
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    display: inline-block;
    cursor: pointer;
    will-change: transform, opacity;
    touch-action: manipulation; /* Optimize touch interactions */
    text-transform: capitalize;
}

.language-btn:hover {
    background-color: var(--jade);
    border-color: var(--jade);
    color: var(--bone);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.2);
}

.landing-copyright {
    margin-top: 5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.landing-copyright p {
    color: var(--charcoal);
    font-size: 0.875rem;
    opacity: 1;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

.landing-copyright .palma-text {
    color: var(--jade);
    opacity: 1;
}

.landing-copyright .roman-numeral {
    color: var(--charcoal);
    opacity: 1;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
}


/* Navigation Bar */
.navbar {
    background-color: var(--bone);
    border-bottom: 1px solid rgba(17, 17, 18, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Restore original desktop navigation menu styles */
@media (min-width: 769px) {
    /* Original desktop nav-menu (dropdown panel overrides via .nav-dropdown-wrap .nav-menu later) */
    .nav-menu {
        display: flex !important;
        list-style: none !important;
        gap: 1.5rem !important;
        align-items: center !important;
        justify-content: flex-end !important;
        margin-left: auto !important;
        flex: 0 0 auto !important;
        flex-shrink: 0 !important;
        z-index: 2 !important;
        position: relative !important;
        padding-left: calc(12rem + 550px) !important;
        min-width: 500px !important;
        background: transparent !important;
        width: auto !important;
        height: auto !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
        flex-direction: row !important;
        pointer-events: auto !important;
    }
    
    /* Spanish page: fit longer tab labels; extra left padding so tabs sit further right */
    html[lang="es"] .nav-menu {
        padding-left: calc(12rem + 480px) !important;
    }

    html[lang="es"] .nav-menu .nav-link {
        font-size: 1.25rem !important;
    }
    
    /* Ensure nav-menu links are properly styled on desktop */
    .nav-menu .nav-link {
        color: var(--charcoal) !important;
        text-decoration: none !important;
        font-family: 'Playfair Display', serif !important;
        font-weight: 500 !important;
        font-size: 1.25rem !important;
        padding: 0.5rem 0 !important;
        transition: color 0.3s ease !important;
        position: relative !important;
        width: auto !important;
        text-align: left !important;
        display: block !important;
        text-transform: capitalize !important;
    }
    
    .nav-menu .nav-link:hover {
        color: var(--jade) !important;
    }
    
    .nav-menu .nav-link-active {
        color: var(--jade) !important;
        opacity: 1 !important;
    }
    
    /* Hide mobile menu logo on desktop */
    .nav-menu-logo {
        display: none !important;
    }
    
    /* Ensure nav-menu list items are properly styled */
    .nav-menu li {
        flex: none !important;
        padding: 0 !important;
        width: auto !important;
    }
    
    /* Ensure navbar is properly positioned */
    .navbar {
        position: sticky !important;
        z-index: 1000 !important;
    }
    
    /* Ensure body.menu-open doesn't affect desktop */
    body.menu-open {
        overflow: auto !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
    }
}

/* Desktop only: three-line icon (symmetric with logo) + dropdown for nav links - MUST be top-level so it applies on desktop */
@media (min-width: 769px) {
    .nav-dropdown-toggle.mobile-menu-toggle,
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }
    .mobile-menu-toggle span {
        width: 25px;
        height: 2px;
        background: var(--charcoal);
        border-radius: 2px;
    }
    /* Dropdown panel: hidden by default, shown when .nav-dropdown-wrap.is-open */
    html body .navbar .nav-dropdown-wrap .nav-menu,
    html body .navbar .nav-dropdown-wrap .nav-menu.active,
    html body .navbar .nav-dropdown-wrap .nav-menu:not(.active) {
        position: absolute !important;
        top: calc(100% + 1px) !important; /* Sit just below navbar divider */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: auto !important;
        margin-top: 0.25rem !important;
        display: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        min-width: 200px !important;
        padding: 0.75rem 0 !important;
        background: var(--bone) !important;
        background-color: var(--bone) !important;
        border: 1px solid rgba(17, 17, 18, 0.1) !important;
        border-radius: 8px !important;
        box-shadow: 0 8px 24px rgba(17, 17, 18, 0.12) !important;
        z-index: 1001 !important;
        list-style: none !important;
    }
    html body .navbar .nav-dropdown-wrap.is-open .nav-menu {
        display: flex !important;
    }
        .nav-dropdown-wrap .nav-menu .nav-link {
            display: block !important;
            padding: 0.6rem 1.25rem !important;
            font-size: 1.25rem !important;
            color: var(--charcoal) !important;
            text-decoration: none !important;
            white-space: nowrap !important;
            text-align: center !important;
        }
    .nav-dropdown-wrap .nav-menu .nav-link:hover {
        color: var(--jade) !important;
    }
    .nav-dropdown-wrap .nav-menu .nav-link-active {
        color: var(--jade) !important;
    }
    .nav-dropdown-wrap .nav-menu-logo {
        display: none !important;
    }
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

/* Logo stays in original position (left); three-line icon on right at same distance from center PALMA */
.nav-left {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-dropdown-wrap {
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    will-change: opacity;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-logo:active {
    opacity: 0.6;
}

.nav-logo-img {
    height: 40px;
    width: auto;
}

.nav-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--jade);
    text-align: center;
    margin: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    display: block;
    z-index: 11;
    padding: 0.5rem 1rem;
    min-width: 120px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.nav-title:hover {
    opacity: 0.85;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    flex: 0 0 auto;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    padding-left: calc(12rem + 550px);
    min-width: 500px;
    /* Ensure desktop base styles prevent any overlay behavior */
    background: transparent;
    width: auto;
    height: auto;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
}

/* Spanish page: smaller nav link font and less left padding so tabs fit without extending page */
html[lang="es"] .nav-menu {
    padding-left: calc(12rem + 480px);
}

html[lang="es"] .nav-menu .nav-link {
    font-size: 1.25rem;
}

.nav-link {
    color: var(--charcoal);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 1.25rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
    text-transform: capitalize;
}

.nav-link:hover {
    color: var(--jade);
}

.nav-link-active {
    color: var(--jade);
    opacity: 1; /* Match footer jade appearance */
}


.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Prevent flash of wrong section on load (e.g. after language toggle): hide until JS sets correct section */
body:not(.landing-root):not(.sections-ready) .main-content {
    opacity: 0;
}
body.sections-ready .main-content {
    opacity: 1;
    transition: opacity 0.08s ease-out;
}

/* Main Content - overflow hidden so section geometric pattern doesn't paint over footer */
.main-content {
    min-height: calc(100vh - 80px);
    padding: 0 0 4rem;
    background-color: var(--bone);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Add geometric pattern to non-hero sections; extend below section so it covers bone to footer */
.section.active:not(.hero-section) {
    position: relative;
    overflow: visible;
}

.section.active:not(.hero-section)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -100vh;
    background-image: 
        /* Tessellated diamond pattern */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        ),
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        ),
        repeating-linear-gradient(
            120deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        );
    background-size: 100% 100%;
    background-position: 0 0;
    background-origin: padding-box;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}

.section.active:not(.hero-section) > * {
    position: relative;
    z-index: 1;
}

/* Home: About-page geometric pattern at same scale (tile at 100vh so it doesn't stretch) */
.section.active.hero-section {
    overflow: visible;
}

.section.active.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -4rem;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        ),
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        ),
        repeating-linear-gradient(
            120deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        );
    background-size: 100% 100vh;
    background-repeat: repeat-y;
    background-position: 0 0;
    background-origin: padding-box;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}

.section.active.hero-section > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    display: none !important;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.section.active {
    display: block !important;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* CRITICAL: Ensure sections and main content are always visible on desktop */
@media (min-width: 769px) {
    .main-content {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1 !important;
        position: relative !important;
    }
    
    .section.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Ensure nav-menu cannot block content by being above it */
    .nav-menu {
        z-index: 2 !important;
    }
    
    .main-content {
        z-index: 1 !important;
    }
}

/* Ensure non-hero sections with section-title get proper spacing from divider */
.section.active:not(.hero-section) .section-title {
    padding-top: 12rem; /* Match hero section desktop padding-top from divider to headline */
    margin-bottom: 3.375rem; /* Match hero-headline to hero-subtitle spacing on desktop */
}

/* Scroll indicator for subpages - positioned after subtitle/text */
/* Match updated home page carrot position, which now includes buttons + store line between subtitle and carrot */
/* Home total approx: headline (3.375rem) + subtitle (3.4375rem) + buttons/store (~0.5rem net) + scroll-indicator (4.5625rem) ≈ 11.875rem */
/* Subpage: section-title (3.375rem) + section-subtitle/section-text (3.375rem) = 6.75rem, so carrot needs 11.875rem - 6.75rem = 5.125rem */
.section.active:not(.hero-section) .subpage-scroll-indicator {
    margin-top: 5.125rem; /* Match total distance from heading to carrot on updated home hero */
    margin-bottom: 12rem; /* Doubled: distance from carrot to page content on desktop (was 6rem) */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--charcoal);
    opacity: 0.4;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.3s ease;
    user-select: none;
}

.section.active:not(.hero-section) .subpage-scroll-indicator:hover {
    opacity: 0.6;
}

.section.active:not(.hero-section) .subpage-scroll-indicator svg {
    width: 24px;
    height: 24px;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    overflow: visible;
}

/* Hero card: page bone background; full width; ends above scroll-to target (home-sections). */
.hero-card {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12rem 0 150px;
    overflow: hidden;
    background-color: #E3DED0; /* match home subsection cards */
    border: 1px solid rgba(17, 17, 18, 0.08);
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(17, 17, 18, 0.06);
    box-sizing: border-box;
}

/* Same Aztec-inspired diamond lattice as home subsection cards */
.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 18px,
            rgba(17, 17, 18, 0.015) 18px,
            rgba(17, 17, 18, 0.015) 20px
        ),
        repeating-linear-gradient(
            120deg,
            transparent,
            transparent 18px,
            rgba(17, 17, 18, 0.015) 18px,
            rgba(17, 17, 18, 0.015) 20px
        );
}

/* Subpage backdrop: same size as home hero card, behind content, content unchanged */
.hero-card-backdrop {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    min-height: 100vh;
    height: 100vh;
    z-index: 0 !important;
    pointer-events: none;
}

.hero-card > .container,
.hero-card .hero-background {
    position: relative;
    z-index: 1;
}

.hero-card .container {
    align-self: center;
}

/* Home only: match gap from CTA button to footer jade divider to About (7rem = wrapper 3rem + main 4rem). 
   Flex center adds extra space below content; align to start so section height = content height and gap matches. */
.hero-section .container {
    align-self: flex-start;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    opacity: 1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px; /* Match container width for alignment with header */
    margin: 0 auto;
    width: 100%;
}

.hero-text-content {
    text-align: center;
    margin: 0 auto;
}

.hero-buttons-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap; /* Prevent wrapping to maintain alignment */
    width: 100%;
    margin: -0.75rem auto 0; /* Nudge buttons upward slightly to make room for store text */
    position: relative;
}

/* Home only: compensate for removed "Available on App Store and Google Play" so scroll carrot stays put */
.hero-buttons-wrapper.hero-buttons-compensate {
    margin-bottom: 2.75rem; /* matches former .hero-store-text margin-top + line height */
}

.hero-headline {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 3.375rem; /* Doubled headline-to-subtitle gap (was 1.6875rem) */
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (min-width: 769px) {
    .hero-headline {
        font-size: 5.5rem;
    }
    
    /* Desktop: do not force hero text up; let it sit in its natural position */
    .hero-text-content {
        margin-top: 0;
    }
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal-60);
    line-height: 1.6;
    margin-bottom: 3.4375rem; /* Doubled subtitle-to-buttons gap (was 1.71875rem) */
    opacity: 1;
}

.hero-store-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--charcoal-60);
    opacity: 1;
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-store-label {
    display: inline-block;
}

/* Spanish page: keep subtitle on one line */
html[lang="es"] .hero-subtitle {
    white-space: nowrap;
}

.hero-download-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--jade);
    opacity: 1; /* Match footer jade appearance */
    color: var(--bone);
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    vertical-align: middle;
    width: 280px; /* Same width as Learn How It Works button */
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0;
    white-space: nowrap; /* Prevent text wrapping */
    text-transform: capitalize;
}

.hero-download-btn:hover {
    background-color: var(--jade);
    color: var(--bone);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.2);
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--jade);
    color: var(--bone);
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    width: 280px; /* Wide enough to fit uppercase text */
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0;
    white-space: nowrap; /* Prevent text wrapping */
    text-transform: capitalize;
}

.hero-cta:hover {
    background: var(--jade);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.2);
}

/* Spanish page: wider buttons to accommodate longer uppercase text */
html[lang="es"] .hero-download-btn,
html[lang="es"] .hero-cta {
    width: 320px; /* Wider for Spanish uppercase text */
}

.scroll-indicator {
    margin-top: 5.125rem; /* Match About page carrot location (same as subpage-scroll-indicator) */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--charcoal);
    opacity: 0.4;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.3s ease;
    user-select: none;
}

.scroll-indicator:hover {
    opacity: 0.6;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(5px);
    }
}

.home-sections {
    margin-top: 6rem;
    padding-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 6rem;
    position: relative;
    z-index: 2;
}

/* No gap between hero-card and container on home page */
.hero-section .home-sections {
    margin-top: 0;
    padding-top: 0;
}

.home-subsection {
    text-align: center;
    position: relative;
}

/* Home page: background cards for Built for Real Life, What You Learn, Tools (encapsulate title, text, Discover, and expanded content) */
.hero-section .home-subsection-card {
    position: relative;
    overflow: hidden;
    background-color: #E3DED0; /* warm bone, no purple hue */
    border: 1px solid rgba(17, 17, 18, 0.08);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 12px rgba(17, 17, 18, 0.06);
    text-align: center;
}

/* Aztec-inspired diamond lattice inside cards (two diagonals, stepped-geometric feel) */
.hero-section .home-subsection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 18px,
            rgba(17, 17, 18, 0.015) 18px,
            rgba(17, 17, 18, 0.015) 20px
        ),
        repeating-linear-gradient(
            120deg,
            transparent,
            transparent 18px,
            rgba(17, 17, 18, 0.015) 18px,
            rgba(17, 17, 18, 0.015) 20px
        );
}

.hero-section .home-subsection-card > * {
    position: relative;
    z-index: 1;
}

/* Inner boxes inside home cards: plain background (no pattern showing through) */
.hero-section .home-subsection-card .card,
.hero-section .home-subsection-card .learn-card,
.hero-section .home-subsection-card .tools-list li {
    background-color: #E3DED0; /* match card background so pattern is fully covered */
}

@media (min-width: 769px) {
    .hero-section .home-subsection-card {
        padding: 2.5rem 2rem;
    }
}

/* Desktop only: Home page section spacing (no jade dividers between sections; only above footer) */
@media (min-width: 769px) {
    .hero-section .home-sections {
        gap: 4rem;
    }
    .hero-section .home-subsection:nth-child(4) {
        margin-bottom: 30px;
    }
}

/* Clarity, Built In. section - jade title and 9x16 placeholders */
.clarity-section-title {
    color: var(--charcoal) !important;
}

/* Top padding for "The Latest From Palma" subsection */
.hero-section .home-subsection.clarity-subsection {
    padding-top: 45px;
}

/* Jade 1px divider under "The Latest From Palma" */
.hero-section .clarity-subsection .clarity-section-title::after {
    content: '';
    display: block;
    width: 700px;
    max-width: 100%;
    height: 1px;
    background-color: var(--jade);
    margin: 1.25rem auto 0;
}

/* Hero content moved to clarity section */
.clarity-headline {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 3.375rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
}

@media (min-width: 769px) {
    .clarity-headline {
        font-size: 5.5rem;
    }
}

.clarity-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.6;
    margin-bottom: 3.4375rem;
    opacity: 0.85;
    text-align: center;
}

/* Spanish page: keep subtitle on one line */
html[lang="es"] .clarity-subtitle {
    white-space: nowrap;
}

.clarity-buttons-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 2rem;
}

.clarity-placeholders {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: calc(2.5rem - 60px); /* Moved up 60px */
    padding-top: 30px;
    padding-bottom: 30px;
    margin-bottom: -60px; /* Cancel padding so content below stays at original distance */
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.clarity-placeholder {
    aspect-ratio: 9 / 16;
    background-color: var(--charcoal);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    max-width: 280px;
}

.clarity-placeholder-inner {
    display: contents;
}

.clarity-placeholder .clarity-coming,
.clarity-placeholder .clarity-soon {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.clarity-placeholder .clarity-coming {
    color: var(--bone);
}

.clarity-placeholder .clarity-soon {
    color: var(--jade);
}

/* Dot indicators: hidden on desktop, shown only on mobile */
.clarity-dots {
    display: none;
}

.clarity-cta-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    min-height: 7rem;
}

/* App Store + Google Play pre-register badges (replacing jade CTA) */
.clarity-store-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 0;
    min-height: 7rem;
}

.clarity-store-badges .clarity-store-link {
    display: inline-block;
    line-height: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.clarity-store-badges .clarity-store-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.clarity-store-badges .clarity-store-link img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 175px;
    object-fit: contain;
}

/* Store badges hidden until app is live (layout preserved, not clickable). Remove class store-badges-hidden to show again. */
.clarity-store-badges.store-badges-hidden .clarity-store-link {
    visibility: hidden;
    pointer-events: none;
}

.clarity-store-badges.store-badges-hidden .clarity-store-link img {
    visibility: hidden;
}

/* "The Latest from Palma" / "Lo Último de Palma" – jade box, fixed size in all modes; expanded: email + send fill most of space */
.clarity-cta-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    height: 56px;
    padding: 0.75rem 1rem;
    background-color: var(--jade);
    color: var(--bone);
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
}

.clarity-cta-box:hover {
    background-color: var(--jade);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.2);
}

/* Expanded (email + send visible): charcoal */
.clarity-cta-box.expanded {
    background-color: var(--charcoal);
}

.clarity-cta-box.expanded:hover {
    background-color: var(--charcoal);
}

/* After send: remain charcoal for "You're on the list" */
.clarity-cta-box.clarity-cta-sent {
    background-color: var(--charcoal);
    cursor: default;
}

.clarity-cta-box.clarity-cta-sent:hover {
    background-color: var(--charcoal);
}

.clarity-cta-label {
    display: inline;
    white-space: nowrap;
}

.clarity-cta-expanded {
    display: none;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.clarity-cta-box.expanded .clarity-cta-label {
    display: none;
}

.clarity-cta-box.expanded .clarity-cta-expanded {
    display: flex;
}

.clarity-cta-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 0.5rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    color: var(--bone);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(239, 235, 221, 0.35);
    border-radius: 0.375rem;
    box-sizing: border-box;
}

.clarity-cta-input::placeholder {
    color: rgba(239, 235, 221, 0.7);
}

.clarity-cta-input:focus {
    outline: none;
    border-color: var(--bone);
}

/* Override Chrome autofill/autocomplete blue styling */
.clarity-cta-input:-webkit-autofill,
.clarity-cta-input:-webkit-autofill:hover,
.clarity-cta-input:-webkit-autofill:focus,
.clarity-cta-input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--bone);
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.12) inset;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.12) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.clarity-cta-send {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--bone);
    cursor: pointer;
    border-radius: 0.375rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.clarity-cta-send:hover {
    opacity: 1;
}

.clarity-cta-send svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* Desktop: track is transparent for layout */
.clarity-placeholders-track {
    display: contents;
}

/* Mobile only: simple scroll-snap swipe box (one image visible at a time) */
@media (max-width: 768px) {
    /* Tighter gap between "Clarity, Built In." and top of content cycle box (title position unchanged) */
    .hero-section .clarity-subsection .subsection-title {
        margin-bottom: -1.25rem;
    }

    .clarity-placeholders-wrap {
        margin-bottom: 1.25rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .clarity-placeholders {
        display: flex;
        justify-content: center;
        align-items: center;
        overflow-x: hidden; /* no native horizontal scroll, JS swipe only */
        gap: 0;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .clarity-placeholders::-webkit-scrollbar {
        display: none;
    }
    .clarity-placeholders {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .clarity-placeholders-track {
        display: flex;
        gap: 0;
        width: 100%;
    }

    .clarity-placeholder {
        flex: 0 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        padding: 0;
        background: none;
        border-radius: 0;
    }

    .clarity-placeholder-inner {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 80%;
        max-width: 240px;
        aspect-ratio: 9 / 16;
        background-color: var(--charcoal);
        border-radius: 4px;
    }

    .clarity-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin-top: -1.5rem !important;
        flex-shrink: 0;
    }

    .clarity-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: var(--charcoal);
        opacity: 0.5;
        transition: background-color 0.2s ease, opacity 0.2s ease;
    }

    .clarity-dot.active {
        background-color: var(--jade);
        opacity: 1;
    }

    .hero-section .clarity-store-badges {
        margin-top: -2rem;
    }
}

/* Desktop: center store badges; keep min-height and nudge for layout */
@media (min-width: 769px) {
    .clarity-store-badges {
        min-height: calc(7rem + 100px);
        margin-top: -60px;
    }
}

/* ===========================================
   JADE DIVIDERS FOR ABOUT, HOW IT WORKS, TOOLS PAGES
   =========================================== */

/* About page: jade dividers between content subsections (same style as home page) */
.about-subsection {
    position: relative;
}

/* Jade divider after each content subsection (not after mission, not after final) */
.about-subsection:not(.about-subsection-final):not(:first-child)::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--jade);
    margin-top: 4rem;
    margin-bottom: 4rem;
    opacity: 0.22;
}

/* About page only: no jade divider between Purpose/Philosophy, Philosophy/Experience, and Experience/Vision */
#about .about-content .about-subsection:nth-child(3)::after,
#about .about-content .about-subsection:nth-child(4)::after,
#about .about-content .about-subsection:nth-child(5)::after,
#about .about-content .about-subsection:nth-child(6)::after,
#acerca-de .about-content .about-subsection:nth-child(3)::after,
#acerca-de .about-content .about-subsection:nth-child(4)::after,
#acerca-de .about-content .about-subsection:nth-child(5)::after,
#acerca-de .about-content .about-subsection:nth-child(6)::after {
    content: none;
    display: none;
}

/* How it works: first subsection is :first-child so add jade divider after it (between Clarity By Design and Why Clarity Matters) */
#how-it-works .additional-content .about-subsection:first-child::after,
#como-funciona .additional-content .about-subsection:first-child::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--jade);
    margin-top: 4rem;
    margin-bottom: 4rem;
    opacity: 0.22;
}

/* Center the final subsection text; space from last content subsection */
.about-subsection-final {
    text-align: center;
    position: relative;
    margin-top: 4rem;
    margin-bottom: 0;
}

/* No divider above final About CTA block (footer has its own divider) */

/* Home page: same final CTA block as About (divider + text + button) */
.home-final-cta-block {
    text-align: center;
    position: relative;
    margin-top: 3rem; /* Match About: space from previous content to this block (collapses with tools-subsection margin) */
}

/* Final CTA block: match About "Understanding That Supports You" + "Start Learning" formatting across pages */
.home-final-cta-block .section-cta-wrapper {
    margin-top: 1.5rem;
}

.home-final-cta-block .about-subtitle {
    font-size: 2.5rem;
    margin-bottom: 0;
}

/* Jade 1px divider under "Master Your Money with Confidence" */
.home-final-cta-block .about-subtitle::after {
    content: '';
    display: block;
    width: 700px;
    max-width: 100%;
    height: 1px;
    background-color: var(--jade);
    margin: 1.25rem auto 0;
}

/* How It Works page: jade dividers between content sections (not after final-section) */
.content-section {
    position: relative;
}

.content-section:not(.final-section)::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--jade);
    margin-top: 5rem;
    margin-bottom: 5rem;
    opacity: 0.22;
}

/* How It Works page typography */
#how-it-works .section-title,
#como-funciona .section-title {
    font-size: 5.5rem;
}

#how-it-works .section-subtitle,
#como-funciona .section-subtitle {
    font-size: 2.5rem !important;
}

#how-it-works .additional-content .about-subtitle,
#como-funciona .additional-content .about-subtitle {
    font-size: 2.5rem;
}

#how-it-works .content-subtitle,
#como-funciona .content-subtitle {
    font-size: 2.5rem;
}

#how-it-works .about-body,
#como-funciona .about-body {
    font-size: 1.25rem;
}

/* Tools page: jade divider after the 3 cards */
/* Note: The actual .tools-cards grid styling is defined later in the file */

/* No dividers between individual tool sections */
.tools-section {
    position: relative;
}

/* No divider after tools-sections container */
.tools-sections {
    position: relative;
}

.subsection-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem;
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Thin jade divider under titles in Built for Real Life, What You Learn, Tools (same width) */
.hero-section .built-for-real-life-subsection .subsection-title::after,
.hero-section .what-you-learn-subsection .subsection-title::after,
.hero-section .tools-support-subsection .subsection-title::after {
    content: '';
    display: block;
    width: 700px;
    max-width: 100%;
    height: 1px;
    background-color: var(--jade);
    opacity: 0.6;
    margin: 0.5rem auto 0.75rem;
}

.subsection-title-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease, transform 0.2s ease;
}
/* Link only active when Discover is toggled open; otherwise plain text */
.built-for-real-life-subsection:not(.is-open) .subsection-title-link,
.what-you-learn-subsection:not(.is-open) .subsection-title-link,
.tools-support-subsection:not(.is-open) .subsection-title-link {
    pointer-events: none;
    cursor: default;
}
.built-for-real-life-subsection:not(.is-open) .subsection-title-link:hover,
.what-you-learn-subsection:not(.is-open) .subsection-title-link:hover,
.tools-support-subsection:not(.is-open) .subsection-title-link:hover {
    color: inherit;
    transform: none;
}
.built-for-real-life-subsection.is-open .subsection-title-link,
.what-you-learn-subsection.is-open .subsection-title-link,
.tools-support-subsection.is-open .subsection-title-link {
    pointer-events: auto;
    cursor: pointer;
}
.subsection-title-link:hover {
    color: var(--jade);
    transform: scale(1.05);
}

.subsection-text {
    font-size: 1.25rem;
    color: var(--charcoal-60);
    line-height: 1.8;
    font-weight: 400;
    opacity: 1;
}

.subsection-subheader {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    color: var(--charcoal-60);
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 1;
}

/* Home page: cap width of subsection intro texts (Built for Real Life, What You Learn, Tools) */
.hero-section .subsection-subheader,
.hero-section .subsection-text {
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
}

.learn-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 15px; /* Increased bottom padding by 15px for desktop */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Widen learn-cards for Spanish page to fit titles on one line */
html[lang="es"] .learn-cards {
    max-width: 1200px; /* Increased for Spanish titles */
}

.learn-card {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    color: var(--charcoal);
    line-height: 1.6;
    font-weight: 400;
    padding: 1.5rem;
    background: transparent;
    border: 1px solid rgba(17, 17, 18, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(17, 17, 18, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.learn-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; /* Match .card-title style */
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0; /* Spacing from .card-divider below */
    line-height: 1.3;
    text-align: center; /* Center align titles for all boxes */
}

.learn-card .card-divider {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.learn-card-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    font-weight: 400;
    color: var(--charcoal-60);
    margin: 0;
    opacity: 1;
    text-align: center;
}

.learn-card:hover {
    border-color: rgba(17, 17, 18, 0.15);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.08);
    transform: translateY(-2px);
}

/* Tools page cards - same style as learn-cards */
.tools-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 15px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    padding-bottom: 5rem;
}

/* Jade divider after tools cards - full width of container */
.tools-cards::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--jade);
    opacity: 0.22;
}

.tools-card {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    color: var(--charcoal);
    line-height: 1.6;
    font-weight: 400;
    padding: 1.5rem;
    background: transparent;
    border: 1px solid rgba(17, 17, 18, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(17, 17, 18, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.tools-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: center;
}

/* Only apply nowrap to Tools PAGE cards, not home page */
.tools-cards .tools-card-title {
    white-space: nowrap;
}

.tools-card-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    font-weight: 400;
    color: var(--charcoal-60);
    margin: 0;
    opacity: 1;
    text-align: center;
}

.tools-card:hover {
    border-color: rgba(17, 17, 18, 0.15);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.08);
    transform: translateY(-2px);
}

/* Mobile responsive for tools cards */
@media (max-width: 768px) {
    .tools-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        padding-bottom: 20px; /* Reduce space above divider on mobile */
    }
}

/* Tools page sections */
.tools-sections {
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Tools final section with divider above */
/* How It Works final section: match About final block (subtitle + button spacing) */
.content-section.final-section {
    margin-top: 4rem;
}

.content-section.final-section .content-subtitle {
    margin-bottom: 0;
}

.content-section.final-section .section-cta-wrapper {
    margin-top: 1.5rem;
}

.tools-final-section {
    position: relative;
    text-align: center;
    margin-top: 4rem;
    padding-top: 0;
}

.tools-final-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--jade);
    opacity: 0.22;
}

.tools-final-section .content-subtitle {
    margin-bottom: 0;
}

.tools-final-section .section-cta-wrapper {
    margin-top: 1.5rem;
}

/* Trust & Privacy final section: match About final block */
.page-final-section {
    position: relative;
    text-align: center;
    margin-top: 4rem;
    padding-top: 0;
}

.page-final-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--jade);
    opacity: 0.22;
}

.page-final-section .content-subtitle {
    margin-bottom: 0;
}

.page-final-section .section-cta-wrapper {
    margin-top: 1.5rem;
}

/* Final CTA buttons: zero top margin (match About #about-download-btn) */
#home-final-download-btn,
#how-it-works-download-btn,
#tools-download-btn,
#trust-privacy-download-btn,
#contact-download-btn {
    margin-top: 0;
}

/* Contact final CTA block: match About (subtitle + button spacing) */
.contact-body-subtitle {
    font-size: 2rem;
    margin-bottom: 0;
}

.contact-body-cta-wrapper {
    margin-top: 1.5rem;
}

/* Terms of Service section - reduce padding-top */
#terms .section-title,
#terminos .section-title {
    padding-top: 10px; /* Reduced to 10px as requested */
}

/* Trust & Privacy page sections */
.trust-privacy-section {
    margin-bottom: 2.5rem;
}

.trust-privacy-section-last {
    margin-bottom: 5rem;
    position: relative;
}

.trust-privacy-section-last::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--jade);
    margin-top: 5rem;
    opacity: 0.22;
}

.trust-privacy-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem;
    margin-top: 2rem;
    line-height: 1.3;
}

.trust-privacy-subtitle:first-of-type {
    margin-top: 0;
}

.trust-privacy-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--charcoal-60);
    margin: 0;
    opacity: 1;
}

.trust-privacy-policy-section {
    margin-top: 5rem;
}

.trust-privacy-policy-section .content-subtitle {
    margin-bottom: 1.75rem;
}

/* Privacy Policy scroll box: flex container so icon stays fixed at bottom */
.privacy-policy-scroll {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    overflow: hidden;
    padding: 1.5rem 1.75rem 1.5rem 1.75rem;
    border-radius: 8px;
    border: 1px solid rgba(17, 17, 18, 0.12);
    /* Bone tone consistent with page background */
    background-color: var(--bone);
    box-shadow: 0 4px 18px rgba(17, 17, 18, 0.22);
    position: relative;
    text-align: left;
}

/* Inner area scrolls; icon stays fixed */
.privacy-policy-scroll-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 17, 18, 0.3) transparent;
}

.privacy-policy-scroll::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.4;
    background-image: 
        /* Tessellated diamond pattern, softened */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        ),
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        ),
        repeating-linear-gradient(
            120deg,
            transparent,
            transparent 20px,
            rgba(17, 17, 18, 0.02) 20px,
            rgba(17, 17, 18, 0.02) 21px
        );
}

/* Scrollbar styling on inner scroll area */
.privacy-policy-scroll-inner::-webkit-scrollbar {
    width: 8px;
}

.privacy-policy-scroll-inner::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 0;
    margin-bottom: 0;
}

.privacy-policy-scroll-inner::-webkit-scrollbar-thumb {
    background-color: rgba(17, 17, 18, 0.3);
    border-radius: 999px;
    min-height: 40px; /* Ensure thumb is visible */
}

.privacy-policy-scroll h3,
.privacy-policy-scroll h4 {
    font-family: 'Playfair Display', serif; /* Canela-style serif */
    font-size: 1.2rem;
    font-weight: 600; /* Bold */
    color: var(--charcoal);
    margin: 1.25rem 0 0.5rem;
    line-height: 1.3;
    text-align: left;
}

.privacy-policy-scroll h3:first-child {
    margin-top: 0;
}

.privacy-policy-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--charcoal);
    margin: 0 0 1rem;
    opacity: 0.9;
    text-align: left;
}

.privacy-policy-list {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.privacy-policy-list li {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--charcoal);
    opacity: 0.9;
    margin-bottom: 0.35rem;
}

.privacy-policy-last-updated {
    font-family: 'Canela', serif;
    font-style: italic;
    text-align: center;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.privacy-policy-tos-link {
    font-family: 'Canela', serif;
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--charcoal);
    text-align: center;
    margin: 0 0 0.5rem;
    opacity: 0.9;
}

/* Arrow in neutral font so ↗ renders cleanly */
.privacy-policy-tos-link .tos-arrow {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-style: normal;
}

/* Terms of Service link - jade colored */
.privacy-policy-tos-link .tos-link {
    color: var(--jade);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.privacy-policy-tos-link .tos-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Contact page: jade link (e.g. Trust and Privacy) */
.link-jade {
    color: var(--jade);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.link-jade:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Contact page: section subtitle (tighter so content sits higher) */
.contact-subtitle {
    margin-bottom: 5rem;
}

/* Contact page: body and list */
.contact-body {
    margin-bottom: 2.5rem;
}

.contact-body .trust-privacy-body {
    margin-bottom: 1rem;
}

/* Match "Clear support when you need it." (content-subtitle): Playfair Display */
.contact-column-heading,
.contact-follow-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}
.contact-follow-heading {
    text-align: center;
}
.contact-column-heading {
    margin-bottom: 1rem;
    text-align: center;
}

/* Same font size as Tools "Track and Grow" (1.5rem) */
.contact-body-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.3;
    margin-top: 4.5rem;
    margin-bottom: 1.25rem;
}

.contact-body-cta-wrapper {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
}

.contact-list {
    margin: 0 0 2.5rem;
    padding-left: 1.5rem;
}

.contact-list li {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--charcoal);
    opacity: 0.9;
    margin-bottom: 0.35rem;
}

/* Contact page: social (desktop = embed boxes, mobile = icons) */
.contact-social {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Desktop: three embed boxes - hidden on small screens */
.contact-social-embeds {
    display: none;
}

/* Mobile: icon row - visible by default */
.contact-social-icons-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.contact-social-icon {
    color: var(--charcoal);
    opacity: 0.85;
    transition: opacity 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.contact-social-icon:hover {
    opacity: 1;
    color: var(--jade);
}

.contact-social-icon svg {
    width: 40px;
    height: 40px;
}

/* Desktop only: single column – Contact block centered, then Follow Palma below */
@media (min-width: 1024px) {
    .contact-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4rem;
    }
    .contact-body-text {
        min-width: 0;
        width: 800px; /* Match Tools tab .tools-progress-body – same width, centered */
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    .contact-body-text .contact-list {
        display: inline-block;
        text-align: left;
        padding-left: 1.5rem;
    }
    .contact-body-social {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 60px; /* 30px more: space below Get in Touch + room for divider */
        position: relative;
        padding-top: 31px; /* Reserve space for divider (1px) + 30px gap below it */
    }
    .contact-body-social::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 1160px; /* Match container content width (1200 - 40px padding) */
        max-width: calc(100vw - 80px);
        height: 1px;
        background-color: var(--jade);
        opacity: 0.22;
    }
    .contact-social-embeds {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 420px;
    }
    .contact-social-icons-mobile {
        display: none;
    }
    .contact-body-social .contact-social {
        margin-top: 0;
    }
    .contact-embed-box {
        position: relative;
        width: 420px;
        min-height: 480px;
        border: none;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        background: var(--charcoal);
    }
    .contact-embed-iframe {
        flex: 1;
        min-height: 420px;
        width: 100%;
        border: none;
        display: block;
        background: #111;
    }
    .contact-embed-icons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        margin-top: 1rem;
        width: 420px;
    }
    .contact-social-embeds .contact-embed-icons .contact-social-icon svg {
        width: 40px;
        height: 40px;
    }
}

.contact-privacy-note {
    margin-bottom: 2.5rem;
}

.contact-privacy-note .content-subtitle {
    margin-bottom: 1rem;
}

.tools-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: transparent;
    border: 1px solid rgba(17, 17, 18, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(17, 17, 18, 0.05);
    transition: all 0.3s ease;
}

.tools-section:hover {
    border-color: rgba(17, 17, 18, 0.15);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.08);
}

.tools-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.tools-arrow {
    color: var(--jade);
    font-weight: 400;
}

.tools-section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--charcoal);
    opacity: 0.85;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tools-section-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.tools-section-list li {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    color: var(--charcoal);
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.tools-section-list li:last-child {
    margin-bottom: 0;
}

/* Mobile responsive for tools sections */
@media (max-width: 768px) {
    .tools-sections {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .tools-section {
        padding: 1.5rem;
    }
    
    .tools-section-title {
        font-size: 1.25rem;
    }
}

/* Tools progress section */
.tools-progress-section {
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 2rem;
}

/* Button wrapper in tools-progress-section inherits from section-cta-wrapper */

.tools-progress-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.tools-progress-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--jade);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.tools-progress-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: var(--charcoal-60);
    opacity: 1;
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile responsive for tools progress section */
@media (max-width: 768px) {
    .tools-progress-section {
        padding: 1.5rem 1rem;
    }
    
    .tools-progress-title {
        font-size: 1.5rem;
    }
    
    .tools-progress-subtitle {
        font-size: 1.25rem;
    }
}

.tools-subsection {
    position: relative;
}

.tools-content-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 3rem;
    max-width: 1000px;
    margin: 2rem auto 0;
    margin-bottom: 15px; /* Increased bottom padding by 15px for desktop */
}

.tools-progress-bars {
    display: none;
}

.progress-bar-container {
    background: rgba(17, 17, 18, 0.05);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    width: 60px;
    flex: 0 0 60px;
    display: flex;
    align-items: flex-end;
}

.progress-bar-container:nth-child(1) {
    height: calc((1.5rem + 1.125rem * 1.8 + 1.5rem) * 0.75);
}

.progress-bar-container:nth-child(2) {
    height: calc((1.5rem + 1.125rem * 1.8 + 1.5rem) * 1.5);
}

.progress-bar-container:nth-child(3) {
    height: calc((1.5rem + 1.125rem * 1.8 + 1.5rem) * 3);
}

.progress-bar {
    width: 100%;
    height: 0;
    background-color: var(--jade);
    opacity: 1; /* Match footer jade appearance */
    border-radius: 8px;
    animation: progressFillLoop 5s ease-in-out infinite;
    position: absolute;
    bottom: 0;
    left: 0;
}

.progress-bar-container:nth-child(1) .progress-bar {
    animation-delay: 0s;
}

.progress-bar-container:nth-child(2) .progress-bar {
    animation-delay: 0.2s;
}

.progress-bar-container:nth-child(3) .progress-bar {
    animation-delay: 0.4s;
}

@keyframes progressFillLoop {
    0%, 100% {
        height: 0;
    }
    50% {
        height: 100%;
    }
}

.tools-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: flex;
    flex-wrap: nowrap; /* Changed from wrap to keep all 3 items in one row */
    justify-content: center;
    gap: 1.5rem;
    max-width: 1400px; /* Increased to accommodate 3 items shoulder to shoulder */
}

.tools-list li {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    color: var(--charcoal);
    line-height: 1.8;
    font-weight: 400;
    padding: 1.5rem;
    background: transparent;
    border: 1px solid rgba(17, 17, 18, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(17, 17, 18, 0.05);
    transition: all 0.3s ease;
    text-align: left;
    flex: 1 1 0; /* Equal flex distribution for 3 items in one row */
    min-width: 0; /* Allow flex items to shrink below content size */
    max-width: none; /* Remove max-width constraint */
    display: flex;
    flex-direction: column;
}

.tools-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; /* Match .card-title style */
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 1rem; /* Match .card-title style */
    line-height: 1.3;
    text-align: center; /* Center align titles */
}

.tools-card-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    font-weight: 400;
    color: var(--charcoal-60);
    margin: 0;
    opacity: 1;
    text-align: center; /* Center align body text */
}

.tools-list li:hover {
    border-color: rgba(17, 17, 18, 0.15);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.08);
    transform: translateY(-2px);
}

/* "Built for Real Life": cards hidden by default; only show when subsection has .is-open */
.built-for-real-life-subsection .cards-container {
    display: none !important;
}
.built-for-real-life-subsection.is-open .cards-container {
    display: grid !important;
}

/* Built for Real Life: format same as Tools boxes (layout and styling) */
.hero-section .built-for-real-life-subsection.is-open .cards-container {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem auto 15px;
    max-width: 1400px;
}
.hero-section .built-for-real-life-subsection .card {
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(17, 17, 18, 0.05);
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}
.hero-section .built-for-real-life-subsection .card:hover {
    border-color: rgba(17, 17, 18, 0.15);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.08);
    transform: translateY(-2px);
}
.hero-section .built-for-real-life-subsection .card-title {
    margin-bottom: 1rem;
}
.hero-section .built-for-real-life-subsection .card-body {
    margin-top: 0;
}

/* When closed: small distance from plus icon to jade divider */
.built-for-real-life-subsection:not(.is-open) {
    margin-bottom: 0.5rem;
}
.built-for-real-life-subsection:not(.is-open) .built-for-real-life-toggle {
    margin-bottom: 0.25rem;
}

/* When open: cards have normal spacing so distance to divider increases */
.built-for-real-life-subsection.is-open .cards-container {
    margin-top: 3rem;
    margin-bottom: 15px;
}

/* "What You Learn": learn-cards hidden by default; show when .is-open */
.what-you-learn-subsection .learn-cards {
    display: none !important;
}
.what-you-learn-subsection.is-open .learn-cards {
    display: grid !important;
    margin-top: 3rem;
    margin-bottom: 15px;
}
.what-you-learn-subsection:not(.is-open) {
    margin-bottom: 0.5rem;
}
.what-you-learn-subsection:not(.is-open) .built-for-real-life-toggle {
    margin-bottom: 0.25rem;
}

/* "Tools That Support Real Decisions": tools content hidden by default; show when .is-open */
.tools-support-subsection .tools-content-wrapper {
    display: none !important;
}
.tools-support-subsection.is-open .tools-content-wrapper {
    display: flex !important;
}
.tools-support-subsection:not(.is-open) {
    margin-bottom: 0.5rem;
}
.tools-support-subsection:not(.is-open) .built-for-real-life-toggle {
    margin-bottom: 0.25rem;
}
.tools-support-subsection.is-open .tools-content-wrapper {
    margin-top: 3rem;
    margin-bottom: 15px;
}

/* "Palma's tools give you clarity..." lead paragraph size */
.tools-support-subsection .subsection-text {
    font-size: 1.16rem;
}

.built-for-real-life-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: auto;
    height: auto;
    min-height: 2.5rem;
    margin: 1rem auto 0;
    padding: 0.25rem;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.built-for-real-life-toggle:hover {
    transform: scale(1.05);
}
.built-for-real-life-toggle:focus {
    outline: none;
    box-shadow: none;
}
.subsection-toggle-label {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--charcoal);
    transition: color 0.25s ease;
}
.subsection-toggle-chevron {
    display: block;
    color: var(--charcoal);
    transition: color 0.25s ease, transform 0.25s ease;
}
.built-for-real-life-subsection.is-open .subsection-toggle-label,
.what-you-learn-subsection.is-open .subsection-toggle-label,
.tools-support-subsection.is-open .subsection-toggle-label,
.how-it-works-steps-subsection.is-open .subsection-toggle-label {
    color: var(--jade);
}
.built-for-real-life-subsection.is-open .subsection-toggle-chevron,
.what-you-learn-subsection.is-open .subsection-toggle-chevron,
.tools-support-subsection.is-open .subsection-toggle-chevron,
.how-it-works-steps-subsection.is-open .subsection-toggle-chevron {
    color: var(--jade);
    transform: rotate(180deg);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 15px; /* Increased bottom padding by 15px for desktop */
    max-width: 1400px; /* Increased to fit titles on one line */
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: transparent;
    padding: 2rem;
    border: 1px solid rgba(17, 17, 18, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    border-color: rgba(17, 17, 18, 0.2);
    transform: translateY(-2px);
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0;
    line-height: 1.3;
}

.card-divider {
    width: 90%;
    height: 1px;
    background-color: var(--jade);
    opacity: 0.7;
    margin: 0.75rem auto 0.75rem;
    flex-shrink: 0;
}

.card-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    color: var(--charcoal-60);
    line-height: 1.6;
    font-weight: 400;
    opacity: 1;
    margin: 0;
    margin-top: auto; /* Push body text to bottom to align vertically across cards */
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 3.375rem; /* Match hero-headline to hero-subtitle spacing on desktop */
    text-align: center;
}

.section-text {
    font-family: 'Playfair Display', serif !important;
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: var(--charcoal);
    line-height: 1.3 !important;
    text-align: center !important;
}

/* First section-text on pages without subtitles should match hero spacing */
.section.active:not(.hero-section) #tools-content > .section-text:first-child,
.section.active:not(.hero-section) #trust-privacy-content > .section-text:first-child,
.section.active:not(.hero-section) #contact-content > .section-text:first-child {
    margin-top: 0; /* Ensure spacing is controlled by section-title margin-bottom */
    margin-bottom: calc(6rem + 100px); /* Add padding after subheading to push body title down */
}

/* English desktop only: Add 60px total (40px + 20px more) padding for About, Tools, Trust & Privacy, Contact */
html[lang="en"] .about-mission-text {
    margin-bottom: calc(6rem + 100px + 40px + 20px); /* Add 60px total for EN desktop */
}

html[lang="en"] .section.active:not(.hero-section) #tools-content > .section-text:first-child,
html[lang="en"] .section.active:not(.hero-section) #trust-privacy-content > .section-text:first-child,
html[lang="en"] .section.active:not(.hero-section) #contact-content > .section-text:first-child {
    margin-bottom: calc(6rem + 100px + 40px + 20px); /* Add 60px total for EN desktop */
}

/* Placeholder content for pages with minimal content */
.placeholder-content {
    min-height: 50vh;
    padding: 2rem 0;
}


/* English desktop only: Add 95px total (55px + 40px more) padding for How it works */
html[lang="en"] .section-subtitle {
    margin-bottom: calc(6rem + 100px + 55px + 40px); /* Add 95px total for EN desktop */
}

html[lang="en"] .additional-content {
    margin-top: 0; /* Spacing handled by steps-container margin-bottom */
}

/* Spanish desktop only: Add 50px more padding for all tab selected pages */
html[lang="es"] .about-mission-text {
    margin-bottom: calc(6rem + 100px + 50px); /* Add 50px more for ES desktop */
}

html[lang="es"] .section-subtitle {
    margin-bottom: calc(6rem + 100px + 50px); /* Add 50px more for ES desktop */
}

html[lang="es"] .section.active:not(.hero-section) #tools-content > .section-text:first-child,
html[lang="es"] .section.active:not(.hero-section) #trust-privacy-content > .section-text:first-child,
html[lang="es"] .section.active:not(.hero-section) #contact-content > .section-text:first-child {
    margin-bottom: calc(6rem + 100px + 50px); /* Add 50px more for ES desktop */
}

html[lang="es"] .additional-content {
    margin-top: 0; /* Spacing handled by steps-container margin-bottom */
}

/* About Section Styles – match home page body text (subsection-subheader / subsection-text) */
.about-content {
    max-width: 1200px; /* Match trust & privacy text width on desktop */
    margin: 0 auto;
    text-align: center;
}

/* Desktop only: Ensure all dividers match Trust & Privacy divider width (full container width) */
@media (min-width: 769px) {
    /* Tools page cards - widen to match Trust & Privacy text width */
    .tools-cards {
        max-width: 1200px; /* Match Trust & Privacy divider width */
    }

    /* How It Works long-form section dividers: extend through container padding to match Trust & Privacy width */
    .additional-content .content-section:not(.final-section)::after {
        position: relative;
        left: -20px;                  /* negate container horizontal padding */
        width: calc(100% + 40px);     /* extend line to full container width */
    }
}

.about-subsection {
    margin-bottom: 4.5rem; /* Increased vertical spacing between sections */
}

.about-subsection:last-of-type {
    margin-bottom: 5rem;
}

.about-subsection-final {
    margin-bottom: 0;
}

.about-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0;
}

.about-statement {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--charcoal);
    opacity: 0.85;
    margin-top: 8px;
    margin-bottom: 1.25rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 660px;
    text-align: center;
}

/* How it works: center subtitles in the additional-content about-style blocks */
#how-it-works .additional-content .about-subtitle,
#como-funciona .additional-content .about-subtitle {
    text-align: center;
}

/* How it works: step label – small caps, subtle numbering (charcoal, no jade) */
.steps-inline-cards .step-label {
    font-variant: small-caps;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--charcoal);
    opacity: 0.85;
    letter-spacing: 0.02em;
}

/* How it works: step boxes hidden by default; show when Discover is toggled (.is-open) */
.how-it-works-steps-subsection .steps-inline-cards {
    display: none !important;
}
.how-it-works-steps-subsection.is-open .steps-inline-cards {
    display: grid !important;
    margin-top: 100px;
    margin-bottom: 100px;
}
.how-it-works-steps-subsection .built-for-real-life-toggle {
    margin-top: 50px;
    margin-bottom: 50px;
}
.how-it-works-steps-subsection:not(.is-open) .built-for-real-life-toggle {
    margin-bottom: 50px;
}

/* "Built for Those Who Want to Understand" – two-column layout, left column height matches right */
.about-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.about-two-col-left {
    text-align: left;
    /* Align top of first box with first line of right-column paragraph */
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.about-built-for-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Same box style as Discover section cards; height between natural (~3.75rem) and stretched (⅓ column ~5.5rem) */
.about-built-for-list li {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--charcoal);
    text-align: center;
    padding: 1rem 1.25rem;
    min-height: 4.5rem;
    background: transparent;
    border: 1px solid rgba(17, 17, 18, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(17, 17, 18, 0.05);
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-built-for-list li:hover {
    border-color: rgba(17, 17, 18, 0.15);
    box-shadow: 0 4px 12px rgba(17, 17, 18, 0.08);
    transform: translateY(-2px);
}

.about-built-for-list li:last-child {
    margin-bottom: 0;
}

.about-two-col-right .about-body {
    margin-bottom: 1rem;
}

.about-two-col-right .about-body:last-child {
    margin-bottom: 0;
}

.about-mission-text {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-top: 0; /* Ensure spacing is controlled by section-title margin-bottom */
    margin-bottom: calc(6rem + 100px); /* Add padding after subheading to push body title down */
    line-height: 1.3;
    text-align: center;
}

/* About body text: max-width 660px, centered block; subtitles remain centered */
.about-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--charcoal-60);
    font-weight: 400;
    opacity: 1;
    margin-top: 0;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 660px;
    text-align: left;
}

/* About page only: center-justify body paragraphs */
#about .about-body,
#acerca-de .about-body {
    text-align: center;
}

/* Purpose subsection (our-story): left-align body text, 1px jade vertical line on left */
#about #our-story .about-body,
#acerca-de #nuestra-historia .about-body {
    text-align: center;
}
#about #our-story,
#acerca-de #nuestra-historia {
    box-sizing: border-box;
}

/* About page typography: section title, mission, subtitles, statement, body, CTA */
#about .section-title,
#acerca-de .section-title {
    font-size: 5.5rem;
}
#about .about-mission-text,
#acerca-de .about-mission-text {
    font-size: 2.5rem;
}
#about .about-subtitle,
#acerca-de .about-subtitle {
    font-size: 2.5rem;
}
#about .about-statement,
#acerca-de .about-statement {
    font-size: 1.125rem;
}
#about .about-body,
#acerca-de .about-body {
    font-size: 1.25rem;
}
#about .section-cta-wrapper .content-cta,
#acerca-de .section-cta-wrapper .content-cta {
    font-size: 1.125rem;
}

/* About inline Franklin quote between Philosophy and Experience (same font as .about-subtitle) */
#about .about-inline-quote-block,
#acerca-de .about-inline-quote-block {
    margin-top: 45px;
    margin-bottom: 100px;
    padding-top: 100px;
    text-align: center;
}
.about-inline-quote-text {
    font-family: 'Playfair Display', serif;
    font-size: 2.75rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.3;
    margin: 0;
}
.about-inline-quote-mark {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 3.5rem;
    line-height: 1;
    vertical-align: -0.25em;
    opacity: 0.9;
}
.about-inline-quote-attribution {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--charcoal-60);
    text-align: right;
    margin: 20px 50px 0 0;
}

/* About "A Structured Path to Confidence" – large quote above divider (same font as .about-subtitle: Playfair Display) */
.about-canela-quote {
    font-family: 'Playfair Display', serif;
    font-size: 2.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--charcoal);
    text-align: center;
    margin-top: 100px;
    margin-bottom: 100px;
    margin-left: auto;
    margin-right: auto;
    max-width: 660px;
}
html[lang="es"] .about-canela-quote {
    font-size: 2.559rem;
}

/* Global body text sizing – match About body across site (desktop) */
.card-body,
.learn-card-body,
.tools-card-body,
.trust-privacy-body,
.step-body,
.content-body,
.subsection-subheader,
.subsection-text,
.contact-list li {
    font-size: 1.25rem;
    line-height: 1.8;
}

.about-signature {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(17, 17, 18, 0.1);
    text-align: center;
}

.about-cta-wrapper {
    margin-top: 3rem;
    text-align: center;
    display: flex;
    justify-content: center;
}

.footer-signature-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--charcoal);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.footer-signature-img {
    max-width: 200px;
    height: auto;
    opacity: 1; /* Full opacity to match charcoal darkness */
    display: block;
    margin: 0 auto;
    filter: brightness(0) saturate(100%); /* Convert to charcoal/black */
}

/* Responsive Design - Mobile Only */
@media (max-width: 768px) {
    .logo {
        width: 280px;
    }

    .title {
        font-size: 3.5rem;
    }

    /* Prevent scroll bar on language selection screen on mobile */
    html:has(body.landing-root) {
        height: 100vh;
        overflow: hidden;
        position: relative;
    }

    body.landing-root {
        height: 100vh;
        overflow: hidden;
        position: relative;
        touch-action: none;
        -webkit-overflow-scrolling: none;
    }

    body.landing-root .landing-page {
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        padding: 20px 20px 16px;
        overflow: hidden;
        touch-action: none;
        box-sizing: border-box;
    }

    body.landing-root .landing-content {
        overflow: hidden;
        touch-action: none;
        max-height: 100vh;
    }

    /* Mobile only: push logo and buttons down */
    body.landing-root .landing-content .logo-container {
        margin-top: 3rem;
    }

    /* Mobile only: nudge landing page © block further down without changing page height */
    body.landing-root .landing-content .landing-copyright {
        margin-top: 10rem; /* larger than desktop 5rem to push it lower */
    }

    .language-btn {
        padding: 0.625rem 1.5rem;
        min-width: 100px;
        transition: opacity 0.15s ease; /* Faster transition on mobile */
        -webkit-tap-highlight-color: transparent; /* Remove tap highlight for faster response */
    }

    /* Mobile only: unify button label sizes to match home \"Download App\" */
    .hero-download-btn,
    .hero-cta,
    .content-cta,
    .clarity-cta-box,
    .language-btn {
        font-size: 1.125rem;
    }

    /* Mobile menu - full screen redesign - MOBILE ONLY */
    @media (max-width: 768px) {
        /* Show navbar and divider when menu is open */
        body.menu-open .navbar {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 1001 !important;
        }
        
        /* Show divider when menu is open */
        body.menu-open .home-sections::before {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        .nav-menu {
            position: fixed !important;
            top: 80px !important; /* Start below navbar */
            right: 0 !important;
            left: 0 !important;
            bottom: 0 !important;
            background: var(--bone) !important;
            flex-direction: column !important;
            padding: 0 !important;
            padding-left: 0 !important; /* CRITICAL: Override base padding-left: calc(12rem + 550px) */
            padding-right: 0 !important;
            gap: 0 !important;
            transform: translateX(100%) !important; /* Start off-screen to the right */
            transition: transform 0.4s ease !important;
            align-items: center !important;
            justify-content: flex-start !important;
            padding-top: 2rem !important; /* Add top padding for spacing */
            z-index: 1000 !important;
            overflow: hidden !important; /* Prevent scrolling */
            visibility: visible !important; /* Always visible for smooth transition */
            margin: 0 !important;
            margin-left: 0 !important; /* CRITICAL: Override base margin-left: auto */
            list-style: none !important; /* Remove default list styles */
            width: 100vw !important; /* Full viewport width */
            max-width: 100vw !important; /* Ensure no max-width constraint */
            min-width: 0 !important; /* CRITICAL: Override base min-width: 500px */
            height: calc(100vh - 80px) !important; /* Full height minus navbar - covers iOS safe area */
            max-height: calc(100vh - 80px) !important;
        }
        
        .nav-menu.active {
            transform: translateX(0) !important; /* Slide in from right to left */
            bottom: 0 !important; /* Ensure it reaches the bottom including iOS safe area */
        }
        
        /* CRITICAL: Completely hide nav-menu when closed to prevent bone rectangle */
        .nav-menu:not(.active) {
            transform: translateX(100%) !important; /* Off-screen to the right */
            visibility: hidden !important; /* Completely hidden */
            pointer-events: none !important; /* No interaction */
            opacity: 0 !important; /* Invisible */
            background: transparent !important; /* Remove bone background when closed */
            background-color: transparent !important;
        }
        
        /* Ensure nav-menu has bone background only when active */
        .nav-menu.active {
            background: var(--bone) !important;
            background-color: var(--bone) !important;
        }
        
        /* CRITICAL: Ensure mobile menu tabs are perfectly centered - override ALL possible styles */
        .nav-menu > li:not(.nav-menu-logo) {
            padding-left: 0 !important;
            padding-right: 0 !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            left: 0 !important;
            right: 0 !important;
            position: relative !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .nav-menu .nav-link {
            padding-left: 0 !important;
            padding-right: 0 !important;
            margin-left: auto !important;
            margin-right: auto !important;
            left: 0 !important;
            right: 0 !important;
            position: relative !important;
            display: block !important;
            width: fit-content !important;
        }
        
        /* Prevent body scroll when menu is open - mobile only */
        body.menu-open {
            overflow: hidden !important;
            position: fixed !important;
            width: 100% !important;
            height: 100% !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
        }
        
        /* CRITICAL: Remove all fixed positioning when menu is closed - prevent bone rectangle */
        body:not(.menu-open) {
            position: static !important;
            overflow: auto !important;
            width: auto !important;
            height: auto !important;
            top: auto !important;
            left: auto !important;
            right: auto !important;
            bottom: auto !important;
        }
        
        /* CRITICAL: Ensure footer area is charcoal, not bone */
        body:not(.menu-open) .site-footer,
        .site-footer {
            background-color: var(--charcoal) !important;
        }
        
        /* Ensure html and body have proper background for footer */
        html:has(.site-footer),
        body:has(.site-footer) {
            background-color: var(--charcoal) !important;
        }
        
        /* Remove any bone-colored elements at bottom of footer on mobile */
        body:not(.menu-open)::after,
        body:not(.menu-open)::before {
            display: none !important;
            content: none !important;
            background: none !important;
        }
        
        /* Ensure navbar stays visible when menu is open */
        body.menu-open .navbar {
            position: relative !important;
            top: 0 !important;
            left: 0 !important;
            transform: none !important;
        }
        
        /* Prevent footer from flashing when menu opens, but ensure it shows when menu closes */
        body.menu-open .site-footer {
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }
        
        /* Ensure footer is visible when menu is closed and remove any bone rectangle */
        body:not(.menu-open) .site-footer {
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto !important;
            display: block !important;
            background-color: var(--charcoal) !important; /* Ensure charcoal background */
        }
        
        /* CRITICAL: Ensure area below footer is charcoal, not bone */
        .site-footer::after {
            background-color: var(--charcoal) !important;
        }
        
        /* Ensure body and html below footer are charcoal */
        body:has(.site-footer),
        html:has(.site-footer) {
            background-color: var(--charcoal) !important;
        }
        
        /* CRITICAL: Ensure body and html are charcoal when footer is present on mobile */
        html:has(.site-footer),
        body:has(.site-footer):not(.menu-open) {
            background-color: var(--charcoal) !important;
        }
        
        /* Remove any bone background that might appear at bottom - but only for content area */
        body:not(.menu-open):not(:has(.site-footer)) {
            background-color: var(--bone) !important; /* Normal bone for content area, but not when footer is present */
        }
        
        /* But ensure footer area specifically is charcoal */
        body:not(.menu-open) .site-footer,
        .site-footer {
            background-color: var(--charcoal) !important;
        }
        
        /* Ensure nav-menu covers full height */
        .nav-menu.active {
            bottom: 0 !important;
        }
        
        /* Tab options container - centered to align with PALMA header center */
        .nav-menu > li:not(.nav-menu-logo) {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            flex: 0 0 auto !important;
            position: relative !important;
            list-style: none !important; /* Remove default list styles */
        }
        
        /* Tab links - charcoal color, jade when active, centered to match PALMA header exactly */
        .nav-menu .nav-link {
            color: var(--charcoal) !important;
            text-decoration: none !important;
            font-family: 'Playfair Display', serif !important;
            font-weight: 500 !important;
            font-size: 1.25rem !important;
            text-align: center !important;
            text-transform: capitalize !important;
            padding: 1.5rem 0 !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
            display: block !important;
            transition: color 0.3s ease !important;
            position: relative !important;
            margin: 0 !important;
            margin-left: auto !important;
            margin-right: auto !important;
            left: auto !important;
            transform: none !important;
            white-space: nowrap !important;
            width: fit-content !important; /* Only as wide as content */
            box-sizing: border-box !important;
        }
        
        /* Ensure tab options are evenly spaced between them */
        .nav-menu > li:not(.nav-menu-logo):not(:last-child) {
            margin-bottom: 0.5rem !important; /* Even spacing between tabs */
        }
        
        /* Ensure active page is highlighted in jade in mobile menu */
        .nav-menu .nav-link-active {
            color: var(--jade) !important;
            opacity: 1 !important;
        }
        
        /* Also ensure it works when menu is active */
        .nav-menu.active .nav-link-active {
            color: var(--jade) !important;
            opacity: 1 !important;
        }
        
        /* Logo at bottom - centered to match PALMA header center, moved UP by 30px total */
        .nav-menu-logo {
            margin-top: auto;
            margin-bottom: -50px; /* Reduced negative margin to move UP (was -140px) */
            padding: 2rem 0;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            flex: 0 0 auto; /* Don't grow/shrink */
            position: relative !important;
            list-style: none !important; /* Remove default list styles */
            transform: translateY(-30px) !important; /* Move UP by 30px */
            margin-top: -10px !important; /* Move UP by 10px less (was -20px, now -10px - moves down by 10px) */
        }
        
        .nav-menu-logo-img {
            width: 180px;
            max-width: calc(100vw - 4rem);
            height: auto;
            max-height: 180px;
            object-fit: contain;
            display: block;
            margin: 0 auto !important; /* Center using auto margins */
            margin-left: auto !important;
            margin-right: auto !important;
            position: relative !important;
            left: auto !important;
            transform: none !important;
            box-sizing: border-box !important;
        }
        
        .nav-menu li.nav-menu-logo {
            padding: 2rem 0 !important;
            margin-bottom: -50px !important; /* Reduced negative margin to move UP (was -140px) */
            margin-top: -10px !important; /* Move UP by 10px less (was -20px, now -10px - moves down by 10px) */
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            list-style: none !important;
            transform: translateY(-30px) !important; /* Move UP by 30px */
        }
    }
    
    /* Desktop: dropdown nav (three-line icon symmetric to logo), not horizontal bar */
    @media (min-width: 769px) {
        /* Show three-line toggle on desktop */
        .nav-dropdown-toggle.mobile-menu-toggle,
        .mobile-menu-toggle {
            display: flex !important;
            flex-direction: column;
            gap: 4px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.5rem;
        }

        .mobile-menu-toggle span {
            width: 25px;
            height: 2px;
            background: var(--charcoal);
            border-radius: 2px;
        }

        /* Dropdown panel: nav-menu inside wrap is a vertical dropdown below the icon */
        .nav-dropdown-wrap .nav-menu,
        .nav-dropdown-wrap .nav-menu.active,
        .nav-dropdown-wrap .nav-menu:not(.active) {
            position: absolute !important;
            top: 100% !important;
            right: 0 !important;
            left: auto !important;
            bottom: auto !important;
            margin-top: 0.25rem !important;
            display: none !important;
            flex-direction: column !important;
            align-items: stretch !important;
            justify-content: flex-start !important;
            min-width: 200px !important;
            padding: 0.75rem 0 !important;
            padding-left: 0 !important;
            gap: 0 !important;
            background: var(--bone) !important;
            background-color: var(--bone) !important;
            border: 1px solid rgba(17, 17, 18, 0.1) !important;
            border-radius: 8px !important;
            box-shadow: 0 8px 24px rgba(17, 17, 18, 0.12) !important;
            z-index: 1001 !important;
            overflow: visible !important;
            visibility: visible !important;
            transform: none !important;
            margin-left: 0 !important;
            flex: none !important;
            list-style: none !important;
        }

        .nav-dropdown-wrap.is-open .nav-menu,
        .nav-dropdown-wrap .nav-menu.active {
            display: flex !important;
        }

        .nav-dropdown-wrap .nav-menu > li:not(.nav-menu-logo) {
            flex: none !important;
            padding: 0 !important;
            width: 100% !important;
            border: none !important;
        }

    .nav-dropdown-wrap .nav-menu .nav-link {
        display: block !important;
        padding: 0.6rem 1.25rem !important;
        font-size: 1.25rem !important;
        color: var(--charcoal) !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

        .nav-dropdown-wrap .nav-menu .nav-link:hover {
            color: var(--jade) !important;
        }

        .nav-dropdown-wrap .nav-menu .nav-link-active {
            color: var(--jade) !important;
        }

        .nav-dropdown-wrap .nav-menu-logo {
            display: none !important;
        }

        body.menu-open {
            overflow: auto !important;
            position: static !important;
            width: auto !important;
            height: auto !important;
        }

        .nav-menu > li:not(.nav-menu-logo) {
            flex: none !important;
            width: auto !important;
        }
    }

    /* ADDITIONAL CRITICAL OVERRIDE: Ensure nav-menu never blocks content on desktop - must be after mobile styles */
    @media (min-width: 769px) {
        /* Force remove any fixed positioning that could block content - MAXIMUM SPECIFICITY */
        html body .navbar .nav-menu,
        html body .navbar .nav-menu.active,
        html body .navbar .nav-menu:not(.active),
        html body .nav-menu,
        html body .nav-menu.active,
        html body .nav-menu:not(.active),
        body .navbar .nav-menu,
        body .navbar .nav-menu.active,
        body .navbar .nav-menu:not(.active),
        body .nav-menu,
        body .nav-menu.active,
        body .nav-menu:not(.active),
        .navbar .nav-menu,
        .navbar .nav-menu.active,
        .navbar .nav-menu:not(.active),
        .nav-menu,
        .nav-menu.active,
        .nav-menu:not(.active) {
            position: relative !important;
            top: auto !important;
            right: auto !important;
            left: auto !important;
            bottom: auto !important;
            background: transparent !important;
            background-color: transparent !important;
            transform: none !important;
            visibility: visible !important;
            z-index: 2 !important;
            width: auto !important;
            height: auto !important;
            max-width: none !important;
            max-height: none !important;
            pointer-events: auto !important;
            display: flex !important;
            overflow: visible !important;
        }
    }

    /* Desktop dropdown: higher specificity so this wins over "ADDITIONAL CRITICAL OVERRIDE" above */
    @media (min-width: 769px) {
        html body .navbar .nav-dropdown-wrap .nav-menu,
        html body .navbar .nav-dropdown-wrap .nav-menu.active,
        html body .navbar .nav-dropdown-wrap .nav-menu:not(.active) {
            position: absolute !important;
            top: calc(100% + 1px) !important; /* Sit just below navbar divider */
            left: 50% !important;
            right: auto !important;
            transform: translateX(-50%) !important;
            bottom: auto !important;
            display: none !important;
            flex-direction: column !important;
            min-width: 200px !important;
            background: var(--bone) !important;
            background-color: var(--bone) !important;
            border: 1px solid rgba(17, 17, 18, 0.1) !important;
            border-radius: 8px !important;
            box-shadow: 0 8px 24px rgba(17, 17, 18, 0.12) !important;
            z-index: 1001 !important;
        }
        html body .navbar .nav-dropdown-wrap.is-open .nav-menu {
            display: flex !important;
        }
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Home page only: extra 100px between nav bottom and hero headline on mobile */
    .hero-section {
        min-height: 100vh;
        padding-left: 0;
        padding-right: 0;
    }

    .hero-card {
        min-height: 100vh;
        padding-top: calc(5rem + 15px + 100px);
        padding-bottom: 150px;
        padding-left: 0;
        padding-right: 0;
    }

    .hero-card-backdrop {
        min-height: 100vh;
        height: 100vh;
    }

    .hero-headline {
        font-size: 2.5rem;
        margin-bottom: 1rem; /* Doubled headline-to-subtitle gap on mobile (was 0.5rem) */
        margin-top: -56px; /* Move headline and subtitle up on mobile only (buttons/padding unchanged) */
    }

    /* Optimize English mobile font size - maximum that fits "Understand Your Money." on one line */
    /* Both "Understand Your Money." and "Without Guessing." use the same font size */
    html[lang="en"] .hero-headline {
        font-size: 1.85rem !important; /* Optimized to maximum size that keeps "Understand Your Money." on one line */
        line-height: 1.2 !important; /* Maintain line height */
        letter-spacing: -0.02em !important; /* Tighter letter spacing to help fit */
    }
    
    /* Ensure container doesn't cause wrapping - reduce padding for English mobile */
    html[lang="en"] .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    html[lang="en"] .hero-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 3.5rem; /* Doubled subtitle-to-buttons gap on mobile (was 1.75rem) */
    }
    
    /* Revert Spanish subtitle to normal wrapping on mobile */
    html[lang="es"] .hero-subtitle {
        white-space: normal;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
        margin-top: 56px; /* Compensate for headline -56px so buttons/carrot stay in original position */
    }

    .hero-download-btn {
        padding: 0.875rem 2rem;
        font-size: 1.125rem;
        margin: 0;
        display: inline-block;
        width: 100%;
        max-width: 320px;
    }

    .hero-cta {
        padding: 0.875rem 2rem;
        font-size: 1.125rem;
        margin: 0;
        width: 100%;
        max-width: 320px;
    }

    .scroll-indicator {
        margin-top: 8rem; /* Match About page carrot location on mobile */
    }

    .home-sections {
        margin-top: 1.625rem; /* Increased padding between carrot and "Built for Real Life" (1rem + 10px = 1rem + 0.625rem = 1.625rem) */
        padding-top: 2rem;
        gap: 5rem;
    }

    /* Home page: no gap between hero-card and container */
    .hero-section .home-sections {
        margin-top: 0;
        padding-top: 0;
    }

    /* Adjust divider position on mobile */
    .home-sections::before {
        top: -1.625rem; /* Match margin-top to position divider correctly */
    }

    .hero-section .home-sections::before {
        top: 0; /* Flush with hero-card */
    }

    /* Match English mobile spacing to Spanish (which is perfect) */
    /* Reduce English spacing to match Spanish if English content is taller */
    /* Adjust scroll indicator margin to compensate for any content height differences */
    html[lang="en"] .scroll-indicator {
        margin-top: 7.5rem; /* Match About page carrot location on mobile EN */
    }
    
    html[lang="en"] .home-sections {
        margin-top: 1.625rem; /* Keep same as Spanish base */
    }

    html[lang="en"] .hero-section .home-sections {
        margin-top: 0;
        padding-top: 0;
    }

    html[lang="en"] .hero-section .home-sections::before {
        top: 0;
    }

    .subsection-title {
        font-size: 2rem;
    }

    /* English mobile: Make subsection titles slightly smaller than hero headline but bigger than card titles */
    /* Hero headline: 1.85rem, Card title: 1.25rem, Subsection title: 1.65rem */
    html[lang="en"] .subsection-title {
        font-size: 1.65rem !important; /* Between hero headline (1.85rem) and card title (1.25rem) */
    }

    .subsection-text {
        font-size: 1.125rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }

    .card {
        padding: 1.5rem;
        display: block; /* Revert to block layout on mobile */
        height: auto; /* Revert height on mobile */
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-body {
        font-size: 0.95rem;
        margin-top: 0; /* Revert margin-top on mobile */
    }

    /* Apply .card-title style to all box titles on mobile */
    .learn-card-title {
        font-size: 1.25rem; /* Match .card-title mobile style */
        margin-bottom: 0; /* Spacing from .card-divider below */
    }

    .tools-card-title {
        font-size: 1.25rem; /* Match .card-title mobile style */
        margin-bottom: 1rem; /* Match .card-title style */
    }

    .subsection-subheader {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }

    /* Home mobile: match Tools section spacing to Built for Real Life / What You Learn; compensate for two-line title */
    .hero-section .tools-support-subsection .subsection-text {
        margin-bottom: 1.5rem;
        font-size: 1.16rem;
    }
    .hero-section .tools-support-subsection .subsection-title {
        margin-bottom: 0.5rem;
    }

    /* Built for Real Life: match Tools layout on mobile (column, same gap/padding) */
    .hero-section .built-for-real-life-subsection.is-open .cards-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 15px;
    }
    .hero-section .built-for-real-life-subsection .card {
        padding: 1.25rem;
        flex: none;
    }

    /* Center text inside home section cards on mobile */
    .home-subsection .learn-card,
    .home-subsection .learn-card-title,
    .home-subsection .learn-card-body,
    .home-subsection .tools-list li {
        text-align: center;
    }

    /* About page dividers - reduce space above on mobile */
    .about-subsection:not(.about-subsection-final):not(:first-child)::after {
        margin-top: 20px;
        margin-bottom: 2.5rem;
    }
    /* How it works: first subsection divider - same mobile spacing */
    #how-it-works .additional-content .about-subsection:first-child::after,
    #como-funciona .additional-content .about-subsection:first-child::after {
        margin-top: 20px;
        margin-bottom: 2.5rem;
    }
    
    /* How It Works page dividers - reduce space above */
    .content-section:not(.final-section)::after {
        margin-top: 20px;
    }
    
    /* Tools page final section - reduce space above divider */
    .tools-final-section {
        margin-top: 20px;
    }
    
    /* Trust & Privacy and Contact final sections - reduce space above divider */
    .page-final-section {
        margin-top: 20px;
    }
    
    /* Steps container divider - reduce space above */
    .steps-container {
        padding-bottom: 20px;
    }
    
    /* Trust & Privacy sections mobile */
    .trust-privacy-section-last::after {
        margin-top: 20px;
    }
    
    .trust-privacy-subtitle {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .trust-privacy-subtitle:first-of-type {
        margin-top: 0;
    }
    
    .trust-privacy-policy-section {
        margin-top: 3rem;
    }

    .learn-cards {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-top: 1.5rem;
    }

    .learn-card {
        font-size: 1.125rem;
        padding: 1.25rem;
    }

    .tools-content-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .tools-progress-bars {
        display: none;
    }

    .tools-list {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        margin-top: 1.5rem;
        max-width: 100%;
    }

    .tools-list li {
        font-size: 1.125rem;
        padding: 1.25rem;
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    .section-title {
        font-size: 3rem;
        margin-bottom: 1rem; /* Match hero-headline to hero-subtitle spacing on mobile */
    }

    /* Increase padding between sections on mobile */
    .section.active {
        padding-top: 0; /* Remove default padding, section-title now handles it */
        padding-bottom: 3rem;
    }

    /* Hero section uses same padding-bottom as other sections so CTA button aligns with About/other pages (distance from button to footer jade divider) */

    .section.active:first-child {
        padding-top: 0;
    }
    
    /* Ensure non-hero sections with section-title get proper spacing */
    .section.active:not(.hero-section) .section-title {
        padding-top: calc(5rem + 15px) !important; /* Match hero section mobile padding-top */
        margin-bottom: 1rem !important; /* Match hero-headline to hero-subtitle spacing on mobile */
    }
    
    /* Terms of Service section - reduce padding-top on mobile */
    #terms .section-title,
    #terminos .section-title {
        padding-top: 10px !important; /* Reduced to 10px as requested */
    }
    
    /* Section subtitle mobile spacing */
    .section-subtitle {
        font-size: 1.75rem !important; /* Match about-mission-text mobile size */
        margin-top: 0 !important; /* Ensure spacing is controlled by section-title margin-bottom */
        margin-bottom: calc(4rem + 30px) !important; /* Add padding after subheading to push body title down */
    }
    
    /* First section-text mobile spacing */
    .section.active:not(.hero-section) #tools-content > .section-text:first-child,
    .section.active:not(.hero-section) #trust-privacy-content > .section-text:first-child,
    .section.active:not(.hero-section) #contact-content > .section-text:first-child {
        font-size: 1.75rem !important; /* Match about-mission-text mobile size */
        margin-top: 0 !important; /* Ensure spacing is controlled by section-title margin-bottom */
        margin-bottom: calc(4rem + 30px) !important; /* Add padding after subheading to push body title down */
    }
    
    /* Scroll indicator for subpages - mobile - positioned after subtitle/text */
    /* Match updated home page carrot: headline (1rem) + subtitle (3.5rem) + buttons/store (~0.5rem) + scroll-indicator (5rem) ≈ 10rem total */
    /* Subpage: section-title (1rem) + section-subtitle/section-text (1rem) = 2rem, so carrot needs 10rem - 2rem = 8rem */
    .section.active:not(.hero-section) .subpage-scroll-indicator {
        margin-top: 8rem; /* Match total distance from heading to carrot on updated home hero (≈10rem total) */
        margin-bottom: 3.25rem; /* Doubled: distance from carrot to page content on mobile (was 1.625rem) */
    }
    
    /* Match English mobile spacing for subpage scroll indicators */
    /* Match updated home page EN: hero-headline (1rem) + hero-subtitle (3.5rem) + buttons/store (~0.5rem) + scroll-indicator (4.5rem) ≈ 9.5rem total */
    /* Subpage: section-title (1rem) + section-subtitle/section-text (1rem) = 2rem, so carrot needs 9.5rem - 2rem = 7.5rem */
    html[lang="en"] .section.active:not(.hero-section) .subpage-scroll-indicator {
        margin-top: 7.5rem; /* Match total distance from heading to carrot on updated home hero (≈9.5rem total) */
    }

    /* About Section Mobile Styles */
    .about-content {
        max-width: 100%;
        padding: 0 1rem;
    }

    .about-franklin-quote {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    .about-franklin-quote-text {
        font-size: 1.5rem;
    }
    .about-quote-mark {
        font-size: 2.5rem;
    }

    .about-subsection {
        margin-bottom: 3.5rem; /* Increased vertical spacing between sections on mobile */
    }

    .about-subsection:last-of-type {
        margin-bottom: 4rem;
    }

    /* Home final CTA: match About mobile spacing between subtitle and button */
    .home-final-cta-block .section-cta-wrapper {
        margin-top: 1.5rem;
    }

    .about-subtitle {
        font-size: 1.75rem;
        margin-bottom: 0;
    }

    .about-statement {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
        max-width: 660px;
    }

    .about-mission-text {
        font-size: 1.75rem;
        margin-top: 0 !important; /* Ensure spacing is controlled by section-title margin-bottom */
        margin-bottom: calc(4rem + 30px) !important; /* Add padding after subheading to push body title down */
    }

    .about-body {
        font-size: 1.125rem;
        line-height: 1.8;
        margin-top: 0;
        margin-bottom: 0.875rem;
        max-width: 660px;
        text-align: left;
    }

    #about .about-body,
    #acerca-de .about-body {
        text-align: center;
    }

    .about-body:last-child {
        margin-bottom: 0;
    }

    .about-canela-quote {
        font-size: 2rem;
        font-weight: 600;
        margin-top: 3rem;
        margin-bottom: 3rem;
    }
    html[lang="es"] .about-canela-quote {
        font-size: 2.559rem;
    }

    .about-two-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-built-for-list li {
        font-size: 1.125rem;
        padding: 0.875rem 1rem;
    }

    /* Global body text sizing – match About body across site (mobile) */
    .card-body,
    .learn-card-body,
    .tools-card-body,
    .trust-privacy-body,
    .step-body,
    .content-body,
    .subsection-subheader,
    .subsection-text,
    .contact-list li {
        font-size: 1.125rem;
        line-height: 1.7;
    }

    .privacy-policy-scroll {
        max-height: 18rem;
        padding: 2rem 1.25rem 1.25rem;
    }

    .privacy-policy-scroll::before {
        opacity: 0.3;
    }

    .about-signature {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .footer-logo-link {
        padding: 1.5rem;
        margin: -1.5rem;
    }

    .footer-signature-img {
        max-width: calc(100vw - 80px); /* As large as possible without extending page (accounts for padding) */
        width: 100%;
        height: auto;
        opacity: 1; /* Full opacity to match charcoal darkness */
        filter: brightness(0) saturate(100%); /* Convert to charcoal/black */
        margin: 0 auto; /* Ensure centering */
    }
}

/* Footer */
html {
    background-color: var(--charcoal);
}

body:has(.site-footer) {
    background-color: var(--charcoal);
}

.site-footer {
    background-color: var(--charcoal);
    color: var(--bone);
    padding: 4rem 0 2rem;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
}

/* Desktop only: footer and logo */
@media (min-width: 769px) {
    .site-footer {
        background-color: var(--charcoal);
        color: var(--bone);
        padding: 0rem 0 0rem;
        margin-top: 0;
        margin-bottom: 0;
        position: relative;
    }

    img.footer-logo-img,
    .footer-logo-img {
        height: 330px;
        padding-left: 100px;
        padding-top: 100px;
    }
}

/* Add jade divider before footer (thicker) */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--jade);
    opacity: 0.6;
}

.site-footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background-color: var(--charcoal);
    z-index: -1;
}

.footer-top-button-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.top-button {
    background: var(--charcoal);
    border: 1px solid rgba(239, 235, 221, 0.2);
    border-radius: 50%;
    color: var(--bone);
    opacity: 0.7;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    width: 48px;
    height: 48px;
    animation: bounce 2s infinite;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.top-button:hover {
    opacity: 0.9;
    border-color: rgba(239, 235, 221, 0.4);
    transform: translateY(-2px);
}

.top-button svg {
    width: 24px;
    height: 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    min-height: 200px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    min-height: 200px;
    width: 100%;
}

.footer-logo-left {
    position: absolute;
    left: -200px;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    top: 0;
    z-index: 1;
}

.footer-icons-right {
    position: absolute;
    right: -200px;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    height: 100%;
    top: 0;
    z-index: 1;
    /* Align vertical center with footer-center content (margin-top: 103px) */
    transform: translateY(51.5px); /* half of 103px so icons' center matches text block center */
}

.footer-logo-right {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo-link {
    display: block;
    cursor: pointer;
    padding: 1rem;
    margin: -1rem;
    transition: opacity 0.3s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.footer-logo-link:hover {
    opacity: 0.9;
}

.footer-logo-link:active {
    transform: scale(0.98);
    opacity: 0.8;
}

.footer-logo-img {
    height: 360px;
    width: auto;
    max-width: 450px;
    opacity: 0.6;
    display: block;
    object-fit: contain;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.footer-logo-link:hover .footer-logo-img {
    opacity: 0.8;
}

.footer-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0 2rem;
    margin: 0 auto;
    max-width: 100%;
    margin-top: 103px;
}

.footer-signature {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% + 45px)); /* Center horizontally and vertically */
    display: block;
    z-index: 10;
}

.footer-signature-text {
    color: var(--bone);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    opacity: 0.6;
    font-weight: 300;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 70px)); /* Center horizontally */
    white-space: nowrap;
    z-index: 11;
    pointer-events: none;
}

.footer-signature-img {
    max-width: 405px;
    width: auto;
    height: auto;
    opacity: 1; /* Full opacity to match charcoal darkness */
    display: block;
    visibility: visible;
    margin: 0 auto; /* Center horizontally */
    transform: scale(0.9);
    filter: brightness(0) saturate(100%); /* Convert to charcoal/black */
}

.footer-links-and-social {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 4rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.footer-links-and-social .footer-links {
    margin-bottom: 0;
    width: auto;
}

.footer-links-and-social .footer-social {
    margin-top: 0;
    margin-bottom: 0;
    width: auto;
}

.footer-social {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4rem;
    margin-bottom: 0.5rem;
}

.social-icon {
    color: var(--bone);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icon:hover {
    opacity: 1;
}

.social-icon svg {
    width: 28px;
    height: 28px;
}

.footer-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--bone);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

.footer-link:hover {
    opacity: 1;
}

.footer-copyright {
    margin-top: 0;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.footer-copyright p {
    color: var(--bone);
    font-size: 0.875rem;
    opacity: 0.6;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    margin: 0;
}

.footer-copyright .palma-text {
    color: var(--jade);
    /* inherits opacity from .footer-copyright p so whole line matches */
}

.palma-text {
    color: var(--jade);
    opacity: 1;
}

.palma-lang-toggle {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    opacity: 1;
}

.palma-lang-toggle:hover {
    text-decoration: underline;
}

.roman-numeral {
    color: var(--bone);
    opacity: 0.6;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
}

.footer-lang {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    margin-right: -20px; /* Move 20px to the right */
    position: absolute;
    right: calc(2rem - 20px); /* Match footer-center padding and adjust for margin-right */
    top: 50%; /* Center vertically in footer-content */
    transform: translateY(calc(-50% + 30px + 1.5rem + 0.45rem - 30px)); /* Align toggle center with Privacy Policy: adjusted upward by 30px */
}

.footer-lang-label {
    display: none; /* Hide label text */
}

.footer-lang-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 206.55px; /* Decreased by 0.1: 229.5px * 0.9 = 206.55px */
    height: 45.9px; /* Decreased by 0.1: 51px * 0.9 = 45.9px */
    background: rgba(239, 235, 221, 0.15);
    border: 1px solid rgba(239, 235, 221, 0.35);
    border-radius: 22.95px; /* Decreased by 0.1: 25.5px * 0.9 = 22.95px */
    padding: 4.59px; /* Decreased by 0.1: 5.1px * 0.9 = 4.59px */
    box-sizing: border-box;
    cursor: pointer;
    gap: 6.885px; /* Decreased by 0.1: 7.65px * 0.9 = 6.885px */
}

.footer-lang-toggle input {
    display: none;
}

.footer-lang-toggle .slider {
    position: absolute;
    top: 50%;
    left: 4.59px; /* Decreased by 0.1: 5.1px * 0.9 = 4.59px */
    width: 92.9475px; /* ~90% of half the track (206.55px / 2 = 103.275px, 90% = 92.9475px) */
    height: 36.72px; /* Decreased by 0.1: 40.8px * 0.9 = 36.72px */
    background-color: var(--jade); /* exact same jade as © 2025 PALMA FINANCIAL LLC */
    border: 1px solid var(--jade);
    border-radius: 18.36px; /* Decreased by 0.1: 20.4px * 0.9 = 18.36px */
    opacity: 0.6; /* Match footer jade text appearance (palma-text appears at 0.6 due to parent opacity) */
    transform: translateY(-50%);
    transition: transform 0.05s ease;
    box-sizing: border-box;
}

.footer-lang-toggle input:checked + .slider {
    transform: translateX(104.4225px) translateY(-50%); /* 206.55px - 9.18px padding - 92.9475px slider = 104.4225px */
}

.footer-lang-toggle .toggle-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    font-size: 0.860625rem; /* Decreased by 0.1: 0.95625rem * 0.9 = 0.860625rem */
    color: var(--bone);
    z-index: 2;
    pointer-events: none;
    font-weight: 500;
    padding: 0 4.59px; /* Decreased by 0.1: 5.1px * 0.9 = 4.59px */
    box-sizing: border-box;
    text-transform: capitalize; /* Make "English" and "Español" uppercase */
}

.footer-lang-toggle .toggle-en,
.footer-lang-toggle .toggle-es {
    position: absolute;
    top: 50%;
    width: auto;
    text-align: center;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-50%);
}

/* Center "English" within left slider position: slider starts at 4.59px, is 92.9475px wide, center at 4.59px + 46.47375px = 51.06375px */
.footer-lang-toggle .toggle-en {
    left: 51.06375px;
    transform: translateX(-50%) translateY(-50%);
}

/* Center "Español" within right slider position: slider at 4.59px + 104.4225px = 109.0125px, center at 109.0125px + 46.47375px = 155.48625px */
.footer-lang-toggle .toggle-es {
    left: 155.48625px;
    transform: translateX(-50%) translateY(-50%);
}

/* When ES is active (checked), dim EN and highlight ES */
.footer-lang-toggle input:checked ~ .toggle-text .toggle-en {
    opacity: 0.6;
}

.footer-lang-toggle input:checked ~ .toggle-text .toggle-es {
    opacity: 1;
}

/* When EN is active (not checked), highlight EN and dim ES */
.footer-lang-toggle input:not(:checked) ~ .toggle-text .toggle-en {
    opacity: 1;
}

.footer-lang-toggle input:not(:checked) ~ .toggle-text .toggle-es {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 3rem 0 2rem;
    }
    
    /* Ensure footer extends charcoal background below on mobile */
    .site-footer::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100vh;
        background-color: var(--charcoal) !important;
        z-index: -1;
        pointer-events: none;
    }
    
    /* Ensure html and body are charcoal when footer is present */
    html:has(.site-footer),
    body:has(.site-footer) {
        background-color: var(--charcoal) !important;
    }

    .footer-top-button-container {
        top: 15px;
    }

    .top-button {
        width: 40px;
        height: 40px;
        padding: 0.625rem;
    }

    .top-button svg {
        width: 20px;
        height: 20px;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-center {
        grid-column: auto;
    }

    .footer-lang {
        display: flex; /* Show language toggle on mobile */
        flex-direction: column;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
        margin-top: 1.5rem;
        width: 100%;
        position: static; /* Revert to static positioning for mobile */
        transform: none; /* Remove transform for mobile */
        right: auto; /* Remove absolute positioning for mobile */
        top: auto; /* Remove absolute positioning for mobile */
    }
    
    .footer-lang-toggle {
        width: 195px; /* Smaller for mobile: 229.5px * 0.85 = 195px */
        height: 43px; /* Smaller for mobile: 51px * 0.85 = 43px */
        border-radius: 21.5px; /* Smaller for mobile */
        padding: 4.3px; /* Smaller for mobile */
        gap: 6.5px; /* Smaller for mobile */
    }
    
    .footer-lang-toggle .slider {
        left: 4.3px; /* Smaller for mobile */
        width: 87.8px; /* Smaller for mobile: 103.275px * 0.85 = 87.8px */
        height: 34.7px; /* Smaller for mobile: 40.8px * 0.85 = 34.7px */
        border-radius: 17.3px; /* Smaller for mobile */
    }
    
    .footer-lang-toggle input:checked + .slider {
        transform: translateX(98.6px) translateY(-50%); /* Adjusted for smaller toggle */
    }
    
    .footer-lang-toggle .toggle-text {
        font-size: 0.8125rem; /* Smaller for mobile: 0.95625rem * 0.85 = 0.8125rem */
        padding: 0 4.3px; /* Smaller for mobile */
    }
    
    .footer-lang-toggle .toggle-en {
        left: 48.2px; /* Adjusted for smaller toggle */
    }
    
    .footer-lang-toggle .toggle-es {
        left: 146.8px; /* Adjusted for smaller toggle */
    }

    .footer-logo-left {
        order: -1;
        position: relative;
        left: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .footer-icons-right {
        position: relative;
        right: auto;
        width: auto;
        height: auto;
        top: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.25rem;
        margin-top: 0;
        margin-bottom: 0;
    }

    .footer-signature {
        position: static;
        margin-top: 2rem;
        right: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .footer-signature-text {
        position: static;
        transform: none;
        left: auto;
        top: auto;
        margin-bottom: 0.5rem;
    }

    .footer-signature-img {
        margin-left: 0;
        max-width: calc(100vw - 80px); /* As large as possible without extending page (accounts for padding) */
        width: 100%;
        height: auto;
        transform: none; /* Remove scale transform */
        opacity: 1; /* Full opacity to match charcoal darkness */
        filter: brightness(0) saturate(100%); /* Convert to charcoal/black */
        margin: 0 auto; /* Ensure centering */
    }

    .footer-logo-img {
        height: 180px;
        max-width: 225px;
    }

    .footer-center {
        width: 100%;
    }

    .footer-copyright {
        margin-top: 0;
    }

    .footer-social,
    .footer-icons-right {
        gap: 1.25rem;
        margin-top: 0;
    }

    .social-icon {
        width: 24px;
        height: 24px;
    }

    .social-icon svg {
        width: 24px;
        height: 24px;
    }

    /* Spanish mobile: prevent footer links from wrapping, adjust for longer text */
    html[lang="es"] .footer-link {
        white-space: nowrap;
        font-size: 0.85rem;
    }

    html[lang="es"] .footer-links {
        gap: 1.5rem;
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 200px;
    }

    .title {
        font-size: 2.5rem;
    }
}
