/*
Theme Name: Khichuri Prokashoni
Theme URI: https://pub.khichuri.net
Author: Khichuri Team
Description: A cute, minimal, clean and professional Bengali E-book library & publication theme.
Version: 2.0.0
Text Domain: khichuri
*/

/* ==========================================================================
   1. CSS Variables & Design System
   ========================================================================== */
:root {
    /* Brand Colors */
    --color-primary: #7c3aed;
    --color-primary-hover: #6d28d9;
    --color-primary-light: #f5f3ff;
    --color-primary-tint: #ede9fe;
    --color-coral: #fb7185;
    --color-peach: #fca5a5;
    --color-amber: #f59e0b;
    --color-emerald: #10b981;

    /* Typography & Neutral Colors */
    --text-main: #1e1b4b;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Backgrounds & Surfaces */
    --bg-canvas: #fbfaff;
    --bg-surface: #ffffff;
    --bg-surface-soft: #f8fafc;
    --bg-alt: #f5f3ff;

    /* Borders */
    --border-subtle: #f1f0f7;
    --border-light: #e2e8f0;
    --border-focus: #c4b5fd;

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(124, 58, 237, 0.04);
    --shadow-card: 0 10px 25px -4px rgba(124, 58, 237, 0.06), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 20px 38px -6px rgba(124, 58, 237, 0.14), 0 8px 16px -4px rgba(0, 0, 0, 0.03);
    --shadow-search: 0 12px 35px -8px rgba(124, 58, 237, 0.09), 0 4px 12px rgba(0, 0, 0, 0.02);
    --shadow-btn: 0 6px 18px rgba(124, 58, 237, 0.25);

    /* Radii */
    --radius-pill: 9999px;
    --radius-card: 20px;
    --radius-cover: 14px;
    --radius-sm: 10px;

    /* Layout */
    --header-height: 72px;
    --container-max: 1200px;
}

/* ==========================================================================
   2. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Hind Siliguri', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-body);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
    position: relative;
}

body.drawer-locked {
    overflow: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   3. Glassmorphic Header & Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

/* WordPress Admin Bar Compatibility Fix */
body.admin-bar .site-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.site-header .nav-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand Logo */
.brand-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.site-brand-logo-img {
    height: 44px;
    width: auto;
    max-height: 48px;
    max-width: 180px;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.brand-logo:hover .site-brand-logo-img,
.footer-brand-logo:hover .site-brand-logo-img {
    transform: scale(1.03);
    opacity: 0.95;
}

@media (max-width: 768px) {
    .site-brand-logo-img {
        height: 38px;
        max-width: 145px;
    }
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu li a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.98rem;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active,
.nav-menu li.current-menu-item > a {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Header Actions & CTA */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    color: #ffffff !important;
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: var(--shadow-btn);
    transition: all 0.25s ease;
}

.header-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.35);
    color: #ffffff !important;
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-toggle .bar {
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Navigation (Premium, Full-Viewport & Blur) */
.mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height, 72px);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--header-height, 72px));
    height: calc(100dvh - var(--header-height, 72px));
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(30, 27, 75, 0.2);
    z-index: 9998;
    padding: 1.5rem 1.25rem 2.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    border-bottom: 2px solid var(--border-light);
}

