/* ==========================================================================
   BOOK DETAIL / LANDING PAGE STYLESHEET
   Mufti Abdul Rehman Munir — "Dua: Bandah Aur Rab Ke Ta'alluq Ka Zariya"
   Consistent with books.php & about.php aesthetic
   Simple, dignified, non-commercial (Zero fake reviews)
   ========================================================================== */

@font-face {
    font-family: 'Jameel Noori Nastaleeq';
    src: local('Jameel Noori Nastaleeq'),
         local('JameelNooriNastaleeq'),
         url('../fonts/JameelNooriNastaleeq.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --book-gold: #C5A059;
    --book-gold-dark: #97722B;
    --book-olive: #686438;
    --book-dark: #1C201C;
    --book-body: #4A4438;
    --book-muted: #7A7265;
    --book-bg: #FAF7F2;
    --book-bg-alt: #F4EFE6;
    --book-border: #E5DFD4;
    --book-border-gold: rgba(197, 160, 89, 0.35);
}

/* Base Container */
.book-detail-container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Diamond Divider (Signature element across the website) */
.accent-divider-diamond {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accent-divider-diamond .line {
    width: 40px;
    height: 1px;
    background: var(--book-border-gold);
}

.accent-divider-diamond .diamond {
    font-size: 0.55rem;
    color: var(--book-gold);
    line-height: 1;
}

/* ==========================================================================
   1. HERO SECTION (Pixel-Perfect Match to Reference Image)
   ========================================================================== */
.book-single-hero {
    position: relative;
    padding-top: 135px;
    padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
    background-color: #FAF6EE;
    background-image: url('../images/muftiabdulrehman-hero-background-8.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    border-bottom: 1px solid var(--book-border);
    display: flex;
    align-items: center;
    min-height: 640px;
    overflow: hidden;
}

.book-single-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Soft mask keeping text crisp on the left while preserving the sunlit archway on the right */
    background: linear-gradient(90deg, 
        rgba(254, 252, 248, 0.96) 0%, 
        rgba(254, 252, 248, 0.90) 42%, 
        rgba(254, 252, 248, 0.38) 65%, 
        rgba(254, 252, 248, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 960px) {
    .book-single-hero {
        padding-top: 120px;
    }
    .book-single-hero::before {
        background: rgba(254, 252, 248, 0.95);
    }
}

.book-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Breadcrumb with hairline separator */
.ref-breadcrumb-wrap {
    margin-bottom: 2rem;
    max-width: 540px;
}

.ref-breadcrumb {
    font-size: 0.8125rem;
    color: #8C7355;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-weight: 500;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(160, 130, 90, 0.28);
}

.ref-breadcrumb a {
    color: #8C7355;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ref-breadcrumb a:hover {
    color: var(--book-dark);
}

.ref-breadcrumb .sep {
    color: #BCA88E;
    font-size: 0.75rem;
}

.ref-breadcrumb .current {
    color: #8C7355;
    font-weight: 600;
}

/* Two-Column Grid */
.ref-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

@media (max-width: 960px) {
    .ref-hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.ref-hero-left {
    max-width: 560px;
}

/* Eyebrow */
.ref-hero-tag-wrap {
    margin-bottom: 0.85rem;
}

.ref-hero-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #A35C30;
    display: inline-block;
    border-bottom: 1.5px solid #A35C30;
    padding-bottom: 3px;
}

/* Authentic Urdu Nastaliq Headline */
.ref-hero-urdu-block {
    text-align: left;
    margin-bottom: 0.35rem;
}

.ref-hero-urdu-title {
    font-family: 'Jameel Noori Nastaleeq', 'Gulzar', 'Noto Nastaliq Urdu', serif;
    font-size: clamp(2.3rem, 3.8vw, 3rem);
    font-weight: 700;
    line-height: 2.1;
    color: #191A19;
    direction: rtl;
    text-align: left;
    display: block;
    margin: 0;
    letter-spacing: 0;
}

.ref-hero-urdu-title .accent-red {
    color: #8B1515;
}

.ref-hero-urdu-sub {
    font-family: 'Jameel Noori Nastaleeq', 'Gulzar', 'Noto Nastaliq Urdu', serif;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 400;
    line-height: 1.95;
    color: #4A4438;
    direction: rtl;
    text-align: left;
    display: block;
    margin: 0.25rem 0 1.25rem;
}

/* Author Line */
.ref-hero-author {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1C201C;
    margin-bottom: 1.35rem;
}

.ref-hero-author a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ref-hero-author a:hover {
    color: #8F672C;
}

/* Specs Row */
.ref-specs-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.15rem;
    margin-bottom: 1.5rem;
}

.ref-spec-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #383227;
}

.ref-spec-item svg {
    width: 18px;
    height: 18px;
    color: #8F672C;
    stroke-width: 1.8;
}

.ref-spec-pipe {
    width: 1px;
    height: 18px;
    background: rgba(160, 130, 90, 0.4);
}

/* Summary paragraph */
.ref-hero-summary {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #554E42;
    max-width: 530px;
    margin-bottom: 2rem;
}

/* Action Buttons */
.ref-hero-buttons {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: wrap;
}

.btn-ref-read {
    background: #191A19;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.9rem 2.2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 4px 14px rgba(25, 26, 25, 0.2);
    transition: all 0.25s ease;
}

.btn-ref-read:hover {
    background: #8F672C;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(143, 103, 44, 0.3);
}

.btn-ref-download {
    background: #FFFDF9;
    border: 1.5px solid #C4B59F;
    color: #191A19;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.9rem 2.2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.25s ease;
}

.btn-ref-download:hover {
    border-color: #8F672C;
    color: #8F672C;
    background: #FFFFFF;
    transform: translateY(-2px);
}

.btn-ref-share {
    background: #FFFDF9;
    border: 1.5px solid #C4B59F;
    color: #191A19;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.9rem 1.65rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: all 0.25s ease;
}

.btn-ref-share:hover {
    border-color: #8F672C;
    color: #8F672C;
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(143, 103, 44, 0.15);
}

/* ==========================================================================
   TOP PUBLIC WAQF & QUICK ACTION BAR (Right Under Hero)
   ========================================================================== */
.book-quick-action-bar-wrap {
    background: #FAF7F2;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding: 1.25rem 0;
    position: relative;
    z-index: 10;
}

.book-quick-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.quick-action-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 380px;
}

.badge-waqf-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #191A19;
    color: #FAF6F0;
    white-space: nowrap;
}

