/* ==========================================================================
   Mu'jam Mufradat al-Qur'an — Dedicated PDF Book Edition Stylesheet
   Designed for exact A4 Islamic Book Print Output (2 words per page)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif+Bengali:wght@400;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;0,6..72,700;1,6..72,400&display=swap');

:root {
  --teal-primary: #0f766e;
  --teal-dark: #0d5f59;
  --teal-deep: #064e3b;
  --teal-light: #e6f4f2;
  --teal-badge: #115e59;
  --highlight-red: #dc2626;
  --gold-accent: #c59b27;
  --ink-primary: #18181b;
  --ink-secondary: #3f3f46;
  --ink-muted: #52525b;
  --bg-page: #f8fafc;
  --paper-white: #ffffff;
  --border-card: #0f766e;
  --border-light: #cbd5e1;

  --font-arabic: 'Amiri', 'Traditional Arabic', serif;
  --font-bengali: 'Noto Serif Bengali', serif;
  --font-english: 'Newsreader', Georgia, serif;
}

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

body {
  font-family: var(--font-bengali);
  background-color: #e2e8f0;
  color: var(--ink-primary);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 3rem;
}

/* ==========================================================================
   Screen Toolbar (Hidden in Print)
   ========================================================================== */
.pdf-toolbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #0f766e;
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* taste-skill-ignore */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toolbar-seal {
  font-size: 1.4rem;
  color: #fef08a;
}

.toolbar-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.toolbar-subtitle {
  font-size: 0.875rem;
  opacity: 0.85;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-back-web {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background-color 0.2s ease;
}

.btn-back-web:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.btn-print-now {
  background-color: #f59e0b;
  color: #78350f;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-print-now:hover {
  background-color: #d97706;
  color: #ffffff;
}

.toolbar-hint {
  width: 100%;
  font-size: 0.8125rem;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  text-align: center;
  color: #ccfbf1;
}

/* ==========================================================================
   Book Container & Pages
   ========================================================================== */
.book-wrapper {
  max-width: 210mm;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 20mm;
}

/* Each A4 Page Container */
.book-page {
  position: relative;
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  max-height: 297mm;
  background-color: #ffffff;
  background-image: url('assets/page-bg.png');
  background-size: 100% 100%;
  background-position: center bottom;
  background-repeat: no-repeat;
  box-sizing: border-box;
  padding: 7mm 10mm 16mm 10mm;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* taste-skill-ignore */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  page-break-after: always;
  break-after: page;
}

/* ==========================================================================
   Royal Islamic Book Cover Page (Clean & Minimal Editorial Art)
   Matching Reference: Deep Petrol Teal, Bold White Title, Receding Golden Arches,
   and Organic Torn-Paper Parchment Base
   ========================================================================== */
.book-cover-page {
  background-color: #1f5456;
  background-image: url('assets/book-cover-bg.svg');
  background-size: 100% 100%;
  background-position: center center;
  padding: 0;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.book-cover-page .hanging-lanterns-img,
.book-cover-page .page-number-box {
  display: none !important;
}

.cover-content-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16mm 12mm 14mm;
  z-index: 5;
  box-sizing: border-box;
}

.cover-top-header {
  text-align: center;
  margin-top: 4mm;
}

.cover-tagline {
  font-family: var(--font-bengali);
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.03em;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* taste-skill-ignore */
}

.cover-center-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 8mm;
  margin-bottom: auto;
}

.cover-title-bn {
  font-family: var(--font-bengali);
  line-height: 1.1;
  color: #ffffff;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); /* taste-skill-ignore */
}

.cover-title-line1 {
  display: block;
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cover-title-line2 {
  display: block;
  font-size: 4.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-top: -0.2rem;
}

.cover-title-ar {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fef08a;
  margin: 0.75rem 0 0;
  letter-spacing: 0.02em;
  opacity: 0.95;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); /* taste-skill-ignore */
}

/* Warm Parchment Torn-Paper Bottom Zone */
.cover-bottom-parchment-block {
  position: relative;
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  color: #1e293b;
  z-index: 10;
  padding-bottom: 2mm;
}

.cover-desc-line {
  font-size: 0.925rem;
  font-weight: 600;
  color: #334155;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

.cover-pill-stats {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f766e;
  margin: 0.2rem 0;
}

.cover-pill-stats .stat-dot {
  color: #d97706;
}

/* ==========================================================================
   Editorial Introductory Pages (Imprint, Introduction, 80% Concept, Resources)
   Matching Image 1: 4 Pages After Cover
   ========================================================================== */
.editorial-page {
  padding: 16mm 14mm 16mm 14mm;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Page 1: Imprint (প্রকাশনা তথ্য) */
.imprint-page {
  justify-content: space-between;
}

.imprint-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 480px;
  margin: auto;
  gap: 1.25rem;
  color: #334155;
  padding: 10mm 0 6mm;
}

.imprint-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.imprint-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.imprint-title-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}

