/* ═══════════════════════════════════════════════════════════
   PARISHUDDA GRANDHAMU — Design System
   Palette: Country Butcher / Telugu Bible Study Reference
   Butcher Light #f5f2eb · Butcher #8b3a30 · Slate #262523
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Mandali&family=Noto+Serif+Telugu:wght@400;600;700;900&family=Noto+Sans+Telugu:wdth,wght@75,300..700&family=Ramabhadra&family=Tenali+Ramakrishna&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ─── */
:root {
    /* Butcher palette (from reference project) */
    --butcher-light: #f5f2eb;
    /* warm cream background */
    --butcher: #8b3a30;
    /* deep rustic red/brown — brand */
    --butcher-dark: #5c231c;
    /* darker rustic red */
    --butcher-slate: #262523;
    /* warm dark gray (dark mode bg) */
    --butcher-card: #ffffff;
    /* light card */
    --butcher-card-dk: #33312e;
    /* dark mode card */
    --butcher-text-dk: #e6e4df;
    /* dark mode text */
    --butcher-border: #e8e3d8;
    /* warm border */

    /* Semantic aliases */
    --bg: var(--butcher-light);
    --surface: var(--butcher-card);
    --brand: var(--butcher);
    --brand-dark: var(--butcher-dark);
    --text: #1c1a17;
    --text-muted: #6b6560;
    --text-subtle: #9b9490;
    --border: var(--butcher-border);

    /* Shadows (warm) */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, .07), 0 1px 2px -1px rgba(0, 0, 0, .07);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .08), 0 2px 4px -2px rgba(0, 0, 0, .08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
    --shadow-premium: 0 10px 40px -10px rgba(139, 58, 48, .08);
    --shadow-premium-dark: 0 10px 40px -10px rgba(0, 0, 0, .6);

    /* Global geometry */
    --wrap-w: 1200px;
    --r-md: 8px;
    --r-lg: 12px;

    /* Type */
    --font-serif: 'Mandali', 'Playfair Display', 'Noto Serif Telugu', serif;
    --font-sans: 'Noto Sans Telugu', 'Inter', sans-serif;
    --font-ui: 'Inter', sans-serif;

    /* Transition */
    --trans-fast: .15s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-base: .25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Radii */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-2xl: 20px;

    /* Premium Color Palette (from Telugu Bible Study) */
    --primary-color: #1a237e;
    /* Deep Royal Blue */
    --primary-dark: #283593;
    --accent-color: #ffca28;
    /* Gold */
    --text-color: #333333;
    --bg-color: #f8f9fa;
    /* Soft White */
    --card-bg: #ffffff;
    --footer-bg: #0d1b2a;

    --font-heading: 'Cinzel', serif;
    --font-telugu: 'Ramabhadra', sans-serif;

    /* Legacy Butcher Palette mappings for existing elements */
    --gold-300: #FFE082;
    --gold-400: var(--accent-color);
    --gold-500: #FFB300;
    --gold-600: #FFA000;
    --gray-400: #ccc;
}

/* ─── Dark Mode Mapping ─── */
html.dark {
    --bg: #1c1b18;
    --surface: var(--butcher-card-dk);
    --text: #f5f5f4;
    --text-muted: #a8a29e;
    --text-subtle: #78716c;
    --border: #57534e;
    --line: #44403c;
    --butcher: #e07a5f;
    /* Warm sunset red perfectly visible on dark grey */
    --butcher-dark: #f4a261;
    --butcher-light: #f5f2eb; /* Restore as a light accent Color even in dark mode */

    /* Dark Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 16px 32px rgba(0, 0, 0, 0.5);
}

/* Dark mode overrides */
.dark {
    --bg: var(--butcher-slate);
    --surface: var(--butcher-card-dk);
    --text: var(--butcher-text-dk);
    --text-muted: #9b9490;
    --text-subtle: #6b6560;
    --border: rgba(255, 255, 255, .07);
    --shadow-premium: var(--shadow-premium-dark);
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color .3s ease, color .3s ease;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Subtle dot pattern (from Telugu Bible Study) */
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.025' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/svg%3E");
}

main {
    flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    line-height: 1.25;
    color: var(--text);
    font-weight: 700;
}

a {
    color: var(--brand);
    text-decoration: none;
}

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

p {
    line-height: 1.7;
}

/* ─── Headings use Mandali ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    color: var(--brand-dark);
    line-height: 1.2;
}

.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
    color: var(--butcher-light);
}

/* ─── Container ─── */
.wrap {
    width: 100%;
    max-width: var(--wrap-w);
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .wrap {
        padding: 0 32px;
    }
}

@media (min-width: 1024px) {
    .wrap {
        padding: 0 48px;
    }
}

/* ══════════════════════════════════
   PREMIUM CARD (reference project)
══════════════════════════════════ */
.premium-card {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border);
    transition: transform .3s ease, box-shadow .3s ease;
}