.quick-action-heading {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.5;
    color: #555046;
}

.quick-action-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-quick-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.22s ease;
}

.btn-qa-read {
    background: #191A19;
    color: #FFFFFF;
}

.btn-qa-read:hover {
    background: #8F672C;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(143, 103, 44, 0.25);
}

.btn-qa-download {
    background: #FFFFFF;
    border-color: #C4B59F;
    color: #191A19;
}

.btn-qa-download:hover {
    border-color: #8F672C;
    color: #8F672C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(143, 103, 44, 0.15);
}

.btn-qa-share {
    background: #FFFFFF;
    border-color: #C4B59F;
    color: #191A19;
}

.btn-qa-share:hover {
    border-color: #8F672C;
    color: #8F672C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(143, 103, 44, 0.15);
}

.btn-qa-scroll {
    background: transparent;
    border-color: rgba(140, 120, 83, 0.3);
    color: #6E6557;
}

.btn-qa-scroll:hover {
    border-color: #8F672C;
    color: #191A19;
    background: #FFFFFF;
}

@media (max-width: 900px) {
    .book-quick-action-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .quick-action-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .quick-action-right {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    .btn-quick-action {
        justify-content: center;
        padding: 0.65rem 0.75rem;
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   PURE CSS 3D HARDCOVER BOOK MOCKUP (Standing Elevation, Spine & Depth)
   ========================================================================== */
.ref-hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1.5rem 0;
    max-width: 100%;
    overflow: visible;
}

.book-mockup-stage {
    --stage-w: 400px;
    --stage-h: 530px;
    --mockup-w: 310px;
    --mockup-h: 460px;
    --spine-w: 38px;
    --depth-z: 18px;

    position: relative;
    width: var(--stage-w);
    max-width: 100%;
    height: var(--stage-h);
    perspective: 1600px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.book-mockup-3d {
    position: relative;
    width: var(--mockup-w);
    height: var(--mockup-h);
    transform-style: preserve-3d;
    transform: rotateY(-23deg) rotateX(3deg);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.book-mockup-3d:hover {
    transform: rotateY(-14deg) rotateX(1deg) translateY(-8px);
}

/* Front Cover Board */
.book-cover-board {
    position: absolute;
    inset: 0;
    border-radius: 3px 6px 6px 3px;
    background: #FFFFFF;
    box-shadow: 
        -16px 20px 36px rgba(25, 20, 15, 0.22),
        -5px 7px 14px rgba(25, 20, 15, 0.12);
    overflow: hidden;
    transform: translateZ(var(--depth-z));
}

.book-cover-board img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hardcover Hinge Crease / Joint Groove near Spine */
.book-cover-crease {
    position: absolute;
    top: 0;
    right: 20px;
    width: 8px;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.20) 0%, 
        rgba(0, 0, 0, 0.04) 25%, 
        rgba(255, 255, 255, 0.45) 65%, 
        rgba(0, 0, 0, 0.10) 100%);
    pointer-events: none;
    z-index: 3;
}

/* Realistic Lamination Sheen */
.book-cover-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(118deg, 
        rgba(255, 255, 255, 0.42) 0%, 
        rgba(255, 255, 255, 0.15) 16%, 
        rgba(255, 255, 255, 0) 35%, 
        rgba(0, 0, 0, 0.04) 75%, 
        rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
    z-index: 4;
}

/* Hardcover Lip / Border bevel around the cover */
.book-cover-lip {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-left: 2px solid rgba(255, 255, 255, 0.8);
    border-right: 1px solid rgba(0, 0, 0, 0.18);
    pointer-events: none;
    z-index: 5;
}

/* 3D Spine (Right Side) */
.book-spine-3d {
    position: absolute;
    top: 1px;
    right: calc(var(--spine-w) * -1);
    width: var(--spine-w);
    height: calc(100% - 2px);
    background: linear-gradient(90deg, 
        #9B886E 0%, 
        #C7B79E 10%, 
        #EDE3D2 30%, 
        #FAF7F2 48%, 
        #DFD0BB 75%, 
        #B6A286 92%, 
        #826F54 100%);
    transform-origin: left center;
    transform: rotateY(90deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px 3px;
    box-sizing: border-box;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.28);
    border-radius: 0 4px 4px 0;
    z-index: 2;
}

/* Spine Embossed Ribs */
.spine-rib {
    width: 85%;
    height: 3px;
    background: linear-gradient(90deg, rgba(140, 115, 80, 0.6), rgba(255, 255, 255, 0.9), rgba(140, 115, 80, 0.6));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    border-radius: 1px;
}

.spine-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 12px;
    padding: 8px 0;
    box-sizing: border-box;
}

.spine-emblem-top, .spine-emblem-bottom {
    font-size: 0.8rem;
    color: #8C6A35;
    line-height: 1;
}

.spine-title-urdu {
    font-family: 'Jameel Noori Nastaleeq', 'Gulzar', serif;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: clamp(0.95rem, 2.2vw, 1.25rem);
    color: #191A19;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
    white-space: nowrap;
}

.spine-author-urdu {
    font-family: 'Jameel Noori Nastaleeq', 'Gulzar', serif;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: clamp(0.7rem, 1.6vw, 0.85rem);
    color: #524637;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Top Page Block (Visible in 3D tilt) */
.book-top-pages {
    position: absolute;
    top: calc(var(--spine-w) * -0.95);
    left: 4px;
    width: calc(100% - 8px);
    height: var(--spine-w);
    background: repeating-linear-gradient(90deg, 
        #E6DDCD 0px, 
        #F9F6EE 2px, 
        #ECE3D4 4px);
    transform-origin: bottom center;
    transform: rotateX(90deg);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.25);
    border-radius: 2px 2px 0 0;
    z-index: 1;
}

/* Back Cover Board Thickness */
.book-back-board {
    position: absolute;
    inset: 0;
    background: #E0D5C3;
    border-radius: 3px 6px 6px 3px;
    transform: translateZ(calc(var(--depth-z) * -1));
    box-shadow: -10px 14px 28px rgba(20, 16, 12, 0.38);
}

/* Multi-layered Floor Shadows */
.book-shadow-contact {
    position: absolute;
    bottom: -8px;
    left: 2%;
    width: 96%;
    height: 14px;
    background: radial-gradient(ellipse at center, rgba(15, 12, 8, 0.55) 0%, rgba(15, 12, 8, 0) 72%);
    border-radius: 50%;
    filter: blur(4px);
    pointer-events: none;
}

.book-shadow-ambient {
    position: absolute;
    bottom: -22px;
    left: -4%;
    width: 108%;
    height: 36px;
    background: radial-gradient(ellipse at center, rgba(28, 22, 14, 0.35) 0%, rgba(28, 22, 14, 0.1) 55%, rgba(28, 22, 14, 0) 78%);
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
    transform: rotate(-1.5deg);
}

/* ==========================================================================
   2. GENERIC SECTION HEADERS
   ========================================================================== */
.book-section {
    padding: 5.5rem 0;
}

.book-section-light {
    background: #FFFFFF;
    border-bottom: 1px solid var(--book-border);
}

.book-section-cream {
    background: var(--book-bg);
    border-bottom: 1px solid var(--book-border);
}

.book-section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
}

.book-section-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--book-gold-dark);
    display: block;
    margin-bottom: 0.5rem;
}

