/*
Theme Name: Maktaba PDF Pro
Theme URI: https://example.com/maktaba-pdf-pro
Author: Codex
Description: قالب عربي سريع لمكتبة كتب PDF مع دعم SEO ونوع محتوى الكتب.
Version: 1.9.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: maktaba-pdf-pro
*/

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #697586;
  --line: #e3e8ef;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #f59e0b;
  --danger: #b42318;
  --shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.maktaba-ad-slot {
  width: min(100% - 32px, 1120px);
  min-height: 1px;
  margin: 18px auto;
  text-align: center;
  overflow: hidden;
}
.maktaba-ad-slot:empty {
  display: none;
}
.maktaba-ad-slot ins {
  max-width: 100%;
}
.ad-book-after-description {
  width: 100%;
  margin: 18px 0 4px;
}
.ad-footer {
  margin-top: 28px;
  margin-bottom: 0;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 247, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.menu {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
}
.primary-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-menu li {
  position: relative;
  margin: 0;
}
.menu a,
.primary-menu a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
}
.menu a:hover,
.primary-menu a:hover {
  background: #eef4ff;
  color: var(--brand-dark);
}
.primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 210px;
  display: none;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  display: grid;
}
.primary-menu .sub-menu a {
  width: 100%;
}
.wp-block-page-list,
.page_item_has_children .children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wp-block-page-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wp-block-page-list a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}
.wp-block-page-list a:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}
.mobile-menu {
  display: none;
}
.mobile-menu summary {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
  cursor: pointer;
}
.mobile-menu nav {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 64px;
  z-index: 50;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow);
}
.mobile-menu nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
}
.mobile-menu nav a:hover {
  background: #eef4ff;
  color: var(--brand-dark);
}
.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(390px, 100%);
}
.search-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
}
.btn,
.search-form button,
.wp-block-search__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover,
.search-form button:hover { background: var(--brand-dark); }
.btn.secondary { background: #edf4ef; color: var(--brand-dark); }
.btn.danger { background: var(--danger); }
.hero {
  padding: 38px 0 26px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, .08), rgba(244, 246, 248, 0) 72%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.2;
}
.hero p { margin: 0 0 24px; color: var(--muted); font-size: 18px; max-width: 620px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}
.stat strong { display: block; font-size: 22px; color: var(--brand-dark); }
.shelf {
  min-height: 280px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.88), rgba(255,255,255,.20)),
    repeating-linear-gradient(90deg, #1d4ed8 0 32px, #f59e0b 32px 44px, #e5eefb 44px 76px);
  box-shadow: var(--shadow);
}
.section { padding: 26px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.section h2,
.archive-title {
  margin: 0;
  font-size: 28px;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.book-grid.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.book-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.book-media-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.book-media-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .32);
  box-shadow: var(--shadow);
}
.media-cover {
  aspect-ratio: 2 / 3;
  border-radius: 7px;
  overflow: hidden;
  background: #e7eef8;
}
.media-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f4f7f5;
}
.media-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.media-tax {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}
.media-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}
.media-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.quote-section {
  background: #f7faf8;
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.quote-card {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
  overflow: hidden;
}
.quote-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--brand);
}
.quote-mark {
  position: absolute;
  inset-inline-end: 18px;
  top: 4px;
  color: rgba(30, 122, 92, .12);
  font-size: 76px;
  font-weight: 900;
  line-height: 1;
}
.quote-card blockquote {
  position: relative;
  margin: 0;
  color: #1f2937;
  font-size: 16px;
  line-height: 2;
}
.quote-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.quote-card footer strong {
  color: var(--brand-dark);
}
.quote-card footer span::before {
  content: "•";
  margin-inline-end: 8px;
  color: var(--accent);
}
.book-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 40, 31, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cover {
  aspect-ratio: 2 / 3;
  background: #e6ede8;
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: contain; background: #f4f7f5; }
.book-card-body { padding: 12px; }
.book-card h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.45; }
.book-card a,
.media-body a {
  overflow-wrap: anywhere;
}
.meta { color: var(--muted); font-size: 13px; }
.rating { color: var(--accent); font-weight: 800; }
.stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 1px;
  color: #cbd5e1;
  vertical-align: middle;
}
.stars .filled { color: var(--accent); }
.card-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}
.card-tools .copy-feedback {
  flex-basis: 100%;
  color: #067647;
  font-weight: 800;
}
.card-tools button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  padding: 5px 8px;
  font-family: inherit;
  cursor: pointer;
}
.card-more-link {
  color: var(--brand-dark);
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  background: #f8fafc;
}
.book-card-author {
  line-height: 1.7;
}
.book-single {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: start;
  padding: 38px 0;
}
.book-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.book-single h1 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 46px); line-height: 1.25; }
.book-author-line {
  margin: 0 0 18px;
  font-size: 15px;
}
.series-book-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.8;
}
.series-book-notice strong {
  flex: 0 0 auto;
  color: #1d4ed8;
}
.series-book-notice a {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 22px 0;
}
.fact {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.fact span { display: block; color: var(--muted); font-size: 12px; }
.book-like-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.book-like-form button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  padding: 9px 12px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.book-like-form button:disabled {
  opacity: .72;
  cursor: default;
}
.book-like-form strong {
  color: var(--brand-dark);
}
.book-info-table {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
}
.info-table-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.info-table-head h2 {
  margin: 0;
  font-size: 22px;
}
.info-table-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.book-info-table dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}
.book-info-table dl > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.book-info-table dl > div:nth-child(odd) {
  background: #fcfcfd;
}
.book-info-table dt {
  color: var(--muted);
  font-weight: 800;
}
.book-info-table dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.book-tabs {
  margin-top: 22px;
}
.book-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.book-tab-buttons button {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
  color: var(--muted);
  padding: 10px 14px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.book-tab-buttons button.active {
  background: #fff;
  color: var(--brand-dark);
}
.book-tab-panel {
  display: none;
}
.book-tab-panel.active {
  display: block;
}
.empty-tab-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  color: var(--muted);
  line-height: 1.9;
}
.author-books-link {
  margin-top: 14px;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.notice {
  border: 1px solid #f3b4ad;
  background: #fff4f2;
  color: var(--danger);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 16px;
}
.content-area {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.content-area h2 {
  margin: 0 0 14px;
  font-size: 24px;
}
.book-description-box {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
  overflow: hidden;
}
.book-description-seo-note {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #713f12;
  font-weight: 800;
}
.description-title {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbff, #fff);
}
.description-title h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.4;
}
.description-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.description-content {
  padding: 20px;
  font-size: 16px;
  line-height: 2;
}
.description-content p:first-child { margin-top: 0; }
.description-content p:last-child { margin-bottom: 0; }
.book-end-categories {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.book-end-categories strong {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
}
.book-end-categories div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.book-end-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand-dark);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
}
.book-end-categories a:hover {
  background: var(--brand);
  color: #fff;
}
.author-profile-box {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .07), rgba(255,255,255,0) 45%),
    #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
}
.author-photo {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  background: #e7eef8;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  font-size: 46px;
  font-weight: 900;
}
.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-profile-body .eyebrow {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}
.author-profile-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}
.author-bio {
  color: #364152;
  line-height: 1.95;
}
.author-bio p:first-child { margin-top: 0; }
.author-bio p:last-child { margin-bottom: 0; }
.author-source {
  display: inline-flex;
  margin-top: 12px;
  color: var(--brand-dark);
  font-weight: 800;
}
.copyright-report-box {
  margin-top: 18px;
  border: 1px solid #f7c76f;
  border-radius: 8px;
  background: #fffaf0;
  overflow: hidden;
}
.copyright-notice {
  padding: 16px 18px;
}
.copyright-notice h2 {
  margin: 0 0 8px;
  font-size: 21px;
  color: #92400e;
}
.copyright-notice p {
  margin: 4px 0;
  color: #5f4520;
}
.report-success {
  padding: 12px 18px;
  background: #ecfdf3;
  color: #067647;
  border-bottom: 1px solid #abefc6;
  font-weight: 800;
}
.report-details {
  border-top: 1px solid #f7c76f;
  background: #fff;
}
.report-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--danger);
  font-weight: 900;
  cursor: pointer;
}
.report-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}
.report-form label {
  display: grid;
  gap: 6px;
}
.report-form label.wide {
  grid-column: 1 / -1;
}
.report-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.report-form input,
.report-form select,
.report-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
}
.report-form textarea {
  resize: vertical;
}
.report-form button {
  width: max-content;
}
.related-section {
  padding-top: 12px;
}
.book-share-card,
.book-review-box {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
}
.book-share-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 16px;
}
.share-cover {
  border-radius: 8px;
  overflow: hidden;
  background: #e7eef8;
}
.share-card-body h2 {
  margin: 2px 0 4px;
  font-size: 24px;
}
.share-card-body p {
  margin: 0 0 8px;
  color: var(--muted);
}
.share-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.short-link-label {
  display: grid;
  gap: 5px;
  margin: 10px 0;
}
.short-link-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.short-link-label input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  direction: ltr;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.share-buttons a,
.share-buttons button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  padding: 0 11px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}
.share-buttons a:hover,
.share-buttons button:hover {
  border-color: var(--brand);
  background: #eef4ff;
}
.copy-feedback {
  color: #067647;
  font-size: 13px;
  font-weight: 800;
}
.book-review-box {
  padding: 18px;
}
.review-summary {
  font-size: 20px;
}
.review-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.review-form input[type="text"],
.review-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
}
.hp-field {
  position: absolute;
  right: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.rating-input {
  display: inline-flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 3px;
  width: max-content;
}
.rating-input input {
  position: absolute;
  opacity: 0;
}
.rating-input label {
  color: #cbd5e1;
  cursor: pointer;
  font-size: 28px;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: var(--accent);
}
.review-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.review-item {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.review-item p {
  margin: 6px 0 0;
  color: var(--muted);
}
.download-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.download-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 14px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.download-tabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.download-panel {
  display: none;
}
.download-panel.active {
  display: block;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumbs a {
  color: var(--brand-dark);
  font-weight: 800;
}
.breadcrumbs strong {
  color: var(--text);
  font-weight: 700;
}
.archive-intro {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}
.archive-bottom-text,
.empty-state,
.faq-box,
.author-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}
.archive-bottom-text {
  margin-top: 28px;
  padding: 18px 20px;
  line-height: 2;
}
.empty-state {
  padding: 26px;
}
.empty-state p,
.empty-note {
  color: var(--muted);
}
.search-form-large {
  margin-top: 16px;
  max-width: 680px;
}
.search-results-grid {
  margin-top: 18px;
}
.search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}
.search-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 800;
}
.search-tabs a.active,
.search-tabs a:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.book-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.book-filters select,
.book-filters button {
  min-height: 42px;
  border-radius: 8px;
  font-family: inherit;
}
.book-filters select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}
.author-hero {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px;
  margin-bottom: 18px;
}
.inner-section {
  padding-top: 14px;
}
.faq-box {
  margin-top: 24px;
  padding: 18px 20px;
}
.faq-box h2 {
  margin: 0 0 12px;
  font-size: 24px;
}
.faq-box details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.faq-box summary {
  cursor: pointer;
  font-weight: 800;
}
.faq-box p {
  margin-bottom: 0;
  color: var(--muted);
}
.request-layout {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 22px;
  align-items: start;
}
.request-copy,
.request-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}
.request-copy {
  padding: 24px;
}
.request-copy .eyebrow {
  color: var(--brand-dark);
  font-weight: 900;
}
.request-copy p,
.request-copy li {
  color: var(--muted);
}
.request-card {
  padding: 18px;
}
.request-form {
  display: grid;
  gap: 13px;
}
.request-form label {
  display: grid;
  gap: 6px;
}
.request-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.request-form input,
.request-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  font-family: inherit;
}
.request-form textarea {
  resize: vertical;
}
.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.term-chip {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 5px 14px rgba(20, 40, 31, .04);
}
.term-chip:hover {
  border-color: rgba(30, 122, 92, .42);
  box-shadow: var(--shadow);
}
.term-chip strong {
  color: var(--brand-dark);
  line-height: 1.45;
}
.term-chip span {
  color: var(--muted);
  font-size: 13px;
}
.iqra-term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.iqra-term-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.iqra-term-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .32);
  box-shadow: var(--shadow);
}
.iqra-term-card a {
  display: block;
}
.iqra-term-covers {
  min-height: 118px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px 14px 0;
  background: linear-gradient(180deg, #eef4ff, #fff);
}
.iqra-term-covers span {
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: #dce7f7;
  overflow: hidden;
  box-shadow: 0 7px 15px rgba(15, 23, 42, .11);
}
.iqra-term-covers img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f4f7f5;
}
.iqra-term-covers span span {
  display: none;
}
.iqra-term-body {
  padding: 12px 14px 14px;
}
.iqra-term-body strong {
  display: block;
  font-size: 19px;
  line-height: 1.4;
}
.iqra-term-body small {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-weight: 800;
}
.iqra-term-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.site-footer {
  padding: 34px 0 22px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr .7fr .7fr 1fr;
  gap: 24px;
  align-items: start;
}
.footer-brand p,
.footer-note p {
  margin: 12px 0 0;
  max-width: 360px;
}
.footer-links {
  display: grid;
  gap: 8px;
}
.footer-links strong,
.footer-note strong {
  color: var(--text);
  font-size: 16px;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--brand-dark);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.pagination,
