/* Attribution: Soumyo Biswas
   Change Log:
   - 2026-01-16: Added styles for CTA button, capture forms, stats, reviews, and sample modal.
   - 2026-01-16: Added review star styling for ratings.
   - 2026-01-17: Removed preview/review styling to align with the trimmed homepage and book pages.
   - 2026-01-18: Updated Amazon button styling and added variants for grid and hero CTAs.
   - 2026-01-20: Removed sample capture form and modal content styles to align with email-only contact.
   - 2026-01-21: Added SVG-logo fallback text styling for deployments without binary assets.
   - 2026-01-21: Added the public/ deployment copy for Cloudflare Pages output.
   Pseudocode:
   - Define base reset and typography styles.
   - Style navigation, hero, and core layout sections.
   - Style book grids, detail layouts, and interaction patterns.
   - Style Amazon CTA buttons for subtle, on-brand linkouts.
   - Style stats and lightbox overlays without sample modal content.
   - Provide a text fallback when the SVG logo is missing in deployments.
*/

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

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #2d3748;
    background: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

.page-wrapper {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

/* ===========================
   NAVIGATION
   =========================== */
.nav-bar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(11, 42, 91, 0.08);
    z-index: 1000;
    border-bottom: 1px solid rgba(11, 42, 91, 0.06);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

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

/* Soumyo Biswas: Hide the fallback text by default and only show it when the SVG fails to load. */
.logo-text {
    display: none;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: #0B2A5B;
}

/* Soumyo Biswas: Toggle fallback visibility when the nav logo adds the fallback class. */
.nav-logo.logo-fallback .logo-image {
    display: none;
}

/* Soumyo Biswas: Show the text logo when the SVG is unavailable. */
.nav-logo.logo-fallback .logo-text {
    display: inline-flex;
    align-items: center;
}

.nav-logo picture {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo .logo-image {
    height: 52px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

/* Tablet and small laptops - maintain good visibility */
@media (max-width: 1024px) {
    .nav-logo .logo-image {
        height: 46px;
    }
}

/* Mobile landscape and tablets */
@media (max-width: 768px) {
    .nav-logo .logo-image {
        height: 42px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .nav-logo .logo-image {
        height: 38px;
    }
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #0B2A5B;
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

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

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Navigation CTA button */
.nav-cta {
    background: linear-gradient(135deg, #0B2A5B 0%, #1e4d8b 100%);
    color: #ffffff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(11, 42, 91, 0.2);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 42, 91, 0.3);
}

.nav-link {
    color: #0B2A5B;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: #FFC400;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 20px rgba(11, 42, 91, 0.1);
    }

    .nav-links.active {
        max-height: 300px;
        padding: 1rem 0;
    }

    .nav-link {
        padding: 1rem 2rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(11, 42, 91, 0.06);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* CTA spacing on mobile navigation */
    .nav-cta {
        width: 100%;
        margin-top: 0.75rem;
    }
}

/* ===========================
   PAGE VIEWS
   =========================== */
.page-view {
    display: none;
}

.page-view.active {
    display: block;
}

/* ===========================
   VALUE STRIP
   =========================== */
.value-strip {
    background: linear-gradient(135deg, #f0f9ff 0%, #fff5e6 100%);
    padding: 2rem 2rem;
    border-bottom: 2px solid rgba(255, 196, 0, 0.2);
}

.value-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.value-item {
    text-align: center;
}

.value-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.value-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0B2A5B;
}

/* ===========================
   LANDING HERO
   =========================== */
.landing-hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 2rem;
    text-align: center;
}

.landing-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #0B2A5B;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.landing-hero-title::after {
    content: '✨';
    position: absolute;
    top: -20px;
    right: -40px;
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(15deg); opacity: 0.8; }
}

.landing-hero-tagline {
    font-size: 1.4rem;
    color: #718096;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.landing-cta {
    background: linear-gradient(135deg, #FFC400 0%, #ffdb4d 100%);
    color: #0B2A5B;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(255, 196, 0, 0.3);
    border: none;
    cursor: pointer;
    display: inline-block;
}

.landing-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 196, 0, 0.4);
}

/* Trust Signals */
.trust-signals {
    max-width: 1400px;
    margin: 3rem auto 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0B2A5B;
    box-shadow: 0 4px 15px rgba(11, 42, 91, 0.1);
    border: 2px solid rgba(46, 211, 183, 0.3);
}

/* ===========================
   SECTIONS
   =========================== */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #0B2A5B;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* ===========================
   BOOK GRID
   =========================== */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.book-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(11, 42, 91, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(11, 42, 91, 0.06);
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(11, 42, 91, 0.15);
}

.book-card-cover {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-size: 5rem;
}

.book-card-cover.emotions {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.book-card-cover.gratitude {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.book-card-cover.sports-car {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.book-card-cover.bubble {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.book-card-age-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 196, 0, 0.95);
    color: #0B2A5B;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
}

.book-card-content {
    padding: 2rem;
}

.book-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0B2A5B;
    margin-bottom: 0.5rem;
}

.book-card-benefit {
    color: #718096;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.book-card-cta {
    background: linear-gradient(135deg, #0B2A5B 0%, #1e4d8b 100%);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.book-card-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(11, 42, 91, 0.3);
}

/* ===========================
   BOOK DETAIL PAGE
   =========================== */
.book-hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    padding: 4rem 2rem;
}

.book-hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.book-hero-content h1 {
    font-size: 3rem;
    font-weight: 900;
    color: #0B2A5B;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.book-hero-subtitle {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.book-hero-description {
    font-size: 1.05rem;
    color: #718096;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.amazon-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.amazon-btn {
    /* Subtle Amazon CTA styling that matches the Ocean Pop palette. */
    background: #f6f8fc; /* Soft neutral background for trust. */
    color: #0B2A5B; /* Deep ocean blue text for contrast. */
    padding: 0.9rem 1.6rem; /* Comfortable tap target. */
    border-radius: 50px; /* Rounded pill shape. */
    text-decoration: none; /* Remove underline. */
    font-weight: 700; /* Emphasize CTA. */
    font-size: 1rem; /* Base button size. */
    transition: all 0.3s ease; /* Smooth hover feedback. */
    box-shadow: 0 6px 16px rgba(11, 42, 91, 0.12); /* Soft shadow. */
    display: inline-flex; /* Align icon and label. */
    align-items: center; /* Center label vertically. */
    gap: 0.5rem; /* Space between icon and text. */
    border: 1px solid rgba(11, 42, 91, 0.15); /* Subtle border. */
    cursor: pointer; /* Show clickable state. */
}

.amazon-btn:hover {
    transform: translateY(-2px); /* Lift on hover. */
    box-shadow: 0 8px 22px rgba(11, 42, 91, 0.18); /* Slightly deeper shadow. */
    border-color: rgba(11, 42, 91, 0.25); /* Emphasize outline on hover. */
}

.amazon-btn--hero {
    /* Slightly larger button for the hero area. */
    padding: 1rem 2rem; /* Larger tap target above the fold. */
}

.amazon-btn--tile {
    /* Compact button for book cards. */
    margin-top: 0.85rem; /* Separate from Learn More button. */
    width: 100%; /* Full-width for mobile comfort. */
    justify-content: center; /* Center the label. */
    font-size: 0.95rem; /* Slightly smaller for cards. */
}

.book-cover-container {
    position: relative;
}

.book-cover-large {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(11, 42, 91, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 6rem;
    position: relative;
    overflow: hidden;
}

.badge-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    background: white;
    color: #0B2A5B;
    padding: 0.6rem 1.3rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(11, 42, 91, 0.12);
    border: 2px solid rgba(124, 92, 255, 0.2);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(11, 42, 91, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(11, 42, 91, 0.06);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2ED3B7 0%, #7C5CFF 100%);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(11, 42, 91, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0B2A5B;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: #718096;
    line-height: 1.6;
}

/* Inside List */
.inside-list {
    list-style: none;
}

.inside-list li {
    padding: 1rem 0 1rem 3rem;
    position: relative;
    font-size: 1.1rem;
    color: #4a5568;
    border-bottom: 1px solid rgba(11, 42, 91, 0.1);
}

.inside-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2ED3B7;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Inside + accordion split layout */
.inside-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.accordion-stack {
    display: grid;
    gap: 1rem;
}

/* Stats section */
.stats-section {
    padding: 2rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(11, 42, 91, 0.08);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #0B2A5B;
}

.stat-label {
    color: #718096;
    margin-top: 0.5rem;
}

/* FAQ Accordion */
.accordion-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(11, 42, 91, 0.08);
}

.accordion-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #0B2A5B;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: #f8f9ff;
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    color: #7C5CFF;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.accordion-text {
    color: #718096;
    line-height: 1.7;
}

/* ===========================
   ABOUT & CONTACT PAGES
   =========================== */
.about-container,
.contact-container,
.legal-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-content,
.contact-content,
.legal-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
}

.about-content h2,
.legal-content h2 {
    font-size: 1.8rem;
    color: #0B2A5B;
    margin: 2rem 0 1rem 0;
}

.about-content h3,
.legal-content h3 {
    font-size: 1.4rem;
    color: #0B2A5B;
    margin: 1.5rem 0 0.75rem 0;
}

.about-content p,
.contact-content p,
.legal-content p {
    margin-bottom: 1.5rem;
}

.about-content ul,
.legal-content ul {
    margin: 1rem 0 1.5rem 2rem;
}

.about-content li,
.legal-content li {
    margin-bottom: 0.5rem;
}

.signature {
    font-style: italic;
    margin-top: 2rem;
}

.contact-info {
    background: #f0f9ff;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.contact-info a {
    color: #0B2A5B;
    font-weight: 600;
}

/* Secondary CTA button in book hero */
.btn-secondary {
    background: #ffffff;
    color: #0B2A5B;
    border: 2px solid #0B2A5B;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0B2A5B;
    color: #ffffff;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: #0B2A5B;
    color: white;
    padding: 3rem 2rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.footer-link:hover {
    color: #FFC400;
}

.footer-email {
    color: #FFC400;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===========================
   LIGHTBOX OVERLAY
   =========================== */
/* Soumyo Biswas: Keep modal overlay styles for the gallery lightbox only. */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 42, 91, 0.95);
    backdrop-filter: blur(5px);
    z-index: 2000;
    padding: 2rem;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    font-size: 2rem;
    color: #0B2A5B;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #FFC400;
}

.lightbox-nav {
    position: absolute;
    background: white;
    border: none;
    font-size: 3rem;
    color: #0B2A5B;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: #FFC400;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 1024px) {
    .book-hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

@media (max-width: 768px) {
    .landing-hero {
        padding: 3rem 1.5rem;
    }

    .landing-hero-title {
        font-size: 2rem;
    }

    .landing-hero-title::after {
        top: -15px;
        right: -25px;
        font-size: 1.5rem;
    }

    .landing-hero-tagline {
        font-size: 1.1rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .book-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: -50px;
    }

    .lightbox-next {
        right: -50px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .value-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-hero-title {
        font-size: 1.75rem;
    }

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

    .amazon-buttons {
        flex-direction: column;
    }

    .amazon-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================
   FAQ SECTION
   =========================== */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.faq-category {
    margin-bottom: 3rem;
}

.faq-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b2a5b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #667eea;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #2d3748;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: #f7fafc;
}

.faq-icon {
    font-size: 0.875rem;
    color: #667eea;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-answer p {
    color: #4a5568;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .faq-container {
        padding: 0 1rem;
    }
    
    .faq-category-title {
        font-size: 1.25rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem 1rem;
    }
}

/* ===========================
   BOOK CARD IMAGES
   =========================== */

.book-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.book-card:hover .book-card-image {
    transform: scale(1.05);
}

/* ===========================
   BOOK DETAIL HERO IMAGE
   =========================== */

.book-cover-hero {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.book-cover-hero:hover {
    transform: translateY(-8px);
}

@media (max-width: 768px) {
    .book-cover-hero {
        max-width: 300px;
    }
}

/* ===========================
   GALLERY GRID
   =========================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* ===========================
   LIGHTBOX RESPONSIVE IMAGES
   =========================== */

#lightboxImage {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    #lightboxImage {
        max-width: 95vw;
        max-height: 70vh;
    }
}

/* ===========================
   IMAGE LOADING STATES
   =========================== */

.book-card-image,
.book-cover-hero,
.gallery-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.book-card-image[src],
.book-cover-hero[src],
.gallery-image[src] {
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .book-card-image,
    .book-cover-hero,
    .gallery-image,
    .gallery-item {
        transition: none;
        animation: none;
    }
    
    .book-card:hover .book-card-image,
    .gallery-item:hover .gallery-image {
        transform: none;
    }
}

/* Improve image rendering on high-DPI displays */
.book-card-image,
.book-cover-hero,
.gallery-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