.mobile-drawer.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .mobile-drawer {
    top: calc(var(--header-height, 72px) + 32px);
    height: calc(100vh - var(--header-height, 72px) - 32px);
    height: calc(100dvh - var(--header-height, 72px) - 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .mobile-drawer {
        top: calc(var(--header-height, 72px) + 46px);
        height: calc(100vh - var(--header-height, 72px) - 46px);
        height: calc(100dvh - var(--header-height, 72px) - 46px);
    }
}

body.drawer-locked {
    overflow: hidden !important;
    touch-action: none;
}

.mobile-drawer-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.mobile-nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-card, 16px);
    background: var(--bg-surface-soft, #f8fafc);
    border: 1px solid var(--border-subtle, #f1f0f7);
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-menu li.current-menu-item > a,
.mobile-nav-menu li a:hover,
.mobile-nav-menu li a:active {
    background: var(--color-primary-light, #f5f3ff);
    color: var(--color-primary, #7c3aed);
    border-color: var(--border-focus, #c4b5fd);
}

.mobile-drawer-cta {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-light);
}

.btn-block-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary, #7c3aed) 0%, #6366f1 100%);
    color: #ffffff !important;
    padding: 15px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-block-cta:active {
    transform: scale(0.98);
}

@media (min-width: 821px) {
    .mobile-drawer {
        display: none !important;
    }
}

/* ==========================================================================
   4. Hero Section with Illustrated Panorama Background & Floating Search
   ========================================================================== */
.main-site-content {
    padding-top: calc(var(--header-height) + 30px);
    min-height: calc(100vh - 350px);
    position: relative;
}

.home .main-site-content,
.post-type-archive-book .main-site-content {
    padding-top: var(--header-height);
}

/* Ambient Doodles */
.ambient-doodles {
    display: none;
}

/* Hero Content */
.hero-section {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3.5rem 1.5rem 4.5rem;
    background-color: #f7f6fe;
    background-image: url('../images/hero_bg.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    overflow: hidden;
}

.hero-section.hero-archive-section {
    padding: 3rem 1.5rem 3.5rem;
}

/* Bottom blend gradient transitioning smoothly into the canvas background */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(251, 250, 255, 0) 0%, rgba(251, 250, 255, 0.75) 60%, rgba(251, 250, 255, 1) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-inner {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.25s ease;
}

.hero-pill-badge:hover {
    transform: translateY(-2px);
    border-color: var(--border-focus);
}

.hero-main-title {
    font-family: 'Playfair Display', 'Hind Siliguri', serif;
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
    line-height: 1.25;
    margin-bottom: 1.2rem;
}

.hero-description {
    font-size: 1.12rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

/* Floating Pill Search Form */
.floating-search-wrapper {
    max-width: 580px;
    margin: 0 auto 2.5rem;
}

.search-pill-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #ede9fe;
    border-radius: var(--radius-pill);
    padding: 6px 8px 6px 20px;
    box-shadow: var(--shadow-search);
    transition: all 0.3s ease;
}

.search-pill-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 16px 40px -6px rgba(124, 58, 237, 0.16);
    transform: translateY(-2px);
}

.search-input-icon {
    color: #94a3b8;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.search-pill-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background: transparent;
}

.search-pill-input::placeholder {
    color: #94a3b8;
    font-size: 0.95rem;
}

.search-pill-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    outline: none;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
    transition: all 0.25s ease;
}

.search-pill-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

/* Category Filter Pills (From Reference) */
.category-filters-container {
    margin-top: 1.5rem;
}

.category-pills-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pill {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-body);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-pill:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-tint);
    color: var(--color-primary);
    background: #faf8ff;
}

.category-pill.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    border-color: transparent;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
    transform: translateY(-2px);
}

/* ==========================================================================
   5. Catalog & 4-Column Book Cards Grid
   ========================================================================== */
.catalog-section {
    position: relative;
    z-index: 1;
    padding: 1.5rem 0 5rem;
}

.catalog-header-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.2rem;
}

.catalog-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-heading-pill {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.catalog-heading {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.view-all-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--color-primary);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.view-all-pill-btn:hover {
    background: var(--color-primary);
    color: #ffffff !important;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

/* Responsive Cards Grid (Auto-fill up to 4 columns) */
.cute-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 280px));
    justify-content: flex-start;
    gap: 1.8rem;
}

/* Cute Book Card Component */
.cute-book-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.cute-book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-focus);
}

/* 3D Tactile Book Cover */
.book-cover-link {
    display: block;
    text-decoration: none;
    margin-bottom: 1.1rem;
}

.book-cover-wrapper {
    position: relative;
    border-radius: var(--radius-cover);
    overflow: hidden;
    aspect-ratio: 1 / 1.45;
    background: #f1f5f9;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.cute-book-card:hover .book-cover-wrapper {
    transform: scale(1.025);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

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

/* Realistic 3D Book Spine Fold */
.book-spine-depth {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 32px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.24) 0%, rgba(0, 0, 0, 0.08) 12%, rgba(255, 255, 255, 0.15) 18%, transparent 40%);
    pointer-events: none;
}

.book-lighting-sheen {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.book-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ede9fe 0%, #fbcfe8 100%);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-main);
}

.placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.placeholder-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Card Body */
.book-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-book-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}

.card-book-title a {
    color: var(--text-main);
    text-decoration: none;
}

.card-book-title a:hover {
    color: var(--color-primary);
}

.card-author-name {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-author-name .by-prefix {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-right: 4px;
}

.card-author-name a {
    color: inherit;
}

.card-author-name a:hover {
    color: var(--color-primary);
}

/* Rating Stars */
.card-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.stars-gold {
    color: var(--color-amber);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.rating-number {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

/* Pastel Format Chips */
.card-format-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1rem;
    min-height: 26px;
}

.format-chip {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.format-chip.format-pdf {
    background: #ffe4e6;
    color: #e11d48;
}

.format-chip.format-epub {
    background: #f3e8ff;
    color: #7c3aed;
}

.format-chip.format-kfx {
    background: #fef3c7;
    color: #d97706;
}

.format-chip.format-azw3 {
    background: #dcfce7;
    color: #15803d;
}

.format-chip.format-mobi {
    background: #e0f2fe;
    color: #0284c7;
}

/* Action Buttons */
.card-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 0.5rem;
}

.btn-card-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6366f1 100%);
    color: #ffffff !important;
    border: none;
    outline: none;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.22);
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-card-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.32);
    color: #ffffff !important;
}

