/* ============================================================
   Muslims in Bay Area — Baitus Salaam Mosque
   Public site stylesheet (separate from dashboard)
   ============================================================ */

:root {
    /* Deep Teal & Champagne palette — WCAG AA verified */
    --navy-900: #0a4047;        /* teal deepest — primary brand */
    --navy-800: #0e545c;        /* teal dark */
    --navy-700: #136d75;        /* teal mid (button bg) */
    --navy-50: #e6f0f0;         /* teal tint */
    --green: #136d75;
    --green-deep: #0a4047;
    --gold: #b89968;            /* champagne — for backgrounds & borders */
    --gold-text: #7a5a2e;       /* deeper bronze — for TEXT uses (5.8:1 on white, AA pass) */
    --gold-soft: #d4b988;       /* light champagne — text on dark bg only */
    --cream: #faf7f0;
    --bg: #fbf9f3;
    --bg-soft: #f1ecdf;
    --announcement: #c2410c;
    --text: #1a2933;            /* slightly warmer dark for body */
    --text-muted: #5a6770;      /* 5.4:1 on white — AA pass */
    --text-soft: #6f7d86;       /* 4.6:1 on white — AA pass */
    --border: #e5dfd1;
    --shadow-sm: 0 2px 8px rgba(10, 64, 71, 0.06);
    --shadow-md: 0 12px 32px rgba(10, 64, 71, 0.10);
    --shadow-lg: 0 24px 64px rgba(10, 64, 71, 0.16);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --container: 1480px;
    --container-narrow: 920px;
    --gutter: 36px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    /* Prevent rogue horizontal scroll without breaking position: sticky.
       overflow-x: hidden establishes a scroll container that breaks sticky
       in Safari; overflow-x: clip does not. Hidden is fallback for old browsers. */
    overflow-x: hidden;
    overflow-x: clip;
}

a { color: var(--navy-800); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--gold-text); }

/* Accessible focus ring for keyboard navigation — required for ADA */
:focus-visible {
    outline: 2px solid var(--gold-text);
    outline-offset: 2px;
    border-radius: 4px;
}
.btn:focus-visible,
.nav a:focus-visible,
.header-phone:focus-visible {
    outline-offset: 3px;
}

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

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy-900);
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; }

.eyebrow {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold-text);
    margin-bottom: 0.6em;
    display: inline-block;
}

.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.65;
}

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

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

section { padding: clamp(40px, 6vw, 84px) 0; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    height: 60px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-phone {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.header-phone:hover { color: var(--gold-text); }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--navy-900);
}
.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
    /* Uses background-image so a missing file fails silently
       (no broken-image glyph) — bg color shows until PNG saved */
    background-color: var(--green-deep);
    background-image: url('../img/amc-logo.avif');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.site-footer .brand-mark { width: 44px; height: 44px; }

.partner-logo {
    height: 56px;
    width: auto;
    display: block;
}
.partner-card {
    display: flex;
    align-items: center;
    gap: 22px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    box-shadow: var(--shadow-sm);
}
.partner-card .partner-text { color: var(--text-muted); font-size: 0.95rem; }
.partner-card .partner-text strong { color: var(--navy-900); display: block; margin-bottom: 2px; font-family: 'Inter', sans-serif; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy-900);
}
.brand-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-soft);
    font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 1px; }
.nav a {
    padding: 7px 11px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-sm);
}
.nav a:hover { color: var(--gold-text); background: var(--bg-soft); }
.nav a.active { color: var(--gold-text); }