.book-section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.6vw, 2.75rem);
    font-weight: 400;
    color: var(--book-dark);
    margin: 0;
    line-height: 1.2;
}

.book-section-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--book-muted);
    margin-top: 1rem;
}

/* ==========================================================================
   3. ABOUT THE BOOK (Why It Matters)
   ========================================================================== */
.book-about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3.5rem;
    align-items: center;
}

@media (max-width: 900px) {
    .book-about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.book-about-prose p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--book-body);
    margin-bottom: 1.25rem;
}

.book-quote-card {
    background: #FAF7F2;
    border: 1px solid var(--book-border);
    border-left: 3px solid var(--book-gold);
    border-radius: 8px;
    padding: 2.25rem 2rem;
}

.book-quote-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.65;
    color: var(--book-dark);
    margin: 0 0 1.25rem;
}

.book-quote-author {
    font-size: 0.85rem;
    color: var(--book-muted);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.book-quote-author strong {
    color: var(--book-dark);
}

/* ==========================================================================
   4. KEY TOPICS / WHAT YOU WILL LEARN
   ========================================================================== */
.book-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.75rem;
}

.book-topic-card {
    background: #FFFFFF;
    border: 1px solid var(--book-border);
    border-radius: 8px;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.book-topic-card:hover {
    border-color: var(--book-gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(42, 36, 28, 0.06);
}

.topic-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--book-gold-dark);
    margin-bottom: 0.75rem;
}

