/* فريق الأمل العُماني — واجهة الموقع الرسمية (v2)
   هاتف أولاً • RTL/LTR بخصائص منطقية • بلا خطوط أو أصول خارجية • ألوان الهوية مأخوذة بالعينة من الشعار الرسمي الأصلي:
   أحمر #B9262E • أخضر زيتوني #3C5B17 (docs: TEAM_VISUAL_IDENTITY.md). */
:root {
  --red: #B9262E;
  --red-700: #8F1B22;
  --red-050: #FBEDEE;
  --green: #3C5B17;
  --green-700: #2E4712;
  --green-050: #EEF3E7;
  --ink: #25302B;
  --muted: #56615B;
  --ivory: #F7F6F2;
  --white: #FFFFFF;
  --line: #E2DFD6;
  --radius: 16px;
  --shadow: 0 10px 28px -14px rgba(37, 48, 43, .35);
  --header-h: 64px;
  --font-ar: "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", "SF Arabic", Tahoma, system-ui, sans-serif;
  --font-en: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--font-ar); font-size: 106.25%; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
html[lang="en"] { font-family: var(--font-en); font-size: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; color: var(--ink); background: var(--ivory); line-height: 1.8; overflow-x: hidden; }
html[lang="en"] body { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-700); text-underline-offset: .2em; }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.ico-lg { width: 1.9rem; height: 1.9rem; }
.ico-xl { width: 4.5rem; height: 4.5rem; stroke-width: 1.4; }
html[dir="rtl"] .ico.dir { transform: scaleX(-1); }
.skip { position: absolute; inset-inline-start: .75rem; top: -4rem; z-index: 100; background: var(--red-700); color: #fff; padding: .6rem 1rem; border-radius: 10px; }
.skip:focus { top: .75rem; }

/* ----- أزرار ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .6rem 1.35rem; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; line-height: 1.3; text-decoration: none; cursor: pointer; text-align: center; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: .4rem 1rem; font-size: .92rem; }
.btn-lg { min-height: 52px; padding: .75rem 1.6rem; font-size: 1.05rem; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-700); color: #fff; }
.btn-light { background: #fff; color: var(--red-700); }
.btn-light:hover { background: var(--red-050); color: var(--red-700); }
.btn-outline { border-color: var(--red); color: var(--red-700); background: transparent; }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-wa { background: var(--green); color: #fff; }
.btn-wa:hover { background: var(--green-700); color: #fff; }
.btn-outline-green { border-color: var(--green); color: var(--green-700); background: transparent; }
.btn-outline-green:hover { background: var(--green); color: #fff; }

/* ----- شريط المعاينة ----- */
.preview-banner { background: var(--ink); color: #fff; text-align: center; font-size: .85rem; padding: .35rem 1rem; }

/* ----- الرأس ----- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.header-bar { display: flex; align-items: center; gap: .75rem; min-height: var(--header-h); position: relative; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-inline-end: auto; min-width: 0; }
.brand img { width: 58px; height: 52px; object-fit: contain; flex: none; }
.brand-name { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.lang-link { display: inline-flex; align-items: center; min-height: 40px; padding: .2rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink); text-decoration: none; background: #fff; }
.lang-link:hover { border-color: var(--red); color: var(--red-700); }
.header-donate { display: none; }
.menu-btn { width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; display: grid; place-items: center; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; transition: transform .25s, opacity .2s; }
.bars { position: relative; }
.bars::before { position: absolute; top: -6px; }
.bars::after { position: absolute; top: 6px; }
.menu-open .bars { background: transparent; }
.menu-open .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-open .bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: .5rem 0 1rem; }
.menu-open .site-nav { display: block; }
.site-nav a { display: block; padding: .8rem 1.25rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.site-nav a:hover { background: var(--green-050); color: var(--green-700); }
@media (min-width: 960px) {
  .menu-btn { display: none; }
  .header-donate { display: inline-flex; }
  .site-nav { display: block; position: static; box-shadow: none; border: 0; background: transparent; padding: 0; order: 2; }
  .site-nav ul { display: flex; gap: .15rem; }
  .site-nav a { padding: .5rem .8rem; border-radius: 999px; font-size: .95rem; }
  .header-bar { gap: 1.25rem; }
  .brand { margin-inline-end: 0; }
  .header-tools { margin-inline-start: auto; order: 3; }
}

/* ----- البطل ----- */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero-media { position: relative; aspect-ratio: 4 / 3.1; max-height: 62svh; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero-scrim { position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(to top, var(--ink) 4%, rgba(37, 48, 43, 0)); }
.hero-credit { position: absolute; inset-inline-start: .75rem; top: .75rem; margin: 0; font-size: .78rem; background: rgba(0, 0, 0, .55); padding: .15rem .65rem; border-radius: 999px; }
.hero-body { position: relative; margin-top: -2.2rem; padding-block: 0 2.6rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; font-weight: 700; font-size: .95rem; color: var(--green); }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow-light { color: #DDE9C8; }
.hero h1 { font-size: clamp(1.85rem, 7vw, 3.6rem); max-width: 18ch; text-wrap: balance; }
html[lang="en"] .hero h1 { max-width: 20ch; }
.hero .lead { font-size: 1.05rem; max-width: 62ch; color: #F1F0EA; margin-bottom: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.3rem; }
.hero-actions .btn { flex: 1 1 14rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; padding: .2rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); }
.chips .ico { width: 1em; height: 1em; }
@media (min-width: 960px) {
  .hero { display: grid; align-items: end; min-height: min(80svh, 730px); }
  .hero-media { position: absolute; inset: 0; aspect-ratio: auto; max-height: none; }
  .hero-scrim { inset: 0; height: auto; background: linear-gradient(180deg, rgba(14, 16, 15, .15) 0%, rgba(14, 16, 15, .4) 40%, rgba(14, 16, 15, .88) 100%); }
  .hero-body { margin-top: 0; padding-block: 6rem 4.2rem; }
  .hero-actions .btn { flex: 0 0 auto; }
}
/* ----- أقسام ----- */
.section { padding-block: 3.5rem; }
.section-alt { background: var(--white); }
@media (min-width: 960px) { .section { padding-block: 5.2rem; } }
.section-head { max-width: 70ch; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.6rem, 4.4vw, 2.4rem); }
.lead-dark { color: var(--muted); font-size: 1.05rem; }
.fx-note { font-size: .88rem; color: var(--muted); border-inline-start: 3px solid var(--green); padding-inline-start: .75rem; }
.about-grid { display: grid; gap: 2rem; }
.about-facts { margin: 0; display: grid; gap: .9rem; align-content: start; }
.about-facts div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.about-facts dt { font-weight: 700; color: var(--red-700); font-size: .9rem; }
.about-facts dd { margin: 0; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.3fr 1fr; gap: 3rem; } }

/* ----- البطاقات ----- */
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cards { grid-template-columns: repeat(3, 1fr); } .cards-completed { grid-template-columns: repeat(2, 1fr); max-width: 760px; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.section-alt .card { background: var(--ivory); }
.card-media { aspect-ratio: 4 / 3; background: var(--green-050); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-art { display: grid; place-items: center; color: var(--green); aspect-ratio: 16 / 7; }
.card-media img.pos-bottom { object-position: 50% 88%; }
.card-art-done { background: var(--green-050); color: var(--green-700); }
.card-body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; padding: .1rem .7rem; border-radius: 999px; background: var(--red); color: #fff; }
.badge-soft { background: var(--red-050); color: var(--red-700); }
.badge-done { background: var(--green); }
.badge .ico { width: 1em; height: 1em; }
.card h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.intro { color: var(--ink); }
.kv-list { margin: .4rem 0 1rem; display: grid; gap: .9rem; }
.kv dt { font-weight: 800; color: var(--red-700); font-size: .88rem; margin-bottom: .15rem; }
.kv dd { margin: 0; }
.kv p { margin: 0 0 .5rem; color: var(--ink); }
.facts { display: grid; gap: .55rem; }
.fact-row { display: block; }
.fact-label { display: block; font-size: .85rem; color: var(--muted); }
.fact-value { font-size: 1.05rem; color: var(--ink); }
.fact-per { color: var(--ink); }
.fact-meta { display: block; font-size: .8rem; color: var(--muted); }
.tag-estimate { display: inline-block; font-size: .72rem; font-weight: 700; padding: 0 .5rem; border-radius: 999px; background: var(--red-050); color: var(--red-700); }
.fact-inline { font-weight: 700; }
bdi[dir="ltr"] { white-space: nowrap; }
.card-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; margin-block: .25rem .8rem; }
.card-actions { margin-top: auto; display: grid; gap: .6rem; }
@media (min-width: 420px) { .card-actions { grid-template-columns: 1fr 1fr; } }

/* ----- المعرض ----- */
.chips-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.chip:hover { border-color: var(--green); color: var(--green-700); }
.chip-n { background: var(--green-050); color: var(--green-700); border-radius: 999px; padding: 0 .5rem; font-size: .8rem; }
.g-group { margin-top: 2.2rem; }
.g-group h3 { font-size: 1.25rem; }
.g-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 700px) { .g-grid { grid-template-columns: repeat(3, 1fr); gap: .8rem; } }
@media (min-width: 1080px) { .g-grid { grid-template-columns: repeat(4, 1fr); } }
.g-link { display: block; position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #d8d6cd; }
.g-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.g-link:hover img { transform: scale(1.04); }
.g-cap { position: absolute; inset-inline: 0; bottom: 0; padding: 1.4rem .6rem .45rem; font-size: .82rem; line-height: 1.4; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); }
.js .g-extra { display: none; }
.js .g-group.is-open .g-extra { display: block; }
.g-more { margin-top: 1rem; }
/* فيديو الميدان: غلاف طولي 9:16؛ المقطع يُحمَّل عند الضغط فقط (app.js) */
.v-note { margin: .2rem 0 1rem; color: var(--muted); font-size: .92rem; }
.v-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
@media (min-width: 700px) { .v-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .v-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.v-item { min-width: 0; }
.v-fig { margin: 0; }
.v-link, .v-live { display: block; position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #1c211e; }
.v-link img, .v-live video { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; background: #000; }
.v-play { position: absolute; inset: 0; margin: auto; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .58); color: #fff; transition: transform .2s, background .2s; }
.v-play .ico { width: 1.6rem; height: 1.6rem; fill: currentColor; stroke: none; }
.v-link:hover .v-play, .v-link:focus-visible .v-play { transform: scale(1.08); background: rgba(185, 38, 46, .9); }
.v-link.is-loading { cursor: progress; }
.v-link.is-loading .v-play { opacity: .5; }
.v-link.is-loading .v-dur { background: var(--red); font-weight: 700; }
.v-dur { position: absolute; inset-block-end: .45rem; inset-inline-end: .45rem; padding: 0 .45rem; border-radius: 6px; background: rgba(0, 0, 0, .68); color: #fff; font-size: .78rem; line-height: 1.6; direction: ltr; }
.v-fig figcaption { display: flex; flex-direction: column; gap: .1rem; padding: .45rem .15rem 0; font-size: .86rem; line-height: 1.5; }
.v-cap { font-weight: 600; }
.v-meta { color: var(--muted); font-size: .8rem; }
.v-live { background: #000; }
.v-live video { object-fit: contain; }
dialog.lb { border: 0; padding: 0; background: transparent; width: min(96vw, 1100px); max-width: none; max-height: 96vh; color: #fff; overflow: visible; }
dialog.lb::backdrop { background: rgba(10, 12, 11, .9); }
.lb-fig { margin: 0; text-align: center; }
.lb-fig img { margin-inline: auto; max-height: 76vh; width: auto; max-width: 100%; border-radius: 10px; background: #000; }
.lb-cap { margin-top: .6rem; font-size: 1rem; }
.lb-count { font-size: .82rem; opacity: .85; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .6rem; }
.lb-btn { min-width: 48px; min-height: 48px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-close { position: absolute; inset-block-start: -3.4rem; inset-inline-end: 0; }
html[dir="rtl"] .lb-prev .ico, html[dir="rtl"] .lb-next .ico { transform: scaleX(-1); }

/* ----- كيف نعمل ----- */
.steps { counter-reset: s; display: grid; gap: 1rem; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; position: relative; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; margin-bottom: .6rem; }
.steps h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--muted); }

/* ----- الأسئلة ----- */
.faq { display: grid; gap: .7rem; }
.faq-item { background: var(--ivory); border: 1px solid var(--line); border-radius: 14px; }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; min-height: 56px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-ico { transition: transform .2s; color: var(--red-700); }
.faq-item[open] .faq-ico { transform: rotate(180deg); }
.faq-a { padding: 0 1.2rem 1rem; color: var(--ink); }
.faq-a p { margin: 0; }

/* ----- التواصل ----- */
.contact-grid { display: grid; gap: .8rem; }
@media (min-width: 700px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card { display: flex; align-items: center; gap: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: var(--ink); min-height: 76px; }
.contact-card:hover { border-color: var(--green); }
.contact-card .ico { color: var(--green); }
.cc-text { display: grid; min-width: 0; }
.cc-label { font-size: .85rem; color: var(--muted); }
.cc-val { font-weight: 700; overflow-wrap: anywhere; }

/* ----- التذييل ----- */
.site-footer { background: var(--ink); color: #E8EBE6; padding-block: 2.5rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand img { width: 88px; height: auto; background: #fff; border-radius: 12px; padding: 4px; }
.footer-brand p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.footer-note { font-size: .9rem; margin: 0; color: #C9CFC8; }
.footer-copy { font-size: .85rem; margin: 0; color: #C9CFC8; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.4fr; align-items: start; } .footer-copy { grid-column: 1 / -1; } }

/* ----- صفحات نصية ----- */
.doc { padding-block: 3rem 4rem; }
.doc h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
.doc h2 { font-size: 1.25rem; margin-top: 2rem; color: var(--red-700); }
.doc ul { list-style: disc; padding-inline-start: 1.3rem; display: grid; gap: .4rem; margin-bottom: 1rem; }
.en-note { margin-top: 2rem; color: var(--muted); }

@media print { .site-header, .site-nav, .menu-btn, .hero-actions { display: none; } }
