/* =========================================================
   Bayt-ul-Aleem Foundation -- shared stylesheet
   Design tokens
   ========================================================= */

:root {
  --teal-900: #0B4A3F;
  --teal-800: #0E5A4B;
  --teal-700: #14634F;
  --teal-500: #1D8570;
  --teal-100: #E1EDE8;

  --gold-600: #A87A2A;
  --gold-500: #C6963A;
  --gold-300: #E4C878;
  --gold-100: #F6ECD3;

  --sand: #EDE3C8;
  --sand-light: #F5EFDD;
  --paper: #F2F6F3;
  --white: #FFFFFF;

  --ink: #142420;
  --ink-soft: #3E534D;
  --ink-faint: #6C8079;
  --border: #D8E1DA;
  --border-strong: #B9C9C1;

  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1180px;
  --radius: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--teal-900);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--gold-600); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

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

svg { max-width: 100%; height: auto; display: block; }
.star-mark { width: 1em; height: 1em; }

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

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-block;
  margin-bottom: 0.9em;
}

/* ---------- Star motif (signature element) ---------- */
.star-mark {
  fill: currentColor;
}

/* ---------- Navigation ---------- */
.site-header {
  background: var(--teal-900);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand svg { width: 30px; height: 30px; color: var(--gold-300); }
.brand span small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-100);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--teal-100);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--gold-500);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-gold {
  background: var(--gold-500);
  color: var(--teal-900);
}
.btn-gold:hover { background: var(--gold-300); color: var(--teal-900); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: var(--white); color: var(--white); }

.btn-teal {
  background: var(--teal-700);
  color: var(--white);
}
.btn-teal:hover { background: var(--teal-500); color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--teal-900);
  color: var(--white);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0.08;
  pointer-events: none;
}

@media print {
  .hero-pattern, .nav-toggle { display: none !important; }
  .hero { background: var(--teal-900) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .star-mark, .icon, .stage-icon { width: 20px !important; height: 20px !important; }
  section { padding: 32px 0; }
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 28px 88px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 { color: var(--white); margin-bottom: 0.4em; }
.hero .lede {
  color: var(--teal-100);
  font-size: 1.15rem;
  max-width: 46ch;
  margin-bottom: 1.8em;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art svg { width: 100%; max-width: 360px; height: auto; }

.hero-small {
  padding: 64px 28px 56px;
}
.hero-small .hero-inner {
  grid-template-columns: 1fr;
  padding: 0;
  text-align: left;
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--sand-light); }
.section-teal {
  background: var(--teal-900);
  color: var(--white);
}
.section-teal h2, .section-teal h3 { color: var(--white); }
.section-teal p { color: var(--teal-100); }

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.pillar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.pillar-card .icon {
  width: 46px; height: 46px;
  color: var(--teal-700);
  margin-bottom: 18px;
}
.pillar-card h3 { margin-bottom: 0.4em; }
.pillar-card p { margin-bottom: 0; font-size: 0.96rem; }

/* ---------- Journey / stages (services page signature) ---------- */
.journey {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stage {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 38px 0;
  border-top: 1px solid var(--border-strong);
}
.stage:last-child { border-bottom: 1px solid var(--border-strong); }

.stage-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1;
}

.stage-body h3 { margin-bottom: 0.35em; }
.stage-body .stage-icon {
  width: 34px; height: 34px;
  color: var(--teal-700);
  margin-bottom: 12px;
}

/* ---------- Quote / verse block ---------- */
.verse {
  border-left: 4px solid var(--gold-500);
  padding: 6px 0 6px 28px;
  max-width: 720px;
}
.verse p.arabic {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.5em;
  direction: rtl;
}
.verse p.translation {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--teal-100);
  margin-bottom: 0.5em;
}
.verse cite {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gold-300);
  letter-spacing: 0.04em;
}

/* ---------- Team ---------- */
.team-card {
  text-align: center;
}
.team-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  overflow: hidden;
}
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-avatar svg { width: 42px; height: 42px; }
.team-card h3 { margin-bottom: 0.2em; font-size: 1.1rem; }
.team-role {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 0.6em;
  display: block;
}

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0;
}
.stat { text-align: center; }
.stat .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--teal-800);
}
.stat .label {
  font-size: 0.85rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Photo placeholder blocks ---------- */
.photo-block {
  background: var(--teal-100);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--teal-700);
  text-align: center;
  padding: 20px;
}
.photo-block svg { width: 40px; height: 40px; opacity: 0.7; }
.photo-block span {
  font-size: 0.78rem;
  color: var(--ink-faint);
  max-width: 22ch;
}

/* ---------- Divider star ---------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 48px;
  color: var(--border-strong);
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  background: var(--border-strong);
  flex: 1;
  max-width: 140px;
}
.divider svg { width: 18px; height: 18px; color: var(--gold-500); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.96rem;
  background: var(--white);
  color: var(--ink);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--teal-500);
  outline-offset: 1px;
}
.form-note {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: -8px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.contact-info-item:last-child { border-bottom: 1px solid var(--border); }
.contact-info-item svg {
  width: 22px; height: 22px;
  color: var(--teal-700);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-info-item h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.contact-info-item p { margin: 0; font-size: 0.92rem; }

.map-placeholder {
  background: var(--teal-100);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-700);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 24px;
  padding: 20px;
}

/* ---------- Gallery ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-tab {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
}
.filter-tab:hover { border-color: var(--teal-500); color: var(--teal-700); }
.filter-tab-active {
  background: var(--teal-900);
  border-color: var(--teal-900);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.gallery-item {
  margin: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.gallery-item figcaption {
  padding: 12px 14px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 18, 0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox-open { display: flex; }
.lightbox-content {
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius);
}
.lightbox-content figcaption {
  color: var(--teal-100);
  font-size: 0.92rem;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-900);
  color: var(--teal-100);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand svg { width: 26px; height: 26px; color: var(--gold-300); }
.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 1.05rem;
}
.site-footer p { color: var(--teal-100); }
.footer-col h4 {
  font-family: var(--font-body);
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--teal-100); font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold-300); }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(225, 237, 232, 0.65);
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 24px; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 220px; }

  .nav-links { display: none; }
  .nav-links-open {
    display: flex !important;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--teal-900);
    flex-direction: column;
    padding: 20px 28px 28px;
    gap: 18px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.18);
  }
  .nav-toggle { display: block; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 60px 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