.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: 1px;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
    animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.video-embed {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #000;
}
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    place-items: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--navy-900);
    position: relative;
    transition: transform 0.2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--navy-900);
    color: white;
    border-color: var(--navy-900);
}
.btn-primary:hover {
    background: var(--navy-800);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-gold {
    background: var(--gold);
    color: var(--navy-900);
    border-color: var(--gold);
    font-weight: 700;
}
.btn-gold:hover {
    background: var(--gold-text);
    color: #ffffff;
    border-color: var(--gold-text);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-green {
    background: var(--green);
    color: white;
    border-color: var(--green);
}
.btn-green:hover {
    background: var(--green-deep);
    color: white;
    border-color: var(--green-deep);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-ghost {
    background: transparent;
    color: var(--navy-900);
    border-color: var(--navy-900);
}
.btn-ghost:hover { background: var(--navy-900); color: white; }
.btn-ghost.on-dark { color: white; border-color: rgba(255,255,255,0.5); }
.btn-ghost.on-dark:hover { background: white; color: var(--navy-900); border-color: white; }

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
.announcement-bar {
    background: var(--announcement);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}
.announcement-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-right: 56px;
}
.announcement-bar a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}
.announcement-bar a:hover { color: white; opacity: 0.85; }
.announcement-close {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.85;
    font-size: 1.4rem;
    line-height: 1;
    padding: 4px 8px;
}
.announcement-close:hover { opacity: 1; }

/* ============================================================
   HERO — layered: photo (fallback) → video → teal overlay → champagne highlights → content
   ============================================================ */
.hero {
    position: relative;
    color: white;
    overflow: hidden;
    isolation: isolate;
    /* Photo poster — visible behind video, and the entire fallback when video is hidden */
    background:
        url('../img/og-cover.webp') center/cover no-repeat,
        linear-gradient(135deg, #136d75 0%, #0a4047 100%);
}

/* Video layer */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* Dark teal overlay — readable white text */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg, rgba(10, 64, 71, 0.88) 0%, rgba(10, 64, 71, 0.55) 55%, rgba(10, 64, 71, 0.78) 100%);
}

/* Champagne highlights for warmth */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    background-image:
        radial-gradient(circle at 88% 8%, rgba(212, 185, 136, 0.18) 0, transparent 32%),
        radial-gradient(circle at 12% 92%, rgba(212, 185, 136, 0.12) 0, transparent 38%),
        radial-gradient(circle at 50% 100%, rgba(10, 64, 71, 0.6) 0, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 4;
}

/* Mobile + reduced-motion users: hide video, photo poster takes over */
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
    .hero-video { display: none; }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 72px;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero-inner { max-width: 640px; }
.hero h1 {
    color: white;
    margin-bottom: 0.15em;
    font-size: clamp(2.5rem, 5.2vw, 4rem);
    font-weight: 600;
    line-height: 1.05;
}
.hero-subhead {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    color: var(--gold-soft);
    font-weight: 500;
    font-style: italic;
    margin-bottom: 1.2em;
}
.hero .lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    max-width: 580px;
    margin-bottom: 1.8em;
    line-height: 1.6;
}
.hero .lead em { font-style: italic; color: var(--gold-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 0; }

.pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 100px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 28px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    column-gap: clamp(28px, 5vw, 64px);
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-stat .num {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 700;
    color: white;
    line-height: 1;
    letter-spacing: -0.01em;
}
.hero-stat .label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.62);
    margin-top: 6px;
    letter-spacing: 0.04em;
}

/* Hero-side Prayer Card (floats right of hero text)
   Light card on dark hero — high contrast, "callout" feel */
