/* =====================================================
   BOOK PAGE STYLES
   ===================================================== */

/* ----- Book Hero Section ----- */
.book-hero {
    padding: 8rem 1.5rem 4rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.book-label {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-text h1 {
    color: var(--color-white);
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    font-style: italic;
}

.hero-desc {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Book Mockup */
.hero-book {
    display: flex;
    justify-content: center;
}

.book-mockup {
    perspective: 1400px;
}

.book-cover {
    width: 300px;
    height: 440px;
    background:
        radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 35%),
        linear-gradient(155deg, #0a365b 0%, #144f82 45%, #0c2942 100%);
    border-radius: 4px 10px 10px 4px;
    box-shadow:
        -12px 16px 32px rgba(0, 0, 0, 0.28),
        0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.4rem 1.55rem;
    text-align: left;
    transform: rotateY(-14deg) rotateX(2deg);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.14);
    overflow: hidden;
    isolation: isolate;
}

.book-cover::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 18px;
    background: linear-gradient(90deg, #081d2f 0%, #123754 100%);
    border-radius: 3px 0 0 3px;
    z-index: 1;
}

.book-cover::after {
    content: "";
    position: absolute;
    inset: 12% 8% 16% 14%;
    background-image: url("../images/app-icon.jpg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.16;
    filter: saturate(1.08) contrast(1.05);
    mix-blend-mode: screen;
    z-index: 1;
}

.cover-badge {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #d0e8ff;
    border: 1px solid rgba(208, 232, 255, 0.4);
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    margin-bottom: 1.3rem;
    z-index: 2;
    position: relative;
}

.cover-kicker {
    margin: 0 0 0.5rem;
    color: #d9ebff;
    font-size: 0.76rem;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

.book-cover h2 {
    color: var(--color-white);
    font-size: 2.05rem;
    line-height: 1.12;
    margin-bottom: 0.95rem;
    max-width: 230px;
    text-shadow: 0 2px 8px rgba(5, 22, 36, 0.4);
    z-index: 2;
    position: relative;
}

.book-cover h2 .cover-line {
    display: inline-block;
    white-space: nowrap;
}

.cover-subline {
    margin: 0;
    color: rgba(232, 242, 255, 0.92);
    font-size: 0.95rem;
    line-height: 1.35;
    max-width: 235px;
    text-shadow: 0 1px 6px rgba(5, 22, 36, 0.3);
    z-index: 2;
    position: relative;
}

.cover-divider {
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, #c8def5 0%, rgba(200, 222, 245, 0) 100%);
    margin: auto 0 1rem;
    z-index: 2;
    position: relative;
}

.cover-author {
    margin: 0 0 0.2rem;
    color: #f3f8ff;
    font-size: 0.86rem;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

.cover-credential {
    margin: 0;
    color: rgba(222, 236, 252, 0.86);
    font-size: 0.78rem;
    letter-spacing: 0.4px;
    z-index: 2;
    position: relative;
}

/* ----- Problem Section ----- */
.problem-section {
    padding: 4rem 0;
    background-color: var(--color-white);
}

.problem-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.problem-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--color-background);
    border-radius: var(--radius-md);
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.problem-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.problem-text p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.problem-text strong {
    color: var(--color-primary);
    font-size: 1.25rem;
}

/* ----- Contents Section ----- */
.contents-section {
    padding: 4rem 0;
    background-color: var(--color-background);
}

.contents-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-intro {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

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

.content-part {
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.content-part h3 {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.content-part ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-part li {
    padding: 0.5rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.content-part li:last-child {
    border-bottom: none;
}

.content-part li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* ----- Chapters 21-26 Section ----- */
.late-chapters-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #f6f8f4 0%, #fdfbf7 100%);
}

.late-chapters-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.late-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.late-chapter-card {
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 76, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.late-chapter-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.chapter-number {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--color-primary-dark);
    background-color: rgba(15, 76, 129, 0.12);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    margin-bottom: 0.75rem;
}

.late-chapter-card h3 {
    font-size: 1.05rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.late-chapter-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
}

.chapter-link {
    display: inline-block;
    font-weight: 700;
    color: var(--color-primary);
    border-bottom: 1px solid transparent;
}

.chapter-link:hover {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary-dark);
}

/* ----- Chapter Reading Section ----- */
.chapter-reading-section {
    padding: 4rem 0;
    background-color: var(--color-white);
}

.chapter-reading-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.chapter-reading-list {
    display: grid;
    gap: 1rem;
    max-width: 940px;
    margin: 0 auto;
}

.chapter-reading-item {
    border-left: 4px solid var(--color-primary);
    background-color: var(--color-background);
    padding: 1.2rem 1.3rem;
    border-radius: var(--radius-sm);
}

.chapter-reading-item h3 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
    color: var(--color-primary-dark);
}

.chapter-reading-item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text);
    font-style: italic;
}

/* ----- Author Section ----- */
.author-section {
    padding: 4rem 0;
    background-color: var(--color-white);
}

.author-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

.author-image {
    position: sticky;
    top: 100px;
}

.author-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 3rem;
    font-weight: 700;
}

.author-text h2 {
    margin-bottom: 1.5rem;
}

.author-text p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ----- Testimonials Section ----- */
.testimonials-section {
    padding: 4rem 0;
    background-color: var(--color-background);
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.testimonial-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary);
}

.testimonial-quote {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
}

/* ----- Sample Section ----- */
.sample-section {
    padding: 4rem 0;
    background-color: var(--color-white);
}

.sample-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.sample-preview {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-background);
    padding: 2rem;
    border-radius: var(--radius-md);
}