.imprint-sub-val {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f766e;
  margin: 0;
}

.imprint-val {
  font-size: 0.95rem;
  color: #1e293b;
  margin: 0;
  line-height: 1.45;
  font-weight: 500;
}

.imprint-divider-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 260px;
  margin: 0.35rem 0;
}

.imprint-art-line {
  flex: 1;
  height: 1px; /* taste-skill-ignore */
  border-bottom: 1.5px dashed rgba(15, 118, 110, 0.4);
}

.imprint-art-knot {
  color: #d97706;
  font-size: 1rem;
}

.imprint-bottom-promo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #0f766e;
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

.imprint-bottom-promo-bar span {
  font-size: 0.85rem;
  font-weight: 600;
}

.promo-visit-btn {
  background-color: #ffffff;
  color: #0f766e;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  text-decoration: none;
}

/* Page 2 & 3: Editorial Content (ভূমিকা & ৮০% এর ব্যাখ্যা) */
.editorial-title-wrap {
  text-align: center;
  margin-top: 2mm;
  margin-bottom: 0.85rem;
}

.editorial-title-pill {
  display: inline-block;
  background-color: var(--teal-primary);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.4rem 1.75rem;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.intro-body-text {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #1e293b;
  text-align: justify;
}

.intro-paragraph {
  margin: 0;
  text-indent: 1.25rem;
}

.intro-ayah-box {
  background-color: #f0fdfa;
  border-left: 3.5px solid var(--teal-primary);
  padding: 0.85rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 0.35rem 0;
  text-align: center;
}

.intro-ayah-ar {
  font-family: var(--font-arabic);
  font-size: 1.45rem;
  font-weight: 700;
  color: #042f2e;
  line-height: 1.6;
  margin: 0 0 0.4rem;
  direction: rtl;
}

.intro-ayah-bn {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #0f766e;
  margin: 0;
  font-style: italic;
}

.intro-dua {
  font-weight: 700;
  color: #0f766e;
  text-align: center;
  text-indent: 0;
  margin-top: 0.4rem;
}

/* 80% Concept Stats Highlight Grid (4 columns) */
.stats-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.stat-box-item {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1; /* taste-skill-ignore */
  border-radius: 10px;
  padding: 0.65rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}

.stat-box-item.highlight {
  background-color: #f0fdfa;
  border-color: var(--teal-primary);
}

.stat-box-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--teal-primary);
  line-height: 1;
}

.stat-box-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
}

/* Page 4: Outro / Dua / Other Books */
.outro-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  line-height: 1.35;
  margin: 3mm 0 0.65rem;
}

.outro-dua-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #334155;
  text-align: justify;
  margin: 0 0 0.95rem;
}

.outro-promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #0f766e;
  color: #ffffff;
  padding: 0.75rem 1.15rem;
  border-radius: 10px;
  margin-bottom: 1.15rem;
}

.promo-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.promo-banner-btn {
  background-color: #ffffff;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.outro-section-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin: 0 0 0.65rem;
}

.other-books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.other-book-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.other-book-card {
  background-color: #ffffff;
  border: 1.5px solid #0f766e;
  border-radius: 8px;
  padding: 0.65rem 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-height: 145px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* taste-skill-ignore */
  transition: transform 0.15s ease;
}

.other-book-thumb-wrap {
  width: 100%;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
  overflow: hidden;
  border-radius: 4px;
}

.other-book-cover-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* taste-skill-ignore */
}

.other-book-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.other-book-btn {
  background-color: #0f766e;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.other-book-card:hover .other-book-btn {
  background-color: #0d9488;
}

.outro-socials-row {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.3rem;
}

.social-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffffff;
  padding: 0.45rem 1.15rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 700;
  transition: opacity 0.2s ease;
}

.social-pill-btn:hover {
  opacity: 0.9;
}

.social-pill-btn.fb {
  background-color: #1877f2;
}

.social-pill-btn.yt {
  background-color: #ff0000;
}

.social-pill-btn.web {
  background-color: #0f766e;
}

/* ==========================================================================
   Ending / Gratitude & Back Cover Pages (বইয়ের সমাপ্তি ও পিছনের কভার)
   ========================================================================== */