.hero-prayer-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    color: var(--text);
}
.hero-prayer-card .hpc-header {
    background: var(--green-deep);
    color: white;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.hero-prayer-card .hpc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.05rem;
}
.hero-prayer-card .hpc-meta { text-align: right; line-height: 1.2; }
.hero-prayer-card .hpc-date {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.62);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.hero-prayer-card .hpc-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--gold-soft);
    margin-top: 3px;
}
.hero-prayer-card .hpc-countdown {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
}
.hero-prayer-card .hpc-next {
    background: rgba(212, 185, 136, 0.22);
    border-bottom: 1px solid var(--border);
    padding: 13px 22px;
    font-size: 0.9rem;
    color: var(--gold-text);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.hero-prayer-card .hpc-next strong { color: var(--navy-900); font-weight: 700; }
.hero-prayer-card .hpc-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}
.hero-prayer-card .hpc-row:last-of-type { border-bottom: none; }
.hero-prayer-card .hpc-row:hover { background: var(--bg-soft); }
.hero-prayer-card .hpc-row.next { background: rgba(212, 185, 136, 0.18); }
.hero-prayer-card .hpc-row.next .hpc-time { color: var(--gold-text); }
.hero-prayer-card .hpc-row.next .hpc-name { color: var(--navy-900); }
.hero-prayer-card .hpc-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--navy-900);
}
.hero-prayer-card .hpc-arabic {
    font-family: 'Amiri', serif;
    font-size: 0.88rem;
    color: var(--text-soft);
    margin-top: 2px;
    direction: rtl;
}
.hero-prayer-card .hpc-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--navy-900);
    font-size: 1.05rem;
}
.hero-prayer-card .hpc-footer {
    padding: 14px 22px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
}
.hero-prayer-card .hpc-footer a {
    color: var(--gold-text);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.hero-prayer-card .hpc-footer a:hover { color: var(--navy-900); }
.hero-prayer-card .hpc-footer .sublabel {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.hero-directions {
    margin-top: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero-directions:hover {
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}
.hero-directions .gd-icon {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: rgba(184, 153, 104, 0.18);
    border-radius: 50%;
    color: var(--gold-text);
    font-size: 1.1rem;
}
.hero-directions .gd-text { flex: 1; }
.hero-directions .gd-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; color: var(--navy-900); }
.hero-directions .gd-addr { font-size: 0.82rem; color: var(--text-muted); }
.hero-directions .gd-arrow { color: var(--text-soft); font-size: 1.2rem; }

.page-hero {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    color: white;
    padding: 56px 0 48px;
    position: relative;
}
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(212, 185, 136, 0.18), transparent 50%);
    pointer-events: none;
}
.page-hero h1 { color: white; margin-bottom: 0.3em; }
.page-hero .lead { color: rgba(255,255,255,0.85); max-width: 640px; }
.page-hero .container { position: relative; z-index: 1; }

/* ============================================================
   PRAYER TIMES CARD (homepage + prayer-times page)
   ============================================================ */
.prayer-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.prayer-card-header {
    background: var(--navy-900);
    color: white;
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.prayer-card-header h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}
.prayer-card-header .today {
    font-size: 0.85rem;
    color: var(--gold-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}
.prayer-card-body { padding: 8px 0; }
.prayer-card-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border);
    transition: background 0.18s ease;
}
.prayer-card-row:last-child { border-bottom: none; }
.prayer-card-row:hover { background: var(--bg-soft); }
.prayer-card-row.next { background: rgba(184, 153, 104, 0.08); }
.prayer-card-row.next .prayer-card-time { color: var(--gold-text); }

.prayer-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}
.prayer-card-name {
    font-weight: 600;
    color: var(--navy-900);
}
.prayer-card-name small {
    display: block;
    font-weight: 400;
    color: var(--text-soft);
    font-size: 0.78rem;
    margin-top: 2px;
}
.prayer-card-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--navy-800);
    font-size: 1.05rem;
}
.prayer-card-footer {
    padding: 16px 28px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================
   SECTIONS / CARDS / FEATURES
   ============================================================ */
.section-bg-soft { background: var(--bg-soft); }
.section-bg-cream { background: var(--cream); }

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(40px, 6vw, 64px);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    align-items: center;
}

.feature {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-soft);
}
.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
    color: white;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
}
.feature h3 { margin-bottom: 10px; }
.feature p { color: var(--text-muted); margin: 0; }
.feature > a:not(.btn) {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--gold-text);
}
.feature > a:not(.btn):hover { color: var(--navy-900); }

/* Photo gallery grid — used on community page */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.photo-gallery > .photo {
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: var(--navy-900);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}
.photo-gallery > .photo:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}
.photo-gallery > .photo--wide { grid-column: span 2; }

@media (max-width: 760px) {
    .photo-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .photo-gallery > .photo--wide { grid-column: span 2; }
}

