.ancient-books-section{background:#f8fafc;padding:50px 0 75px;min-height:80vh}.ancient-books-header{text-align:center;max-width:720px;margin:0 auto 40px}.ancient-books-badge{display:inline-block;background:#ecfdf5;color:#16a34a;font-weight:700;font-size:12px;padding:5px 14px;border-radius:30px;letter-spacing:.05em;text-transform:uppercase;margin-bottom:10px}.ancient-books-title{font-size:2.2rem;font-weight:800;color:#0b1f3a;margin-bottom:10px;line-height:1.25}.ancient-books-subtitle{font-size:1rem;color:#64748b;margin:0;line-height:1.6}.ancient-books-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;align-items:stretch}.ancient-book-card{background:#ffffff;border-radius:22px;border:1px solid #edf2f7;box-shadow:0 6px 20px rgba(15,23,42,0.06);padding:22px 20px 20px;display:flex;flex-direction:column;height:100%;position:relative;transition:transform .3s ease,box-shadow .3s ease}.ancient-book-card:hover{transform:translateY(-6px);box-shadow:0 16px 36px rgba(15,23,42,0.12)}.ancient-book-lang{position:absolute;top:14px;right:14px;z-index:2;font-size:11px;font-weight:700;padding:4px 12px;border-radius:8px;color:#ffffff;box-shadow:0 2px 8px rgba(0,0,0,0.12);letter-spacing:.02em}.ancient-book-lang.is-english{background:linear-gradient(135deg,#059669 0%,#047857 100%)}.ancient-book-lang.is-hindi{background:linear-gradient(135deg,#d97706 0%,#b45309 100%)}.ancient-book-cover-wrap{width:100%;height:220px;display:flex;align-items:center;justify-content:center;margin-bottom:16px;background:transparent}.ancient-book-cover-link{display:flex;align-items:center;justify-content:center;text-decoration:none;width:100%;height:100%}.ancient-book-img{max-height:205px;max-width:160px;width:auto;height:auto;object-fit:cover;border-radius:10px;box-shadow:0 6px 18px rgba(0,0,0,0.15);border:1px solid rgba(0,0,0,0.08);transition:transform .35s ease}.ancient-book-card:hover .ancient-book-img{transform:scale(1.04)}.ancient-book-noimg{width:150px;height:190px;border-radius:10px;background:#f1f5f9;border:1.5px dashed #cbd5e1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#94a3b8;font-size:12px;font-weight:600}.ancient-book-body{display:flex;flex-direction:column;flex-grow:1}.ancient-book-title{font-size:1.12rem;font-weight:800;color:#0b1f3a;line-height:1.35;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:48px}.ancient-book-title a{color:inherit;text-decoration:none;transition:color .2s ease}.ancient-book-title a:hover{color:#16a34a}.ancient-book-meta-item{display:flex;align-items:center;gap:8px;font-size:13.5px;color:#334155;font-weight:600;margin-bottom:6px;line-height:1.4}.ancient-book-icon{width:15px;height:15px;flex-shrink:0}.ancient-book-meta-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ancient-book-stats-pill{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:7px 12px;display:flex;align-items:center;justify-content:center;gap:8px;margin:12px 0 16px;font-size:12.5px;font-weight:600;color:#475569}.ancient-book-stats-pill .stat-segment{display:inline-flex;align-items:center;gap:5px}.ancient-book-stats-pill .stat-sep{color:#cbd5e1;font-weight:400}.ancient-book-btn{background:linear-gradient(135deg,#16a34a 0%,#15803d 100%);color:#ffffff!important;border-radius:50px;padding:10px 20px;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;box-shadow:0 4px 14px rgba(22,163,74,0.25);transition:all .25s ease;margin-top:auto}.ancient-book-btn:hover{background:linear-gradient(135deg,#15803d 0%,#166534 100%);transform:translateY(-2px);box-shadow:0 6px 18px rgba(22,163,74,0.38);color:#ffffff!important;text-decoration:none}.ancient-book-btn .btn-arrow{transition:transform .2s ease}.ancient-book-btn:hover .btn-arrow{transform:translateX(3px)}.ancient-books-empty{grid-column:1/-1;width:100%}.ancient-books-pagination{display:flex;justify-content:center;margin-top:40px}@media(max-width:1200px){.ancient-books-grid{grid-template-columns:repeat(3,1fr);gap:20px}}@media(max-width:900px){.ancient-books-grid{grid-template-columns:repeat(2,1fr);gap:18px}.ancient-books-title{font-size:1.8rem}}@media(max-width:560px){.ancient-books-grid{grid-template-columns:1fr;gap:18px}.ancient-books-title{font-size:1.5rem}.ancient-books-section{padding:35px 0 55px}}.spinner-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,0.7);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;z-index:9999}.spinner{width:60px;height:60px;border:6px solid #f3f3f3;border-top:6px solid #28a745;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pagination{display:flex;justify-content:center;gap:6px}.pagination .page-link{border-radius:50%!important;width:40px;height:40px;display:flex;align-items:center;justify-content:center;color:#198754;font-weight:600;border:1px solid #dee2e6;transition:all .3s ease}.pagination .page-link:hover{background-color:#198754;color:#fff;transform:scale(1.05)}.pagination .active .page-link{background-color:#198754!important;border-color:#198754!important;color:#fff!important}body{background:linear-gradient(135deg,#eef2f7 60%,#e6fdf7 100%);font-family:'Segoe UI','Roboto',sans-serif;min-height:100vh}.book-ui-container{max-width:1250px;margin:40px auto;background:#fff;border-radius:20px;box-shadow:0 10px 40px rgba(0,0,0,0.08);overflow:hidden;padding-bottom:20px}.back-link{text-decoration:none;font-size:15px;color:#2f855a;font-weight:600;margin-bottom:20px;display:inline-block;margin-left:48px;margin-top:24px}.back-link:hover{text-decoration:underline}.book-ui-header{display:flex;align-items:flex-start;gap:32px;padding:40px 48px 30px 48px;background:linear-gradient(90deg,#eafff2 50%,#c7f5f1 100%);border-bottom:1px solid #e4f7f5}.book-ui-cover{width:150px;height:200px;background:#f1f5f9;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 25px rgba(0,0,0,0.10)}.book-ui-cover img{max-width:100%;max-height:100%}.book-ui-meta{flex:1}.book-ui-title{font-size:2.3rem;font-weight:800;margin-bottom:12px;color:#14532d}.book-ui-author{font-size:1.2rem;color:#374151;margin-bottom:8px;font-weight:600}.book-ui-info{font-size:1rem;color:#4b5563;margin-bottom:12px}.book-ui-desc{color:#374151;font-size:1.05rem;line-height:1.6}.book-ui-actions{margin:0 0 24px 0;padding:0 48px}.book-ui-actions .btn-success{background:linear-gradient(90deg,#16a34a 50%,#2dd4bf 100%);border:none;color:#fff;font-weight:600;font-size:1.05rem;border-radius:10px;padding:10px 20px;display:inline-flex;align-items:center;gap:8px;box-shadow:0 4px 12px rgba(22,163,74,0.15);transition:all 0.25s}.book-ui-actions .btn-success:hover{background:#15803d;transform:translateY(-2px)}.flipbook-ui-section{display:flex;gap:32px;padding:0 32px 32px 32px;flex-wrap:wrap}.summary-section{flex:1 1 380px;background:#fffef3;padding:24px 28px;border-radius:16px;box-shadow:0 5px 20px rgba(255,193,7,0.08)}.summary-section h5{font-weight:700;color:#92400e;margin-bottom:16px;font-size:1.2rem}.summary-section p{color:#5b3414;line-height:1.7;font-size:1.05rem;text-align:justify}.highlight-list-section{flex:1 1 380px;background:#f8fdf9;border-radius:16px;padding:24px 22px;box-shadow:0 5px 20px rgba(34,197,94,0.07);height:fit-content}.highlight-list-section h5{font-weight:700;color:#166534;margin-bottom:18px;font-size:1.2rem}.highlight-list{padding-left:0;list-style:none;margin:0}.highlight-list li{background:#fff;border-radius:10px;margin-bottom:10px;padding:12px 16px;transition:all 0.3s;border:1.5px solid #e5e7eb}.highlight-list li strong{font-size:1.05rem;color:#111827}.highlight-list li small{font-size:0.95rem;color:#374151}.highlight-list li:hover{background:linear-gradient(90deg,#e0ffe7 50%,#b2f7ef 100%);border-left:5px solid #16a34a;transform:translateX(4px)}.highlight-list li ul li{font-size:0.92rem;color:#374151}

/* ========================================================
   BOOK DETAIL & FLIPBOOK RESPONSIVE STYLES
   ======================================================== */
.book-ui-container{max-width:1200px;margin:35px auto;background:#ffffff;border-radius:20px;box-shadow:0 10px 40px rgba(15,23,42,0.08);overflow:hidden;padding-bottom:30px}
.book-ui-header{display:flex;align-items:flex-start;gap:32px;padding:35px 40px 25px;background:linear-gradient(135deg,#f0fdf4 0%,#e6fcf5 100%);border-bottom:1px solid #dcfce7}
.book-ui-cover{width:180px;height:250px;background:#ffffff;border-radius:14px;overflow:hidden;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 30px rgba(0,0,0,0.12);flex-shrink:0;border:1px solid rgba(0,0,0,0.06)}
.book-ui-cover img{width:100%;height:100%;object-fit:cover;display:block}
.book-ui-meta{flex:1;min-width:0}
.book-ui-title{font-size:2rem;font-weight:800;color:#0b1f3a;margin-bottom:10px;line-height:1.3}
.book-ui-author{font-size:1.15rem;font-weight:700;color:#166534;margin-bottom:8px}
.book-ui-info{font-size:0.98rem;color:#64748b;font-weight:600;margin-bottom:14px}
.book-ui-desc{font-size:1rem;line-height:1.65;color:#334155}
.book-ui-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:20px 40px;background:#ffffff}
.btn-primary-gradient{background:linear-gradient(135deg,#0b1f3a 0%,#1e3a8a 100%);color:#ffffff!important;font-weight:700;font-size:1rem;border-radius:10px;padding:10px 22px;display:inline-flex;align-items:center;gap:8px;text-decoration:none;box-shadow:0 4px 14px rgba(11,31,58,0.2);transition:all 0.25s ease;border:none}
.btn-primary-gradient:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(11,31,58,0.3);color:#ffffff!important}
.flipbook-ui-section{display:flex;gap:28px;padding:10px 40px 30px}
.summary-section,.highlight-list-section{flex:1 1 0;min-width:0;background:#f8fafc;border-radius:16px;border:1px solid #e2e8f0;padding:24px;box-shadow:0 4px 16px rgba(0,0,0,0.03)}
.summary-section h5,.highlight-list-section h5{font-weight:800;font-size:1.15rem;color:#166534;margin-bottom:14px;display:flex;align-items:center;gap:8px}
.book-summary{color:#334155;line-height:1.7;font-size:0.98rem}
.highlight-pages-list{list-style:none;padding-left:0;margin:0;display:flex;flex-direction:column;gap:10px}
.highlight-page-item{display:flex;align-items:flex-start;gap:10px;background:#ffffff;border:1px solid #e2e8f0;border-radius:10px;padding:10px 14px}
.highlight-page-desc{font-size:0.95rem;color:#475569;line-height:1.5}
.flipbook-reader-container{margin:20px 40px 30px;background:#ffffff;border-radius:18px;border:1px solid #e2e8f0;box-shadow:0 10px 30px rgba(0,0,0,0.06);overflow:hidden}
.flipbook-reader-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:18px 24px;background:#0b1f3a;color:#ffffff}
.flipbook-reader-header h4{font-size:1.25rem;font-weight:700;color:#ffffff;margin:0}
.reader-hint{font-size:0.88rem;color:#94a3b8;margin-top:3px}
.reader-btn-fullscreen{background:#ffffff!important;color:#0b1f3a!important;border:1.5px solid #ffffff!important;border-radius:8px;padding:7px 16px;font-size:0.9rem;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:all 0.25s ease;box-shadow:0 2px 8px rgba(0,0,0,0.15);text-decoration:none;line-height:1.2}
.reader-btn-fullscreen:hover{background:#16a34a!important;color:#ffffff!important;border-color:#16a34a!important;box-shadow:0 4px 14px rgba(22,163,74,0.35);transform:translateY(-1px)}
.reader-btn-fullscreen svg{stroke:currentColor;flex-shrink:0}
.flipbook-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:14px 24px;background:#f1f5f9;border-bottom:1px solid #e2e8f0}
.toolbar-nav{display:flex;align-items:center;gap:10px}
.flip-nav-btn{background:#ffffff;border:1.5px solid #cbd5e1;color:#1e293b!important;padding:8px 18px;border-radius:30px;font-size:0.92rem;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:all 0.2s ease;box-shadow:0 2px 6px rgba(0,0,0,0.04);line-height:1.2}
.flip-nav-btn:hover{background:#16a34a;color:#ffffff!important;border-color:#16a34a;transform:translateY(-1px);box-shadow:0 4px 12px rgba(22,163,74,0.25)}
.flip-nav-btn svg{stroke:currentColor;flex-shrink:0;transition:transform 0.2s ease}
.flip-nav-btn#prevBtn:hover svg{transform:translateX(-2px)}
.flip-nav-btn#nextBtn:hover svg{transform:translateX(2px)}
.flip-page-badge{background:#ffffff;border:1px solid #e2e8f0;padding:8px 16px;border-radius:30px;font-size:0.92rem;font-weight:600;color:#334155;display:inline-flex;align-items:center;gap:6px}
.jump-group{display:flex;align-items:center;background:#ffffff;border:1.5px solid #cbd5e1;border-radius:30px;overflow:hidden;padding:2px 4px 2px 12px}
.jump-group input{border:none;outline:none;width:90px;font-size:0.9rem;color:#1e293b;font-weight:600}
.jump-group button{background:#16a34a;color:#ffffff;border:none;border-radius:20px;padding:5px 14px;font-size:0.85rem;font-weight:700;cursor:pointer;transition:background 0.2s}
.jump-group button:hover{background:#15803d}
.flipbook-stage-wrap{background:#18181b;padding:24px 10px;min-height:580px;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;width:100%}
.reader-loading-overlay{position:absolute;inset:0;background:rgba(15,23,42,0.92);color:#ffffff;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:50;text-align:center;padding:20px}
.reader-loading-overlay .loading-text{font-size:1.05rem;font-weight:600;color:#e2e8f0}
.flipbook-outer-viewport{width:100%;display:flex;align-items:center;justify-content:center}
#flipbookContainer{margin:0 auto;box-shadow:0 16px 48px rgba(0,0,0,0.5);background:#ffffff;border-radius:6px;max-width:100%}
.flipbook-reader-footer{background:#f8fafc;padding:10px 24px;border-top:1px solid #e2e8f0;text-align:center}
@media(max-width:991px){
.book-ui-container{margin:20px 14px;border-radius:16px}
.book-ui-header{padding:25px 20px;gap:20px}
.book-ui-actions{padding:16px 20px}
.flipbook-ui-section{flex-direction:column;padding:10px 20px 24px;gap:20px}
.flipbook-reader-container{margin:15px 14px 24px}
.back-link{margin-left:20px;margin-top:16px}
}
@media(max-width:640px){
.book-ui-header{flex-direction:column;align-items:center;text-align:center}
.book-ui-cover{width:150px;height:210px}
.book-ui-title{font-size:1.55rem}
.book-ui-author{font-size:1.05rem}
.book-ui-actions{flex-direction:column;width:100%}
.book-ui-actions .btn{width:100%;justify-content:center}
.flipbook-toolbar{flex-direction:column;align-items:center;gap:10px}
.toolbar-nav{width:100%;justify-content:space-between}
.flip-nav-btn span{display:none}
.flip-nav-btn{padding:8px 12px}
.toolbar-jump{width:100%;display:flex;justify-content:center}
.jump-group{width:100%;max-width:220px;justify-content:space-between}
.jump-group input{width:120px}
.flipbook-stage-wrap{padding:16px 6px;min-height:400px}
}

.book-ui-container,.flipbook-ui-section,.summary-section,.highlight-list-section,.chapter-card{max-width:100%;min-width:0;overflow:hidden;overflow-wrap:break-word;word-wrap:break-word;box-sizing:border-box}.book-ui-desc,.book-summary,.chapter-info,.highlight-page-desc{max-width:100%;overflow-wrap:break-word;word-wrap:break-word}.book-ui-desc *,.book-summary *,.chapter-info *,.highlight-page-desc *{max-width:100% !important;box-sizing:border-box}.book-summary table,.chapter-info table{display:block;width:100% !important;overflow-x:auto}
