/* SoftBix SEO eBook — Premium Reader */

body.ebook-page {
    background: #F7F4EE;
}
body.ebook-page header {
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(26,27,31,.06);
}

/* Reading progress */
.ebook-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #FFC700, #E8A000);
    z-index: 1001;
    transition: width .12s ease-out;
    box-shadow: 0 0 12px rgba(255,199,0,.45);
}

/* Hero banner — matches site page-hero */
.ebook-hero-banner {
    position: relative;
    padding: calc(var(--header-height) + 48px) 24px 64px;
    overflow: hidden;
    background: var(--white);
}
.ebook-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 75% 40%, rgba(255,199,0,.1) 0%, transparent 55%),
        radial-gradient(ellipse 50% 50% at 15% 80%, rgba(12,131,31,.04) 0%, transparent 55%),
        linear-gradient(180deg, var(--white) 0%, var(--card) 100%);
}
.ebook-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,199,0,.26) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,199,0,.26) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 88% 78% at 55% 42%, black 10%, transparent 70%);
}
.ebook-hero-banner .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
}
.ebook-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 28px;
    transition: .25s;
}
.ebook-hero-back:hover { color: var(--yellow-deep); }
.ebook-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}
.ebook-hero-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--yellow-deep);
    background: rgba(255,199,0,.12);
    border: 1px solid rgba(255,199,0,.28);
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.ebook-hero-text h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}
.ebook-hero-text h1 em {
    font-style: normal;
    color: var(--yellow-deep);
}
.ebook-hero-text > p {
    font-size: 1.05rem;
    color: var(--ink-soft);
    line-height: 1.75;
    max-width: 520px;
    margin-bottom: 28px;
}
.ebook-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}
.ebook-hero-pills span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: #fff;
    border: 1px solid rgba(26,27,31,.1);
    padding: 8px 14px;
    border-radius: 999px;
}
.ebook-hero-pills i { color: #FFC700; font-size: .72rem; }
.ebook-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.ebook-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 26px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .88rem;
    transition: .25s;
    border: none;
    cursor: pointer;
}
.ebook-hero-btn-primary {
    background: linear-gradient(135deg, #FFC700, #E8A000);
    color: #1A1B1F;
    box-shadow: 0 8px 28px rgba(255,199,0,.35);
}
.ebook-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(255,199,0,.45);
}
.ebook-hero-btn-ghost {
    background: #fff;
    color: var(--ink);
    border: 1.5px solid rgba(26,27,31,.15);
}
.ebook-hero-btn-ghost:hover {
    border-color: #FFC700;
    color: var(--ink);
    background: rgba(255,199,0,.12);
}
.ebook-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.ebook-hero-book {
    position: relative;
    width: min(280px, 100%);
    aspect-ratio: 3/4;
    background: linear-gradient(145deg, #2A2B35 0%, #1A1B24 100%);
    border-radius: 12px 20px 20px 12px;
    box-shadow:
        0 30px 80px rgba(0,0,0,.5),
        inset 0 1px 0 rgba(255,255,255,.08),
        -8px 0 0 #FFC700,
        -12px 0 24px rgba(255,199,0,.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px;
}
.ebook-hero-book::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8%;
    bottom: 8%;
    width: 6px;
    background: linear-gradient(180deg, #FFE566, #E8A000);
    border-radius: 0 4px 4px 0;
}
.ebook-hero-book i {
    font-size: 3.5rem;
    color: #FFC700;
    filter: drop-shadow(0 4px 20px rgba(255,199,0,.4));
}
.ebook-hero-book span {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ebook-hero-book small {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255,255,255,.45);
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Reader layout */
.ebook-reader-wrap {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    max-width: 1280px;
    margin: -36px auto 0;
    padding: 0 24px 80px;
    position: relative;
    z-index: 3;
    align-items: start;
}

/* Sidebar TOC */
.ebook-toc {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    max-height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #E8A000 transparent;
}
.ebook-toc-inner {
    background: #fff;
    border-radius: 18px;
    padding: 24px 20px;
    box-shadow: 0 4px 24px rgba(26,27,31,.08), 0 1px 0 rgba(26,27,31,.04);
    border: 1px solid rgba(26,27,31,.06);
}
.ebook-toc-label {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #E8A000;
    margin-bottom: 6px;
}
.ebook-toc h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.ebook-toc nav ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ebook-toc nav li { margin-bottom: 2px; }
.ebook-toc nav a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 10px 12px;
    border-radius: 10px;
    line-height: 1.45;
    transition: .2s;
}
.ebook-toc nav a::before {
    content: attr(data-num);
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 800;
    color: var(--ink-soft);
    background: var(--card);
    border-radius: 6px;
    transition: .2s;
}
.ebook-toc nav a:hover,
.ebook-toc nav a.active {
    color: var(--ink);
    background: var(--yellow-pale);
}
.ebook-toc nav a.active::before,
.ebook-toc nav a:hover::before {
    background: #FFC700;
    color: var(--ink);
}
.ebook-print-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: .82rem;
    border: none;
    border-radius: 11px;
    cursor: pointer;
    transition: .25s;
}
.ebook-print-btn:hover {
    background: #FFC700;
    color: var(--ink);
}

/* Mobile TOC */
.ebook-toc-mobile-btn {
    display: none;
    position: fixed;
    bottom: 88px;
    right: 20px;
    z-index: 900;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: .82rem;
    border: none;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(26,27,31,.35);
    cursor: pointer;
}
.ebook-toc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,27,31,.5);
    z-index: 850;
    backdrop-filter: blur(4px);
}

