  /* ── DESIGN TOKENS ────────────────────────────────────────────────────────────
     CSS custom properties (design tokens) shared across all components.
     --watermark-upcoming and --watermark-subscribe are CSS content() values
     injected by applyLanguage() in main.js whenever the language changes,
     so the decorative Arabic watermarks update alongside the page text. */
  :root {
    --bg:       #0d1810;
    --surface:  #121f16;
    --card:     #172219;
    --border:   #2a3d2e;
    --gold:     #c9a84c;
    --gold-dim: #8a6f2e;
    --cream:    #e8dcc8;
    --muted:    #6e8a74;
    --accent:   #4a8c5c;
    --text:     #d4c9b0;
    --watermark-upcoming: 'الدرس القادم';
    --watermark-subscribe: 'اشترك';
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  /* Offset anchor scroll targets by the sticky header height so section
     headings are not hidden behind the header when navigating to a hash. */
  section[id], .stats-bar[id], footer[id] { scroll-margin-top: 84px; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Noto Serif Bengali', serif;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
  }

  /* ── GEOMETRIC BACKGROUND ────────────────────────────────────────────────────
     Fixed full-screen layered grid of diagonal and horizontal lines rendered
     at very low opacity to produce a subtle Islamic geometric texture behind
     all page content. pointer-events: none keeps it non-interactive. */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      repeating-linear-gradient(60deg, transparent, transparent 40px, rgba(201,168,76,0.025) 40px, rgba(201,168,76,0.025) 41px),
      repeating-linear-gradient(-60deg, transparent, transparent 40px, rgba(201,168,76,0.025) 40px, rgba(201,168,76,0.025) 41px),
      repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(201,168,76,0.02) 40px, rgba(201,168,76,0.02) 41px);
    pointer-events: none;
    z-index: 0;
  }

  .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  /* ── TOP ANNOUNCEMENT STRIP ────────────────────────────────────────────────
     Gold bar pinned above the header with rotating announcement items.
     The <span> text nodes are replaced by applyLanguage() on every language
     change using the t.announcement array from the active translation pack. */
  .announce-strip {
    background: var(--gold);
    color: #0d1810;
    text-align: center;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 10;
  }
  .announce-strip span { font-family: 'Noto Serif Bengali', serif; }
  .announce-strip .dot { margin: 0 8px; opacity: 0.5; }

  /* ── HEADER ───────────────────────────────────────────────────────────────────
     Sticky top bar with backdrop blur. Contains the site logo, navigation
     links, the language picker (#lang-picker), and the mobile menu toggle.
     JS listens to #lang-picker "change" events to trigger applyLanguage(). */
  header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(13,24,16,0.96);
    backdrop-filter: blur(12px);
    z-index: 100;
  }
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 24px;
    position: relative;
  }
  .logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }
  .logo-ar {
    font-family: 'Amiri', serif;
    font-size: 22px;
    color: var(--gold);
    direction: rtl;
  }
  .logo-bn {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Cormorant Garamond', serif;
  }
  nav {
    display: flex;
    gap: 28px;
    align-items: center;
    margin-inline-start: auto;
  }
  nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-family: 'Noto Serif Bengali', serif;
    transition: color 0.2s;
    letter-spacing: 0.3px;
  }
  nav a:hover, nav a.active { color: var(--gold); }
  .nav-cta {
    background: var(--gold);
    color: #0d1810 !important;
    padding: 7px 18px;
    border-radius: 2px;
    font-weight: 600 !important;
    font-size: 13px !important;
  }
  .menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--gold);
    font-size: 24px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .menu-toggle:hover { border-color: var(--gold-dim); }
  .lang-switcher {
    display: flex;
    align-items: center;
    margin-inline-start: 8px;
  }
  /* Language picker <select>: value and aria-label are kept in sync by
     applyLanguage() in main.js on every language switch. Pill-shaped style
     makes it visually distinct from the standard OS dropdown appearance. */
  #lang-picker {
    background: rgba(18, 31, 22, 0.9);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    padding: 4px 6px;
    min-width: 78px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    cursor: pointer;
  }
  #lang-picker:focus { outline: 1px solid var(--gold-dim); }

  /* ── HERO ────────────────────────────────────────────────────────────────────
     Full-width centered section with Quranic calligraphy, the Sheikh's name
     in both Bengali and Arabic, role meta items, and CTA buttons.
     All text nodes are replaced by applyLanguage() from t.hero. */
  .hero {
    padding: 80px 0 64px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border);
  }
  .hero-calligraphy {
    font-family: 'Amiri', serif;
    font-size: clamp(36px, 6vw, 72px);
    color: var(--gold);
    direction: rtl;
    line-height: 1.3;
    margin-bottom: 8px;
    opacity: 0.9;
    text-shadow: 0 0 60px rgba(201,168,76,0.3);
  }
  .hero-calligraphy-sub {
    font-family: 'Amiri', serif;
    font-size: clamp(18px, 3vw, 28px);
    color: var(--gold-dim);
    direction: rtl;
    margin-bottom: 40px;
    opacity: 0.7;
  }
  .hero-divider {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 36px;
  }
  .hero-name {
    font-family: 'Noto Serif Bengali', serif;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
  }
  .hero-name-ar {
    font-family: 'Amiri', serif;
    font-size: clamp(18px, 3vw, 30px);
    color: var(--muted);
    direction: rtl;
    margin-bottom: 20px;
  }
  .hero-meta {
    font-size: 14px;
    color: var(--muted);
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
  }
  .hero-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    letter-spacing: 0.5px;
  }
  .hero-meta-item::before { content: '◈'; color: var(--gold); font-size: 10px; }
  .hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
  .btn {
    padding: 12px 28px;
    border-radius: 2px;
    font-size: 14px;
    font-family: 'Noto Serif Bengali', serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
  }
  .btn-primary {
    background: var(--gold);
    color: #0d1810;
    font-weight: 700;
    border: none;
  }
  .btn-primary:hover { background: #d4b255; }
  .btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
  }
  .btn-outline:hover { border-color: var(--gold); color: var(--gold); }

  /* ── ORNAMENT ── */
  .ornament {
    text-align: center;
    font-family: 'Amiri', serif;
    color: var(--gold-dim);
    font-size: 28px;
    letter-spacing: 8px;
    opacity: 0.6;
    margin: 16px 0;
    direction: rtl;
  }
  .hero-ornament { margin-top: 40px; }

  /* ── SECTION LAYOUT ────────────────────────────────────────────────────────
     Shared spacing, typography, and header-row layout used by all content
     sections (Classes, Recordings, Books, Articles, Connect).
     .section-label / .section-title / .section-subtitle are updated by
     applyLanguage() for every section on each language change. */
  section { padding: 64px 0; }
  .section-compact { padding: 48px 0; }
  section + section { border-top: 1px solid var(--border); }

  .section-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
  }
  .section-title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 6px;
    line-height: 1.3;
  }
  .section-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 40px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 16px;
  }
  .section-head { margin-bottom: 40px; }
  .section-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
  }
  .see-all {
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }
  .see-all:hover { text-decoration: underline; }

  /* ── CLASS ANNOUNCEMENT CARD ──────────────────────────────────────────────
     Featured upcoming class block with a left gold accent border.
     The ::after pseudo-element renders a large decorative Arabic watermark
     whose text is controlled by the --watermark-upcoming CSS custom property.
     applyLanguage() updates that variable via style.setProperty() so the
     watermark word changes to match the active language's translation. */
  .class-upcoming {
    background: var(--card);
    border: 1px solid var(--gold-dim);
    border-left: 3px solid var(--gold);
    padding: 28px 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
  }
  .class-upcoming::after {
    content: var(--watermark-upcoming);
    font-family: 'Amiri', serif;
    font-size: 80px;
    color: var(--gold);
    opacity: 0.04;
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    direction: rtl;
    pointer-events: none;
  }
  .class-badge {
    display: inline-block;
    background: var(--gold);
    color: #0d1810;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    margin-bottom: 14px;
    font-family: 'Cormorant Garamond', serif;
  }
  .class-title-main {
    font-family: 'Amiri', serif;
    font-size: 26px;
    color: var(--cream);
    direction: rtl;
    margin-bottom: 4px;
  }
  .class-title-bn {
    font-size: 18px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 16px;
  }
  .class-details {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
  }
  .class-detail { display: flex; align-items: center; gap: 6px; }
  .class-detail-icon { color: var(--gold); font-size: 11px; }

  /* ── GRID ── */
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

  /* ── RECORDING CARD ─────────────────────────────────────────────────────────
     Shared card used in both the Classes grid and the Recordings grid.
     Contains .rec-number, .rec-title, .rec-title-ar (Arabic subtitle), and
     a meta row with an optional play/watch link. All inner text is injected
     by applyLanguage() from the respective section's cards array. */
  /* ── Base recording card — used by #recordings (original style) ── */
  .rec-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 24px;
    transition: border-color 0.2s;
    position: relative;
  }
  .rec-card:hover { border-color: var(--gold-dim); }
  .rec-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 13px;
    color: var(--gold-dim);
    margin-bottom: 10px;
    letter-spacing: 1px;
  }
  .rec-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 6px;
    line-height: 1.5;
  }
  .rec-title-ar {
    font-family: 'Amiri', serif;
    font-size: 15px;
    color: var(--muted);
    direction: rtl;
    margin-bottom: 14px;
  }
  .rec-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    font-family: 'Cormorant Garamond', serif;
  }
  .rec-play {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    font-family: 'Cormorant Garamond', serif;
  }
  .rec-play:hover { opacity: 0.8; }

  /* ── Classes grid card overrides — scoped to #classes only ── */
  #classes .rec-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: 0.3s ease;
  }
  #classes .rec-card:hover { transform: translateY(-2px); border-color: var(--gold-dim); }
  #classes .rec-number { text-transform: uppercase; }
  #classes .rec-title { font-size: 16px; line-height: 1.4; margin-bottom: 8px; }
  #classes .rec-title-ar { font-size: 16px; line-height: 1.4; }
  #classes .rec-meta {
    font-family: inherit;
    font-size: 13px;
    margin-top: auto;
  }
  #classes .rec-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
  }
  #classes .rec-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-family: inherit;
    font-size: 14px;
    background: rgba(199, 164, 91, 0.15);
    border-radius: 8px;
    flex-shrink: 0;
    gap: 0;
  }
  #classes .rec-play:hover {
    background: var(--gold);
    color: #0d1810;
    transform: scale(1.1);
    opacity: 1;
  }
  .play-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
    font-size: 12px;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
  }
  .play-icon {
    width: 28px;
    height: 28px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--gold);
    flex-shrink: 0;
  }

  /* ── BOOK CARD ───────────────────────────────────────────────────────────────
     Two-column card with a decorative spine letter on the left and book
     info on the right (Arabic title, Bengali translated title, author, PDF
     download link). Text is updated by applyLanguage() from t.books.cards. */
  .book-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 28px 24px;
    transition: border-color 0.2s;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  .book-card:hover { border-color: var(--gold-dim); }
  .book-spine {
    width: 44px;
    min-width: 44px;
    height: 64px;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Amiri', serif;
    color: #0d1810;
    font-size: 20px;
    writing-mode: horizontal-tb;
    direction: rtl;
  }
  .book-info { flex: 1; }
  .book-title-ar {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: var(--cream);
    direction: rtl;
    margin-bottom: 4px;
    line-height: 1.4;
  }
  .book-title-bn {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
    line-height: 1.4;
  }
  .book-author {
    font-size: 12px;
    color: var(--gold-dim);
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 14px;
  }
  .pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold-dim);
    padding: 4px 12px;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.2s;
  }
  .pdf-link:hover { background: var(--gold); color: #0d1810; }

  /* ── ARTICLE CARD ───────────────────────────────────────────────────────────
     Horizontally divided row: date column (day/month/year) on the left,
     article content (tag, title, excerpt) on the right. All text fields
     are replaced by applyLanguage() from the t.articles.cards array. */
  .article-card {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    align-items: start;
  }
  .article-card:last-child { border-bottom: none; }
  .article-date {
    font-family: 'Cormorant Garamond', serif;
    text-align: center;
    line-height: 1.2;
  }
  .article-date-day { font-size: 32px; color: var(--gold); font-weight: 300; }
  .article-date-month { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
  .article-date-year { font-size: 11px; color: var(--muted); }
  .article-content {}
  .article-tag {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 6px;
  }
  .article-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 8px;
    line-height: 1.5;
    text-decoration: none;
    display: block;
  }
  .article-title:hover { color: var(--gold); }
  .article-excerpt {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* ── CONNECT / SUBSCRIBE BOX ──────────────────────────────────────────────
     Centered CTA box linking to Telegram, YouTube, and WhatsApp channels.
     The ::before pseudo-element shows a large decorative Arabic watermark
     controlled by --watermark-subscribe, updated by applyLanguage() via
     style.setProperty(). Channel button HTML is injected by setHTMLAll(). */
  .subscribe-box {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .subscribe-box::before {
    content: var(--watermark-subscribe);
    font-family: 'Amiri', serif;
    font-size: 120px;
    color: var(--gold);
    opacity: 0.04;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    direction: rtl;
    white-space: nowrap;
  }
  .subscribe-ar {
    font-family: 'Amiri', serif;
    font-size: 22px;
    color: var(--gold-dim);
    direction: rtl;
    margin-bottom: 16px;
  }
  .subscribe-title { font-size: 24px; font-weight: 600; color: var(--cream); margin-bottom: 8px; }
  .subscribe-desc { color: var(--muted); font-size: 14px; margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }
  .channel-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
  .channel-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.5px;
    transition: all 0.2s;
  }
  .channel-btn:hover { border-color: var(--gold); color: var(--gold); }
  .channel-btn .icon { font-size: 16px; }

  /* ── FOOTER ──────────────────────────────────────────────────────────────────
     Three-column grid: brand + description on the left, content links and
     external links in the remaining columns. Bottom bar has copyright and
     an Arabic Quranic quote. All text is set by applyLanguage() via t.footer. */
  footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
    position: relative;
    z-index: 1;
  }
  .footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
  }
  .footer-brand {}
  .footer-calligraphy {
    font-family: 'Amiri', serif;
    font-size: 28px;
    color: var(--gold);
    direction: rtl;
    margin-bottom: 12px;
    line-height: 1.4;
  }
  .footer-desc { font-size: 13px; color: var(--muted); line-height: 1.8; max-width: 300px; }
  .footer-col-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 16px;
  }
  .footer-links { list-style: none; }
  .footer-links li { margin-bottom: 10px; }
  .footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
  .footer-links a:hover { color: var(--gold); }
  .footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    font-family: 'Cormorant Garamond', serif;
  }
  .footer-bottom-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .footer-bottom-ar {
    font-family: 'Amiri', serif;
    direction: rtl;
    font-size: 14px;
    color: var(--gold-dim);
    opacity: 0.7;
  }
  .footer-dev-logo {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
  }
  .footer-dev-logo:hover { opacity: 1; }
  .footer-dev-logo-img {
    height: 35px;
    width: auto;
    display: block;
  }

  /* ── DECORATIVE RULE ── */
  .rule {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 48px 0 0;
  }
  .rule-line { flex: 1; height: 1px; background: var(--border); }
  .rule-diamond {
    color: var(--gold);
    font-size: 10px;
    opacity: 0.6;
    letter-spacing: 4px;
  }

  /* ── STATS BAR ────────────────────────────────────────────────────────────────
     Horizontal strip of summary counters between the hero and content sections.
     .stat-num and .stat-label text is replaced by applyLanguage() from t.stats. */
  .stats-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
  }
  .stats-inner {
    display: flex;
    justify-content: center;
    gap: 64px;
  }
  .stat { text-align: center; }
  .stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 4px;
  }
  .stat-label { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-family: 'Cormorant Garamond', serif; }

  /* ── LABEL PILL ── */
  .new-pill {
    display: inline-block;
    background: rgba(201,168,76,0.15);
    color: var(--gold);
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 2px 8px;
    font-family: 'Cormorant Garamond', serif;
    margin-left: 8px;
    vertical-align: middle;
  }

  /* ── COMPETITION SECTION ────────────────────────────────────────────────────
     Featured competition block mirrors .class-upcoming; three competition cards
     mirror .rec-card. Status pills show active/upcoming state at a glance.
     The ::after watermark uses --watermark-competition, set by applyLanguage(). */
  :root {
    --watermark-competition: 'المسابقة';
  }

  .comp-featured {
    background: var(--card);
    border: 1px solid var(--gold-dim);
    border-left: 3px solid var(--gold);
    padding: 28px 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
  }
  .comp-featured::after {
    content: var(--watermark-competition);
    font-family: 'Amiri', serif;
    font-size: 80px;
    color: var(--gold);
    opacity: 0.04;
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    direction: rtl;
    pointer-events: none;
  }
  .comp-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #0d1810;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    margin-bottom: 14px;
    font-family: 'Cormorant Garamond', serif;
  }
  .comp-title-main {
    font-family: 'Amiri', serif;
    font-size: 26px;
    color: var(--cream);
    direction: rtl;
    margin-bottom: 4px;
  }
  .comp-title-bn {
    font-size: 18px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 16px;
  }
  .comp-details {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
  }
  .comp-detail { display: flex; align-items: center; gap: 6px; }
  .comp-actions { display: flex; gap: 12px; flex-wrap: wrap; }

  /* Competition card (3-column grid) */
  .comp-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .comp-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
  .comp-card-icon {
    font-size: 28px;
    margin-bottom: 4px;
  }
  .comp-card-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dim);
  }
  .comp-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cream);
    line-height: 1.4;
  }
  .comp-card-title-ar {
    font-family: 'Amiri', serif;
    font-size: 14px;
    color: var(--muted);
    direction: rtl;
  }
  .comp-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
  }
  .comp-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
  }
  .comp-status {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
  }
  .comp-status.active {
    background: rgba(74, 140, 92, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
  }
  .comp-status.upcoming {
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold-dim);
    border: 1px solid var(--gold-dim);
  }
  .comp-status.completed {
    background: rgba(110, 138, 116, 0.1);
    color: var(--muted);
    border: 1px solid var(--border);
  }

  /* ── COMPETITION PAGE (competition.html) specific styles ── */
  .comp-hero {
    padding: 64px 0 48px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  .comp-hero-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
  }
  .comp-hero-title {
    font-size: clamp(26px, 4vw, 44px);
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 12px;
    line-height: 1.3;
  }
  .comp-hero-title-ar {
    font-family: 'Amiri', serif;
    font-size: clamp(20px, 3vw, 32px);
    color: var(--gold-dim);
    direction: rtl;
    margin-bottom: 20px;
  }
  .comp-hero-desc {
    max-width: 680px;
    margin: 0 auto 32px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
  }
  .comp-hero-meta {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
    font-family: 'Cormorant Garamond', serif;
  }
  .comp-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .comp-hero-meta-item::before { content: '◈'; color: var(--gold); font-size: 10px; }

  /* Day cards for 10-day schedule */
  .days-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
  }
  .day-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 24px;
    transition: border-color 0.2s;
    position: relative;
    overflow: hidden;
  }
  .day-card:hover { border-color: var(--gold-dim); }
  .day-card.day-special {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, var(--card), rgba(201,168,76,0.04));
  }
  .day-card-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.25;
    position: absolute;
    top: 8px;
    right: 16px;
    line-height: 1;
  }
  .day-card-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
  }
  .day-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 4px;
    line-height: 1.4;
  }
  .day-card-title-ar {
    font-family: 'Amiri', serif;
    font-size: 16px;
    color: var(--gold-dim);
    direction: rtl;
    margin-bottom: 10px;
  }
  .day-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
  }
  .day-card-hadith {
    margin-top: 12px;
    padding: 10px 14px;
    border-left: 2px solid var(--gold-dim);
    font-size: 12px;
    color: var(--muted);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    line-height: 1.7;
  }

  /* Rules / info box */
  .info-box {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 32px;
    margin-bottom: 24px;
  }
  .info-box-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .info-list li {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
  }
  .info-list li::before {
    content: '✦';
    color: var(--gold);
    font-size: 10px;
    margin-top: 6px;
    flex-shrink: 0;
  }

  /* ── DOWNLOAD MODAL ─────────────────────────────────────────────────────────
     Fixed overlay shown when a visitor clicks a PDF download link.
     Collects name, WhatsApp, and email before granting access to the book URL.
     The ::after watermark reuses the existing card pattern for visual consistency. */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(6px);
  }
  .modal-overlay[hidden] { display: none; }

  .modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    padding: 40px;
    max-width: 460px;
    width: 100%;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
  }
  .modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
  }
  .modal-close:hover { border-color: var(--gold); color: var(--gold); }

  .modal-header { margin-bottom: 28px; }
  .modal-title-ar {
    font-family: 'Amiri', serif;
    font-size: 17px;
    color: var(--gold-dim);
    direction: rtl;
    margin-bottom: 8px;
    opacity: 0.8;
  }
  .modal-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 6px;
    line-height: 1.3;
  }
  .modal-subtitle { font-size: 13px; color: var(--muted); line-height: 1.6; }

  .form-group { margin-bottom: 18px; }
  .form-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  .form-required { color: var(--gold); margin-left: 2px; }
  .form-input {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Noto Serif Bengali', serif;
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
    display: block;
  }
  .form-input::placeholder { color: var(--muted); opacity: 0.5; }
  .form-input:focus { border-color: var(--gold-dim); }
  .form-input.is-invalid { border-color: #e74c3c; }
  .form-error {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
    min-height: 18px;
    font-family: 'Noto Serif Bengali', serif;
  }

  .modal-submit-btn {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
    font-size: 14px;
  }
  .modal-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

  #download-success { text-align: center; padding: 16px 0 8px; }
  .modal-success-icon {
    width: 52px;
    height: 52px;
    background: rgba(74, 140, 92, 0.15);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--accent);
    margin: 0 auto 14px;
  }
  .modal-success-msg {
    font-size: 15px;
    color: var(--cream);
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.5;
  }
  .modal-privacy {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    opacity: 0.7;
  }

  /* ── RESPONSIVE (≤ 768px) ─────────────────────────────────────────────────────
     On mobile: grids collapse to a single column, the desktop nav is hidden
     and replaced by the hamburger toggle, and the header lang-picker shrinks.
     JS detects window.innerWidth > 768 to auto-close the mobile menu on resize. */
  @media (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .stats-inner { gap: 28px; flex-wrap: wrap; }
    .menu-toggle { display: inline-flex; }
    #lang-picker {
      min-width: 74px;
      font-size: 10px;
      padding: 4px 6px;
    }
    nav {
      display: none;
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      width: min(320px, 92vw);
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      background: var(--surface);
      border: 1px solid var(--border);
      z-index: 120;
      overflow: hidden;
    }
    nav.open { display: flex; }
    nav a {
      padding: 11px 14px;
      border-bottom: 1px solid var(--border);
    }
    nav a:last-child { border-bottom: none; }
    .nav-cta {
      text-align: center;
      margin: 10px;
      border-radius: 2px;
    }
    .hero { padding: 48px 0 40px; }
    .subscribe-box { padding: 28px 20px; }
    .comp-featured { padding: 24px 20px; }
    .comp-details { gap: 12px; flex-direction: column; }
    .comp-actions { flex-direction: column; }
    .days-grid { grid-template-columns: 1fr; }
    .modal-box { padding: 28px 20px; max-height: 95vh; }
    .books-page-hero-inner { flex-direction: column; gap: 20px; }
    .books-page-hero-stat { align-self: flex-start; }
    .books-filter-bar { gap: 8px; padding-bottom: 4px; }
    .books-filter-chip { padding: 7px 14px; font-size: 12px; }
    .books-library-grid { grid-template-columns: 1fr; }
    .books-view-all-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  }

  /* ── BOOKS VIEW-ALL CTA (homepage) ─────────────────────────────────────── */
  .books-view-all-cta {
    margin-top: 28px;
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold-dim);
    background: var(--card);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .books-view-all-text {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .books-view-all-count {
    font-family: 'Amiri', serif;
    font-size: 22px;
    color: var(--gold);
    font-weight: 700;
    white-space: nowrap;
  }
  .books-view-all-label {
    font-size: 13px;
    color: var(--muted);
  }
  .books-view-all-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── BOOKS PAGE ─────────────────────────────────────────────────────────────
     Dedicated /books.html layout: hero strip, filter chips, 3-column card grid.
     Follows the same dark-green design system as the rest of the site. */

  /* Hero strip */
  .books-page-hero {
    background: linear-gradient(135deg, var(--surface) 0%, var(--card) 100%);
    border-bottom: 1px solid var(--border);
    padding: 64px 0 48px;
    position: relative;
    overflow: hidden;
  }
  .books-page-hero::before {
    content: "📚";
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 120px;
    opacity: 0.04;
    pointer-events: none;
  }
  .books-page-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }
  .books-page-hero-text { flex: 1; }
  .books-page-label {
    margin-bottom: 12px;
  }
  .books-page-title {
    font-family: 'Noto Serif Bengali', 'Cormorant Garamond', serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 600;
    color: var(--cream);
    line-height: 1.2;
    margin: 0 0 12px;
  }
  .books-page-subtitle {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 560px;
    margin: 0;
  }
  .books-page-hero-stat {
    text-align: center;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 24px 36px;
    min-width: 120px;
    flex-shrink: 0;
  }
  .books-stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 52px;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
  }
  .books-stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    letter-spacing: 0.04em;
  }

  /* Library section */
  .books-library-section {
    padding: 48px 0 80px;
    background: var(--bg);
  }

  /* Filter chips row */
  .books-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
  .books-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: 'Noto Serif Bengali', serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
  }
  .books-filter-chip:hover {
    border-color: var(--gold-dim);
    color: var(--cream);
  }
  .books-filter-chip.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #0d1810;
    font-weight: 600;
  }
  .books-filter-chip.active .filter-count {
    background: rgba(13, 24, 16, 0.25);
    color: #0d1810;
  }
  .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--muted);
    font-size: 11px;
    font-family: 'Cormorant Garamond', serif;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 22px;
  }

  /* Books grid */
  .books-library-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  /* Individual book card */
  .lib-book-card {
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
  }
  .lib-book-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
  }
  .lib-book-spine {
    height: 6px;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold));
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 12px;
    font-family: 'Amiri', serif;
    font-size: 11px;
    color: rgba(13, 24, 16, 0.6);
    letter-spacing: 0.05em;
  }
  .lib-book-body {
    padding: 24px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .lib-book-cat-tag {
    display: inline-block;
    font-family: 'Amiri', serif;
    font-size: 11px;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.2);
    padding: 2px 10px;
    margin-bottom: 14px;
    direction: rtl;
    width: fit-content;
    letter-spacing: 0.03em;
  }
  .lib-book-title-ar {
    font-family: 'Amiri', serif;
    font-size: 20px;
    color: var(--cream);
    direction: rtl;
    line-height: 1.5;
    margin-bottom: 6px;
  }
  .lib-book-title {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 10px;
  }
  .lib-book-author {
    font-size: 11px;
    color: var(--gold-dim);
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 18px;
  }
  .lib-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold-dim);
    padding: 7px 16px;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.2s;
    align-self: flex-start;
  }
  .lib-pdf-btn:hover { background: var(--gold); color: #0d1810; }

  /* Empty state */
  .books-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
  }
  .books-empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
  .books-empty-msg  { font-size: 14px; }

  @media (max-width: 1024px) {
    .books-library-grid { grid-template-columns: repeat(2, 1fr); }
  }