.btn-card-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-body) !important;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-card-secondary:hover {
    border-color: var(--color-primary-tint);
    color: var(--color-primary) !important;
    background: #faf8ff;
    transform: translateY(-1px);
}

/* Empty State */
.cute-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: #ffffff;
    border-radius: var(--radius-card);
    border: 1px dashed var(--border-focus);
}

.empty-icon-box {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-cute-primary {
    display: inline-block;
    background: var(--color-primary);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

/* ==========================================================================
   6. Cute & Minimal Footer
   ========================================================================== */
.cute-site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    padding: 4rem 0 2rem;
    position: relative;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.3fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.footer-brand-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    max-width: 165px;
    object-fit: contain;
}


.footer-bio-text {
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.footer-social-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface-soft);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.social-circle:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-col-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.2rem;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav-list li a {
    color: var(--text-muted);
    font-size: 0.94rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-nav-list li a:hover {
    color: var(--color-primary);
    transform: translateX(3px);
}

.fmt-pill-mini {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    margin-right: 6px;
}
.fmt-pill-mini.pdf { background: #ffe4e6; color: #e11d48; }
.fmt-pill-mini.epub { background: #f3e8ff; color: #7c3aed; }
.fmt-pill-mini.kfx { background: #fef3c7; color: #d97706; }
.fmt-pill-mini.azw3 { background: #dcfce7; color: #15803d; }

.newsletter-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.cute-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-pill-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: var(--bg-surface-soft);
    color: var(--text-main);
}

.newsletter-pill-input:focus {
    border-color: var(--color-primary);
    background: #ffffff;
}

.newsletter-pill-btn {
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-pill-btn:hover {
    background: var(--color-primary-hover);
}

.footer-bottom-bar {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-legal-links a {
    color: var(--text-muted);
}

.footer-legal-links a:hover {
    color: var(--color-primary);
}

.footer-legal-links .separator {
    color: var(--border-light);
}

/* ==========================================================================
   7. Single Book Page & Reading Experience
   ========================================================================== */
.single-book-page-wrap {
    padding: 1.5rem 0 5rem;
}

/* Breadcrumb Navigation */
.cute-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.cute-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cute-breadcrumb a:hover {
    color: var(--color-primary);
}

.cute-breadcrumb .separator {
    color: var(--border-light);
    font-size: 0.85rem;
}

.cute-breadcrumb .current {
    color: var(--text-main);
    font-weight: 600;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 1. Top Presentation Hero Card --- */
.single-book-card {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.06), 0 4px 12px rgba(15, 23, 42, 0.03);
    padding: 2.75rem;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 3.5rem;
    align-items: start;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Soft ambient background gradient glow inside card */
.single-book-card::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, rgba(251, 113, 133, 0.03) 50%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

/* Left Cover Column */
.single-hero-cover-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.book-cover-3d {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1.45;
    border-radius: 18px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(124, 58, 237, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book-cover-3d:hover {
    transform: translateY(-4px) rotate(-0.5deg);
    box-shadow: 0 26px 52px rgba(15, 23, 42, 0.22), 0 6px 16px rgba(124, 58, 237, 0.12);
}

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

.book-spine-effect {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 18px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.08) 35%, rgba(255, 255, 255, 0.2) 60%, transparent 100%);
    pointer-events: none;
}

.book-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    padding: 1.5rem;
    text-align: center;
}

.cover-quick-specs {
    display: flex;
    gap: 8px;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.spec-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-pill);
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Right Details Column */
.single-book-details {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.single-book-meta-top {
    margin-bottom: 1.25rem;
}

.genre-pill {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid var(--color-primary-tint);
    text-decoration: none;
    transition: all 0.2s ease;
}

.genre-pill:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary-hover);
}

.book-categories-wrap {
    margin-bottom: 0.75rem;
}

.single-book-title {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 2.35rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.32;
    margin: 0 0 1rem 0;
    letter-spacing: -0.3px;
}

/* Clean, organized metadata row without dummy ratings or buzzwords */
.single-book-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
}

.single-book-meta-row .author-item .meta-label {
    color: var(--text-light);
    margin-right: 4px;
}

.single-book-meta-row .author-item .meta-value,
.single-book-meta-row .author-item a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.single-book-meta-row .author-item a:hover {
    text-decoration: underline;
}

.single-book-meta-row .meta-dot {
    color: var(--border-light);
    font-size: 0.85rem;
    user-select: none;
}

.single-book-meta-row .meta-free-tag {
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
}

.single-book-meta-row .meta-price-tag {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.15rem;
}

/* Download Hub */
.book-download-hub {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.single-actions-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.btn-single-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    color: #ffffff !important;
    padding: 13px 28px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.28);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.btn-single-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(124, 58, 237, 0.38);
    color: #ffffff !important;
}

.btn-single-preview,
.khichuri-online-reader-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #ffffff !important;
    border: 1.5px solid var(--border-light) !important;
    color: var(--text-main) !important;
    padding: 12px 24px !important;
    border-radius: var(--radius-pill) !important;
    font-family: inherit !important;
    font-size: 0.98rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

.btn-single-preview:hover,
.khichuri-online-reader-btn:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    background: #faf8ff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.1) !important;
}

.btn-single-preview svg,
.khichuri-online-reader-btn svg {
    color: var(--color-primary) !important;
    flex-shrink: 0 !important;
}

/* Direct Formats Bar */
.direct-formats-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.formats-bar-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.direct-formats-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.format-dl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-body);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.format-dl-badge .format-name {
    letter-spacing: 0.5px;
}

.format-dl-badge svg {
    color: var(--text-light);
    transition: all 0.2s ease;
}

.format-dl-badge:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #fdfcff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.08);
}

.format-dl-badge:hover svg {
    color: var(--color-primary);
    transform: translateY(1px);
}

.chip-text {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.chip-icon {
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.direct-dl-chip:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.16);
    color: var(--color-primary) !important;
}

.direct-dl-chip:hover .chip-icon {
    color: var(--color-primary);
    transform: translateY(1.5px);
}

.direct-dl-chip:hover .chip-text {
    color: var(--color-primary);
}

/* --- 2. Main Content & Sidebar Grid --- */
.single-book-body-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 4rem;
}