/* Content */
.ebook-content {
    background: #fff;
    border-radius: 20px;
    padding: 52px 64px 64px;
    box-shadow: 0 4px 32px rgba(26,27,31,.07);
    border: 1px solid rgba(26,27,31,.05);
    font-family: 'Source Serif 4', Georgia, serif;
}

.ebook-chapter {
    margin-bottom: 64px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(26,27,31,.08);
    scroll-margin-top: calc(var(--header-height) + 24px);
}
.ebook-chapter:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.ebook-chapter-num {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #E8A000;
    margin-bottom: 14px;
}
.ebook-chapter-num::after {
    content: '';
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, #FFC700, transparent);
}
.ebook-chapter h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.ebook-lead {
    font-size: 1.12rem;
    color: #3D3E48;
    line-height: 1.85;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #FFFBF0, #FFF8E6);
    border-left: 4px solid #FFC700;
    border-radius: 0 14px 14px 0;
}
.ebook-chapter h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin: 36px 0 14px;
}
.ebook-chapter h4 {
    font-family: 'Outfit', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
    margin: 24px 0 10px;
}
.ebook-chapter p {
    font-size: 1.02rem;
    color: #44455A;
    line-height: 1.9;
    margin-bottom: 18px;
}
.ebook-chapter ul,
.ebook-chapter ol {
    margin: 0 0 22px 0;
    padding-left: 0;
    list-style: none;
}
.ebook-chapter ul li,
.ebook-chapter ol li {
    position: relative;
    font-size: 1rem;
    color: #44455A;
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 24px;
}
.ebook-chapter ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .65em;
    width: 7px;
    height: 7px;
    background: #FFC700;
    border-radius: 50%;
}
.ebook-chapter ol { counter-reset: ebook-ol; }
.ebook-chapter ol li { counter-increment: ebook-ol; padding-left: 32px; }
.ebook-chapter ol li::before {
    content: counter(ebook-ol);
    position: absolute;
    left: 0;
    top: .1em;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: .7rem;
    font-weight: 800;
    background: var(--yellow-pale);
    color: #B8860B;
    border-radius: 6px;
}
.ebook-chapter li strong { color: var(--ink); }
.ebook-chapter code {
    font-family: 'Inter', monospace;
    background: #F4F2EC;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: .86rem;
}
.ebook-chapter a {
    color: #B8860B;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(232,160,0,.4);
}
.ebook-chapter a:hover { color: var(--ink); }

.ebook-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0 28px;
    font-family: 'Inter', sans-serif;
    font-size: .88rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.ebook-table th,
