/* ==========================================
   POOJASERVICE - PREMIUM ANIMATED E-BOOKS
   Design only. Existing PDF functionality intact.
========================================== */

.ebook-page {
    --ebook-maroon: #54101f;
    --ebook-deep: #300b18;
    --ebook-gold: #d9ad60;
    --ebook-cream: #fff9ef;
    --ebook-text: #492b27;
    background: #fffaf2;
    color: var(--ebook-text);
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

/* ANIMATED HERO */

.ebook-hero {
    min-height: 530px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 65px 20px 55px;
    background:
        radial-gradient(ellipse at 50% 45%, #792d37 0%, transparent 48%),
        linear-gradient(125deg, #280a15, #641b2c 52%, #310b19);
    isolation: isolate;
}

.ebook-hero::before,
.ebook-hero::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(223,185,113,.18);
    pointer-events: none;
    z-index: -1;
}

.ebook-hero::after {
    inset: 25px;
    border-color: rgba(223,185,113,.09);
}

.ebook-hero-content {
    max-width: 850px;
    text-align: center;
    position: relative;
    z-index: 3;
    animation: ebookHeroEnter 1.1s ease both;
}

.ebook-eyebrow {
    color: #f0d59f;
    font-size: 11px;
    letter-spacing: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ebook-eyebrow span {
    width: 28px;
    height: 1px;
    background: var(--ebook-gold);
}

.ebook-hero-symbol {
    font-family: Georgia, serif;
    font-size: 76px;
    line-height: 1.5;
    color: #f3d18e;
    text-shadow: 0 0 15px rgba(245,194,105,.65),
                 0 0 40px rgba(245,194,105,.3);
    animation: ebookSymbolGlow 3s ease-in-out infinite;
}

.ebook-hero h1 {
    color: #fff8ed;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(38px, 5vw, 65px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 18px;
    letter-spacing: -.8px;
}

.ebook-hero h1 span {
    color: #e9bd70;
    font-style: italic;
}

.ebook-hero-content > p {
    color: #ead8cf;
    font-size: 15px;
    line-height: 1.9;
    max-width: 620px;
    margin: 0 auto 27px;
}

.ebook-explore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 27px;
    background: linear-gradient(135deg,#f2d49a,#c99a4c);
    color: #40121c !important;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.25);
    transition: .35s ease;
}

.ebook-explore-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(225,180,99,.35);
    background: #fff0cb;
}

.ebook-hero-bottom {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 27px;
    margin-top: 43px;
    color: #e8c58e;
    font-size: 11px;
    letter-spacing: 1px;
}

.ebook-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    animation: ebookOrbFloat 8s ease-in-out infinite;
}

.ebook-orb-one {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle,rgba(224,173,89,.14),transparent 70%);
    top: -80px;
    left: -50px;
}

.ebook-orb-two {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle,rgba(228,174,94,.13),transparent 70%);
    bottom: -160px;
    right: -70px;
    animation-delay: -3s;
}

.ebook-orb-three {
    width: 170px;
    height: 170px;
    background: radial-gradient(circle,rgba(255,232,184,.1),transparent 70%);
    top: 30%;
    right: 12%;
    animation-delay: -5s;
}

.ebook-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.ebook-particles span {
    position: absolute;
    color: #edc47d;
    opacity: .55;
    font-size: 19px;
    animation: ebookParticle 6s ease-in-out infinite;
}

.ebook-particles span:nth-child(1) {top:15%;left:12%}
.ebook-particles span:nth-child(2) {top:28%;left:82%;animation-delay:-2s}
.ebook-particles span:nth-child(3) {top:72%;left:8%;animation-delay:-3s}
.ebook-particles span:nth-child(4) {top:80%;left:89%;animation-delay:-1s}
.ebook-particles span:nth-child(5) {top:12%;left:67%;animation-delay:-4s}
.ebook-particles span:nth-child(6) {top:55%;left:93%;animation-delay:-2.5s}
.ebook-particles span:nth-child(7) {top:42%;left:4%;animation-delay:-1.5s}
.ebook-particles span:nth-child(8) {top:89%;left:43%;animation-delay:-3.5s}
.ebook-particles span:nth-child(9) {top:23%;left:42%;animation-delay:-2s}
.ebook-particles span:nth-child(10) {top:66%;left:73%;animation-delay:-4s}
.ebook-particles span:nth-child(11) {top:8%;left:92%;animation-delay:-1s}
.ebook-particles span:nth-child(12) {top:91%;left:19%;animation-delay:-3s}