.premium-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.dark .premium-card {
    box-shadow: var(--shadow-premium-dark);
}

/* ══════════════════════════════════
   TOPBAR
══════════════════════════════════ */
.topbar {
    background: var(--butcher-slate);
    color: rgba(230, 228, 223, .5);
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: .04em;
    padding: 8px 0;
}

.dark .topbar {
    background: #1a1917;
}

.topbar a {
    color: inherit;
    transition: color .2s;
}

.topbar a:hover {
    color: var(--butcher-light);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar__social {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ══════════════════════════════════
   HEADER
══════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 242, 235, .97);
    border-bottom: 2px solid #d6d3c9;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background .3s, border-color .3s;
}

.dark .site-header {
    background: rgba(38, 37, 35, .97);
    border-bottom-color: #444;
}

.header__inner {
    display: flex;
    align-items: center;
    min-height: 96px;
    padding: 12px 0;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo__mark {
    width: 40px;
    height: 40px;
    background: var(--butcher);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(139, 58, 48, .3);
}

.logo__text-main {
    font-family: var(--font-serif);
    font-size: 19px;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.2;
}

.dark .logo__text-main {
    color: var(--butcher-light);
}

.logo__text-sub {
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--butcher);
}

/* Nav */
.primary-nav {
    display: none;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .primary-nav {
        display: flex;
    }
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--r-md);
    color: var(--text-muted);
    transition: color .2s, background .2s;
    white-space: nowrap;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--butcher);
    background: rgba(139, 58, 48, .07);
}

.nav-link.active {
    color: var(--butcher);
}

.dark .nav-link:hover {
    color: var(--butcher-light);
    background: rgba(255, 255, 255, .06);
}

.dark .nav-link.active {
    color: #f5f2eb;
}

/* Header controls */
.header__controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .2s, color .2s;
}

.icon-btn:hover {
    background: rgba(139, 58, 48, .07);
    color: var(--butcher);
}

.dark .icon-btn {
    color: var(--text-muted);
}

.dark .icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--butcher-light);
}

.hamburger {
    display: none;
}

@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }
}

/* Mobile nav */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 6px 0;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    padding: 11px 24px;
    color: var(--text-muted);
    transition: color .15s, background .15s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--butcher);
    background: rgba(139, 58, 48, .06);
}

/* ══════════════════════════════════
   SEARCH OVERLAY
══════════════════════════════════ */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(38, 37, 35, .8);
    backdrop-filter: blur(6px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 16px 0;
}

.search-overlay.open {
    display: flex;
    animation: fadeIn .2s ease;
}

.search-modal {
    width: 100%;
    max-width: 580px;
    background: var(--surface);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: slideUp .25s ease;
}

.search-modal__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.search-modal__bar input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 16px;
    background: transparent;
    color: var(--text);
}

.search-modal__bar input::placeholder {
    color: var(--text-subtle);
}

.search-modal__hint {
    padding: 10px 20px 12px;
    font-size: 11px;
    color: var(--text-subtle);
    font-family: var(--font-ui);
    letter-spacing: .03em;
}