.book-topic-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--book-dark);
    margin: 0 0 0.65rem;
    line-height: 1.3;
}

.book-topic-card p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--book-body);
    margin: 0;
}

/* ==========================================================================
   5. CHAPTER LIST (FIHRIST)
   ========================================================================== */
.book-chapter-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.book-chapter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1080px;
    margin: 0 auto;
}

@media (max-width: 860px) {
    .book-chapter-grid {
        grid-template-columns: 1fr;
    }
}

.chapter-grid-card {
    background: #FAF8F5;
    border: 1px solid var(--book-border);
    border-radius: 8px;
    padding: 1.15rem 1.35rem;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 1rem;
    align-items: center;
    transition: all 0.25s ease;
}

.chapter-grid-card:hover {
    background: #FFFFFF;
    border-color: var(--book-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(42, 36, 28, 0.05);
}

.chapter-grid-num {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--book-gold-dark);
    font-weight: 400;
}

.chapter-grid-info h4 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--book-dark);
    margin: 0 0 0.15rem;
    line-height: 1.35;
}

.chapter-grid-urdu {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    color: var(--book-olive);
    direction: rtl;
    line-height: 1.4;
}

.chapter-grid-page {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--book-muted);
    background: #EDE6D8;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    white-space: nowrap;
}

.chapter-item-row {
    background: #FAF8F5;
    border: 1px solid var(--book-border);
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.25s ease;
}

