/* Churches of Lebanon — church page. Mobile-first, RTL-aware (logical properties). */

:root {
  --navy: #1e3a5f;
  --navy-deep: #12253d;
  --blue: #3d6b9e;
  --gold: #b8863b;
  --gold-soft: #e6c66a;
  --cream: #f7f2e7;
  --ink: #23282e;
  --muted: #6a7178;
  --line: #e4dccb;
  --bg: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(18, 37, 61, 0.10);
  --header-h: 56px;
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Kufi Arabic",
    "Noto Sans Arabic", Arial, sans-serif;
  --serif: Georgia, "Amiri", "Noto Naskh Arabic", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 0.4em; }
a { color: var(--blue); }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  inset-inline-start: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 200;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------- Header / menu ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-inline: 1rem;
  max-width: var(--wrap);
  margin-inline: auto;
}
.brand {
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: transparent;
  border: 1px solid rgba(247, 242, 231, 0.4);
  border-radius: 10px;
  cursor: pointer;
}
.menu-toggle span {
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 1rem 1rem;
  background: var(--navy-deep);
  max-width: var(--wrap);
  margin-inline: auto;
}
.menu.is-open { display: flex; }
.menu a {
  color: var(--cream);
  text-decoration: none;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
}
.menu a:hover { background: rgba(255, 255, 255, 0.08); }

.lang-toggle {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(247, 242, 231, 0.15);
}
.lang-item {
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  border: 1px solid rgba(247, 242, 231, 0.3);
}
.lang-item.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #23180a;
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-deep);
  overflow: hidden;
}
.hero-track { position: relative; }
.hero-slide img {
  width: 100%;
  height: min(72vh, 560px);
  object-fit: cover;
}
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(18, 37, 61, 0.55);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.hero-nav.prev { inset-inline-start: 0.6rem; }
.hero-nav.next { inset-inline-end: 0.6rem; }
.hero-dots {
  position: absolute;
  inset-block-end: 5.2rem;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
}
.hero-dot.is-active { background: var(--gold-soft); }
.hero-overlay {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  padding: 2.5rem 1.2rem 1.2rem;
  background: linear-gradient(to top, rgba(18, 37, 61, 0.9), transparent);
  color: var(--cream);
}
.hero-overlay h1 { color: #fff; font-size: clamp(1.5rem, 5vw, 2.6rem); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.95rem;
}
.hero-meta .dot { opacity: 0.6; }
.sect-badge {
  background: var(--gold);
  color: #23180a;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}
.sect-badge.pending { background: #d8a34a; }

/* ---------- Sections ---------- */
.section {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 2.4rem 1.2rem;
  scroll-margin-top: calc(var(--header-h) + 8px);
}
.section-alt { background: var(--cream); max-width: none; }
.section-alt > * { max-width: var(--wrap); margin-inline: auto; }
.section-title {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  color: var(--navy);
  position: relative;
  padding-block-end: 0.4rem;
  margin-block-end: 1.4rem;
}
.section-title::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 3rem;
  height: 3px;
  background: var(--gold);
  border-radius: 3px;
}

/* Features */
.feature-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.feature-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-body { padding: 1rem 1.1rem 1.2rem; }
.feature-body h3 { color: var(--navy); font-size: 1.15rem; }

/* Highlights */
.highlight-list { display: grid; gap: 1.2rem; }
.highlight {
  display: grid;
  gap: 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.highlight-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.highlight-body { padding: 0 1.1rem 1.1rem; }
.highlight:not(.has-img) .highlight-body { padding-top: 1.1rem; }
.highlight-body h3 { color: var(--navy); }

/* Times */
.times-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.times-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.times-day { font-weight: 700; color: var(--navy); }
.times-slots { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.slot { color: var(--ink); }
.slot strong { color: var(--gold); font-variant-numeric: tabular-nums; }

/* Events */
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.event {
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border-inline-start: 4px solid var(--gold);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.event-date { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.event-body h3 { font-size: 1.1rem; color: var(--navy); }

/* Contact */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn:hover { background: var(--blue); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* Location + map */
.location-grid { display: grid; gap: 1.2rem; }
.map {
  width: 100%;
  height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  z-index: 0;
}
.address-text { font-size: 1.05rem; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: var(--cream);
  padding: 1.8rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
}
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.report-link { font-weight: 600; }
.fineprint { color: rgba(247, 242, 231, 0.7); font-size: 0.85rem; margin: 0; }

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .menu {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    padding: 0 1rem 0.5rem;
  }
  .menu-toggle { display: none; }
  .lang-toggle { margin: 0 0 0 auto; border: none; padding: 0; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .highlight.has-img { grid-template-columns: 1fr 1.2fr; align-items: stretch; }
  .highlight.has-img .highlight-img img { height: 100%; }
  .highlight.has-img .highlight-body { padding: 1.2rem 1.2rem 1.2rem 0; }
  .times-row { grid-template-columns: 180px 1fr; align-items: baseline; }
  .location-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .map { height: 380px; }
  .site-footer { flex-direction: row; align-items: center; gap: 1.4rem; }
  .fineprint { margin-inline-start: auto; }
}
@media (min-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- RTL fixes (logical props cover most; these are the exceptions) ---------- */
[dir="rtl"] .menu.is-open { text-align: right; }
[dir="rtl"] .event { border-inline-start: 4px solid var(--gold); }
[dir="rtl"] .hero-nav.prev { transform: translateY(-50%) scaleX(-1); }
[dir="rtl"] .hero-nav.next { transform: translateY(-50%) scaleX(-1); }
@media (min-width: 720px) {
  [dir="rtl"] .lang-toggle { margin: 0 auto 0 0; }
  [dir="rtl"] .highlight.has-img .highlight-body { padding: 1.2rem 0 1.2rem 1.2rem; }
  [dir="rtl"] .fineprint { margin-inline-start: auto; }
}