/* ══════════════════════════════════
   HERO SECTION
══════════════════════════════════ */
.hero {
    background: var(--butcher-slate);
    padding: 72px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dark .hero {
    background: #1a1917;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% -20%, rgba(139, 58, 48, .25) 0%, transparent 55%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(245, 242, 235, .45);
    margin-bottom: 20px;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    background: rgba(139, 58, 48, .5);
}

.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 700;
    color: var(--butcher-light);
    line-height: 1;
    margin-bottom: 14px;
    letter-spacing: -.01em;
}

.hero__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 280px;
    margin: 0 auto 16px;
}

.hero__divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 58, 48, .4));
}

.hero__divider-line-rev {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, transparent, rgba(139, 58, 48, .4));
}

.hero__divider-star {
    color: var(--butcher);
    font-size: 12px;
    opacity: .7;
}

.hero__sub {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(245, 242, 235, .35);
    margin-bottom: 24px;
}

.hero__desc {
    font-family: var(--font-sans);
    font-size: 16px;
    color: rgba(245, 242, 235, .55);
    max-width: 440px;
    margin: 0 auto 40px;
    line-height: 1.75;
}

.hero__cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 52px;
}

.hero__stats {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.hero__stat {
    padding: 16px 24px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.hero__stat:last-child {
    border-right: none;
}

.hero__stat-num {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--butcher-light);
    line-height: 1;
}

.hero__stat-label {
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(245, 242, 235, .3);
    margin-top: 4px;
    font-family: var(--font-ui);
}

/* ══════════════════════════════════
   QUICK NAV BAR
══════════════════════════════════ */
.quick-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.quick-nav__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-nav__label {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.field-select {
    flex: 1;
    min-width: 150px;
    max-width: 280px;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--bg) url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%238b3a30' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s;
}

.field-select:focus {
    border-color: var(--butcher);
}

/* ══════════════════════════════════
   SECTION LAYOUT
══════════════════════════════════ */
.section {
    padding: 30px 0 40px;
}

@media (min-width: 768px) {
    .section {
        padding: 40px 0 60px;
    }
}

.section-sm {
    padding: 24px 0 32px;
}

.section-lg {
    padding: 80px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--butcher);
    margin-bottom: 8px;
}

.section-eyebrow::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--butcher);
    border-radius: 2px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 700;
    color: var(--brand-dark);
}

.dark .section-title {
    color: var(--butcher-light);
}

/* ══════════════════════════════════
   BOOK CARDS  (premium-card variant)
══════════════════════════════════ */
.book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 640px) {
    .book-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 900px) {
    .book-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1100px) {
    .book-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.book-card {
    --card-accent: var(--butcher);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--card-accent);
    border-bottom: 4px solid var(--gray-400);
    border-radius: var(--r-xl);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease, border-bottom-color .3s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 100%;
}

.dark .book-card {
    border-color: #333;
    border-bottom-color: black;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
    border-bottom-color: var(--card-accent);
}

.dark .book-card:hover {
    border-bottom-color: var(--card-accent);
}

.book-card--nt {
    --card-accent: var(--gold-400);
}

.book-card__code {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 800;
    color: var(--card-accent);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.book-card__name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    line-height: 1.3;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.dark .book-card__name {
    color: #ffffff;
}

.book-card:hover .book-card__name {
    color: var(--card-accent);
}

.book-card__num {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ══════════════════════════════════
   FEATURE TILES
══════════════════════════════════ */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 26px 22px;
    box-shadow: var(--shadow-premium);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}

.feature-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.feature-tile__top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--butcher), var(--butcher-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.feature-tile:hover .feature-tile__top-bar {
    transform: scaleX(1);
}

.feature-tile__icon {
    width: 46px;
    height: 46px;
    background: rgba(139, 58, 48, .07);
    border: 1px solid rgba(139, 58, 48, .12);
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.dark .feature-tile__icon {
    background: rgba(139, 58, 48, .12);
    border-color: rgba(139, 58, 48, .2);
}

.feature-tile__num {
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--butcher);
    margin-bottom: 5px;
}

.feature-tile__title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 8px;
}

.dark .feature-tile__title {
    color: var(--butcher-light);
}

.feature-tile__desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ══════════════════════════════════
   QUOTE STRIP