/* Left Article Box */
.single-description-box {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    padding: 3rem;
}

.section-title-wrap {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.section-heading {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.5rem 0 0 0;
}

.book-prose-content {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.12rem;
    line-height: 1.95;
    color: #334155;
}

.book-prose-content p {
    margin-bottom: 1.5rem;
}

.book-prose-content p:last-child {
    margin-bottom: 0;
}

.book-prose-content strong {
    color: var(--text-main);
    font-weight: 700;
}

/* Right Sidebar Cards */
.book-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.sidebar-spec-card {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    padding: 1.75rem;
}

.sidebar-card-title {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.spec-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.spec-label {
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.spec-value {
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
}

.reading-tips-card {
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border-color: #ede9fe;
}

.reading-tip-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

.reading-tip-text code {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* --- 3. Related Books Section & Balanced Invite Card --- */
.single-related-section {
    padding-top: 1rem;
}

.related-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.catalog-invite-card {
    background: linear-gradient(135deg, #fbf7ff 0%, #f5effe 100%);
    border: 2px dashed #ddd6fe;
    border-radius: var(--radius-card);
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 380px;
}

.invite-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.invite-title {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.65rem 0;
}

.invite-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

.invite-btn {
    display: inline-flex;
    align-items: center;
    background: var(--color-primary);
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
    transition: all 0.25s ease;
}

.invite-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/* ==========================================================================
   7.5 Cute Download Modal
   ========================================================================== */
.cute-download-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cute-download-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.cute-modal-window {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    border-radius: 26px;
    box-shadow: 0 25px 60px -12px rgba(124, 58, 237, 0.25), 0 0 1px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #ede9fe;
}

.cute-download-modal-overlay.active .cute-modal-window {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.cute-modal-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    padding: 24px 28px;
    position: relative;
    color: #ffffff;
}

.cute-modal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cute-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.cute-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
}

.cute-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.08);
}

.cute-modal-title {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.25;
    color: #ffffff;
}

.cute-modal-book-name {
    font-size: 0.92rem;
    color: #ede9fe;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    font-weight: 400;
}

/* Modal Body */
.cute-modal-body {
    padding: 26px 28px;
}

.cute-modal-intro {
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 16px;
}

/* Modal Format Cards List */
.cute-modal-formats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-format-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #f1f5f9;
    border-radius: 18px;
    padding: 14px 18px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.modal-format-card:hover {
    background: #faf8ff;
    border-color: #c4b5fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.12);
}

.format-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.format-type-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-epub {
    background: #ede9fe;
    color: #7c3aed;
}

.badge-pdf {
    background: #ffe4e6;
    color: #e11d48;
}

.badge-kfx {
    background: #fef3c7;
    color: #d97706;
}

.badge-mobi {
    background: #e0f2fe;
    color: #0284c7;
}

.badge-azw3 {
    background: #dcfce7;
    color: #059669;
}

.badge-default {
    background: #f1f5f9;
    color: #475569;
}

.format-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.format-name {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.format-desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.3;
}

.format-download-action {
    flex-shrink: 0;
    margin-left: 12px;
}

.btn-download-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
    padding: 7px 15px;
    border-radius: 9999px;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-format-card:hover .btn-download-pill {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
}

.modal-format-card:hover .btn-download-pill svg {
    transform: translateY(1.5px);
}

/* Modal Footer / Tip */
.cute-modal-footer {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 14px 28px;
    font-size: 0.82rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

/* Modal Loading State */
.cute-modal-loading {
    padding: 40px 20px;
    text-align: center;
}

.cute-modal-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid #ede9fe;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: cuteModalSpin 0.85s linear infinite;
    margin: 0 auto 16px;
}

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

.cute-modal-loading-text {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

/* ==========================================================================
   8. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1100px) {
    .cute-books-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 820px) {
    .desktop-nav, .header-cta-btn {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .cute-books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    .hero-section {
        padding: 2.75rem 1rem 3.5rem;
    }
    .hero-main-title {
        font-size: 2.4rem;
    }
    .single-book-card {
        grid-template-columns: 1fr;
        padding: 2.25rem 1.75rem;
        gap: 2.5rem;
    }
    .book-cover-3d {
        max-width: 260px;
        margin: 0 auto;
    }
    .single-book-title {
        font-size: 1.85rem;
    }
    .single-book-body-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .single-description-box {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 540px) {
    .cute-books-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-section {
        padding: 2rem 0.85rem 2.75rem;
    }
    .hero-main-title {
        font-size: 2rem;
    }
    .search-pill-form {
        padding: 5px 6px 5px 14px;
    }
    .search-pill-submit span.btn-text {
        display: none;
    }
    .category-pills-row {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 6px;
        flex-wrap: nowrap;
    }
    .category-pill {
        flex-shrink: 0;
    }
    .footer-bottom-bar {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Khichuri Modern E-Book Reader Modal (PDF.js Powered) v2.3
   Responsive, Fast, & Mobile Friendly
   With Screen-Fit (Zero Scroll) & Continuous Scroll Modes
   ========================================================================== */

body.book-preview-modal-open {
    overflow: hidden !important;
}

/* Modal Overlay */
.book-preview-modal {
    position: fixed !important;
    z-index: 999999 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.book-preview-modal.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Modal Content Card */
.book-preview-modal-content {
    background-color: #181824 !important;
    width: 100% !important;
    max-width: 1100px !important;
    height: 100% !important;
    max-height: 94vh !important;
    border-radius: 18px !important;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* Reader Top Header Bar */
.reader-header-bar {
    background: #12121a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 12px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-shrink: 0 !important;
    z-index: 20 !important;
    box-sizing: border-box !important;
}

.reader-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.reader-mode-badge {
    background: rgba(124, 58, 237, 0.25) !important;
    border: 1px solid rgba(124, 58, 237, 0.45) !important;
    color: #c4b5fd !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 9999px !important;
    white-space: nowrap !important;
}

.reader-book-title {
    color: #f8fafc !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: 'Hind Siliguri', sans-serif !important;
}

/* Navigation Controls (Center) */
.reader-nav-controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.reader-page-indicator {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #94a3b8 !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.06) !important;
    padding: 4px 12px !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.reader-page-indicator input {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    width: 34px !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    font-family: inherit !important;
}

.reader-page-indicator input:focus {
    border-bottom: 1px solid #7c3aed !important;
}

/* View Mode Toggle: [পৃষ্ঠা | স্ক্রোল] */
.reader-viewmode-toggle {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 9999px !important;
    padding: 2px !important;
    gap: 2px !important;
}

.reader-mode-btn {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-family: inherit !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.reader-mode-btn.active {
    background: #7c3aed !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4) !important;
}

.reader-mode-btn:hover:not(.active) {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Reader Standard Buttons */
.reader-ctrl-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
}

.reader-ctrl-btn:hover:not(:disabled) {
    background: rgba(124, 58, 237, 0.35) !important;
    border-color: #7c3aed !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.reader-ctrl-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.reader-fit-btn {
    width: auto !important;
    padding: 0 12px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

.reader-close-btn {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #fca5a5 !important;
}

.reader-close-btn:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

/* Right Controls */
.reader-header-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.reader-zoom-group {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* Reader Viewport Area */
.book-preview-modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    background: #0b0b12 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 20px 16px !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}

/* Single Page Mode Wrapper */
.reader-single-page-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

.reader-canvas-wrapper {
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    z-index: 2 !important;
}

#reader-canvas {
    display: block !important;
    background: #ffffff !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.4) !important;
    border-radius: 6px !important;
    transition: transform 0.15s ease !important;
}

/* Bottom Navigation Action Bar (Right below the page) */
.reader-page-bottom-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 18px !important;
    margin-bottom: 24px !important;
    padding: 10px 18px !important;
    background: rgba(24, 24, 36, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 9999px !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45) !important;
    z-index: 10 !important;
}

.reader-bottom-nav-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
    font-family: inherit !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.reader-bottom-nav-btn:hover:not(:disabled) {
    background: rgba(124, 58, 237, 0.35) !important;
    border-color: #7c3aed !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.reader-bottom-nav-btn.primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    border-color: #7c3aed !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4) !important;
}

.reader-bottom-nav-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6) !important;
    transform: translateY(-2px) !important;
}

.reader-bottom-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.reader-bottom-page-status {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

/* Floating Side Chevron Navigation (Always visible in viewport on Left & Right) */
.reader-floating-side-btn {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 100 !important;
    background: rgba(18, 18, 26, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
    width: 44px !important;
    height: 56px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
    padding: 0 !important;
}

.reader-side-prev {
    left: 28px !important;
}

.reader-side-next {
    right: 28px !important;
}

.reader-floating-side-btn:hover:not(:disabled) {
    background: #7c3aed !important;
    border-color: #a78bfa !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.08) !important;
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.5) !important;
}

.reader-floating-side-btn:disabled {
    opacity: 0.2 !important;
    cursor: not-allowed !important;
    transform: translateY(-50%) !important;
}

/* Continuous Scroll Mode Wrapper */
.reader-continuous-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 32px !important;
    width: 100% !important;
    padding: 10px 0 50px !important;
}

.reader-scroll-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65) !important;
}

.reader-scroll-badge {
    position: absolute !important;
    top: -12px !important;
    left: 16px !important;
    background: #7c3aed !important;
    color: #ffffff !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    padding: 3px 12px !important;
    border-radius: 9999px !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.45) !important;
    z-index: 5 !important;
}

.reader-scroll-canvas {
    display: block !important;
    border-radius: 6px !important;
}

/* Loading State */
.reader-loading-state {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    color: #e2e8f0 !important;
    z-index: 5 !important;
}

.reader-spinner {
    width: 38px !important;
    height: 38px !important;
    border: 3.5px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 3.5px solid #7c3aed !important;
    border-radius: 50% !important;
    animation: readerSpin 0.8s linear infinite !important;
    margin: 0 auto 12px !important;
}

@keyframes readerSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.reader-loading-text {
    font-size: 0.95rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.reader-error-box {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    padding: 16px 22px !important;
    border-radius: 12px !important;
    color: #fca5a5 !important;
    font-size: 0.95rem !important;
}

.reader-retry-btn {
    display: inline-block !important;
    margin-top: 8px !important;
    color: #ffffff !important;
    background: #ef4444 !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
}

/* Mobile Touch Tap Zones */
.reader-touch-zone {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 20% !important;
    max-width: 140px !important;
    z-index: 3 !important;
    cursor: pointer !important;
    background: transparent !important;
}

.reader-touch-left {
    left: 0 !important;
}

.reader-touch-right {
    right: 0 !important;
}

/* Mobile Bottom Navigation Bar (Hidden on desktop) */
.reader-mobile-bottom-bar {
    display: none;
    background: #12121a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 10px 16px !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
    z-index: 20 !important;
    box-sizing: border-box !important;
}

.reader-mob-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
}

.reader-mob-btn:hover:not(:disabled) {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
}

.reader-mob-btn:disabled {
    opacity: 0.3 !important;
}

.reader-mob-page-indicator {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .book-preview-modal {
        padding: 0 !important;
    }
    .book-preview-modal-content {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .reader-header-bar {
        padding: 10px 14px !important;
    }

    .reader-nav-controls,
    .reader-zoom-group,
    .reader-floating-side-btn,
    #reader-fullscreen-btn {
        display: none !important;
    }

    .reader-mobile-bottom-bar {
        display: flex !important;
    }

    .book-preview-modal-body {
        padding: 12px 6px 16px !important;
    }
}


/* ==========================================================================
   Internal Pages: Contact, Submit Book, & Taxonomy Archive Pages
   Modern, Clean, Aesthetic Bengali Theme matching Homepage Essence
   ========================================================================== */

/* --- Common Hero Page & Archive Section --- */
.hero-page-section,
.hero-archive-section {
    padding: 3.5rem 0 2.5rem 0 !important;
    text-align: center;
}

.hero-page-section .hero-inner,
.hero-archive-section .hero-inner {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-page-section .hero-main-title,
.hero-archive-section .hero-main-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0.75rem 0 1rem 0;
    background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.hero-page-section .hero-description,
.hero-archive-section .hero-description {
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 1.25rem 0;
    max-width: 720px;
}

/* Taxonomy Archive Meta Stats */
.archive-meta-stats-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.archive-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.18);
    padding: 7px 18px;
    border-radius: 9999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #6d28d9;
    box-shadow: 0 4px 12px -2px rgba(124, 58, 237, 0.08);
}

.archive-stat-pill svg {
    color: #7c3aed;
}

/* Archive Pagination */
.archive-pagination-wrapper {
    margin-top: 3.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.archive-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    border-radius: 9999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.archive-pagination .page-numbers:hover:not(.current):not(.dots) {
    border-color: #c084fc;
    color: #7c3aed;
    background: #faf5ff;
    transform: translateY(-1px);
}

.archive-pagination .page-numbers.current {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

.archive-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #94a3b8;
    box-shadow: none;
}

/* --- Contact Page Layout & Cards --- */
.contact-page-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 1rem auto 5rem auto;
    align-items: start;
}

.contact-cards-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-info-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(124, 58, 237, 0.1);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    padding: 1.75rem 1.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    transition: all 0.25s ease;
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px -8px rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.25);
}

