/* Al-Fateh Islamic Center — demo site design system
   Palette drawn from the mosque's stone and the ICC aesthetic:
   ivory, sand, deep teal, gold. AR (RTL, default) + EN (LTR). */

:root {
  --ivory: #faf7f0;
  --sand: #efe7d5;
  --sand-deep: #e2d6bc;
  --stone: #cbb98f;
  --teal: #0f4f43;
  --teal-deep: #0a3a31;
  --gold: #b8923e;
  --gold-soft: #d6b668;
  --ink: #26221a;
  --ink-soft: #5c5546;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(38, 34, 26, .09);
  --ar-head: "Amiri", serif;
  --ar-body: "IBM Plex Sans Arabic", sans-serif;
  --en-head: "Cormorant Garamond", serif;
  --en-body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--ar-body);
  font-size: 17px;
  line-height: 1.85;
}
html[dir="ltr"] body { font-family: var(--en-body); }
h1, h2, h3, h4 { font-family: var(--ar-head); font-weight: 700; color: var(--teal-deep); line-height: 1.45; }
html[dir="ltr"] h1, html[dir="ltr"] h2, html[dir="ltr"] h3, html[dir="ltr"] h4 { font-family: var(--en-head); }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
.container { max-width: 1140px; margin-inline: auto; padding-inline: 20px; }

/* ====== top ribbon ====== */
.ribbon {
  background: var(--teal-deep); color: #e8e2d2; font-size: 13.5px;
  padding: 7px 0; text-align: center; letter-spacing: .2px;
}
.ribbon a { color: var(--gold-soft); }