@media (max-width: 680px) {
    .chapter-item-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}

.chapter-item-row:hover {
    background: #FFFFFF;
    border-color: var(--book-gold);
    box-shadow: 0 6px 18px rgba(42, 36, 28, 0.05);
}

.chapter-index {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--book-gold-dark);
    font-weight: 400;
}

.chapter-info h4 {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--book-dark);
    margin: 0 0 0.25rem;
}

.chapter-info .chapter-urdu-title {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    color: var(--book-olive);
    margin-bottom: 0.4rem;
}

.chapter-info p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--book-body);
    margin: 0;
}

.chapter-page-tag {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--book-muted);
    background: #EDE6D8;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* ==========================================================================
   6. BESPOKE DIGITAL PDF READER (Powered by PDF.js with Luxury UI)
   ========================================================================== */
.book-reader-card {
    background: #191B19;
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(20, 16, 12, 0.22);
    position: relative;
}

#bookPdfReader {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    background: #191B19;
}

/* Reader Top Toolbar */
.reader-toolbar-pro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: #141614;
    border-bottom: 1px solid rgba(197, 160, 89, 0.25);
    color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Left: Book Badge & Urdu Title */
.r-tool-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.r-book-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid rgba(197, 160, 89, 0.35);
    color: #D6B268;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.r-book-badge svg {
    width: 13px;
    height: 13px;
    stroke-width: 2;
}

.r-book-name-urdu {
    font-family: 'Jameel Noori Nastaleeq', 'Gulzar', serif;
    font-size: 1.15rem;
    color: #FFFFFF;
    line-height: 1.2;
}

/* Center: Page Controls */
.r-tool-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.r-page-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #C8BFB0;
}

.r-page-indicator input {
    width: 38px;
    text-align: center;
    background: #252825;
    border: 1px solid rgba(197, 160, 89, 0.5);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 0.2rem 0;
    outline: none;
}

.r-page-indicator strong {
    color: #D6B268;
}

/* Right Controls */
.r-tool-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.r-btn-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    overflow: hidden;
}

.r-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #E6DFD3;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.r-btn:hover {
    background: #8F672C;
    color: #FFFFFF;
    border-color: #8F672C;
}

.r-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.r-btn.active {
    background: #8F672C;
    color: #FFFFFF;
    border-color: #8F672C;
}

.r-btn-group .r-btn {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0.45rem 0.65rem;
}

.r-btn-group .r-btn:hover {
    background: #8F672C;
}

.r-zoom-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: #C8BFB0;
    padding: 0 0.5rem;
    min-width: 44px;
    text-align: center;
}

.r-btn-download {
    background: #8F672C;
    color: #FFFFFF;
    border: 1px solid #A87D38;
}

.r-btn-download:hover {
    background: #A87D38;
    color: #FFFFFF;
}

.r-btn svg {
    width: 14px;
    height: 14px;
}

/* Reader Viewport Area */
.reader-stage-area {
    position: relative;
    background: #ECE6DA;
    height: 75vh;
    min-height: 480px;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    overscroll-behavior: contain;
}

/* Floating Navigation Arrows */
.r-floating-flip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(25, 27, 25, 0.75);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(197, 160, 89, 0.4);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.r-floating-flip:hover {
    background: #8F672C;
    border-color: #C5A059;
    transform: translateY(-50%) scale(1.08);
}

.r-floating-flip svg {
    width: 20px;
    height: 20px;
}

