:root {
  --green: #002e1c;
  --green-deep: #001f14;
  --green-mid: #0a3d2a;
  --gold: #c5a059;
  --gold-soft: #d4b56a;
  --gold-dark: #9a7a3c;
  --cream: #f5f1e8;
  --cream-bar: #ebe4d4;
  --white: #ffffff;
  --text-muted: #a8b5ad;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: #1a1a1a;
  background: var(--cream);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }
img { max-width: 100%; display: block; }

.site-header { position: sticky; top: 0; z-index: 100; }
.top-bar {
  background: var(--cream-bar);
  color: var(--green);
  text-align: center;
  font-size: .78rem;
  letter-spacing: .04em;
  padding: .4rem 1rem;
  border-bottom: 1px solid rgba(197,160,89,.35);
}
.nav-bar {
  background: var(--green);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .55rem 1.75rem;
  border-bottom: 1px solid var(--gold);
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
  color: var(--gold);
}
.brand__logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  border: 1.5px solid var(--gold);
  background: var(--green-deep);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--gold);
}
.brand__text small {
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .22em;
  color: var(--gold-soft);
  margin-top: .15rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem 1.35rem;
  margin-left: auto;
  margin-right: 1rem;
}
.main-nav a {
  color: #f2efe6;
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}
.nav-tools button,
.nav-tools a {
  background: transparent;
  border: none;
  color: var(--gold);
  cursor: pointer;
  padding: .35rem;
  display: inline-flex;
  align-items: center;
  font-size: 1.15rem;
  line-height: 1;
}
.nav-tools svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--gold);
  width: 40px; height: 34px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--gold); }

.site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3.5rem;
}

.page-title { text-align: center; margin: .25rem auto 1.35rem; }
.page-title span {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: #1a1a1a;
  background: var(--white);
  border: 1px solid #1a1a1a;
  border-radius: var(--radius-sm);
  padding: .55rem 1.75rem;
  letter-spacing: .02em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.filters a {
  border: 1.5px solid transparent;
  color: #333;
  background: transparent;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  transition: .15s;
}
.filters a.is-active,
.filters a:hover {
  background: var(--green);
  color: var(--gold);
  border-color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #111 !important;
  border: none;
  border-radius: 8px;
  padding: .55rem 1.15rem;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: #111 !important; }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; border-radius: 7px; }
.btn-outline {
  background: transparent;
  color: var(--gold) !important;
  border: 1px solid var(--gold);
}

.hero-feature {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 2rem;
  align-items: center;
  background: #002b1b;
  border-radius: 4px;
  padding: 1.75rem 5.5rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border: none;
}
.hero-feature::before,
.hero-feature::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 140px;
  opacity: .55;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c5a059' stroke-width='1.1'%3E%3Cpath d='M60 8 L112 60 L60 112 L8 60 Z'/%3E%3Cpath d='M60 28 L92 60 L60 92 L28 60 Z'/%3E%3Cpath d='M60 42 L78 60 L60 78 L42 60 Z'/%3E%3Cpath d='M60 8 L60 112 M8 60 L112 60' opacity='.45'/%3E%3Cpath d='M24 24 L96 96 M96 24 L24 96' opacity='.35'/%3E%3Ccircle cx='60' cy='60' r='14' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 110px 110px;
  background-repeat: repeat;
}
.hero-feature::before { left: -10px; }
.hero-feature::after { right: -10px; transform: scaleX(-1); }

.hero-feature__media {
  position: relative;
  z-index: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--gold);
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1.05;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.hero-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-feature__body {
  position: relative;
  z-index: 1;
  color: #f3efe4;
  padding: .25rem 0 .25rem .25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-feature__body h2 {
  font-family: var(--font-body);
  color: #d4af37;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-weight: 700;
  margin: 0 0 .9rem;
  line-height: 1.35;
  letter-spacing: .02em;
  text-transform: uppercase;
  max-width: 34em;
}
.hero-feature__body p {
  margin: 0 0 1.1rem;
  color: #ffffff;
  font-size: .92rem;
  line-height: 1.55;
  max-width: 38em;
  opacity: .92;
}
.hero-feature__meta {
  display: flex;
  gap: 1.4rem;
  font-size: .88rem;
  color: #ffffff;
  margin-bottom: 1.35rem;
  opacity: .9;
}
.hero-feature__meta span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.hero-feature__meta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}
.hero-feature__body .btn {
  margin-top: auto;
  align-self: flex-start;
  background: #d4af37;
  color: #111 !important;
  border-radius: 6px;
  padding: .6rem 1.35rem;
  font-weight: 700;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.article-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  grid-template-rows: auto auto;
  gap: .75rem .9rem;
  background: var(--green);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  padding: .85rem;
  transition: box-shadow .2s, transform .2s;
}
.article-card:hover {
  box-shadow: 0 10px 28px rgba(0,46,28,.28);
  transform: translateY(-2px);
}
.article-card__img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(197,160,89,.5);
}
.article-card__body { min-width: 0; }
.article-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .45rem;
  line-height: 1.3;
  color: var(--white);
}
.article-card h3 a { color: var(--white); }
.article-card h3 a:hover { color: var(--gold); }
.article-card__meta {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .7rem;
}
.article-card__meta span { display: inline-flex; align-items: center; gap: .25rem; }
.article-card__foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-top: .15rem;
  padding-top: .55rem;
  border-top: 1px solid rgba(197,160,89,.2);
}
.tag {
  font-size: .7rem;
  color: #9aa89f;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  padding: .18rem .45rem;
}
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 2rem 0 1rem;
  border-bottom: 1px solid rgba(0,46,28,.15);
  padding-bottom: .5rem;
}
.section-head h2 {
  font-family: var(--font-display);
  color: var(--green);
  margin: 0;
  font-size: 1.45rem;
}
.section-head a { color: var(--green); font-size: .9rem; }
.section-head a:hover { color: var(--gold-dark); }

