/* Zawahif Maroc public website (landing, species, provinces, blog). Same tokens as the app (app.css). */
:root {
  --g: #14513a; --g2: #1f7a55; --g3: #e7f2ec; --sand: #e9c98a; --sand2: #f8efdc; --ink: #14201b; --ink2: #34423c; --muted: #5f6d67;
  --line: #e3e9e6; --bg: #fff; --soft: #f6f8f7; --red: #c62828; --r: 16px;
  --font: "Inter", "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}
[dir=rtl] { --font: "Noto Kufi Arabic", "Inter", system-ui, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--g2); text-decoration: none; } a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: clamp(27px, 4.6vw, 44px); line-height: 1.15; letter-spacing: -.02em; margin: 14px 0 12px; }
[dir=rtl] h1 { line-height: 1.45; letter-spacing: 0; }
h2 { font-size: clamp(20px, 2.8vw, 26px); line-height: 1.3; margin: 40px 0 14px; letter-spacing: -.01em; }
[dir=rtl] h2 { letter-spacing: 0; line-height: 1.5; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--ink2); max-width: 760px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; text-decoration: none !important; }
.brand b { display: block; font-weight: 800; color: var(--g); font-size: 18px; line-height: 1.15; }
.brand small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav.main { margin-inline-start: auto; display: flex; gap: 4px; align-items: center; }
nav.main a { color: var(--ink2); font-weight: 600; padding: 8px 12px; border-radius: 10px; font-size: 15px; text-decoration: none; }
nav.main a:hover, nav.main a.on { background: var(--g3); color: var(--g); }
nav.main a.cta { background: var(--g); color: #fff; } nav.main a.cta:hover { background: var(--g2); }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; flex: none; }
.lang a { padding: 4px 9px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }
.lang a.on { background: var(--g3); color: var(--g); }
nav.sub { display: none; }
@media (max-width: 760px) {
  nav.main a.txt { display: none; } .brand small { display: none; } .brand b { font-size: 16px; } .bar { gap: 8px; height: 58px; }
  nav.main a.cta { padding: 7px 11px; font-size: 14px; }
  nav.sub { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  nav.sub::-webkit-scrollbar { display: none; }
  nav.sub a { flex: none; font-size: 14px; font-weight: 600; color: var(--ink2); padding: 5px 12px; border-radius: 999px; background: var(--soft); text-decoration: none; }
  nav.sub a.on { background: var(--g3); color: var(--g); }
}
main { padding-bottom: 40px; min-height: 60vh; }
.crumbs { font-size: 13px; color: var(--muted); margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); } .crumbs span[aria-current] { color: var(--ink2); }

/* buttons, chips, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700;
  border: 1px solid transparent; text-decoration: none !important; cursor: pointer; font-size: 15px; }
.btn.big { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn.primary { background: var(--g); color: #fff; } .btn.primary:hover { background: var(--g2); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--g); } .btn.ghost:hover { border-color: #c9ddd2; }
.btn.dis { color: var(--muted); cursor: default; }
.btn.fbb { background: #1877f2; color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink2); font-weight: 600; font-size: 14px; text-decoration: none; }
.chips a:hover, .chips a.on { border-color: var(--g2); color: var(--g); background: var(--g3); }
.chips i { font-style: normal; color: var(--muted); font-weight: 500; font-size: 12px; }
.vb { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.vb.v0 { background: #e3f3e8; color: #1d6a3e; } .vb.v1 { background: #fbf1d3; color: #7a5a05; }
.vb.v2 { background: #fde4d4; color: #a7430b; } .vb.v3 { background: var(--red); color: #fff; } .vb.vu { background: #eceff1; color: #555; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--sand2); color: #7a5205; }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; padding: 26px 0 8px; }
.hero-t h1 { margin-top: 0; }
.hero-map { display: block; background: linear-gradient(160deg, var(--g3), #fff 70%); border: 1px solid var(--line); border-radius: 24px; padding: 18px; }
.hero-map:hover { border-color: #c9ddd2; }
.mapsvg { width: 100%; height: auto; display: block; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.kpis div { background: var(--soft); border-radius: 14px; padding: 12px 14px; }
.kpis b { display: block; font-size: 28px; font-weight: 800; color: var(--g); line-height: 1.1; }
.kpis span { font-size: 13px; color: var(--muted); line-height: 1.3; display: block; }
.kpis .dg b { color: var(--red); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 14px; } .hero-map { max-width: 440px; width: 100%; margin: 0 auto; padding: 12px; }
  .kpis { grid-template-columns: repeat(2, 1fr); } .lead { font-size: 17px; }
}
.sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sh h2 { margin-bottom: 14px; } .sh a { font-weight: 700; font-size: 14px; white-space: nowrap; }

/* sightings grid */
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .ogrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.oc { display: block; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; color: var(--ink); text-decoration: none !important; }
.oc:hover { border-color: #c9ddd2; box-shadow: 0 6px 20px rgba(20,81,58,.08); }
.oimg { position: relative; aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.oimg img { width: 100%; height: 100%; object-fit: cover; }
.oimg .vb { position: absolute; bottom: 8px; inset-inline-start: 8px; }
.ob { padding: 10px 12px 12px; } .ob b { display: block; font-size: 15px; line-height: 1.3; }
.ob small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* species list */
.splist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .splist { grid-template-columns: minmax(0, 1fr); } }
.spc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none !important; min-width: 0; }
.spc:hover { border-color: #c9ddd2; }
.spi { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--c) 12%, #fff); box-shadow: inset 0 0 0 2px var(--c); }
.spb { flex: 1; min-width: 0; } .spb b { display: block; line-height: 1.3; } .spb i { display: block; font-size: 13px; color: var(--muted); }
.spb small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spr { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; } .spr small { font-size: 12px; color: var(--muted); }

/* danger block (never an ad next to it) */
.danger { background: #fff4f3; border: 1px solid #f3c9c5; border-radius: 20px; padding: 20px; margin: 34px 0; }
.danger h2 { margin: 0 0 8px; color: var(--red); font-size: 21px; }
.danger p { color: #5b2421; margin-bottom: 14px; }
.tel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tel a { background: #fff; border: 1px solid #f3c9c5; border-radius: 14px; padding: 10px; text-align: center; color: var(--ink); text-decoration: none !important; }
.tel b { display: block; font-size: 19px; color: var(--red); direction: ltr; } .tel small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
@media (max-width: 520px) { .tel b { font-size: 15px; white-space: nowrap; } .tel a { padding: 10px 4px; } }

/* blog cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .pgrid { grid-template-columns: minmax(0, 1fr); } }
.pc { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; color: var(--ink); text-decoration: none !important; }
.pc:hover { border-color: #c9ddd2; box-shadow: 0 6px 20px rgba(20,81,58,.08); }
.pc .pimg { aspect-ratio: 1200/630; background: var(--g3); overflow: hidden; } .pc .pimg img { width: 100%; height: 100%; object-fit: cover; }
.pc .pb { padding: 12px 14px 14px; } .pc b { display: block; line-height: 1.35; font-size: 16px; margin: 4px 0; }
.pc small { color: var(--muted); font-size: 13px; }
.cat { display: inline-block; font-size: 12px; font-weight: 700; color: var(--g); background: var(--g3); padding: 2px 9px; border-radius: 999px; }
.cat a { color: inherit; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 26px 0; }

/* article */
.post { max-width: 760px; }
.post header h1 { margin-top: 10px; }
.pdate { color: var(--muted); font-size: 14px; }
.hero-img { margin: 18px 0; } .hero-img img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 18px; background: var(--soft); }
.hero-img figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.post section h2 { margin-top: 32px; }
.post ul { padding-inline-start: 22px; } .post li { margin: 6px 0; }
.facts { background: var(--sand2); border-radius: 16px; padding: 6px 18px; margin: 18px 0; }
.facts ul { margin: 10px 0; } .facts li { font-weight: 600; color: #4f3a0a; }
.live { background: var(--g3); border-radius: 14px; padding: 12px 16px; color: var(--g); font-weight: 600; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 10px 0; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; } .faq details p { margin: 10px 0 0; color: var(--ink2); }
.adbox { margin: 28px 0; min-height: 100px; }

/* species / sighting page */
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.d-head h1 { margin-bottom: 4px; } .d-head .vb { margin-top: 22px; font-size: 13px; }
.sci { color: var(--muted); margin: 0 0 14px; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.names div { background: var(--soft); border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.names small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.mapcard { background: linear-gradient(160deg, var(--g3), #fff 70%); border: 1px solid var(--line); border-radius: 20px; padding: 16px; max-width: 520px; }
.mapcard.sm { max-width: 340px; margin: 18px 0; }
.sp-tip { background: var(--g3); border-radius: 14px; padding: 12px 16px; } .sp-tip b { color: var(--g); }
.meta { list-style: none; padding: 0; margin: 10px 0 16px; display: grid; gap: 6px; } .meta b { color: var(--muted); font-weight: 600; margin-inline-end: 6px; }
.gal { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px 0 8px; border-radius: 18px; }
.gal img { flex: none; width: 100%; max-height: 70vh; object-fit: contain; background: #111; scroll-snap-align: center; border-radius: 18px; }
.orig { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 16px 0; }
.orig summary { cursor: pointer; font-weight: 700; } .orig p { white-space: pre-wrap; margin: 10px 0 0; }
.plist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.plist a { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink); text-decoration: none !important; }
.plist a:hover { border-color: #c9ddd2; } .plist b { display: block; } .plist span { color: var(--muted); font-size: 14px; } .plist em { color: var(--red); font-style: normal; }

/* landing blocks */
.how .steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: s; }
.how .steps li { background: var(--soft); border-radius: 16px; padding: 16px; counter-increment: s; }
.how .steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--g); color: #fff; font-weight: 800; margin-bottom: 8px; }
.how .steps b { display: block; } .how .steps span { color: var(--ink2); font-size: 15px; }
@media (max-width: 760px) { .how .steps { grid-template-columns: 1fr; } }
.fb { background: var(--sand2); border-radius: 22px; padding: 22px; margin: 40px 0 10px; }
.fb h2 { margin-top: 0; }

/* footer */
.foot { background: #0f2e22; color: #cfe0d7; padding: 34px 0 20px; margin-top: 30px; font-size: 14px; }
.foot a { color: #fff; } .foot .brand b { color: #fff; }
.fcols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
.foot h3 { color: var(--sand); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.foot ul { list-style: none; padding: 0; margin: 0; } .foot li { margin: 6px 0; }
.foot .sos b { color: var(--sand); margin-inline-end: 6px; }
.foot p { margin: 12px 0; }
.copy { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; margin-top: 22px; color: #9db8aa; }
@media (max-width: 760px) { .fcols { grid-template-columns: 1fr; gap: 10px; } }