/* Two-column split (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-img {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: grid;
    place-items: center;
    color: rgba(255,255,255,0.4);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    overflow: hidden;
    position: relative;
}
.split-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(214,168,91,0.25), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,0.06), transparent 60%);
}
.split-img span { position: relative; z-index: 1; opacity: 0.6; }

/* Photo-backed split-img — used when an actual image replaces the placeholder gradient */
.split-img.has-photo {
    background-size: cover;
    background-position: center;
    background-color: var(--navy-900);
}
.split-img.has-photo::before { display: none; }
.split-img.has-photo span { display: none; }

/* Event list */
.event-list { display: grid; gap: 16px; }
.event {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 24px;
    padding: 22px 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.event:hover {
    border-color: var(--gold-soft);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}
.event.highlighted {
    border-color: rgba(184, 153, 104, 0.5);
    background: linear-gradient(to right, rgba(212, 185, 136, 0.08), white 60%);
}
.event.highlighted .event-date { background: rgba(184, 153, 104, 0.18); }
.event.highlighted .event-date .day { color: var(--gold-text); }
.event-date {
    text-align: center;
    background: var(--navy-50);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
}
.event-date .month {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold-text);
    font-weight: 700;
}
.event-date .day {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: var(--navy-900);
    font-weight: 700;
    line-height: 1;
}
.event-body h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0 0 4px;
    color: var(--navy-900);
}
.event-body .meta { color: var(--text-muted); font-size: 0.9rem; }

/* Testimonial */
.testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.testimonial {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
}
.testimonial::before {
    content: '\201C';
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    color: var(--gold-soft);
    position: absolute;
    top: -12px;
    left: 18px;
    line-height: 1;
}
.testimonial p {
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.6;
}
.testimonial .who {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
}
.testimonial .stars { color: var(--gold-text); margin-bottom: 8px; letter-spacing: 2px; }

/* CTA band */
.cta-band {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    color: white;
    text-align: center;
    padding: clamp(60px, 9vw, 96px) 0;
    position: relative;
    overflow: hidden;
}
.cta-band::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(214,168,91,0.18), transparent 60%);
    pointer-events: none;
}
.cta-band h2 { color: white; margin-bottom: 0.4em; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 640px; margin: 0 auto 1.8em; font-size: 1.1rem; }
.cta-band .container { position: relative; z-index: 1; }