══════════════════════════════════ */
.quote-strip {
    background: var(--butcher-slate);
    padding: 52px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dark .quote-strip {
    background: #1a1917;
}

.quote-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(139, 58, 48, .15) 0%, transparent 60%);
}

.quote-strip__inner {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
    padding: 0 24px;
}

.quote-strip__text {
    font-family: var(--font-serif);
    font-size: clamp(17px, 2.5vw, 24px);
    color: var(--butcher-light);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 16px;
}

.quote-strip__ref {
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--butcher);
    font-weight: 700;
}

/* ══════════════════════════════════
   PAGE DARK HEADER
══════════════════════════════════ */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), url('/public/images/bible_study_hero.png');
    background-size: cover;
    background-position: center;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
    border-bottom: 8px solid var(--butcher);
}

.dark .page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.95)), url('/public/images/bible_study_hero.png');
    background-size: cover;
    background-position: center;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--butcher), transparent);
}

.page-header__crumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 500;
    color: white;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.page-header__crumb a {
    color: white;
    transition: color .2s;
}

.page-header__crumb a:hover {
    color: var(--butcher-light);
}

.page-header__eyebrow {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--butcher);
    margin-bottom: 8px;
}

.page-header__title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: var(--butcher-light);
    margin-bottom: 4px;
    line-height: 1.1;
}

.page-header__sub {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
}

/* Ornamental divider */
.divider-ornament {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 44px 0;
}

.divider-ornament__line {
    flex: 1;
    height: 2px;
    background: var(--gray-400);
}

.dark .divider-ornament__line {
    background: #444;
}

.divider-ornament__icon {
    color: var(--butcher);
    font-size: 18px;
    opacity: .9;
    flex-shrink: 0;
}

/* ══════════════════════════════════
   CHAPTER BUTTONS
══════════════════════════════════ */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

@media (min-width: 480px) {
    .chapter-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (min-width: 640px) {
    .chapter-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (min-width: 900px) {
    .chapter-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

.chapter-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all .2s ease;
}

.chapter-btn:hover {
    background: var(--butcher);
    border-color: var(--butcher);
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(139, 58, 48, .25);
}

.chapter-btn.active {
    background: var(--butcher);
    border-color: var(--butcher);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 58, 48, .3);
}

/* ══════════════════════════════════
   SUBNAV (chapter page)
══════════════════════════════════ */
.subnav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 68px;
    z-index: 60;
}

.subnav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.subnav__breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-subtle);
    overflow: hidden;
}

.subnav__breadcrumb a {
    color: inherit;
    transition: color .2s;
    white-space: nowrap;
}

.subnav__breadcrumb a:hover {
    color: var(--butcher);
}

.subnav__current {
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════
   VERSES
══════════════════════════════════ */
.verse-row {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
    position: relative;
    scroll-margin-top: 130px;
}

.verse-row:last-child {
    border-bottom: none;
}

.verse-row:hover {
    background: rgba(139, 58, 48, .04);
}

.dark .verse-row:hover {
    background: rgba(139, 58, 48, .08);
}

.verse-row.selected {
    background: rgba(139, 58, 48, .05);
    border-left: 3px solid var(--butcher);
    padding-left: 17px;
}

.dark .verse-row.selected {
    background: rgba(139, 58, 48, .1);
}

.verse-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: var(--border);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 3px;
    transition: background .2s, color .2s;
}

.verse-row:hover .verse-num,
.verse-row.selected .verse-num {
    background: var(--butcher);
    color: #fff;
}

.verse-text {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.9;
    color: var(--text);
    padding-top: 1px;
}

/* Words of Jesus */
.jesus-mode .jesus-verse {
    background: #fff5f5;
}

.dark.jesus-mode .jesus-verse {
    background: rgba(127, 29, 29, .08);
}

.jesus-mode .jesus-verse .verse-text {
    color: #b91c1c;
    font-style: italic;
}

.jesus-mode .jesus-verse .verse-num {
    background: #fee2e2;
    color: #991b1b;
}

/* Jesus toggle */
.jesus-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-label-text {
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(245, 242, 235, .45);
    text-align: center;
    line-height: 1.2;
}