.ending-gratitude-page {
  padding: 16mm 14mm 16mm 14mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ending-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  gap: 1rem;
}

.ending-bismillah {
  font-family: var(--font-arabic);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--teal-primary);
  margin: 0.2rem 0;
  line-height: 1.4;
}

.ending-gratitude-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.ending-gratitude-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #334155;
  text-align: justify;
  margin: 0;
}

.ending-dua-callout {
  background-color: #f0fdfa;
  border: 1.5px solid var(--teal-primary);
  border-radius: 12px;
  padding: 1rem 1.35rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin: 0.35rem 0;
}

.ending-dua-ar {
  font-family: var(--font-arabic);
  font-size: 1.35rem;
  font-weight: 700;
  color: #042f2e;
  line-height: 1.7;
  margin: 0 0 0.4rem;
  direction: rtl;
}

.ending-dua-bn {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #0f766e;
  font-weight: 600;
  margin: 0;
}

.ending-signatures-row {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(15, 118, 110, 0.35); /* taste-skill-ignore */
}

.ending-signature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.sig-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.sig-role {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

/* Back Cover (বইয়ের ব্যাক কভার) */
.book-back-cover-page {
  background-color: #1f5456;
  background-image: url('assets/book-cover-bg.svg');
  background-size: 100% 100%;
  background-position: center center;
  padding: 0;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.book-back-cover-page .hanging-lanterns-img,
.book-back-cover-page .page-number-box {
  display: none !important;
}

.back-cover-content-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16mm 14mm 14mm;
  z-index: 5;
  box-sizing: border-box;
}

.back-cover-header {
  text-align: center;
}

.back-cover-tagline {
  font-family: var(--font-bengali);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  letter-spacing: 0.02em;
}

.back-cover-blurb-box {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25); /* taste-skill-ignore */
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  max-width: 500px;
  backdrop-filter: blur(4px); /* taste-skill-ignore */
  text-align: center;
}

.back-cover-blurb-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fef08a;
  margin: 0 0 0.65rem;
  letter-spacing: 0.02em;
}

.back-cover-blurb-text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  text-align: justify;
}

.back-cover-bottom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  width: 100%;
}

.back-cover-publisher {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.back-cover-web-link {
  font-size: 0.88rem;
  color: #99f6e4;
  text-decoration: none;
  font-weight: 600;
}

/* Hanging Lanterns from top edge - aligned cleanly above card banner */
.hanging-lanterns-img {
  position: absolute;
  top: 0;
  left: 9mm;
  width: 11.5mm;
  height: auto;
  pointer-events: none;
  z-index: 10;
}

/* Page Running Header - Aligned in same row as lanterns & page number */
.page-running-head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 6mm;
  min-height: 9mm;
  position: relative;
}

.page-head-center {
  text-align: center;
}

.page-head-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-primary);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.page-head-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.2;
}

/* Page Number Badge (Top right corner - aligned with lanterns and header) */
.page-number-box {
  position: absolute;
  top: 7mm;
  right: 8mm;
  background-color: var(--teal-primary);
  color: #ffffff;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  z-index: 10;
}

/* Page Content */
.page-entries-grid {
  display: flex;
  flex-direction: column;
  gap: 4.5mm;
  flex: 1;
}

/* ==========================================================================
   Word Card (Matching Competitor Layout)
   ========================================================================== */
.pdf-word-card {
  position: relative;
  background-color: #ffffff;
  border: 1.5px solid var(--teal-primary);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  page-break-inside: avoid;
  break-inside: avoid;
}