.contact-card-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-card-body h3 {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 0.35rem 0;
}

.contact-card-body p {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
}

.contact-highlight-link {
    display: inline-block;
    color: #7c3aed;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-highlight-link:hover {
    color: #5b21b6;
    text-decoration: underline;
}

.contact-form-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(124, 58, 237, 0.12);
    box-shadow: 0 20px 45px -15px rgba(124, 58, 237, 0.08);
    padding: 2.75rem 2.5rem;
}

.contact-form-header {
    margin-bottom: 2rem;
}

.contact-form-title {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0.75rem 0 0 0;
}

/* Common Form Fields Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 0.98rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.required-star {
    color: #ef4444;
    font-weight: bold;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea,
.custom-select-wrap select {
    width: 100%;
    padding: 13px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #fafafc;
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 0.98rem;
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.custom-select-wrap select:focus {
    border-color: #7c3aed;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

/* Pill Buttons */
.btn-cute-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff !important;
    padding: 13px 30px;
    border-radius: 9999px;
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.28);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.btn-cute-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.38);
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
}

.btn-cute-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: #475569 !important;
    padding: 12px 24px;
    border-radius: 9999px;
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 600;
    font-size: 0.96rem;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cute-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #1e293b !important;
}

/* Alert Messages */
.form-messages {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.75rem;
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.5;
}

