:root {
  --er-ink: #18211c;
  --er-muted: #5c6860;
  --er-line: #d8dfda;
  --er-paper: #ffffff;
  --er-wash: #f4f7f4;
  --er-green: #245c45;
  --er-green-soft: #e8f1ec;
  --er-blue: #3d6573;
  --er-blue-soft: #e9f1f3;
  --er-amber: #9b641f;
  --er-amber-soft: #fbf1df;
  --er-red: #78454d;
  --er-red-soft: #f6e9eb;
  --er-radius: 8px;
}

@font-face {
  font-family: "Pish Quran Naskh";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/noto-naskh-arabic/NotoNaskhArabic-Arabic-v44.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

.estekhare-reference-page {
  color: var(--er-ink);
  background: #f7f8f6;
}

.estekhare-reference-page .page-breadcrumb {
  direction: ltr !important;
}

.estekhare-reference-page .page-breadcrumb__list {
  direction: rtl !important;
  color: #5b6879;
}

.estekhare-reference-page .page-breadcrumb__item > a {
  color: #5b6879;
}

.er-wrap {
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
}

.er-hero {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  display: grid;
  align-items: end;
  color: #fff;
  background: #1a3128;
}

.er-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.er-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 27, 21, .66);
}

.er-hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
  padding-block: 92px 36px;
}

.er-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #d7eadf;
  font-size: .88rem;
  font-weight: 700;
}

.er-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 2.6rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.er-hero p {
  max-width: 720px;
  margin: 12px 0 0;
  color: #e7efe9;
  font-size: 1rem;
  line-height: 2;
}

.er-main {
  display: grid;
  gap: 24px;
  padding-block: 28px 56px;
}

.er-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  color: var(--er-muted);
  font-size: .88rem;
  line-height: 1.8;
}

.er-source-intro {
  margin: 0 0 14px;
  color: var(--er-muted);
}

.er-band {
  padding: 26px;
  border: 1px solid var(--er-line);
  border-radius: var(--er-radius);
  background: var(--er-paper);
}

.er-band--plain {
  padding-inline: 0;
  border: 0;
  background: transparent;
}

.er-band h2,
.er-band h3 {
  margin: 0 0 12px;
  color: var(--er-ink);
  line-height: 1.6;
  letter-spacing: 0;
}

.er-band h2 { font-size: 1.38rem; }
.er-band h3 { font-size: 1.04rem; }

.er-band p,
.er-band li,
.er-editorial {
  color: #354139;
  line-height: 2.05;
}

.er-band a {
  color: var(--er-green);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.er-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.er-meta > div,
.er-meta > span {
  min-width: 112px;
  padding: 9px 12px;
  border: 1px solid var(--er-line);
  border-radius: 6px;
  background: var(--er-wash);
}

.er-meta dt {
  color: var(--er-muted);
  font-size: .75rem;
}

.er-meta dd {
  margin: 3px 0 0;
  color: var(--er-ink);
  font-weight: 750;
}

.er-direction {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-inline-start: 4px solid var(--er-blue);
  border-radius: var(--er-radius);
  background: var(--er-blue-soft);
}

.er-direction[data-state="encouraging"] {
  border-color: var(--er-green);
  background: var(--er-green-soft);
}

.er-direction[data-state="review"] {
  border-color: var(--er-amber);
  background: var(--er-amber-soft);
}

.er-direction[data-state="caution"] {
  border-color: var(--er-red);
  background: var(--er-red-soft);
}

.er-direction[data-state="very_good"] {
  color: #12543a;
  border-color: #14704d;
  background: #dff3e7;
}

.er-direction[data-state="good"] {
  color: #285a43;
  border-color: #4b7b62;
  background: #eaf3ed;
}

.er-direction[data-state="neutral"] {
  color: #6f521d;
  border-color: #9b742d;
  background: #fbf3df;
}

.er-direction[data-state="bad"] {
  color: #733c45;
  border-color: #9a5660;
  background: #f8e9ec;
}

.er-direction[data-state="very_bad"] {
  color: #5f2932;
  border-color: #74313c;
  background: #f1dce1;
}

.er-direction svg {
  width: 24px;
  height: 24px;
  margin-top: 2px;
}

.er-direction strong { display: block; margin-bottom: 5px; }
.er-direction p { margin: 0; color: #334139; }

.er-ayah {
  scroll-margin-top: 90px;
  padding: 24px;
  border: 1px solid var(--er-line);
  border-radius: var(--er-radius);
  background: var(--er-paper);
}

.er-ayah--primary {
  border-color: #a9bdb0;
  box-shadow: 0 10px 32px rgba(24, 33, 28, .08);
}

.er-ayah__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--er-muted);
  font-size: .84rem;
}