.home-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 1.75rem;
}
.home-intro .brand-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  background: var(--green);
}
.home-intro h1 {
  font-family: var(--font-display);
  color: var(--green);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 .4rem;
  letter-spacing: .06em;
}
.home-intro p { color: #5a635e; margin: 0; }

.prayer-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: var(--green);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  padding: .85rem .5rem;
  margin-bottom: 1.75rem;
  overflow: hidden;
}
.prayer-strip__item {
  text-align: center;
  color: #e8e2d4;
  padding: .5rem .25rem;
  border-right: 1px solid rgba(197,160,89,.25);
}
.prayer-strip__item:last-child { border-right: 0; }
.prayer-strip__item strong {
  display: block;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-top: .15rem;
}
.prayer-strip__item span { font-size: .78rem; opacity: .85; }

.hadith-card, .content-body {
  background: var(--white);
  border: 1px solid rgba(0,46,28,.12);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
}
.hadith-card {
  background: var(--green);
  border-color: var(--gold);
  color: #eee;
}
.hadith-card h3 a { color: var(--gold); }
.hadith-card blockquote {
  margin: 0;
  font-size: 1.05rem;
  color: #f3efe4;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  font-family: var(--font-display);
  font-style: italic;
}
.hadith-card cite { display: block; margin-top: .75rem; color: var(--text-muted); font-size: .9rem; font-style: normal; }

.content-body h1 {
  font-family: var(--font-display);
  color: var(--green);
  margin-top: 0;
}
.content-meta { color: #6a736e; font-size: .9rem; margin-bottom: 1.25rem; }
.featured-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold);
}
.prose h2, .prose h3 { font-family: var(--font-display); color: var(--green); }
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.form-grid { display: grid; gap: 1rem; max-width: 560px; }
.form-grid label { display: grid; gap: .35rem; font-weight: 600; color: var(--green); }
.form-grid input, .form-grid textarea, .form-grid select {
  padding: .65rem .75rem;
  border: 1px solid #cbb98a;
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
}
.alert {
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gold);
  background: #fff8e8;
  border-radius: var(--radius-sm);
}
.alert-error { background: #fdeceb; border-color: #c45c5c; }

.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--white);
  color: var(--green);
}
.pagination .is-current { background: var(--green); color: var(--gold); }

.site-footer {
  background: var(--green);
  color: #d9d1bf;
  border-top: 2px solid var(--gold);
  padding: 1.35rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}
.footer-links, .footer-social { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }
.footer-links a, .footer-social a { color: #eee; font-size: .88rem; }
.footer-links a:hover, .footer-social a:hover { color: var(--gold); }
.footer-social { justify-content: center; }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-copy { margin: 0; text-align: right; font-size: .82rem; opacity: .85; color: #cfc7b6; }

.search-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,20,12,.72);
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-panel.is-open { display: flex; }
.search-panel form {
  width: min(520px, 92vw);
  display: flex;
  gap: .5rem;
  background: var(--green);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem;
}
.search-panel input {
  flex: 1;
  border: 1px solid rgba(197,160,89,.4);
  border-radius: 8px;
  padding: .7rem .9rem;
  background: var(--green-deep);
  color: #fff;
  font: inherit;
}

@media (max-width: 980px) {
  .article-grid { grid-template-columns: 1fr 1fr; }
  .hero-feature { grid-template-columns: 200px 1fr; padding: 1.5rem 3.5rem; gap: 1.35rem; }
  .hero-feature::before, .hero-feature::after { width: 90px; opacity: .4; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--green-deep);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--gold);
    margin: 0;
  }
  .main-nav.is-open { display: flex; }
  .nav-bar { position: relative; flex-wrap: wrap; }
  .nav-tools { order: 2; }
  .article-grid { grid-template-columns: 1fr; }
  .hero-feature { grid-template-columns: 1fr; padding: 1.25rem 1.15rem; }
  .hero-feature__media { max-width: none; aspect-ratio: 16/10; }
  .hero-feature::before, .hero-feature::after { width: 48px; opacity: .25; }
  .prayer-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-links, .footer-social, .footer-copy { justify-content: center; text-align: center; }
}