/* ====== header ====== */
header.site { background: var(--white); border-bottom: 1px solid var(--sand-deep); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { height: 48px; width: auto; }
.brand .t { font-family: var(--ar-head); font-size: 21px; font-weight: 700; color: var(--teal-deep); line-height: 1.3; }
html[dir="ltr"] .brand .t { font-family: var(--en-head); font-size: 20px; }
.brand .t small { display: block; font-family: var(--ar-body); font-size: 11.5px; color: var(--gold); letter-spacing: 1px; }
html[dir="ltr"] .brand .t small { font-family: var(--en-body); }
nav.main { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
nav.main a { color: var(--ink-soft); font-weight: 600; font-size: 15.5px; padding: 6px 2px; border-bottom: 2px solid transparent; }
nav.main a:hover, nav.main a.active { color: var(--teal); border-bottom-color: var(--gold); }
.lang-switch {
  border: 1.5px solid var(--gold); color: var(--gold) !important; border-radius: 999px;
  padding: 5px 16px !important; font-size: 14px !important; border-bottom: 1.5px solid var(--gold) !important;
}
.lang-switch:hover { background: var(--gold); color: var(--white) !important; }

/* ====== hero ====== */
.hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; isolation: isolate; }
.hero .bg { position: absolute; inset: 0; z-index: -2; }
.hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(10, 44, 37, .88) 0%, rgba(10, 44, 37, .25) 55%, rgba(10, 44, 37, .15) 100%);
}
.hero .inner { padding: 60px 0 68px; color: var(--white); }
.hero h1 { color: var(--white); font-size: clamp(34px, 5vw, 56px); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero p { max-width: 640px; font-size: 19px; color: #f0ead8; margin-top: 10px; }
.hero .gold-line { width: 86px; height: 3px; background: var(--gold-soft); margin-bottom: 18px; border-radius: 2px; }

/* ====== buttons ====== */
.btn {
  display: inline-block; border-radius: 999px; padding: 12px 30px; font-weight: 700;
  font-size: 15.5px; font-family: inherit; border: none; cursor: pointer; transition: all .18s;
}
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #a37f2f; }
.btn-ghost { border: 1.6px solid #e8e0c9; color: #f3eeda; background: rgba(255,255,255,.07); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-deep); }
.btn-outline { border: 1.6px solid var(--teal); color: var(--teal); background: transparent; }
.btn-outline:hover { background: var(--teal); color: var(--white); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* ====== sections ====== */
section { padding: 72px 0; }
section.alt { background: var(--sand); }
section.teal { background: var(--teal-deep); color: #ece5d2; }
section.teal h2, section.teal h3 { color: var(--white); }
.section-kicker { color: var(--gold); font-weight: 700; font-size: 14px; letter-spacing: 1.5px; margin-bottom: 8px; }
.section-title { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px; }
.section-lead { color: var(--ink-soft); max-width: 740px; font-size: 17.5px; margin-bottom: 36px; }
section.teal .section-lead { color: #cfc6ae; }
.orn { color: var(--gold); font-size: 22px; letter-spacing: 6px; margin-bottom: 10px; }

/* ====== grids & cards ====== */
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } .bar { flex-direction: column; padding: 12px 0; } }

.card {
  background: var(--white); border: 1px solid var(--sand-deep); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
section.alt .card { border-color: #d8cbac; }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15.5px; }
.card .icon { font-size: 30px; display: block; margin-bottom: 12px; }

.photo-card { overflow: hidden; padding: 0; }
.photo-card img { height: 230px; width: 100%; object-fit: cover; }
.photo-card .pc-body { padding: 20px 24px 24px; }

/* ====== video cards ====== */
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 920px) { .vgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .vgrid { grid-template-columns: 1fr; } }
.vcard {
  background: var(--white); border: 1px solid var(--sand-deep); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .18s;
}
.vcard:hover { transform: translateY(-4px); }
.vcard .thumb { position: relative; aspect-ratio: 16/9; background: var(--teal-deep); }
.vcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vcard .thumb .dur {
  position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(8, 40, 33, .85);
  color: #fff; font-size: 12.5px; padding: 2px 9px; border-radius: 6px; font-family: var(--en-body);
}
.vcard .thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.vcard .thumb .play span {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(184, 146, 62, .92);
  display: grid; place-items: center; color: #fff; font-size: 20px; padding-inline-start: 4px;
  transition: transform .18s;
}
.vcard:hover .play span { transform: scale(1.1); }
.vcard .vc-body { padding: 16px 18px 18px; }
.vcard .vc-body .ttl { font-weight: 700; color: var(--teal-deep); font-size: 15.5px; line-height: 1.7; max-height: 3.4em; overflow: hidden; }
.vcard .vc-body .meta { color: var(--ink-soft); font-size: 13px; margin-top: 8px; }

/* ====== timetable / info list ====== */
.info-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.info-table th, .info-table td { padding: 14px 20px; border-bottom: 1px solid var(--sand); text-align: start; }
.info-table th { background: var(--teal); color: #fff; font-weight: 700; font-size: 15px; }
.info-table tr:last-child td { border-bottom: none; }
.rule-list { list-style: none; display: grid; gap: 12px; }
.rule-list li {
  background: var(--white); border-inline-start: 4px solid var(--gold); border-radius: 10px;
  padding: 14px 20px; box-shadow: var(--shadow); color: var(--ink-soft); font-size: 15.5px;
}

/* ====== FAQ ====== */
details.faq {
  background: var(--white); border: 1px solid var(--sand-deep); border-radius: 12px;
  padding: 0; margin-bottom: 12px; overflow: hidden;
}
details.faq summary {
  cursor: pointer; font-weight: 700; color: var(--teal-deep); padding: 16px 22px; font-size: 16.5px;
  list-style: none; position: relative;
}
details.faq summary::after { content: "+"; color: var(--gold); position: absolute; inset-inline-end: 20px; font-size: 21px; }
details.faq[open] summary::after { content: "–"; }
details.faq .a { padding: 0 22px 18px; color: var(--ink-soft); font-size: 15.5px; }

/* ====== forms ====== */
.form-card { max-width: 660px; margin-inline: auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 7px; color: var(--teal-deep); }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--sand-deep); background: var(--ivory); border-radius: 10px;
  padding: 11px 15px; font-family: inherit; font-size: 15.5px; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label {
  border: 1.5px solid var(--sand-deep); border-radius: 999px; padding: 8px 18px; cursor: pointer;
  font-size: 14.5px; color: var(--ink-soft); background: var(--white);
}
.radio-row input { display: none; }
.radio-row input:checked + span { color: var(--teal); font-weight: 700; }
.radio-row label:has(input:checked) { border-color: var(--gold); background: #fdf6e7; }
.form-ok {
  display: none; background: #eaf5ee; border: 1.5px solid #bfdcc8; color: #1c5c33;
  border-radius: 12px; padding: 22px; text-align: center; font-weight: 700;
}
.demo-note { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 14px; }

/* ====== stats ====== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; background: rgba(255,255,255,.06); border: 1px solid rgba(214,182,104,.3); border-radius: var(--radius); padding: 26px 12px; }
.stat .num { font-family: var(--ar-head); font-size: 40px; color: var(--gold-soft); }
html[dir="ltr"] .stat .num { font-family: var(--en-head); }
.stat .lbl { font-size: 14px; color: #d8d0ba; margin-top: 4px; }

/* ====== prayer times widget ====== */
.ptimes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 760px) { .ptimes { grid-template-columns: repeat(3, 1fr); } }
.pt { background: var(--white); border: 1px solid var(--sand-deep); border-radius: 12px; text-align: center; padding: 16px 6px; box-shadow: var(--shadow); }
.pt .n { font-weight: 700; color: var(--teal-deep); font-size: 15px; }
.pt .t { font-family: var(--en-body); font-size: 19px; color: var(--gold); font-weight: 700; margin-top: 3px; }

/* ====== manager ====== */
.manager { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
@media (max-width: 760px) { .manager { grid-template-columns: 1fr; } }
.manager img { border-radius: var(--radius); box-shadow: var(--shadow); border: 5px solid var(--white); }
.manager blockquote { font-family: var(--ar-head); font-size: 21px; color: var(--teal-deep); line-height: 2; }
html[dir="ltr"] .manager blockquote { font-family: var(--en-head); }
.manager .who { margin-top: 14px; color: var(--gold); font-weight: 700; }

/* ====== gallery strip ====== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery img { border-radius: 12px; height: 180px; width: 100%; object-fit: cover; box-shadow: var(--shadow); }

/* ====== footer ====== */
footer.site { background: var(--teal-deep); color: #cfc6ae; padding: 54px 0 30px; margin-top: 0; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; }
@media (max-width: 760px) { footer .cols { grid-template-columns: 1fr 1fr; } }
footer h4 { color: var(--gold-soft); font-size: 16px; margin-bottom: 14px; }
footer a { display: block; color: #cfc6ae; font-size: 14.5px; margin-bottom: 9px; }
footer a:hover { color: var(--white); }
footer .fine { border-top: 1px solid rgba(214,182,104,.25); margin-top: 38px; padding-top: 20px; font-size: 13px; text-align: center; color: #9d947c; }
.social { display: flex; gap: 12px; margin-top: 12px; }
.social a {
  width: 38px; height: 38px; border: 1.5px solid rgba(214,182,104,.5); border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; margin-bottom: 0;
}
.social a:hover { background: var(--gold); border-color: var(--gold); }

/* page hero (inner pages) */
.page-hero { background: var(--teal-deep); padding: 56px 0 48px; color: var(--white); position: relative; overflow: hidden; }
.page-hero h1 { color: var(--white); font-size: clamp(30px, 4vw, 44px); }
.page-hero p { color: #cfc6ae; max-width: 700px; margin-top: 8px; }
.page-hero .pattern { position: absolute; inset-inline-end: -40px; top: -40px; opacity: .12; font-size: 240px; color: var(--gold-soft); pointer-events: none; }