.er-ayah__arabic {
  margin: 0;
  color: #16241d;
  font-family: "Pish Quran Naskh", "Noto Naskh Arabic", "Amiri Quran", serif !important;
  font-size: 1.82rem;
  font-weight: 400;
  line-height: 2.15;
  word-spacing: .06em;
  font-synthesis: none;
  text-align: right;
}

.er-ayah__translation {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--er-line);
  color: #354139;
  font-size: .98rem;
  line-height: 2.05;
}

.er-verse-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.er-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.er-link {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--er-line);
  border-radius: var(--er-radius);
  background: var(--er-paper);
  color: var(--er-ink);
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.er-link:hover {
  transform: translateY(-2px);
  border-color: #9db3a5;
  box-shadow: 0 8px 22px rgba(24, 33, 28, .08);
}

.er-link strong,
.er-link span { display: block; }
.er-link span { margin-top: 6px; color: var(--er-muted); line-height: 1.8; }

.er-index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.er-index-grid a {
  display: block;
  height: 100%;
  padding: 13px;
  border: 1px solid var(--er-line);
  border-radius: 6px;
  background: var(--er-paper);
  color: var(--er-ink);
  text-decoration: none;
}

.er-index-grid a:hover { border-color: #91aa9b; background: var(--er-green-soft); }

.er-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.er-pagination a {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid var(--er-line);
  border-radius: var(--er-radius);
  background: var(--er-paper);
  color: var(--er-green);
  font-weight: 700;
  text-decoration: none;
}

.er-pagination a:last-child { justify-content: end; text-align: left; }
.er-pagination svg { width: 20px; height: 20px; flex: 0 0 auto; }

.er-source-list { padding-inline-start: 22px; }
.er-source-list li + li { margin-top: 8px; }

.er-note {
  padding: 16px 18px;
  border-inline-start: 4px solid var(--er-amber);
  background: var(--er-amber-soft);
  color: #4e3a23;
  line-height: 2;
}

.er-editorial > :first-child { margin-top: 0; }
.er-editorial > :last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .er-wrap,
  .er-hero__content { width: min(100% - 24px, 1080px); }
  .er-hero { min-height: 280px; }
  .er-hero h1 { font-size: 1.82rem; }
  .er-hero__content { padding-block: 72px 24px; }
  .er-main { gap: 16px; padding-block: 18px 40px; }
  .er-band,
  .er-ayah { padding: 18px; }
  .er-grid,
  .er-pagination { grid-template-columns: 1fr; }
  .er-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er-ayah__arabic { font-size: 1.48rem; }
  .er-pagination a:last-child { justify-content: start; text-align: right; }
}

@media (max-width: 390px) {
  .er-index-grid { grid-template-columns: 1fr; }
  .er-direction { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .er-link { transition: none; }
  .er-link:hover { transform: none; }
}

@media print {
  .er-hero { min-height: auto; color: #000; background: #fff; }
  .er-hero img,
  .er-hero::after { display: none; }
  .er-hero__content { padding-block: 20px; }
  .er-hero p,
  .er-eyebrow { color: #222; }
  .er-link,
  .er-ayah,
  .er-band { break-inside: avoid; box-shadow: none; }
}