.toggle-track-wrap {
    width: 42px;
    height: 24px;
    position: relative;
}

.toggle-track-wrap input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .1);
    border: 1.5px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    transition: background .2s, border-color .2s;
    cursor: pointer;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    transition: transform .2s;
}

.toggle-track-wrap input:checked~.toggle-slider {
    background: #b91c1c;
    border-color: #b91c1c;
}

.toggle-track-wrap input:checked~.toggle-slider::after {
    transform: translateX(18px);
}

/* ══════════════════════════════════
   AUDIO PANEL
══════════════════════════════════ */
.audio-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 16px 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.audio-panel__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.audio-panel__icon {
    width: 38px;
    height: 38px;
    background: var(--butcher);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.audio-panel__title {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.audio-panel__sub {
    font-size: 11px;
    color: var(--text-subtle);
}

audio {
    width: 100%;
    height: 38px;
    border-radius: 8px;
}

/* ══════════════════════════════════
   CROSS REFERENCES
══════════════════════════════════ */
.xref-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.xref-panel__header {
    background: var(--bg);
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}

.xref-panel__title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.xref-panel__hint {
    font-size: 14px;
    color: var(--text-subtle);
    margin-top: 3px;
}

.xref-panel__body {
    padding: 12px;
    max-height: 72vh;
    overflow-y: auto;
    min-height: 160px;
}

.xref-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: border-color .2s, box-shadow .2s;
}

.dark .xref-card {
    background: var(--butcher-card-dk);
}

.xref-card:hover {
    border-color: rgba(139, 58, 48, .2);
    box-shadow: var(--shadow-sm);
}

.xref-card:last-child {
    margin-bottom: 0;
}

.xref-ref {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--butcher);
    margin-bottom: 4px;
}

.xref-loc {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--butcher);
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.xref-link {
    font-size: 13px;
    color: var(--butcher);
    white-space: nowrap;
    font-family: var(--font-ui);
}

.xref-verse {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ══════════════════════════════════
   READING LAYOUT
══════════════════════════════════ */
.reading-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

@media (min-width: 900px) {
    .reading-layout {
        grid-template-columns: 190px 1fr;
    }
}

@media (min-width: 1200px) {
    .reading-layout {
        grid-template-columns: 210px 1fr 260px;
    }
}

.sidebar-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.sidebar-panel h3 {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.sticky-top {
    position: sticky;
    top: 82px;
}

/* ══════════════════════════════════
   MOBILE XREF DRAWER
══════════════════════════════════ */
.xref-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(38, 37, 35, .7);
    align-items: flex-end;
}

.xref-drawer-overlay.open {
    display: flex;
}

.xref-drawer {
    background: var(--surface);
    border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    width: 100%;
    max-height: 65vh;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
}

.xref-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.xref-drawer__title {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.xref-drawer__body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

/* ══════════════════════════════════
   BUTTONS
══════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: var(--r-lg);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s, color .2s;
    white-space: nowrap;
    letter-spacing: .01em;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--butcher);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 58, 48, .25);
}

.btn-primary:hover {
    background: var(--butcher-dark);
    box-shadow: 0 4px 16px rgba(139, 58, 48, .35);
}

.btn-outline {
    background: transparent;
    color: var(--butcher-light);
    border: 1.5px solid rgba(245, 242, 235, .2);
}

.btn-outline:hover {
    background: rgba(245, 242, 235, .07);
    border-color: rgba(245, 242, 235, .4);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--butcher);
    border-color: rgba(139, 58, 48, .2);
}

.btn-sm {
    padding: 7px 16px;
    font-size: 12px;
    border-radius: var(--r-md);
}

.btn-lg {
    padding: 13px 28px;
    font-size: 15px;
}

/* ══════════════════════════════════
   CHAPTER NAV BUTTONS
══════════════════════════════════ */
.chapter-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    text-decoration: none;
    transition: all .2s;
}

.chapter-nav-btn:hover {
    color: var(--butcher);
    border-color: var(--butcher);
    background: rgba(139, 58, 48, .04);
}

/* ══════════════════════════════════
   SEARCH
══════════════════════════════════ */
.search-result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: block;
    text-decoration: none;
    transition: all .2s;
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(139, 58, 48, .2);
}