.r-flip-prev {
    left: 1.5rem;
}

.r-flip-next {
    right: 1.5rem;
}

/* Single Viewport */
.pdf-single-viewport {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.pdf-canvas-wrapper {
    box-shadow: 
        0 14px 40px rgba(35, 25, 15, 0.22),
        0 2px 8px rgba(35, 25, 15, 0.08);
    border-radius: 4px;
    overflow: hidden;
    background: #FFFFFF;
    transition: box-shadow 0.3s ease;
}

.pdf-render-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Continuous Scroll Mode */
.pdf-continuous-viewport {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.continuous-page-card {
    background: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(35, 25, 15, 0.16);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cont-page-header {
    width: 100%;
    background: #252825;
    color: #D6B268;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    display: flex;
    justify-content: space-between;
}

.cont-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Loading Curtain */
.reader-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(236, 230, 218, 0.92);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transition: opacity 0.3s ease;
}

.reader-loading-overlay.active {
    display: flex;
}

.r-spinner-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.r-gold-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(143, 103, 44, 0.2);
    border-top-color: #8F672C;
    border-radius: 50%;
    animation: rSpin 0.8s linear infinite;
}

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

.loading-msg {
    font-size: 0.9rem;
    font-weight: 600;
    color: #383227;
}

/* Collapsible Thumbnails Drawer */
.reader-thumbs-drawer {
    background: #141614;
    border-top: 1px solid rgba(197, 160, 89, 0.25);
    padding: 1rem 1.25rem;
    display: none;
    z-index: 18;
}

.reader-thumbs-drawer.active {
    display: block;
    animation: rDrawerSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rDrawerSlide {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.thumbs-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    font-size: 0.8rem;
    color: #C8BFB0;
    font-weight: 600;
}

.thumbs-hint {
    font-size: 0.72rem;
    color: #8F7F6C;
}

.thumbs-list-scroll {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #8F672C #252825;
}

.thumbs-list-scroll::-webkit-scrollbar {
    height: 6px;
}

.thumbs-list-scroll::-webkit-scrollbar-thumb {
    background: #8F672C;
    border-radius: 3px;
}

.thumb-item {
    flex: 0 0 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumb-item:hover {
    border-color: rgba(197, 160, 89, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.thumb-item.active {
    border-color: #8F672C;
    background: rgba(143, 103, 44, 0.15);
}

.thumb-canvas {
    width: 68px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    background: #FFFFFF;
}

.thumb-label {
    font-size: 0.68rem;
    color: #A0988A;
    font-weight: 600;
}

.thumb-item.active .thumb-label {
    color: #D6B268;
}

@media (max-width: 768px) {
    .reader-toolbar-pro {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 0.85rem;
        gap: 0.75rem;
    }
    .r-tool-left, .r-tool-center, .r-tool-right {
        justify-content: center;
    }
    .r-btn-label {
        display: none;
    }
    .r-floating-flip {
        width: 38px;
        height: 38px;
    }
    .r-flip-prev { left: 0.5rem; }
    .r-flip-next { right: 0.5rem; }
    .reader-stage-area {
        height: 64vh;
        min-height: 400px;
        max-height: 600px;
        padding: 1rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .reader-toolbar-pro {
        padding: 0.6rem 0.5rem;
        gap: 0.6rem;
    }
    .r-book-name-urdu {
        display: none;
    }
    .r-tool-left {
        justify-content: center;
    }
    .r-btn-group .r-btn {
        padding: 0.4rem 0.5rem;
    }
    .r-floating-flip {
        display: none !important;
    }
    .reader-stage-area {
        height: 58vh;
        min-height: 330px;
        max-height: 480px;
        padding: 0.5rem 0.25rem;
    }
}

/* ==========================================================================
   7. ABOUT THE AUTHOR (Using portrait-image-7)
   ========================================================================== */
.author-spotlight-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3.5rem;
    align-items: center;
}

@media (max-width: 860px) {
    .author-spotlight-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
}

.author-portrait-frame {
    max-width: 290px;
    margin: 0 auto;
}

.author-portrait-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--book-gold);
    box-shadow: 0 14px 32px rgba(42, 36, 28, 0.12);
}

.author-details-col h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    color: var(--book-dark);
    margin: 0 0 0.4rem;
}

.author-role-strip {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--book-olive);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.author-details-col p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--book-body);
    margin-bottom: 1.15rem;
}