/* Map placeholder */
.map-placeholder {
    aspect-ratio: 16 / 7;
    background:
        linear-gradient(135deg, rgba(184,137,58,0.08), rgba(10,37,64,0.04)),
        var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    color: var(--text-soft);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--navy-900);
    color: rgba(255, 255, 255, 0.75);
    padding: 64px 0 28px;
    font-size: 0.92rem;
}
.site-footer h4 {
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    margin-bottom: 18px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.footer-grid a {
    color: rgba(255,255,255,0.75);
    display: block;
    padding: 4px 0;
}
.footer-grid a:hover { color: var(--gold-soft); }
.footer-brand { max-width: 320px; }
.footer-brand p { margin-top: 12px; line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
}
.footer-bottom .arabic {
    font-family: 'Amiri', serif;
    color: var(--gold-soft);
    font-size: 1rem;
}

/* ============================================================
   FORMS (contact)
   ============================================================ */
.form-grid { display: grid; gap: 18px; }
.form-grid .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-900);
    margin-bottom: 6px;
}
.field input, .field textarea, .field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.96rem;
    color: var(--text);
    background: white;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184,137,58,0.15);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .grid-3, .testimonials { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .split { grid-template-columns: 1fr; gap: 32px; }
    .hero .container { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; padding-bottom: 56px; }
    .hero-prayer-card { max-width: 480px; }
}
@media (max-width: 760px) {
    /* Tighter gutters on phones */
    :root { --gutter: 20px; }

    /* Nav */
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); flex-direction: column; padding: 12px 16px; box-shadow: var(--shadow-md); }
    .nav.open { display: flex; align-items: stretch; gap: 0; }
    .nav.open a { padding: 14px 12px; border-bottom: 1px solid var(--border); border-radius: 0; }
    .nav.open a:last-child { border-bottom: none; }
    .nav-toggle { display: grid; }
    .site-header { position: relative; }
    .site-header .container { height: 60px; gap: 12px; }
    .header-phone, .header-cta { display: none; }

    /* Brand: tighten so it doesn't compete with the toggle */
    .brand { gap: 10px; min-width: 0; }
    .brand-mark { width: 36px; height: 36px; }
    .brand-name { font-size: 1.15rem; }
    .brand-sub { font-size: 0.62rem; letter-spacing: 0.12em; }

    /* Announcement bar tighter on phones */
    .announcement-bar { font-size: 0.82rem; padding: 8px 0; }
    .announcement-bar .container { gap: 8px; padding-right: 40px; }
    .announcement-close { right: 12px; }

    /* Hero — tighten everything for 360–480px viewports */
    .hero .container { padding-top: 36px; padding-bottom: 36px; gap: 28px; }
    .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.1; }
    .hero-subhead { font-size: clamp(1.2rem, 4.5vw, 1.55rem); margin-bottom: 1em; }
    .hero .lead { font-size: 1rem; margin-bottom: 1.4em; }
    .hero-cta { gap: 10px; }
    .hero-cta .btn { padding: 11px 18px; font-size: 0.9rem; flex: 1 1 auto; min-width: 140px; }
    .pill-tag { font-size: 0.66rem; padding: 6px 14px; letter-spacing: 0.1em; margin-bottom: 20px; }

    /* Hero stats: 3 wide doesn't fit; 2 across with one stat full-width */
    .hero-stats {
        grid-template-columns: 1fr 1fr;
        column-gap: 16px;
        row-gap: 18px;
        margin-top: 28px;
        padding-top: 22px;
    }
    .hero-stat { min-width: 0; }
    .hero-stat:first-child { grid-column: 1 / -1; }
    .hero-stat .num { font-size: 1.5rem; }
    .hero-stat .label { font-size: 0.72rem; }

    /* Hero prayer card mobile cleanup */
    .hero-prayer-card .hpc-header { padding: 14px 16px; }
    .hero-prayer-card .hpc-row { padding: 12px 16px; }
    .hero-prayer-card .hpc-next { padding: 10px 16px; font-size: 0.85rem; }
    .hero-prayer-card .hpc-name { font-size: 0.95rem; }
    .hero-prayer-card .hpc-time { font-size: 1rem; }
    .hero-prayer-card .hpc-clock { font-size: 0.95rem; }
    .hero-prayer-card .hpc-footer { padding: 12px 16px; }
    .hero-directions { padding: 14px 16px; gap: 12px; }
    .hero-directions .gd-icon { width: 32px; height: 32px; }
    .hero-directions .gd-addr { font-size: 0.78rem; }

    /* Page-hero (inner pages) */
    .page-hero { padding: 40px 0 36px; }
    .page-hero h1 { font-size: clamp(1.75rem, 7vw, 2.4rem); }

    /* Section grids */
    .grid-3, .testimonials { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .form-grid .row { grid-template-columns: 1fr; }
    .event { grid-template-columns: 70px 1fr; row-gap: 8px; }
    .event > .btn { grid-column: 1 / -1; justify-self: start; }
    .prayer-card-row { padding: 14px 18px; gap: 12px; }
    .prayer-card-header { padding: 18px 18px; }

    /* CTA band & section heads */
    .cta-band h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
    .section-head { margin-bottom: 32px; }
}

@media (max-width: 480px) {
    /* Very narrow phones — squeeze further */
    .brand-sub { display: none; }
    .hero h1 { font-size: clamp(1.85rem, 8.5vw, 2.4rem); }
    .hero-stat:first-child { grid-column: auto; }
    .hero-stats { grid-template-columns: 1fr; row-gap: 12px; }
    .hero-cta .btn { width: 100%; flex: 1 1 100%; min-width: 0; }
    .testimonial { padding: 22px; }
    .feature { padding: 24px 20px; }
}