.sample-preview h3 {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.sample-text {
    position: relative;
    margin-bottom: 2rem;
}

.sample-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.sample-fade {
    font-style: italic;
    color: var(--color-text-light);
    text-align: center;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-border);
}

.sample-preview .btn {
    display: block;
    text-align: center;
}

/* ----- CTA Section ----- */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.cta-content > p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cta-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ----- Bonus Section ----- */
.bonus-section {
    padding: 4rem 0;
    background-color: var(--color-background);
}

.bonus-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

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

.bonus-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.bonus-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.bonus-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.bonus-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

/* ----- FAQ Section ----- */
.faq-section {
    padding: 4rem 0;
    background-color: var(--color-white);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--color-background);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--color-white);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-primary);
    transition: var(--transition);
}

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

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

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

    .hero-desc {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-book {
        order: -1;
        margin-bottom: 2rem;
    }

    .book-cover {
        width: 240px;
        height: 340px;
        padding: 1rem 1.1rem;
    }

    .book-cover h2 {
        font-size: 1.5rem;
        max-width: 190px;
    }

    .cover-subline {
        font-size: 0.82rem;
        max-width: 190px;
    }

    .cover-divider {
        margin: auto 0 0.8rem;
    }

    .author-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-image {
        position: static;
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .problem-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .book-hero {
        padding: 6rem 1rem 3rem;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .book-cover {
        width: 220px;
        height: 320px;
        transform: rotateY(-8deg);
    }

    .book-cover h2 {
        font-size: 1.35rem;
    }

    .cover-kicker {
        font-size: 0.68rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }
}


.book-cover-image-wrap {
    padding: 0;
    overflow: hidden;
    background: #f3ecdf;
}

.book-cover-image-wrap::before,
.book-cover-image-wrap::after {
    display: none !important;
}

.book-cover-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    border-radius: inherit;
}

.chapter-full-details {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.chapter-full-details summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    outline: none;
}

.chapter-full-details[open] summary {
    margin-bottom: 0.75rem;
}

.chapter-full-details p {
    margin: 0.45rem 0;
    line-height: 1.65;
    color: var(--color-text);
}

.chapter-full-details .chapter-excerpt {
    font-style: italic;
    color: var(--color-text-light);
}

.chapter-download-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.chapter-download-links .chapter-link {
    margin-right: 0;
}
