/* ===========================================================
   Finding Deen — shared stylesheet
   Warm, welcoming palette: deep green + cream + terracotta/gold
   =========================================================== */

:root {
  --color-primary: #2f5233;
  --color-primary-dark: #203a24;
  --color-primary-light: #4a7856;
  --color-accent: #c17f4e;
  --color-accent-dark: #a3653a;
  --color-gold: #d8a94e;
  --color-bg: #faf6ef;
  --color-bg-alt: #f1e8d8;
  --color-surface: #ffffff;
  --color-text: #2b2620;
  --color-text-muted: #6b6459;
  --color-border: #e4d9c3;

  --font-heading: Georgia, "Times New Roman", "Noto Naskh Arabic", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --shadow: 0 4px 18px rgba(47, 82, 51, 0.08);
  --shadow-lg: 0 12px 32px rgba(47, 82, 51, 0.14);
  --max-width: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-dark);
}

ul,
ol {
  padding-left: 1.3rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p {
  margin: 0 0 1em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-surface);
  color: var(--color-surface);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-secondary {
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
}

.btn-secondary:hover {
  background: var(--color-border);
  color: var(--color-primary-dark);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.brand:hover {
  color: var(--color-primary-dark);
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  width: 42px;
  height: 42px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-primary-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu > li > a,
.nav-menu > li > details > summary {
  font-weight: 600;
  color: var(--color-primary-dark);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.nav-menu a.active,
.nav-menu > li > a:hover,
.nav-menu > li > details > summary:hover {
  border-bottom-color: var(--color-accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::after {
  content: "\25BE";
  font-size: 0.7em;
  color: var(--color-accent-dark);
}

.nav-dropdown .dropdown-menu {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  min-width: 220px;
}

@media (min-width: 861px) {
  .nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
  }
}

.nav-dropdown .dropdown-menu li a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-weight: 500;
  color: var(--color-text);
}

.nav-dropdown .dropdown-menu li a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fdfaf3;
  padding: 5rem 1.5rem 6rem;
  background-image:
    linear-gradient(160deg, rgba(47,82,51,0.96) 0%, rgba(32,58,36,0.96) 100%),
    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='%23d8a94e' stroke-opacity='0.35' stroke-width='1'%3E%3Cpath d='M60 4 L96 30 L84 72 L36 72 L24 30 Z'/%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  color: #fff;
}

.hero p.lead {
  font-size: 1.2rem;
  color: #eee6d3;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.page-hero {
  padding: 3.5rem 1.5rem 3rem;
}

.page-hero p.lead {
  margin-bottom: 0;
}

/* ---------- Sections ---------- */
section {
  padding: 4rem 0;
}

section.alt {
  background: var(--color-bg-alt);
}

.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 46px;
  height: 46px;
  color: var(--color-accent-dark);
}

.card a.card-link {
  margin-top: auto;
  font-weight: 600;
}

/* ---------- Content pages ---------- */
.content article {
  max-width: 760px;
  margin: 0 auto;
}

.content article h2 {
  margin-top: 2.2em;
}

.content article h2:first-of-type {
  margin-top: 0;
}

.callout {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  margin: 1.6em 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.pillar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow);
}

.pillar h3 {
  color: var(--color-accent-dark);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.pillar h3 .arabic {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.step-list {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.step-list > li {
  position: relative;
  padding: 0.3rem 0 0.3rem 2.6rem;
  margin-bottom: 0.9rem;
}

.step-list > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #dfe4dc;
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: #cfd8c9;
}

.site-footer a:hover {
  color: #fff;
}

.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.4rem;
  font-size: 0.88rem;
  color: #b7c0b0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-menu.is-open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-menu > li {
    border-top: 1px solid var(--color-border);
  }

  .nav-menu > li > a,
  .nav-menu > li > details > summary {
    padding: 0.9rem 1.5rem;
  }

  .nav-dropdown .dropdown-menu {
    padding: 0 0 0.6rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   Homepage additions
   =========================================================== */
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 0.7rem;
}

.hero .eyebrow { color: var(--color-gold); }

.hero-bismillah {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-gold);
  margin: 0 0 1rem;
}

.hero-sub {
  margin-top: 1.6rem;
  font-size: 0.95rem;
  color: #d5dccf;
}

.btn-light {
  background: #fdfaf3;
  color: var(--color-primary-dark);
}
.btn-light:hover { background: #fff; color: var(--color-primary-dark); }

/* Journey / steps */
.journey {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
  counter-reset: journey;
}

.journey li {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 3.2rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
  counter-increment: journey;
}

.journey li::before {
  content: counter(journey);
  position: absolute;
  top: 1rem;
  left: 1.4rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
.journey p { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: 0.8em; }

/* Topic cards */
.card.is-soon { background: transparent; box-shadow: none; border-style: dashed; }
.card.is-soon:hover { transform: none; box-shadow: none; }
.card.is-soon .card-icon { color: var(--color-text-muted); }

.badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.badge-live { background: #e3efe2; color: var(--color-primary-dark); }

.card .soon-note { margin-top: auto; font-size: 0.9rem; color: var(--color-text-muted); }

/* City / community panel */
.city-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.city-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; }
.city-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}
.city-list svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--color-accent-dark); margin-top: 0.15rem; }
.city-list strong { display: block; }
.city-list span { color: var(--color-text-muted); font-size: 0.95rem; }