.form-messages.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #a7f3d0;
}

.form-messages.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fecaca;
}

.field-error-message {
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ef4444 !important;
    background: #fff5f5 !important;
}

/* --- Submit Book Page: Guidelines Section --- */
.submit-guidelines-section {
    max-width: 1000px;
    margin: 1rem auto 2.5rem auto;
}

.guidelines-card-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
    border: 1px solid #ede9fe;
    border-radius: 24px;
    padding: 2.25rem 2.5rem;
    box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.06);
}

.guidelines-header-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.75rem;
    text-align: center;
}

.guidelines-title {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0.65rem 0 0 0;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.guideline-item-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ede9fe;
    border-radius: 18px;
    padding: 1.4rem 1.15rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.guideline-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.08);
    border-color: #c084fc;
}

.guideline-icon-badge {
    font-size: 2rem;
    margin-bottom: 0.65rem;
    display: inline-block;
}

.guideline-card-content h3 {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 0.35rem 0;
}

.guideline-card-content p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

/* --- Submit Book Page: Multi-Step Card --- */
.submit-book-section {
    max-width: 860px;
    margin: 0 auto 5rem auto;
}

.submit-book-card-container {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(124, 58, 237, 0.12);
    box-shadow: 0 25px 50px -15px rgba(124, 58, 237, 0.09);
    padding: 3rem 2.75rem;
}