.ebook-hero-decoration {
    position: absolute;
    font-size: 145px;
    color: rgba(221,177,104,.07);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.decoration-left {left: 2%}
.decoration-right {right: 2%}

/* LIBRARY */

.ebook-library {
    position: relative;
    padding: 75px 0 65px;
    background:
        radial-gradient(ellipse at 50% 0%,rgba(229,199,145,.15),transparent 55%),
        #fffaf2;
}

.ebook-section-heading {
    text-align: center;
    margin: 0 auto 45px;
    padding: 0 15px;
}

.ebook-section-label {
    color: #a17a43;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
}

.ebook-section-heading h2 {
    font-family: Georgia,serif;
    font-size: clamp(32px,4vw,43px);
    font-weight: 700;
    color: #4d1824;
    margin: 12px 0 9px;
}

.ebook-section-heading h2 span {
    color: #bd914e;
    font-style: italic;
}

.ebook-heading-line {
    width: 110px;
    height: 1px;
    background: #d3b27b;
    margin: 16px auto;
    position: relative;
}

.ebook-heading-line span {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #fffaf2;
    padding: 0 12px;
    color: #bc914d;
}

.ebook-section-heading p {
    color: #806c61;
    font-size: 13px;
}

.ebook-library-container {
    max-width: 1200px;
}

.ebook-library-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 27px;
    padding: 17px 21px;
    background: rgba(255,255,255,.8);
    border: 1px solid #eee1cd;
    border-radius: 13px;
}

.ebook-library-top h3 {
    font-family: Georgia,serif;
    color: #551a28;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px;
}

.ebook-library-top h3 i {
    color: #b68a49;
    margin-right: 7px;
}

.ebook-library-top p {
    color: #907a6d;
    font-size: 12px;
    margin: 0;
}

.ebook-count {
    white-space: nowrap;
    color: #75431f;
    background: #f8edda;
    border: 1px solid #ead6b2;
    padding: 9px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.ebook-grid {
    align-items: stretch;
}

.ebook-card-column {
    display: flex;
    margin-bottom: 26px;
    animation: ebookCardEnter .8s ease both;
}

.ebook-card-column:nth-child(4n+1) {animation-delay:.05s}
.ebook-card-column:nth-child(4n+2) {animation-delay:.13s}
.ebook-card-column:nth-child(4n+3) {animation-delay:.21s}
.ebook-card-column:nth-child(4n+4) {animation-delay:.29s}

.ebook-card {
    width: 100%;
    min-height: 365px;
    padding: 17px 13px 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg,#fff,#fffaf1);
    border: 1px solid #eee2cf;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(77,35,24,.07);
    transition: transform .4s ease,box-shadow .4s ease,border-color .4s ease;
}

.ebook-card::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(215,178,116,.09);
    top: -75px;
    right: -65px;
    transition: .5s ease;
}

.ebook-card:hover {
    transform: translateY(-10px);
    border-color: #d4ae70;
    box-shadow: 0 18px 38px rgba(83,32,39,.14);
}

.ebook-card:hover::before {
    transform: scale(2);
}

.ebook-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.ebook-card-badge {
    color: #956b31;
    background: #f8edda;
    border-radius: 30px;
    padding: 5px 9px;
    font-size: 9px;
    letter-spacing: .7px;
    font-weight: 700;
}

.ebook-card-corner {
    color: #c29b5b;
    font-size: 17px;
}

.ebook-cover-stage {
    min-height: 195px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 10px 0 5px;
    perspective: 800px;
}

.ebook-cover-glow {
    position: absolute;
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background: radial-gradient(circle,rgba(215,174,105,.22),transparent 70%);
    transition: .4s ease;
}

.ebook-card:hover .ebook-cover-glow {
    transform: scale(1.3);
}

.ebook-cover-frame {
    position: relative;
    z-index: 1;
    width: 150px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform .5s ease;
}

.ebook-card:hover .ebook-cover-frame {
    transform: rotateY(-9deg) translateY(-4px) scale(1.04);
}

.ebook-book-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(5px 8px 7px rgba(44,22,13,.2));
}

.ebook-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ebook-card-info h3 {
    color: #4f1a28;
    font-family: Georgia,serif;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;
    width: 100%;
    min-height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-wrap: anywhere;
    margin: 7px 0 5px;
}

.ebook-card-divider {
    width: 55px;
    height: 1px;
    background: #e2c99d;
    position: relative;
    margin: 7px 0 13px;
}

.ebook-card-divider span {
    position: absolute;
    left: 50%;
    top: -9px;
    transform: translateX(-50%);
    background: #fffaf1;
    color: #b68b4d;
    padding: 0 7px;
}