.city-card {
  background: var(--color-primary-dark);
  color: #eef1ea;
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.city-card h3 { color: #fff; font-size: 1.8rem; margin-bottom: 0.2em; }
.city-card .eyebrow { color: var(--color-gold); }
.city-card p { color: #d5dccf; margin-bottom: 0; }

/* Reassurance */
.reassure {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.reassure blockquote {
  margin: 1.5rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary-dark);
}
.reassure blockquote cite { display: block; margin-top: 0.4rem; font-size: 0.9rem; font-style: normal; color: var(--color-text-muted); }

@media (max-width: 860px) {
  .city-panel { grid-template-columns: 1fr; }
}

/* ===========================================================
   Greeting hero + suggestion form
   =========================================================== */
.hero .greeting {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.5;
  color: #fff;
  margin-bottom: 0.2em;
}

.hero .greeting-en {
  color: var(--color-gold);
  font-style: italic;
  margin: 0 0 1.4rem;
}

.suggest-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.8rem;
}

.suggest-form fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
.suggest-form legend, .suggest-form label.field-label { font-weight: 600; margin-bottom: 0.4rem; display: block; padding: 0; }
.suggest-form .hint { font-weight: 400; color: var(--color-text-muted); font-size: 0.9rem; }

.suggest-form .checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-top: 0.5rem; }
.suggest-form .checks label { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; }

.suggest-form input[type="text"],
.suggest-form input[type="email"],
.suggest-form textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text);
}

.suggest-form textarea { min-height: 150px; resize: vertical; }

.suggest-form input:focus,
.suggest-form textarea:focus,
.suggest-form button:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 1px;
}

.suggest-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.4rem; }
.suggest-form .field-row > div { min-width: 0; }
.suggest-form .btn { cursor: pointer; font: inherit; font-weight: 600; }
.suggest-form .btn[disabled] { opacity: 0.6; cursor: wait; }
.hp-field { position: absolute; left: -9999px; }

.form-status { margin: 1rem 0 0; font-weight: 600; }
.form-status.is-ok { color: var(--color-primary); }
.form-status.is-error { color: #a33a2a; }

@media (max-width: 600px) {
  .suggest-form .field-row { grid-template-columns: 1fr; }
}

/* ===========================================================
   About page layouts
   =========================================================== */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.statement {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.2;
  margin-bottom: 0;
}

.q-card { text-align: center; align-items: center; }
.q-card p { color: var(--color-text-muted); margin-bottom: 0; }
.q-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-accent-dark);
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.values-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.values-grid h3 { margin-bottom: 0.2em; }
.values-grid p { color: var(--color-text-muted); margin-bottom: 0; }

.scope-note { max-width: 760px; margin: 0 auto; }

.suggest-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.org-box {
  margin-top: 1.6rem;
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
}
.org-box h3 { font-size: 1.1rem; margin-bottom: 0.3em; }
.org-box p { margin-bottom: 0; }

#suggestions { scroll-margin-top: 70px; }

@media (max-width: 860px) {
  .split, .suggest-layout { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* ===========================================================
   Community page
   =========================================================== */
.tabs {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin: 0 auto 2.2rem;
  padding: 0.35rem;
  width: fit-content;
  background: var(--color-bg-alt);
  border-radius: 999px;
}

.tab {
  font: inherit;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: transparent;
  border: 0;
  padding: 0.6rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab:hover { background: rgba(255, 255, 255, 0.6); }
.tab[aria-selected="true"] { background: var(--color-primary); color: #fff; box-shadow: var(--shadow); }
.tab:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 2px; }

.tab-panel[hidden] { display: none; }

.masjid-card h3 { margin-bottom: 0; }
.masjid-card .eyebrow { margin-bottom: 0; }
.masjid-address { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 0.2rem; }
.masjid-about { margin-bottom: 0.4rem; }

.tag-list { list-style: none; padding: 0; margin: 0 0 0.4rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-size: 0.8rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: #e3efe2;
  color: var(--color-primary-dark);
}

.card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: auto; padding-top: 0.6rem; border-top: 1px solid var(--color-border); }
.card-actions .card-link { margin-top: 0; }

.event-list { display: grid; gap: 1.2rem; max-width: 820px; margin: 0 auto; }

.event-card {
  display: flex;
  gap: 1.4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.event-date {
  flex-shrink: 0;
  width: 4.2rem;
  height: 4.8rem;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.event-day { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; }
.event-month { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-gold); }

.event-body { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.event-body h3 { margin-bottom: 0; }
.event-body p { margin-bottom: 0.2rem; }
.event-meta { color: var(--color-text-muted); font-size: 0.95rem; }
.event-body .card-link { font-weight: 600; }

.empty-state {
  text-align: center;
  max-width: 520px;
  margin: 1rem auto;
  padding: 2rem 1.5rem;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
}
.empty-state[hidden] { display: none; }

.listing-cta { text-align: center; margin: 2.5rem 0 0; color: var(--color-text-muted); }

@media (max-width: 520px) {
  .event-card { flex-direction: column; gap: 0.9rem; }
  .event-date { width: 100%; height: auto; flex-direction: row; gap: 0.6rem; padding: 0.5rem; }
}

/* Groups tab */
.group-card h3 { margin-bottom: 0; }
.group-card .eyebrow { margin-bottom: 0; }
.group-meta { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 0.2rem; }
.group-about { margin-bottom: 0.4rem; }