.author-highlights-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

@media (max-width: 600px) {
    .author-highlights-list {
        grid-template-columns: 1fr;
    }
}

.author-highlight-item {
    background: #FFFFFF;
    border: 1px solid var(--book-border);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    color: var(--book-body);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
}

.author-highlight-item svg {
    width: 16px;
    height: 16px;
    color: var(--book-gold);
    flex-shrink: 0;
}

/* ==========================================================================
   8. FREE PUBLIC WAQF BANNER
   ========================================================================== */
.waqf-banner-card {
    max-width: 780px;
    margin: 0 auto;
    background: #FFFFFF;
    border: 1px solid var(--book-border);
    border-radius: 12px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-shadow: 0 12px 32px rgba(42, 36, 28, 0.05);
}

.waqf-banner-card h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3.2vw, 2.4rem);
    color: var(--book-dark);
    margin: 0.5rem 0 1rem;
}

.waqf-banner-card p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--book-body);
    margin: 0 auto 2rem;
    max-width: 600px;
}

.waqf-banner-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================================================
   9. MORE AUTHORED BOOKS (Slider & Grid)
   ========================================================================== */
.more-books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 860px) {
    .more-books-grid {
        grid-template-columns: 1fr;
    }
}

/* Auto-Looping Books Slider */
.more-books-slider-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin: 1.75rem 0 0;
}

.slider-viewport {
    overflow: hidden;
    width: 100%;
    padding: 12px 6px 20px;
    border-radius: 8px;
}

.more-books-slider-track {
    display: flex;
    gap: 24px;
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.more-book-card.slider-card {
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
    box-sizing: border-box;
}

@media (max-width: 960px) {
    .more-book-card.slider-card {
        flex: 0 0 calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }
}

@media (max-width: 600px) {
    .more-book-card.slider-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .slider-arrow {
        display: none !important;
    }
}

.slider-arrow {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid var(--book-border-gold);
    color: var(--book-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 14px rgba(42, 36, 28, 0.08);
    transition: all 0.25s ease;
}

.slider-arrow-prev {
    margin-right: 12px;
}

.slider-arrow-next {
    margin-left: 12px;
}

.slider-arrow:hover {
    background: var(--book-gold);
    color: #FFFFFF;
    border-color: var(--book-gold);
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(197, 160, 89, 0.35);
}

.slider-arrow .icon-svg {
    width: 18px;
    height: 18px;
}

.slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.25rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #DCD5C8;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-dot.active {
    width: 24px;
    background: var(--book-gold);
}

.more-book-card {
    background: #FFFFFF;
    border: 1px solid var(--book-border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.more-book-card:hover {
    border-color: var(--book-gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(42, 36, 28, 0.06);
}

.more-book-frame {
    background: linear-gradient(180deg, #FAF7F2 0%, #F0E9DC 100%);
    border: 1px solid var(--book-border);
    border-radius: 6px;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 1.15rem;
}

.more-book-img {
    height: 170px;
    width: auto;
    object-fit: contain;
    border-radius: 2px 5px 5px 2px;
    box-shadow: -4px 6px 16px rgba(0, 0, 0, 0.14);
}

.more-book-cat {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--book-olive);
    margin-bottom: 0.35rem;
}

.more-book-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.35;
    color: var(--book-dark);
    margin: 0 0 0.5rem;
}

.more-book-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--book-muted);
    margin: 0 0 1.25rem;
    flex: 1;
}

.more-book-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.btn-shelf-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1C201C;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.65rem 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-shelf-action:hover {
    background: var(--book-gold);
    color: #1C201C;
}

.btn-shelf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--book-border);
    border-radius: 4px;
    color: var(--book-dark);
    background: #FFFFFF;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-shelf-icon:hover {
    border-color: var(--book-gold);
    color: var(--book-gold-dark);
    background: #FFFDF9;
}