/* Header Banner - Compact vertical padding matching Image 1 & 2 */
.card-banner {
  position: relative;
  background-color: var(--teal-primary);
  color: #ffffff;
  padding: 0.65rem 1.25rem 0.6rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.banner-word-ar {
  font-family: var(--font-arabic);
  font-size: 2.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
  padding: 0;
}

.banner-meanings {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.banner-meaning-bn {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.banner-meaning-en {
  font-size: 0.875rem;
  color: #ccfbf1;
  font-style: italic;
  font-family: var(--font-english);
}

.banner-right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.card-banner .frequency-badge-rosette {
  width: 66px;
  height: 66px;
  min-width: 66px;
}

.card-banner .frequency-badge-rosette .freq-num {
  font-size: 1.15rem;
}

.card-banner .frequency-badge-rosette .freq-unit {
  font-size: 0.62rem;
}

.banner-accordion-tag {
  background-color: rgba(0, 0, 0, 0.22);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35); /* taste-skill-ignore */
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Protruding circular frequency badge */
.frequency-badge-circle {
  background-color: var(--teal-primary);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  min-width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

/* 12-Lobed Scalloped Islamic Rosette Badge */
.frequency-badge-rosette {
  position: relative;
  width: 84px;
  height: 84px;
  min-width: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.frequency-badge-rosette svg.rosette-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.frequency-badge-rosette .rosette-base {
  fill: #ffc300;
  stroke: none;
}

.frequency-badge-rosette .rosette-text-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #3b1900;
  line-height: 1;
  padding-top: 2px;
}

.frequency-badge-rosette .freq-num {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

.frequency-badge-rosette .freq-unit {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 1px;
  color: #5c2c04;
}

/* Variations Box Grid */
.pdf-variations-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  border-bottom: 1.5px solid var(--teal-primary);
  background-color: #f8fafc;
}

.pdf-var-cell {
  border-right: 1px solid var(--border-light); /* taste-skill-ignore */
  padding: 0.65rem 0.5rem 0.55rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
  min-height: 48px;
}

.pdf-var-cell:last-child {
  border-right: none;
}

.pdf-var-arabic {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.3;
  padding-top: 0.15rem;
}

.pdf-var-meaning {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  line-height: 1.2;
}

/* Examples Block */
.pdf-examples-block {
  padding: 0.65rem 0.95rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: #ffffff;
}

.pdf-example-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed var(--border-light); /* taste-skill-ignore */
}

.pdf-example-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.pdf-ayah-ar {
  font-family: var(--font-arabic);
  font-size: 1.35rem;
  line-height: 1.8;
  color: var(--ink-primary);
  text-align: right;
  direction: rtl;
}

.pdf-ayah-bn {
  font-size: 0.925rem;
  line-height: 1.5;
  color: var(--ink-primary);
}

.pdf-ayah-ref {
  font-weight: 700;
  color: var(--teal-primary);
  margin-left: 0.3rem;
}

.pdf-ayah-en {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--font-english);
}

/* Red Keyword Highlight */
.hl-red {
  color: var(--highlight-red);
  font-weight: 700;
}

/* ==========================================================================
   Table of Contents (সূচিপত্র) Styles — Matching Image 15 (6 cards per page)
   ========================================================================== */
.toc-section-head {
  text-align: center;
  margin-bottom: 5mm;
  padding-bottom: 3mm;
  border-bottom: 2px solid var(--teal-primary);
}

.toc-main-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal-primary);
}

.toc-main-sub {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.toc-entries-grid {
  display: flex;
  flex-direction: column;
  gap: 4.5mm;
  flex: 1;
}

.toc-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, opacity 0.15s ease;
  page-break-inside: avoid;
  break-inside: avoid;
}

.toc-card-link:hover {
  transform: translateY(-1px);
}

.toc-compact-card {
  position: relative;
  background-color: #ffffff;
  border: 1.5px solid var(--teal-primary);
  border-radius: 16px;
  overflow: hidden;
  page-break-inside: avoid;
  break-inside: avoid;
}

.toc-banner {
  position: relative;
  background-color: var(--teal-primary);
  color: #ffffff;
  padding: 0.75rem 1rem 0.65rem;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  overflow: hidden;
}

.toc-banner .frequency-badge-rosette {
  width: 58px;
  height: 58px;
  min-width: 58px;
}

.toc-banner .frequency-badge-rosette .freq-num {
  font-size: 1rem;
}

.toc-banner .frequency-badge-rosette .freq-unit {
  font-size: 0.6rem;
}

.toc-word-ar {
  font-family: var(--font-arabic);
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.1rem 0;
}

.toc-meanings {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.toc-meaning-bn {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.toc-jump-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35); /* taste-skill-ignore */
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}

.back-to-toc-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35); /* taste-skill-ignore */
  padding: 0.32rem 0.75rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.back-to-toc-tag:hover {
  background-color: rgba(255, 255, 255, 0.32);
}

/* ==========================================================================
   Print Specific Rules (@media print)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  body {
    background-color: transparent;
    padding: 0;
    margin: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pdf-toolbar {
    display: none !important;
  }

  .book-wrapper {
    max-width: 100%;
    margin: 0;
    gap: 0;
  }

  .book-page {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    padding: 14mm 10mm 16mm 10mm;
    box-shadow: none; /* taste-skill-ignore */
    page-break-after: always;
    break-after: page;
  }

  .book-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .pdf-word-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .toc-compact-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .toc-card-link {
    text-decoration: none;
  }

  .book-cover-page {
    padding: 16mm 14mm 16mm 14mm;
  }

  .cover-begin-reading-btn {
    display: none;
  }
}