/* Progress Indicator Stepper */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1.5px solid #f1f5f9;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    cursor: default;
}

.progress-step .step-number {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid transparent;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.38);
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.progress-step .step-label {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    transition: color 0.2s ease;
}

.progress-step.active .step-label {
    color: #7c3aed;
    font-weight: 800;
}

.progress-step.completed .step-label {
    color: #10b981;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    margin: 0 1rem -1rem 1rem;
    border-radius: 9999px;
}

/* Step Content */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInStep 0.3s ease-out;
}

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

.step-intro-header {
    margin-bottom: 2rem;
}

.step-title {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0 0 0.35rem 0;
}

.step-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

/* Step Action Navigation */
.step-actions {
    display: flex;
    align-items: center;
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1.5px solid #f1f5f9;
}

.step-actions.flex-between {
    justify-content: space-between;
}

.step-actions.flex-end {
    justify-content: flex-end;
}

/* Upload Dropzone Area */
.upload-area {
    border: 2.5px dashed #c084fc;
    border-radius: 22px;
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #7c3aed;
    background: #f5f3ff;
    transform: scale(1.008);
}

.upload-icon-box {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ede9fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.upload-title {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0 0 0.4rem 0;
}

.upload-hint {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 0.75rem 0;
}

.upload-badge-pill {
    display: inline-block;
    padding: 5px 14px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 9999px;
}

/* File Selected Preview */
.file-info-preview {
    background: #f5f3ff;
    border: 1.5px solid #ddd6fe;
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon-badge {
    font-size: 2rem;
    flex-shrink: 0;
}

.file-data {
    flex: 1;
}

.file-name {
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 700;
    color: #1e1b4b;
    font-size: 1rem;
    word-break: break-all;
}

.file-size {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
}

.remove-file-btn {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.remove-file-btn:hover {
    background: #fecaca;
    color: #b91c1c;
}

/* Upload Progress Bar */
.upload-progress-wrap {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #a855f7);
    border-radius: 9999px;
    transition: width 0.2s ease;
}

.progress-text-display {
    font-size: 0.85rem;
    font-weight: 700;
    color: #7c3aed;
    min-width: 36px;
}

/* Terms Checkbox */
.terms-section {
    margin-top: 1.5rem;
}

.terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.terms-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
    margin-top: 3px;
    flex-shrink: 0;
}

.terms-text {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.5;
}

.terms-text a {
    color: #7c3aed;
    font-weight: 600;
    text-decoration: underline;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .contact-page-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .guidelines-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero-page-section .hero-main-title,
    .hero-archive-section .hero-main-title {
        font-size: 2.1rem;
    }

    .contact-form-card,
    .submit-book-card-container {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .guidelines-grid {
        grid-template-columns: 1fr;
    }

    .guidelines-card-wrapper {
        padding: 1.5rem 1.25rem;
    }

    .progress-step .step-number {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .progress-step .step-label {
        font-size: 0.82rem;
    }

    .progress-line {
        margin: 0 0.5rem -1rem 0.5rem;
    }
}


/* ==========================================================================
   Legal Pages: Terms of Service, Privacy Policy & Standard Pages
   ========================================================================== */

.legal-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 1120px;
    margin: 1.5rem auto 5rem auto;
}

.legal-sidebar {
    position: sticky;
    top: 90px;
}

.legal-toc-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(124, 58, 237, 0.1);
    padding: 1.5rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.toc-icon {
    font-size: 1.2rem;
}

.toc-title {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e1b4b;
    margin: 0;
}

.legal-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.toc-link:hover,
.toc-link.active {
    background: #faf5ff;
    color: #7c3aed;
    font-weight: 700;
    transform: translateX(4px);
}

.toc-help-box {
    margin-top: 1.5rem;
    padding: 1.15rem;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-radius: 16px;
    text-align: center;
    border: 1px solid #ddd6fe;
}

.toc-help-box .help-emoji {
    font-size: 1.5rem;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.toc-help-box p {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.75rem 0;
}

.toc-help-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #7c3aed;
    color: #ffffff !important;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.toc-help-btn:hover {
    background: #6d28d9;
    transform: scale(1.04);
}

/* Legal Main Content Card */
.legal-content-card {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(124, 58, 237, 0.12);
    box-shadow: 0 25px 50px -15px rgba(124, 58, 237, 0.08);
    padding: 3rem 2.75rem;
}

.legal-callout-box {
    background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
    border-left: 4px solid #7c3aed;
    border-radius: 0 18px 18px 0;
    padding: 1.35rem 1.6rem;
    display: flex;
    gap: 1.15rem;
    align-items: flex-start;
    margin-bottom: 2.75rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.04);
}

.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.callout-text {
    font-size: 0.98rem;
    color: #334155;
    line-height: 1.65;
}

.callout-text strong {
    color: #7c3aed;
}

.legal-section-block {
    margin-bottom: 2.75rem;
    padding-bottom: 2.25rem;
    border-bottom: 1.5px solid #f1f5f9;
    scroll-margin-top: 100px;
}

.legal-section-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-number-pill {
    display: inline-block;
    padding: 3px 12px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 0.82rem;
    font-weight: 800;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
    font-family: 'Hind Siliguri', sans-serif;
}

.legal-section-title {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0.35rem 0 1rem 0;
}

.legal-content-card p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.75;
    margin: 0 0 1rem 0;
}

.legal-bullet-list {
    margin: 1rem 0 1.25rem 0;
    padding-left: 1.35rem;
    color: #475569;
}

.legal-bullet-list li {
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.legal-warning-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 0 14px 14px 0;
    padding: 1.15rem 1.35rem;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 1.25rem 0;
    color: #92400e;
    font-size: 0.95rem;
    line-height: 1.6;
}

.warning-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

.legal-contact-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
    margin-top: 1.5rem;
    background: #fafafc;
    border: 1px solid #ede9fe;
    border-radius: 18px;
    padding: 1.5rem;
}

.contact-box-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.c-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.c-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.c-val {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #7c3aed;
    text-decoration: none;
}

.c-val:hover {
    text-decoration: underline;
}

/* Standard Pages Container */
.standard-page-container {
    max-width: 900px;
    margin: 1.5rem auto 5rem auto;
}

.standard-page-card {
    background: #ffffff;
    border-radius: 26px;
    border: 1px solid rgba(124, 58, 237, 0.1);
    box-shadow: 0 20px 45px -15px rgba(124, 58, 237, 0.08);
    padding: 3rem 2.5rem;
}

.page-featured-image-wrap {
    margin-bottom: 2rem;
    border-radius: 18px;
    overflow: hidden;
}

.page-hero-banner {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}

.page-entry-content p {
    margin-bottom: 1.25rem;
}

.page-entry-content h2,
.page-entry-content h3 {
    font-family: 'Hind Siliguri', sans-serif;
    font-weight: 800;
    color: #1e1b4b;
    margin: 2rem 0 1rem 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .legal-page-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .legal-sidebar {
        position: static;
    }

    .legal-contact-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .legal-content-card,
    .standard-page-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }

    .legal-section-title {
        font-size: 1.35rem;
    }
}