.btn-shelf-icon svg {
    width: 14px;
    height: 14px;
}

/* Toast */
.book-copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1C201C;
    color: #FFFFFF;
    padding: 0.85rem 1.35rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.book-copy-toast svg {
    width: 16px;
    height: 16px;
    color: var(--book-gold);
}

/* Responsive adjustments for Reference Hero & Mockup */
@media (max-width: 960px) {
    .ref-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .ref-hero-left {
        max-width: 100%;
    }
    .ref-hero-right {
        order: -1;
        padding: 0.5rem 0;
    }
    .book-mockup-stage {
        --stage-w: 330px;
        --stage-h: 450px;
        --mockup-w: 260px;
        --mockup-h: 382px;
        --spine-w: 32px;
        --depth-z: 15px;
    }
}

@media (max-width: 640px) {
    .book-mockup-stage {
        --stage-w: 275px;
        --stage-h: 380px;
        --mockup-w: 215px;
        --mockup-h: 316px;
        --spine-w: 26px;
        --depth-z: 12px;
    }
    .book-mockup-3d {
        transform: rotateY(-18deg) rotateX(2deg);
    }
    .ref-hero-urdu-title {
        font-size: clamp(1.6rem, 5.8vw, 2.1rem);
        line-height: 1.95;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .ref-hero-urdu-sub {
        font-family: 'Jameel Noori Nastaleeq', 'Gulzar', 'Noto Nastaliq Urdu', serif;
        font-size: clamp(1.1rem, 4vw, 1.35rem);
        line-height: 1.85;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .ref-specs-strip {
        gap: 0.5rem 0.75rem;
    }
    .ref-spec-pipe {
        display: none;
    }
    .ref-spec-item {
        font-size: 0.8rem;
        background: rgba(197, 160, 89, 0.1);
        border: 1px solid rgba(197, 160, 89, 0.25);
        padding: 0.25rem 0.6rem;
        border-radius: 4px;
    }
    .ref-hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .btn-ref-read,
    .btn-ref-download,
    .btn-ref-share {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 380px) {
    .book-mockup-stage {
        --stage-w: 235px;
        --stage-h: 330px;
        --mockup-w: 180px;
        --mockup-h: 265px;
        --spine-w: 22px;
        --depth-z: 10px;
    }
    .book-mockup-3d {
        transform: rotateY(-14deg) rotateX(1deg);
    }
    .book-cover-crease {
        right: 12px;
    }
    .ref-hero-urdu-title {
        font-size: clamp(1.35rem, 5.5vw, 1.6rem);
        line-height: 1.8;
    }
}

@media (max-width: 480px) {
    .chapter-grid-card {
        grid-template-columns: 32px 1fr;
        padding: 0.85rem 0.9rem;
        gap: 0.6rem;
    }
    .chapter-grid-page {
        grid-column: 2;
        justify-self: start;
        margin-top: 0.2rem;
    }
}

/* Fallback & External Options Bar */
.reader-mobile-fallback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #FFFFFF;
    border-top: 1px solid var(--book-border);
    padding: 0.85rem 1.25rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.85rem;
    color: var(--book-muted);
}

.reader-fallback-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4A4438;
}

.reader-fallback-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-fallback-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-fallback-view {
    background: #FAF7F2;
    border: 1px solid var(--book-border);
    color: var(--book-dark);
}

.btn-fallback-view:hover {
    border-color: var(--book-gold);
    color: var(--book-gold-dark);
}

.btn-fallback-dl {
    background: #191A19;
    color: #FFFFFF;
    border: 1px solid transparent;
}

.btn-fallback-dl:hover {
    background: #8F672C;
    color: #FFFFFF;
}

@media (max-width: 768px) {
    .reader-mobile-fallback {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    .reader-fallback-info {
        justify-content: center;
        font-size: 0.82rem;
    }
    .reader-fallback-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .btn-fallback-action {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }
}

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