.ebook-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}
.ebook-table th {
    background: var(--ink);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ebook-table tr:nth-child(even) td { background: #FAFAF8; }
.ebook-table td { color: var(--ink-soft); border-top: 1px solid var(--border); }

.ebook-callout {
    background: linear-gradient(135deg, #FFFBF0, #FFF5D6);
    border: 1px solid rgba(255,199,0,.35);
    border-radius: 16px;
    padding: 24px 28px;
    margin: 28px 0;
}
.ebook-callout h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--ink);
    margin: 0 0 14px;
}
.ebook-callout h4 i { color: #E8A000; margin-right: 8px; }
.ebook-callout p,
.ebook-callout li { font-size: .95rem; color: #44455A; line-height: 1.75; }
.ebook-callout-warn {
    background: linear-gradient(135deg, #FFF8F8, #FFEFEF);
    border-color: rgba(220,53,69,.25);
}
.ebook-callout-warn h4 i { color: #dc3545; }

.ebook-checklist {
    background: linear-gradient(135deg, #F0FAF2, #E8F5EB);
    border: 1px solid rgba(12,131,31,.18);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 32px;
}
.ebook-checklist h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--green);
    margin: 0 0 14px;
}
.ebook-checklist li { color: var(--ink); }

.ebook-timeline { margin: 24px 0 32px; }
.ebook-timeline-item {
    padding: 20px 24px;
    margin-bottom: 14px;
    background: #FAFAF8;
    border: 1px solid var(--border);
    border-radius: 14px;
    border-left: 4px solid #FFC700;
}
.ebook-timeline-item strong {
    font-family: 'Outfit', sans-serif;
    font-size: .95rem;
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
}

.ebook-cta-box {
    background: linear-gradient(135deg, #1A1B24, #2D2E3A);
    border-radius: 18px;
    padding: 40px 32px;
    text-align: center;
    margin: 40px 0 28px;
}
.ebook-cta-box h4 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.45rem;
    color: #fff;
    margin-bottom: 12px;
}
.ebook-cta-box p { font-size: .95rem; color: rgba(255,255,255,.7); margin-bottom: 24px; }
.ebook-cta-box-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ebook-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFC700;
    color: var(--ink);
    font-weight: 800;
    padding: 13px 24px;
    border-radius: 11px;
    transition: .25s;
}
.ebook-cta-primary:hover { background: #fff; transform: translateY(-2px); }
.ebook-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    padding: 12px 22px;
    border: 1.5px solid rgba(255,255,255,.25);
    border-radius: 11px;
    transition: .25s;
}
.ebook-cta-secondary:hover { border-color: #FFC700; color: #FFC700; }

.ebook-copyright {
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    color: var(--ink-soft);
    text-align: center;
    padding-top: 32px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1100px) {
    .ebook-hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .ebook-hero-visual { order: -1; }
    .ebook-hero-book { width: 220px; aspect-ratio: 3/3.5; }
    .ebook-reader-wrap {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }
    .ebook-toc {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 88vw);
        max-height: 100vh;
        z-index: 900;
        transform: translateX(-110%);
        transition: transform .3s ease;
        padding: calc(var(--header-height) + 16px) 16px 24px;
        background: #fff;
        box-shadow: 8px 0 40px rgba(0,0,0,.15);
    }
    .ebook-toc.open { transform: translateX(0); }
    .ebook-toc-overlay.open { display: block; }
    .ebook-toc-mobile-btn { display: inline-flex; }
    .ebook-toc-inner { box-shadow: none; border: none; padding: 0; }
    .ebook-content { padding: 36px 32px 48px; }
}
@media (max-width: 768px) {
    .ebook-hero-banner { padding-bottom: 48px; }
    .ebook-content { padding: 28px 22px 40px; border-radius: 16px; }
    .ebook-chapter h2 { font-size: 1.5rem; }
    .ebook-lead { font-size: 1rem; padding: 16px 18px; }
}
@media (max-width: 480px) {
    .ebook-hero-pills { flex-direction: column; }
    .ebook-hero-actions { flex-direction: column; }
    .ebook-hero-btn { width: 100%; justify-content: center; }
}

/* Language switcher */
.ebook-lang-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8f6f0 0%, #fff 100%);
    border: 1px solid rgba(26,27,31,.08);
    border-radius: 12px;
}
.ebook-lang-switcher--hero {
    margin-bottom: 0;
    margin-top: 20px;
}
html:not([data-ebook-lang]) .ebook-lang-block:not([data-lang="en"]),
html[data-ebook-lang="en"] .ebook-lang-block:not([data-lang="en"]),
html[data-ebook-lang="hinglish"] .ebook-lang-block:not([data-lang="hinglish"]) {
    display: none !important;
}
.ebook-lang-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-soft);
    margin-right: 4px;
}
.ebook-lang-label i { color: #FFC700; margin-right: 4px; }
.ebook-lang-btn {
    font-family: 'Inter', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(26,27,31,.12);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: .2s;
}
.ebook-lang-btn:hover { border-color: #FFC700; color: var(--ink); }
.ebook-lang-btn.active {
    background: var(--ink);
    color: #FFC700;
    border-color: var(--ink);
}
html[data-ebook-lang="hinglish"] .ebook-chapter h2,
html[data-ebook-lang="hinglish"] .ebook-content { font-family: 'Inter', 'Source Serif 4', serif; }

/* Print */
@media print {
    header, footer, .whatsapp-btn, .modal, .menu-toggle,
    .ebook-hero-banner, .ebook-toc, .ebook-toc-mobile-btn, .ebook-progress,
    .ebook-cta-box, .ebook-hero-actions, .ebook-lang-switcher { display: none !important; }
    body.ebook-page { background: #fff; }
    .ebook-reader-wrap { display: block; padding: 0; margin: 0; max-width: 100%; }
    .ebook-content { box-shadow: none; border: none; padding: 0; border-radius: 0; }
    .ebook-chapter { break-inside: avoid-page; }
}