@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-deep: #0D0D0D;
    --bg-paper: #FDFBF7;
    --text-main: #E5E5E5;
    --text-muted: #A0A0A0;
    --accent: #E8B10C;
    /* Bright Gold */
    --accent-warm: #4A3728;
    /* Earthy Brown */
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Inter', sans-serif;
    --transition-slow: all 0.8s cubic-bezier(0.2, 0, 0.2, 1);

    /* Fluid Spacing & Type */
    --section-pad: clamp(5rem, 15vw, 12rem);
    --container-width: 1400px;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--sans);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
blockquote,
.serif {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.2;
}

/* Typography Overhaul - Fluid */
h1 {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    font-style: italic;
}

p {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    letter-spacing: 0.01em;
    color: var(--text-muted);
}

/* Layout & Spacing - Imperfect & Natural */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

section {
    padding: var(--section-pad) 0;
}

/* Navigation - Minimal & Elegant */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 1000;
    transition: var(--transition-slow);
    background: rgba(8, 8, 8, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header > .container,
header .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 1.5rem !important;
    margin: 0 !important;
}

header.scrolled {
    background: rgba(5, 5, 5, 0.95);
    padding: 1.2rem 0;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(184, 134, 11, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    text-decoration: none !important;
    color: var(--text-main) !important;
    font-family: var(--serif);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.nav-menu {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
}

.nav-menu a,
.nav-menu a:link,
.nav-menu a:visited {
    text-decoration: none !important;
    color: #E8E8E8 !important;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    transition: all 0.4s ease;
    font-weight: 500;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:active {
    color: #fff !important;
    letter-spacing: 0.22em;
}

.nav-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

.nav-actions a:link,
.nav-actions a:visited,
.nav-actions a {
    text-decoration: none !important;
}

.btn-primary-nav {
    padding: 0.8rem 1.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary-nav:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
}

.nav-separator {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.nav-login-link {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #E8E8E8 !important;
    text-decoration: none !important;
}

.btn-join {
    background: transparent;
    color: var(--accent) !important;
    padding: 0.7rem 1.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none !important;
    font-weight: 600;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.btn-join:hover {
    opacity: 0.85;
}

.user-first-name {
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Sub-Header Styling */
.sub-header {
    padding: clamp(0.3rem, 1vw, 0.7rem) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(8, 8, 8, 0.5);
    transition: all 0.3s ease;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    font-size: clamp(0.55rem, 0.8vw, 0.75rem);
}

.sub-header::-webkit-scrollbar {
    display: none;
}

.sub-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: max-content;
    padding: 0 1rem;
    gap: clamp(0.8rem, 2vw, 3rem);
    /* Smaller gap minimum */
}

.sub-left {
    flex: 1;
    display: flex;
    gap: 2rem;
}

.sub-left a {
    color: var(--text-muted) !important;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    white-space: nowrap;
    /* Prevent phone/email wrapping */
}

.sub-left a:hover {
    color: var(--accent) !important;
}

.sub-left i {
    color: var(--accent);
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
}

.sub-middle {
    flex: 1;
    /* Less space for middle now */
}

.search-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 1px clamp(8px, 1vw, 12px);
    width: clamp(150px, 15vw, 250px);
    /* Fluid width */
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: rgba(184, 134, 11, 0.4);
    background: rgba(255, 255, 255, 0.05);
    width: clamp(200px, 20vw, 320px);
}

.search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 10px;
    width: 100%;
    font-size: 0.75rem;
    outline: none;
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.search-bar button:hover {
    color: var(--accent);
}

.sub-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
}

.sub-right a {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.sub-right a:hover {
    color: var(--accent) !important;
    transform: translateY(-2px);
}

/* Dropdown Styles Unified */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(10, 10, 10, 0.98);
    min-width: 200px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.8rem 0;
    margin-top: 15px;
    backdrop-filter: blur(20px);
}

.nav-dropdown-content::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: flex;
    flex-direction: column;
}

.nav-dropdown-content a {
    color: #E8E8E8 !important;
    padding: 0.8rem 1.5rem !important;
    text-decoration: none !important;
    display: block !important;
    text-align: left;
    font-size: 0.75rem !important;
    letter-spacing: 0.12em !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.nav-dropdown-content a:hover {
    background-color: rgba(184, 134, 11, 0.1) !important;
    color: var(--accent) !important;
    padding-left: 1.8rem !important;
}

/* Hero Section - SaaS */
.hero {
    background: var(--bg-deep);
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 35%, rgba(184, 134, 11, 0.12), transparent 35%),
        linear-gradient(135deg, rgba(255,255,255,0.025), transparent 45%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-top: 5vh;
}

.hero-content h1 {
    margin-bottom: 2rem;
    color: #fff !important;
    max-width: 800px;
    text-shadow: none;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 500px;
    color: rgba(255,255,255,0.88) !important;
    text-shadow: none;
}

.hero-content .caption {
    color: var(--accent) !important;
    text-shadow: none;
}

/* Buttons - Grounded */
.btn-story {
    padding: 1.2rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.5s ease;
    display: inline-block;
}

.btn-story:hover {
    background: #fff;
    color: #000;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
}

/* Story Sections */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: clamp(3rem, 8vw, 8vw);
    align-items: center;
}

/* History 3-pillar grid — collapses to 1 column on mobile */
.history-pillars {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem;
}

/* Messages 2-column grid — collapses to 1 column on mobile */
.messages-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
}

@media (max-width: 768px) {
    .history-pillars {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .messages-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.story-image {
    position: relative;
}

.story-image img {
    width: 100%;
    height: auto;
    filter: grayscale(0.2);
}

.caption {
    font-family: var(--serif);
    font-style: italic;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

/* Handwritten Style */
.handwritten {
    font-family: var(--serif);
    font-style: italic;
    font-size: 2.5rem;
    line-height: 1.4;
    color: var(--text-main);
    border-left: 2px solid var(--accent);
    padding-left: 3rem;
    margin: 4rem 0;
}

/* Cards - Natural & Grounded */
.journey-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem;
    transition: var(--transition-slow);
}

.journey-card:hover {
    border-color: var(--accent);
}

/* Bookstore - Organic */
.book-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: clamp(2rem, 5vw, 5rem);
}

.book-item {
    text-align: left;
}

.book-img-wrapper {
    background: #151515;
    padding: 4rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-img-wrapper img {
    max-width: 100%;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.5);
    transform: rotate(-5deg);
    transition: transform 0.6s ease;
}

.book-item:hover img {
    transform: rotate(0deg) scale(1.05);
}

/* Footer - Movement HQ */
footer {
    background: #050505;
    padding: 8rem 0 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Feature Cards */
.feature-card {
    transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover i {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Pricing Cards */
.pricing-card {
    transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.pricing-card:nth-child(2):hover {
    transform: scale(1.08) translateY(-8px);
}

/* Improved Button Styles */
.btn-story {
    transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.btn-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 134, 11, 0.4);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2rem;
}

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

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1.2s cubic-bezier(0.2, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Specific Adjustments */
@media (max-width: 968px) {

    header {
        padding: 0.8rem 0 !important;
    }

    header > .container,
    header .container {
        padding: 0 1rem !important;
    }

    .nav-container {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .logo {
        font-size: 1.15rem !important;
        white-space: nowrap !important;
        flex: none !important;
    }

    .btn-join {
        padding: 0.5rem 1rem !important;
        font-size: 0.65rem !important;
        letter-spacing: 0.1em !important;
    }

    .nav-login-link {
        font-size: 0.65rem !important;
        letter-spacing: 0.1em !important;
    }

    .btn-story {
        padding: 0.8rem 1.8rem !important;
        font-size: 0.8rem !important;
    }

    .nav-menu,
    .nav-actions .btn-primary-nav,
    .nav-separator,
    .user-first-name,
    .sub-header {
        display: none !important;
    }

    .nav-actions {
        flex: none;
        gap: 0.6rem !important;
        align-items: center;
        flex-direction: row !important;
    }

    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px !important;
        cursor: pointer;
        z-index: 1001;
        padding: 8px !important;
        /* Always visible on mobile */
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-toggle span {
        display: block;
        width: 20px !important;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s ease;
    }

    /* In light mode, make bars dark so visible on light header */
    .light-mode .mobile-toggle span,
    html.light-mode .mobile-toggle span {
        background-color: #1C1B1A;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg) !important;
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg) !important;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        background: rgba(10, 10, 10, 0.99);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0 !important;
        transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
        transform: translateX(100%);
        padding: 0 !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    }

    .light-mode .mobile-menu-overlay {
        background: rgba(13, 10, 8, 0.99) !important;
    }

    .mobile-menu-overlay.active {
        transform: translateX(0);
    }

    /* Close button */
    .mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1.2rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1002;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        background: transparent;
        transition: all 0.3s ease;
    }

    .mobile-menu-close:hover {
        border-color: var(--accent);
        background: rgba(184, 134, 11, 0.1);
    }

    .mobile-menu-close i {
        color: #fff;
        font-size: 1rem;
    }

    /* Mobile menu header area */
    .mobile-menu-utility {
        width: 100%;
        padding: 1.2rem 1.5rem !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .m-util-top {
        display: flex;
        align-items: center;
        gap: 1.2rem;
    }

    .m-util-top a {
        font-size: 1.1rem !important;
        color: var(--text-muted) !important;
        opacity: 1 !important;
        transform: none !important;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
    }

    .m-util-top a:hover {
        color: var(--accent) !important;
    }

    .m-util-sep {
        width: 1px;
        height: 16px;
        background: rgba(255, 255, 255, 0.12);
    }

    .mobile-menu-logo {
        font-family: var(--serif);
        font-size: 1.4rem !important;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: #fff;
        margin: 0 !important;
        padding: 1.5rem 1.5rem 1rem !important;
        width: 100%;
        border-bottom: 1px solid var(--accent);
    }

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

    /* Search in mobile menu */
    .mobile-search-container {
        padding: 1rem 1.5rem !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* Nav links */
    .mobile-menu-overlay > a {
        font-size: 0.9rem !important;
        text-transform: uppercase;
        letter-spacing: 0.18em !important;
        color: #fff !important;
        text-decoration: none !important;
        font-family: var(--sans);
        font-weight: 500;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.35s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        width: 100%;
        padding: 1rem 1.5rem !important;
        display: block;
    }

    .mobile-menu-overlay > a:hover {
        color: var(--accent) !important;
        background: rgba(255, 255, 255, 0.02);
    }

    .mobile-menu-overlay > a.btn-join {
        background: transparent !important;
        color: var(--accent) !important;
        text-align: center;
        margin: 1rem 1.5rem !important;
        width: calc(100% - 3rem) !important;
        padding: 0.9rem 1.5rem !important;
        border-radius: 0;
        font-weight: 600;
        letter-spacing: 0.2em !important;
        border: none !important;
    }

    .mobile-menu-overlay.active > a,
    .mobile-menu-overlay.active .mobile-menu-utility,
    .mobile-menu-overlay.active .mobile-menu-logo,
    .mobile-menu-overlay.active .mobile-search-container {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger animation for nav links */
    .mobile-menu-overlay > a:nth-of-type(1) { transition-delay: 0.1s; }
    .mobile-menu-overlay > a:nth-of-type(2) { transition-delay: 0.15s; }
    .mobile-menu-overlay > a:nth-of-type(3) { transition-delay: 0.2s; }
    .mobile-menu-overlay > a:nth-of-type(4) { transition-delay: 0.25s; }
    .mobile-menu-overlay > a:nth-of-type(5) { transition-delay: 0.3s; }
    .mobile-menu-overlay > a:nth-of-type(6) { transition-delay: 0.35s; }
    .mobile-menu-overlay > a:nth-of-type(7) { transition-delay: 0.4s; }
    .mobile-menu-overlay > a:nth-of-type(8) { transition-delay: 0.45s; }
    .mobile-menu-overlay > a:nth-of-type(9) { transition-delay: 0.5s; }
    .mobile-menu-overlay > a:nth-of-type(10) { transition-delay: 0.55s; }

    /* Backdrop Dimming */
    body.menu-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.5s ease;
    }

    body.menu-open.active::after {
        opacity: 1;
        visibility: visible;
    }

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

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

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

    .handwritten {
        font-size: 1.8rem;
        padding-left: 1.5rem;
        margin: 2rem 0;
    }

    .book-img-wrapper {
        padding: 2rem;
    }

    .book-img-wrapper img {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 6vw;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    /* Hero inner content must fill full width on small screens */
    .hero-content > div,
    .hero-content div[style*="max-width"] {
        max-width: 100% !important;
        width: 100% !important;
    }

    .btn-story {
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem;
    }

    /* Ensure button row stacks vertically */
    .hero-content div div,
    .hero-content div[style*="display: flex"] {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    /* Prevent any grid/flex from creating horizontal overflow */
    .story-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Responsive Floating Actions (Theme Toggle & WhatsApp Chat Widget) */
@media (max-width: 768px) {
    #theme-pill-global {
        bottom: 1.2rem !important;
        left: 1.2rem !important;
        padding: 0.45rem 0.9rem !important;
        gap: 0.5rem !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    }

    #tpg-text {
        font-size: 0.6rem !important;
        letter-spacing: 0.1em !important;
    }

    #tpg-icon {
        font-size: 0.75rem !important;
    }

    .ai-chat-widget {
        bottom: 1.2rem !important;
        right: 1.2rem !important;
    }

    .chat-toggle {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.3rem !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    }

    .chat-window {
        bottom: 56px !important;
        width: 280px !important;
        height: 380px !important;
        right: 0 !important;
    }
}

/* AI Chat Widget */
.ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    font-family: var(--sans);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform-origin: bottom right;
    animation: chatOpen 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.active {
    display: flex;
}

@keyframes chatOpen {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-header {
    background: #075E54;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-header h4 {
    font-size: 0.95rem;
    margin: 0;
}

.online-status {
    font-size: 0.7rem;
    color: #dcf8c6;
    opacity: 0.8;
}

.close-chat {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: cover;
    background-blend-mode: overlay;
    background-color: #0d0d0d;
}

.message {
    display: flex;
}

.message.user {
    justify-content: flex-end;
}

.message .bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
}

.message.ai .bubble {
    background: #1e1e1e;
    color: #e1e1e1;
    border-top-left-radius: 0;
}

.message.user .bubble {
    background: #056162;
    color: #fff;
    border-top-right-radius: 0;
}

.chat-input-area {
    padding: 10px;
    background: #1e1e1e;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 8px 15px;
    color: white;
    outline: none;
    font-size: 0.9rem;
}

.chat-input-area button {
    background: #075E54;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

.whatsapp-fallback {
    padding: 10px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.whatsapp-fallback a {
    color: #25D366;
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

@media (max-width: 480px) {
    .chat-window {
        width: 280px;
        /* Mini widget size for mobile */
        height: 400px;
        bottom: 80px;
        right: 10px;
        border-radius: 12px;
    }

    .ai-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .chat-header h4 {
        font-size: 0.85rem;
    }

    .message .bubble {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .chat-input-area input {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Typing Indicator Animation */
.typing-active {
    color: #25D366 !important;
    font-weight: bold;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* ==========================================================================
   LANDING PAGE PREMIUM LIGHT MODE STYLING SYSTEM
   ========================================================================== */
.light-mode {
    --bg-deep: #FAF8F5; /* Warm linen off-white */
    --bg-paper: #FFFFFF;
    --text-main: #1C1B1A; /* Charcoal/Dark Brown */
    --text-muted: #6B6862; /* Elegant earthy grey */
    --accent: #916805; /* Deeper warm gold for contrast */
    --text-nav-user: #1C1B1A; /* Dark active user name in light mode */
}

/* Base structural overrides in Light Mode */
.light-mode body,
.light-mode {
    background-color: var(--bg-deep) !important;
    color: var(--text-main) !important;
}

.light-mode .sub-header {
    background: rgba(243, 240, 234, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.light-mode #main-header {
    background: rgba(250, 248, 245, 0.8) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.light-mode #main-header.scrolled {
    background: rgba(245, 243, 238, 0.96) !important;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2) !important;
}

.light-mode .logo {
    color: #1C1B1A !important;
}

.light-mode .logo span {
    color: var(--accent) !important;
}

.light-mode .nav-menu a,
.light-mode .nav-menu a:link,
.light-mode .nav-menu a:visited {
    color: #1C1B1A !important;
}

.light-mode .nav-menu a:hover,
.light-mode .nav-menu a:active {
    color: var(--accent) !important;
}

.light-mode .nav-login-link {
    color: #1C1B1A !important;
}

.light-mode .mobile-toggle span {
    background: #1C1B1A !important;
}

.light-mode .btn-primary-nav {
    color: #4A4740 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

.light-mode .btn-primary-nav:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.light-mode .sub-left a,
.light-mode .sub-right a {
    color: #6B6862 !important;
}

.light-mode .search-bar input {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1C1B1A !important;
}

.light-mode .search-bar button {
    color: #6B6862 !important;
}

.light-mode section[style*="background: #080808"],
.light-mode section[style*="background:#080808"] {
    background: #F3EFE8 !important;
}

.light-mode .serif,
.light-mode h1,
.light-mode h2,
.light-mode h3,
.light-mode h4 {
    color: #1C1B1A !important;
}

.light-mode p {
    color: #6B6862 !important;
}

.light-mode blockquote {
    color: #3E3B35 !important;
}

.light-mode .btn-story {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

.light-mode .btn-story:hover {
    background: var(--accent) !important;
    color: #000 !important;
}

.light-mode .btn-primary {
    background: transparent !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.light-mode .btn-primary:hover {
    background: var(--accent) !important;
    color: #000 !important;
}

/* Cinematic Hero overrides in Light Mode — gold text */
.light-mode .hero .serif,
.light-mode .hero h1,
.light-mode .hero p,
.light-mode .hero .caption,
.light-mode .hero-content h1,
.light-mode .hero-content p,
.light-mode .hero-content .caption,
.light-mode .hero-content span {
    color: var(--accent) !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}

/* Subtle product-style depth in light mode */
.light-mode .hero-overlay {
    background:
        radial-gradient(circle at 78% 35%, rgba(184, 134, 11, 0.1), transparent 35%),
        linear-gradient(135deg, rgba(0,0,0,0.025), transparent 45%) !important;
}

/* Hero text contrast in light mode */
.light-mode .hero-content .caption {
    color: var(--accent) !important;
    opacity: 1 !important;
}

/* Hero button in light mode */
.light-mode .hero-content .btn-story {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    background: transparent !important;
}

.light-mode .hero-content .btn-story:hover {
    background: var(--accent) !important;
    color: #000 !important;
}

.light-mode .hero-content .btn-primary {
    background: transparent !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.light-mode .hero-content .btn-primary:hover {
    background: var(--accent) !important;
    color: #000 !important;
}

/* Testimonials panel in Light Mode */
.light-mode section[style*="border-top: 1px solid rgba(255,255,255,0.05)"] {
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* History overlay exceptions - keeping it highly dramatic */
.light-mode #history .serif,
.light-mode #history h2,
.light-mode #history h3,
.light-mode #history p,
.light-mode #history span,
.light-mode #history blockquote {
    color: #FFFFFF !important;
}

/* Book showcase block in Light Mode */
.light-mode .book-img-wrapper {
    background: #F3EFE8 !important;
    border: 1px solid rgba(0, 0, 0, 0.02) !important;
}

/* Feature Cards in Light Mode */
.light-mode .feature-card {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.light-mode .feature-card:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: var(--accent) !important;
}

.light-mode .feature-card h3,
.light-mode .feature-card p {
    color: #1C1B1A !important;
}

/* Pricing Cards in Light Mode */
.light-mode .pricing-card {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.light-mode .pricing-card:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: var(--accent) !important;
}

.light-mode .pricing-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(145, 104, 5, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
}

.light-mode .pricing-card span,
.light-mode .pricing-card li {
    color: #1C1B1A !important;
}

.light-mode .pricing-card ul li {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

/* ========================================
   MOBILE RESPONSIVE DESIGN
   ======================================== */

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
    }

    header {
        padding: 0.6rem 0 !important;
    }

    header > .container,
    header .container {
        padding: 0 0.75rem !important;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    .nav-actions {
        flex: none !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    .nav-actions .btn-primary-nav {
        display: none !important;
    }
    
    .mobile-toggle {
        display: flex !important;
        position: static !important;
        z-index: 1001;
    }
    
    .sub-header {
        display: none !important;
    }
    
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(8, 8, 8, 0.98);
        z-index: 999;
        padding: 4rem 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-menu.active {
        transform: translateX(0);
    }
    
    .mobile-menu a {
        display: block;
        padding: 1rem 0;
        color: #fff;
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu-logo {
        font-size: 2rem;
        margin-bottom: 3rem;
        color: var(--accent);
    }
}

/* Mobile Hero Section */
@media (max-width: 768px) {
    .hero-content {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3rem) !important;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-content .btn-story {
        width: 100%;
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
}

/* Mobile Grid Layouts */
@media (max-width: 768px) {
    .story-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .story-image {
        order: -1;
    }
    
    .history-pillars {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .messages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .book-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-card {
        padding: 2rem 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.2rem !important;
    }
    
    .feature-card {
        padding: 1.2rem 0.8rem !important;
    }
    
    .feature-card h3 {
        font-size: 1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .feature-card p {
        font-size: 0.8rem !important;
        line-height: 1.5 !important;
    }
    
    .feature-card > div:first-child {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 100%;
    }
    
    .pricing-card {
        padding: 3rem 2rem;
    }
    
    .pricing-card:nth-child(2) {
        transform: none;
    }
}

/* Mobile Tables */
@media (max-width: 768px) {
    table {
        font-size: 0.85rem;
    }
    
    table thead {
        display: none;
    }
    
    table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
    }
    
    table tbody td {
        display: block;
        padding: 0.5rem 0;
        border: none;
    }
    
    table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--accent);
        display: block;
        margin-bottom: 0.25rem;
    }
}

/* Mobile Forms */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-story {
        width: 100%;
        padding: 1rem;
    }
}

/* Mobile Admin Dashboard */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        padding: 2rem 1rem;
    }
    
    .admin-nav {
        display: none;
    }
    
    .admin-mobile-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1001;
        background: var(--accent);
        color: #000;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        cursor: pointer;
    }
}

/* Mobile Member Dashboard */
@media (max-width: 768px) {
    .member-dashboard {
        padding-top: 100px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(8, 8, 8, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
        z-index: 100;
        flex-direction: row;
        justify-content: space-around;
    }
    
    .dashboard-nav li {
        margin: 0;
    }
    
    .dashboard-nav a {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 3rem;
    }
    
    .hero-content {
        padding: 3rem 0;
    }
    
    .story-grid {
        gap: 4rem;
    }
    
    .stat-card {
        padding: 2.5rem;
    }
    
    h1 {
        font-size: clamp(2rem, 6vw, 4rem);
    }
}

/* Touch-Friendly Elements */
@media (max-width: 768px) {
    .btn-story,
    .btn-primary,
    .btn-action {
        min-height: 48px;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
    }
    
    .nav-dropdown-content a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Mobile Menu Toggle Button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile-Specific Optimizations */
@media (max-width: 480px) {
    :root {
        --section-pad: clamp(3rem, 10vw, 8rem);
    }
    
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .hero-content {
        padding: 1rem 0;
    }
    
    .book-item-home {
        padding: 0.8rem;
    }
    
    .book-img-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .book-img-wrapper img {
        height: 150px !important;
        transform: rotate(0deg) !important;
    }
    
    .book-item-home h3 {
        font-size: 0.85rem !important;
    }
    
    .book-item-home p {
        font-size: 0.75rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .book-item-home .btn-story {
        padding: 0.5rem 1rem !important;
        font-size: 0.65rem !important;
    }
    
    .feature-card h3 {
        font-size: 0.9rem !important;
    }
    
    .feature-card p {
        font-size: 0.75rem !important;
    }
    
    .feature-card i {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Make donation buttons stack on mobile */
    .hero-content .btn-story {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    /* Optimize forms for mobile */
    input,
    textarea,
    select {
        padding: 1rem;
        font-size: 16px;
    }
    
    /* Mobile-friendly tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Improve touch targets */
    button,
    a.btn-story,
    .btn-action {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 50vh;
    }
    
    .hero-content {
        padding: 1rem 0;
    }
}

/* High DPI/Mobile Device Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Improve font rendering on high DPI displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Optimize images for retina displays */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Safe Area for Notched Mobile Devices */
@supports (padding: max(0px)) {
    header {
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
    }
    
    .mobile-menu {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles for Mobile */
@media print and (max-width: 768px) {
    header,
    .mobile-toggle,
    .mobile-menu {
        display: none;
    }
    
    main {
        padding: 0;
    }
}
/* ==========================================================================
   ADDITIONAL LIGHT MODE FIXES — Text Visibility & Comprehensive Overrides
   ========================================================================== */

/* Nav dropdown in light mode */
.light-mode .nav-dropdown-content {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.light-mode .nav-dropdown-content a {
    color: #4A4740 !important;
}

.light-mode .nav-dropdown-content a:hover {
    background-color: rgba(145, 104, 5, 0.08) !important;
    color: var(--accent) !important;
}

/* Nav separator in light mode */
.light-mode .nav-separator {
    background: rgba(0, 0, 0, 0.12) !important;
}

/* Btn-join in light mode */
.light-mode .btn-join {
    background: transparent !important;
    color: var(--accent) !important;
}

/* User first name in light mode */
.light-mode .user-first-name {
    color: #1C1B1A !important;
}

/* Search bar in light mode */
.light-mode .search-bar {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Conversations section — inline-styled text */
.light-mode #conversations p,
.light-mode #conversations h2,
.light-mode #conversations h4,
.light-mode #conversations span {
    color: #1C1B1A !important;
}

.light-mode #conversations .caption {
    color: var(--accent) !important;
}

/* Messages section heading text */
.light-mode .messages-grid h3,
.light-mode .messages-grid p {
    color: #1C1B1A !important;
}

/* Academy section text in light mode */
.light-mode #academy p[style*="color: #ccc"] {
    color: #6B6862 !important;
}

.light-mode #academy div[style*="background: #111"] {
    background: #E8E3DA !important;
}

.light-mode #academy div[style*="background: var(--accent)"] h4 {
    color: #000 !important;
}

/* Testimonials in light mode — blockquote white text override */
.light-mode section[style*="border-top"] blockquote[style*="color: #fff"] {
    color: #1C1B1A !important;
}

/* Pricing section — price numbers in light mode */
.light-mode .pricing-card span[style*="color: #fff"],
.light-mode .pricing-card span[style*="color:#fff"] {
    color: #1C1B1A !important;
}

/* Features section specific */
.light-mode #features .caption {
    color: var(--accent) !important;
}

.light-mode .feature-card p {
    color: #6B6862 !important;
}

/* Handwritten blockquote in light mode */
.light-mode .handwritten {
    color: #1C1B1A !important;
    border-left-color: var(--accent) !important;
}

/* Journey card (booking form) — keep dark-themed in light mode */
.light-mode .journey-card {
    background: #111 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.light-mode .journey-card .serif,
.light-mode .journey-card h4,
.light-mode .journey-card label {
    color: var(--accent) !important;
}

.light-mode .journey-card p,
.light-mode .journey-card span {
    color: #ccc !important;
}

.light-mode .journey-card input,
.light-mode .journey-card textarea,
.light-mode .journey-card select {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.light-mode .journey-card input::placeholder,
.light-mode .journey-card textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.light-mode .journey-card input[type="date"] {
    color-scheme: dark !important;
}

.light-mode .journey-card .btn-primary {
    background: var(--accent) !important;
    color: #fff !important;
}

/* Footer in Light Mode — keep dark for contrast */
.light-mode footer {
    background: #1C1B1A !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.light-mode footer .logo {
    color: #E5E5E5 !important;
}

.light-mode footer p {
    color: #A0A0A0 !important;
}

.light-mode footer h4,
.light-mode footer .footer-title {
    color: #fff !important;
}

.light-mode footer .footer-links a {
    color: #A0A0A0 !important;
}

.light-mode footer .footer-links a:hover {
    color: #B8860B !important;
}

.light-mode footer div[style*="border-top"] {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.light-mode footer div[style*="border-top"] p {
    color: #A0A0A0 !important;
}

/* Chat widget in light mode */
.light-mode .chat-window {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

.light-mode .chat-messages {
    background-color: #f5f5f0 !important;
}

.light-mode .message.ai .bubble {
    background: #e8e5de !important;
    color: #1C1B1A !important;
}

.light-mode .chat-input-area {
    background: #f0ede6 !important;
}

.light-mode .chat-input-area input {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1C1B1A !important;
}

/* ==========================================================================
   IMPROVED FOOTER STYLING
   ========================================================================== */

footer {
    background: #0A0A0A;
    padding: 6rem 0 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-title {
    letter-spacing: 0.03em;
}

.footer-links a {
    font-size: 0.9rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    padding-left: 4px;
}

/* Support Us button in footer */
.footer-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    background: transparent;
    border: 1px solid rgba(184, 134, 11, 0.4);
    color: var(--accent) !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    border-radius: 2px;
}

.footer-support-btn:hover {
    background: var(--accent);
    color: #000 !important;
    border-color: var(--accent);
}

.footer-support-btn i {
    font-size: 0.9rem;
}

.light-mode .footer-support-btn {
    border-color: rgba(184, 134, 11, 0.5) !important;
    color: #B8860B !important;
}

.light-mode .footer-support-btn:hover {
    background: #B8860B !important;
    color: #fff !important;
}

/* Footer bottom bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ==========================================================================
   IMPROVED MOBILE RESPONSIVENESS
   ========================================================================== */

/* Mobile footer */
@media (max-width: 768px) {
    footer {
        padding: 4rem 0 2rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem 1rem !important;
        margin-bottom: 2rem;
    }

    .footer-grid > div {
        text-align: left;
    }
    
    .footer-title {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-links a {
        font-size: 0.8rem !important;
    }
    
    .footer-links li {
        margin-bottom: 0.6rem !important;
    }
    
    footer p {
        font-size: 0.8rem !important;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-bottom p {
        font-size: 0.7rem !important;
    }

    .footer-support-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.75rem !important;
        padding: 0.7rem 1.2rem !important;
    }
}

/* Reduce section padding on mobile */
@media (max-width: 768px) {
    section {
        padding: clamp(3rem, 8vw, 6rem) 0 !important;
    }

    #history {
        padding: 5rem 0 !important;
    }

    /* Messages top flex layout fix */
    div[style*="display: flex"][style*="justify-content: space-between"][style*="align-items: flex-end"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem;
    }

    /* Reduce large bottom margins on mobile */
    div[style*="margin-bottom: 6rem"],
    div[style*="margin-bottom: 7rem"],
    div[style*="margin-bottom: 8rem"] {
        margin-bottom: 3rem !important;
    }

    /* Messages second column padding fix */
    .messages-grid .fade-in[style*="padding-top: 8rem"] {
        padding-top: 0 !important;
    }

    /* Image heights on mobile */
    .messages-grid div[style*="height: 550px"],
    .messages-grid div[style*="height: 450px"] {
        height: 280px !important;
    }

    /* Academy grid on mobile */
    #academy .story-grid {
        gap: 3rem !important;
    }

    #academy div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    #academy div[style*="aspect-ratio: 4/5"] {
        aspect-ratio: 16/9 !important;
    }

    #academy div[style*="position: absolute; bottom: -2rem; left: -2rem"] {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 1rem;
    }

    /* Hero full height on mobile */
    .hero {
        min-height: 85vh;
    }

}