.pagination .nav-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.pagination .nav-links { margin-top: 0; width: 100%; }
.pagination .page-numbers {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  color: var(--brand-dark);
  font-weight: 800;
}
.pagination a.page-numbers:hover { border-color: var(--brand); background: #f0fdf4; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.not-found-section {
  min-height: 62vh;
  display: grid;
  align-items: center;
}
.not-found-box {
  text-align: center;
}
.not-found-code {
  display: inline-flex;
  margin-bottom: 10px;
  color: rgba(30, 122, 92, .16);
  font-size: clamp(72px, 15vw, 150px);
  line-height: 1;
  font-weight: 900;
}
.not-found-box h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 54px);
}
.not-found-box p {
  max-width: 620px;
  margin: 0 auto 20px;
  color: var(--muted);
  line-height: 1.9;
}
.not-found-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.site-index-section .index-grid {
  display: grid;
  gap: 26px;
}
.compact-head {
  margin-bottom: 14px;
}
.center-actions {
  display: flex;
  justify-content: center;
}
.index-grid > section {
  min-width: 0;
}
.index-grid h2,
.series-seo-list h2 {
  margin: 0 0 14px;
  font-size: 24px;
}
.series-seo-list ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.series-seo-list li a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  font-weight: 800;
}
.page-content {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: clamp(20px, 4vw, 42px);
}
.page-header {
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.entry-content {
  color: var(--text);
  font-size: 18px;
  line-height: 2;
}
.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 18px;
}
.entry-content a {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-content h2,
.entry-content h3 {
  margin: 28px 0 12px;
}
@media (max-width: 820px) {
  .nav { flex-wrap: wrap; padding: 12px 0; position: relative; }
  .desktop-menu { display: none; }
  .mobile-menu { display: block; margin-inline-start: auto; }
  .search-form { flex: 1 1 100%; }
  .hero-grid,
  .book-single { grid-template-columns: 1fr; }
  .book-info-table dl { grid-template-columns: 1fr; }
  .book-info-table dl > div { grid-template-columns: 110px 1fr; }
  .book-tab-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1px;
  }
  .book-tab-buttons button { white-space: nowrap; }
  .author-profile-box { grid-template-columns: 1fr; }
  .book-share-card { grid-template-columns: 1fr; }
  .report-form { grid-template-columns: 1fr; }
  .book-media-grid { grid-template-columns: 1fr; }
  .book-grid,
  .book-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-hero { grid-template-columns: 1fr; }
  .request-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf { min-height: 190px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .wrap { width: min(100% - 20px, 1180px); }
  .book-grid,
  .book-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .book-card-body { padding: 10px; }
  .book-card h3 { font-size: 14px; }
  .meta { font-size: 12px; }
  .book-filters { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: grid; }
  .book-media-card { grid-template-columns: 92px 1fr; }
  .iqra-term-grid { grid-template-columns: 1fr; }
  .site-header .search-form { min-width: 100%; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .book-grid,
  .book-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
