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

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background-color: #f5f0e8;
  color: #2a1b0f;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin: 0; }

/* ── Marquee animations ────────────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-slow {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.animate-marquee      { animation: marquee 50s linear infinite; display: flex; }
.animate-marquee-slow { animation: marquee-slow 60s linear infinite; display: flex; }
.marquee-track:hover .animate-marquee,
.marquee-track:hover .animate-marquee-slow { animation-play-state: paused; }

/* ════════════════════════════════════════════════════════════════
   ARTICLE CONTENT  (.ia-content)
   Matches heading sizes / structure used on the homepage
   ════════════════════════════════════════════════════════════════ */
.ia-content {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(42,27,15,.9);
}

/* Paragraph gaps — one clear line of space between paragraphs */
.ia-content p {
  margin-top: 0;
  margin-bottom: 1.6em;
}

/* Headings — matching homepage size scale */
.ia-content h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 40px;   /* matches homepage Life & Legacy heading */
  color: #2a1b0f;
  line-height: 1.15;
  margin: 2.8rem 0 1rem;
}
.ia-content h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 32px;   /* matches homepage featured article title */
  color: #2a1b0f;
  line-height: 1.2;
  margin: 2.2rem 0 0.8rem;
}
.ia-content h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;   /* matches homepage card title */
  color: #2a1b0f;
  line-height: 1.25;
  margin: 1.8rem 0 0.6rem;
}
.ia-content h5 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  color: #2a1b0f;
  margin: 1.5rem 0 0.5rem;
}

/* Links */
.ia-content a { color: #068f5f; text-decoration: underline; text-underline-offset: 3px; }
.ia-content a:hover { color: #056b47; }

/* ── Blockquote — gold left bar + italic serif ───────────────── */
.ia-content blockquote {
  margin: 2.5rem 0;
  padding: 0.2rem 0 0.2rem 2rem;
  border-left: 3px solid #c8a96e;
}
/* Quote body — semibold italic Cormorant Garamond */
.ia-content blockquote p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.5;
  color: #2a1b0f;
  margin-bottom: 0.75em;
}
/* Citation / attribution — gold sans */
.ia-content blockquote cite,
.ia-content blockquote footer,
.ia-content blockquote p:last-child:not(:first-child) {
  font-family: 'Manrope', sans-serif;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: #c8a96e;
  letter-spacing: 0.02em;
  display: block;
  margin-top: 0.5em;
}
/* WordPress core quote block with attribution */
.ia-content .wp-block-quote__citation,
.ia-content figcaption {
  font-family: 'Manrope', sans-serif;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: #c8a96e;
}

/* ── Lists ───────────────────────────────────────────────────── */
.ia-content ul,
.ia-content ol {
  margin: 0 0 1.6em 0;
  padding: 0 0 0 1.5rem;
  list-style: none;
}
.ia-content ul li,
.ia-content ol li {
  position: relative;
  margin-bottom: 0.65em;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(42,27,15,.85);
}
/* Unordered: green diamond bullet */
.ia-content ul li::before {
  content: "◆";
  position: absolute;
  left: -1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: #068f5f;
  line-height: 1;
}
/* Ordered: green number */
.ia-content ol { counter-reset: ia-list; }
.ia-content ol li { counter-increment: ia-list; }
.ia-content ol li::before {
  content: counter(ia-list) ".";
  position: absolute;
  left: -1.4rem;
  top: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #068f5f;
  letter-spacing: 0.02em;
  line-height: 1.75;
}

/* ── Images in content — rounded corners ─────────────────────── */
.ia-content img,
.ia-content figure img,
.ia-content .wp-block-image img {
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  height: auto;
}
.ia-content figure,
.ia-content .wp-block-image {
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
}
.ia-content figcaption,
.ia-content .wp-block-image figcaption {
  font-size: 13px;
  color: #6b5a47;
  text-align: center;
  margin-top: 0.6rem;
  font-style: italic;
}

/* ── Tables ──────────────────────────────────────────────────── */
.ia-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.6em;
  font-size: 15px;
}
.ia-content th {
  background: #2a1b0f;
  color: white;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  text-align: left;
}
.ia-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #d9cec0;
  color: rgba(42,27,15,.85);
}
.ia-content tr:nth-child(even) td { background: rgba(42,27,15,.03); }