.ebook-read-btn {
    margin-top: auto;
    width: 100%;
    min-height: 41px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    color: #fff5e8 !important;
    background: linear-gradient(110deg,#551525,#832b3b);
    border: 1px solid #9a5960;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: .3s ease;
}

.ebook-read-btn:hover {
    color: #49202a !important;
    background: linear-gradient(110deg,#f0d8a9,#d5ad69);
    border-color: #cba568;
    box-shadow: 0 5px 15px rgba(157,113,48,.2);
}

.ebook-empty {
    padding: 65px 15px;
    text-align: center;
    background: white;
    border: 1px solid #eadbc3;
    border-radius: 16px;
}

.ebook-empty div {
    font-size: 55px;
    color: #bd914e;
}

.ebook-empty h3 {
    color: #551a28;
    font-family: Georgia,serif;
}

.ebook-empty p {
    color: #806c61;
}

/* BOTTOM BANNER */

.ebook-bottom-banner {
    padding: 55px 20px;
    text-align: center;
    background: linear-gradient(120deg,#310b18,#641b2c,#350c1a);
    position: relative;
    overflow: hidden;
}

.ebook-bottom-symbol {
    color: #e8c27e;
    font-size: 42px;
    animation: ebookSymbolGlow 3s infinite;
}

.ebook-bottom-banner h2 {
    color: #fff8ed;
    font-family: Georgia,serif;
    font-size: clamp(23px,3vw,34px);
    margin: 10px 0;
}

.ebook-bottom-banner h2 span {
    color: #e9bd70;
    font-style: italic;
}

.ebook-bottom-banner p {
    color: #e7d0c3;
    font-size: 13px;
}

.ebook-bottom-ornament {
    color: #e4bc79;
    letter-spacing: 12px;
    margin-top: 18px;
}

/* ANIMATIONS */

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

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

@keyframes ebookSymbolGlow {
    0%,100% {text-shadow:0 0 10px rgba(245,194,105,.3)}
    50% {text-shadow:0 0 28px rgba(245,194,105,.85),0 0 50px rgba(245,194,105,.3)}
}

@keyframes ebookParticle {
    0%,100% {transform:translateY(0) rotate(0deg);opacity:.25}
    50% {transform:translateY(-24px) rotate(90deg);opacity:.9}
}

@keyframes ebookOrbFloat {
    0%,100% {transform:translate(0,0)}
    50% {transform:translate(25px,-22px)}
}

/* TABLET AND MOBILE */

@media(max-width:767px) {
    .ebook-hero {
        min-height: 465px;
        padding: 55px 19px 38px;
    }

    .ebook-hero-symbol {font-size:62px}
    .ebook-eyebrow {font-size:9px;letter-spacing:2px}
    .ebook-hero-content > p {font-size:13px}
    .ebook-hero-bottom {gap:12px;margin-top:30px;font-size:9px}
    .ebook-hero-decoration {font-size:85px}
    .ebook-library {padding:50px 0 35px}
    .ebook-section-heading {margin-bottom:30px}
    .ebook-library-container {padding-left:12px;padding-right:12px}
    .ebook-library-top {padding:13px 11px}
    .ebook-library-top h3 {font-size:16px}
    .ebook-library-top p {font-size:10px}
    .ebook-count {font-size:10px;padding:8px}
    .ebook-card {min-height:320px;padding:12px 9px}
    .ebook-cover-stage {min-height:155px}
    .ebook-cover-frame {width:120px;height:145px}
    .ebook-card-info h3 {font-size:13px;min-height:43px}
    .ebook-card-badge {font-size:8px;padding:4px 7px}
    .ebook-read-btn {font-size:11px;gap:6px;min-height:38px}
    .ebook-card-column {margin-bottom:17px;padding-left:7px;padding-right:7px}
    .ebook-bottom-banner {padding:42px 15px}
}

@media(max-width:380px) {
    .ebook-hero h1 {font-size:34px}
    .ebook-hero-bottom {gap:8px}
    .ebook-card {min-height:295px;padding:10px 7px}
    .ebook-cover-stage {min-height:135px}
    .ebook-cover-frame {width:105px;height:125px}
    .ebook-card-info h3 {font-size:12px}
    .ebook-read-btn {font-size:10px}
}

/* Respect accessibility preferences */

@media(prefers-reduced-motion:reduce) {
    .ebook-page *,
    .ebook-page *::before,
    .ebook-page *::after {
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
        scroll-behavior:auto !important;
        transition-duration:.01ms !important;
    }
}