.search-result-ref {
    display: inline-flex;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    color: var(--butcher);
    background: rgba(139, 58, 48, .07);
    border: 1px solid rgba(139, 58, 48, .12);
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 10px;
    letter-spacing: .04em;
}

.search-result-text {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text);
    line-height: 1.75;
}

mark {
    background: rgba(139, 58, 48, .12);
    color: var(--butcher);
    border-radius: 3px;
    padding: 0 2px;
}

/* ══════════════════════════════════
   SPINNER
══════════════════════════════════ */
.spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--border);
    border-top-color: var(--butcher);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

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

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.site-footer {
    background: #1a1a1a;
    color: var(--text-muted);
    padding: 48px 0 24px;
    margin-top: auto;
    border-top: 8px solid var(--butcher);
}

.dark .site-footer {
    background: #111;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 36px;
}

@media (min-width: 640px) {
    .footer__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer__brand {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--butcher-light);
    margin-bottom: 8px;
}

.footer__desc {
    font-size: 13px;
    line-height: 1.7;
    max-width: 220px;
}

.footer__heading {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 14px;
}

.footer__link {
    display: block;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    transition: color .2s;
}

.footer__link:hover {
    color: #ffffff;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

/* ══════════════════════════════════
   SCROLLBAR
══════════════════════════════════ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--butcher);
}

/* ══════════════════════════════════
   ANIMATIONS
══════════════════════════════════ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════
   PRINT
══════════════════════════════════ */
@media print {

    .topbar,
    .site-header,
    .site-footer,
    aside,
    .audio-panel,
    .subnav {
        display: none !important;
    }
}

/* ══════════════════════════════════
   TELUGU BIBLE STUDY HOMEPAGE COMPONENTS
══════════════════════════════════ */
.tbs-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), url('/public/images/bible_study_hero.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 40px 0 60px 0;
    text-align: center;
    margin-bottom: 60px;
    border-bottom: 8px solid var(--butcher);
    position: relative;
    overflow: hidden;
}

.tbs-hero__title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--butcher-light);
    margin: 15px 0 25px 0;
}

.tbs-hero__subtitle {
    font-family: var(--font-telugu);
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.8;
}

.tbs-card {
    --card-accent: var(--butcher);
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    border-top: 4px solid var(--card-accent);
    border-bottom: 4px solid var(--gray-400);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    text-align: left;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dark .tbs-card {
    border-color: #333;
    border-bottom-color: black;
}

.tbs-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-bottom-color: var(--card-accent);
}

.dark .tbs-card:hover {
    border-bottom-color: var(--card-accent);
}

.tbs-card--nt {
    --card-accent: var(--gold-400);
}

.tbs-card--about {
    --card-accent: var(--butcher-slate);
}

.dark .tbs-card--about {
    --card-accent: #a8a29e;
}

.tbs-card__icon-wrapper {
    display: flex;
    margin-bottom: 1.5rem;
    color: var(--card-accent);
}

.tbs-card__icon {
    width: 36px;
    height: 36px;
}

.tbs-card__title {
    font-family: var(--font-telugu);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.dark .tbs-card__title {
    color: #ffffff;
}

.tbs-card:hover .tbs-card__title {
    color: var(--card-accent);
}

.tbs-card__desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tbs-card__arrow {
    display: inline-flex;
    align-items: center;
    color: var(--butcher);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: auto;
    transition: transform 0.3s;
}

.dark .tbs-card__arrow {
    color: var(--gold-400);
}

.tbs-card__arrow svg {
    width: 16px;
    height: 16px;
    margin-left: 6px;
    transition: transform 0.3s;
}

.tbs-card:hover .tbs-card__arrow svg {
    transform: translateX(4px);
}

.tbs-btn {
    background: var(--butcher);
    color: white;
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 16px 32px;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(139, 58, 48, 0.4);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: none;
    text-decoration: none;
}

.tbs-btn:hover {
    background: var(--butcher-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 58, 48, 0.5);
    color: white;
}