/* ── WP search form ────────────────────────────────────────────── */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #d9cec0;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  background: white;
  color: #2a1b0f;
  outline: none;
}
.search-form input[type="search"]:focus { border-color: #068f5f; }
.search-form button,
.search-form input[type="submit"] {
  padding: 10px 20px;
  background: #068f5f;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.search-form button:hover,
.search-form input[type="submit"]:hover { background: #056b47; }

/* ── WP pagination ─────────────────────────────────────────────── */
.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.page-numbers a, .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #2a1b0f;
  border: 1px solid #d9cec0;
  transition: all 0.2s;
}
.page-numbers a:hover { background: #068f5f; color: white; border-color: #068f5f; }
.page-numbers .current { background: #068f5f; color: white; border-color: #068f5f; }
.page-numbers .prev, .page-numbers .next { width: auto; padding: 0 16px; }

/* ── Custom logo ───────────────────────────────────────────────── */
.custom-logo { height: 64px; width: auto; }

/* ── Footer nav menu ───────────────────────────────────────────── */
.footer-col-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-col-nav ul li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 6px; }
.footer-col-nav ul li a {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: #4a3828;
  transition: color 0.2s;
  line-height: 1.4;
}
.footer-col-nav ul li a:hover { color: #068f5f; }

/* ════════════════════════════════════════════════════════════════
   SITEMAP  (templates/page-sitemap.php)
   ════════════════════════════════════════════════════════════════ */
.ia-sitemap__block { padding-top: 2.5rem; border-top: 1px solid #e3d9c9; }
.ia-sitemap__block:first-of-type { padding-top: 0; border-top: 0; }
.ia-sitemap__block + .ia-sitemap__block { margin-top: 2.5rem; }

.ia-sitemap__heading {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 30px;
  line-height: 1.2;
  color: #2a1b0f;
  margin: 0 0 1.25rem;
}
.ia-sitemap__heading a { transition: color .2s; }
.ia-sitemap__heading a:hover { color: #068f5f; }

/* Two columns once there is room; the list reads down each in turn. */
.ia-sitemap__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px 40px;
}
@media (min-width: 720px) {
  .ia-sitemap__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ia-sitemap__list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.ia-sitemap__list li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #068f5f;
  opacity: .45;
  transform: translateY(-3px);
}
.ia-sitemap__list a { color: #4a3828; transition: color .2s; }
.ia-sitemap__list a:hover { color: #068f5f; }
.ia-sitemap__count { font-size: 12px; color: #9a8a78; white-space: nowrap; }
.ia-sitemap__empty {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 14px;
  font-style: italic;
  color: #6b5a47;
}

/* ════════════════════════════════════════════════════════════════
   LEGAL PAGES  (templates/page-legal.php)
   ════════════════════════════════════════════════════════════════ */
.ia-legal__toc { align-self: start; }
@media (min-width: 1024px) {
  .ia-legal__toc { position: sticky; top: 104px; }
}
.ia-legal__toc-title {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.44px;
  text-transform: uppercase;
  color: #068f5f;
  margin: 0 0 14px;
}
.ia-legal__toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ia-toc;
  border-left: 1px solid #e3d9c9;
}
.ia-legal__toc li { counter-increment: ia-toc; margin: 0; }
.ia-legal__toc a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #6b5a47;
  transition: color .2s, border-color .2s;
}
.ia-legal__toc a::before { content: counter(ia-toc) ". "; color: #c8a96e; }
.ia-legal__toc a:hover { color: #068f5f; border-left-color: #068f5f; }

/* Room for the sticky header when a contents link jumps down the page. */
.ia-legal__body h2 { scroll-margin-top: 104px; }
.ia-legal__body h2:first-child { margin-top: 0; }

/* ════════════════════════════════════════════════════════════════
   NAHJUL BALAGHA  (templates/nahjul-balagha-*.php)
   ════════════════════════════════════════════════════════════════ */

/* Section icons: the SVG is used as a mask and painted in the text colour,
   so one white icon file shows white on the tabs and brown beside the intro. */
.ia-nahj-icon {
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--ia-icon) center / contain no-repeat;
          mask: var(--ia-icon) center / contain no-repeat;
}

/* Cards hidden by the search box (their Tailwind display class would otherwise win over [hidden]). */
#ia-nahj-grid > [hidden] { display: none; }

/* An entry's optional quote, between the title and the text: the same gold
   hairline the article blockquote uses on its left, and a lighter one below
   it separating the quote from the description. */
.ia-nahj-quote {
  margin: 0 0 2.5rem;
  padding: 0.2rem 0 2.25rem 2rem;
  max-width: 900px;
  border-left: 3px solid #c8a96e;
  border-bottom: 1px solid #e8dfd2;
}
.ia-nahj-quote__text {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.25;
  color: #2a1b0f;
}
.ia-nahj-quote__by {
  margin-top: 0.5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
  color: #068f5f;
}
@media (max-width: 767px) {
  .ia-nahj-quote { padding-left: 1.25rem; padding-bottom: 1.75rem; margin-bottom: 2rem; }
  .ia-nahj-quote__text { font-size: 28px; }
  .ia-nahj-quote__by { font-size: 22px; }
}

/* Entry text: a touch looser and neutral grey, as in the design. */
.ia-nahj-content { line-height: 1.95; color: #393939; }

/* Previous / next cards, with a hairline running behind them to the column's edge. */
.ia-nahj-pager {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ia-nahj-pager::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #d9cec0;
}
.ia-nahj-pager > a { position: relative; }
@media (min-width: 640px) {
  .ia-nahj-pager { display: flex; gap: 26px; }
  .ia-nahj-pager > a { width: 276px; }
}
