/* ==========================================================================
   WASM | وسم — public site styles
   ========================================================================== */

:root {
  --green: #174d2f;
  --green2: #0b3925;
  --olive: #748b49;
  --sand: #f1e7d6;
  --cream: #fbf8f1;
  --brown: #76502f;
  --gold: #c8a15a;
  --ink: #18352a;
  --muted: #6e756f;
  --line: #e7dece;
  --red: #d62828;
  --radius-card: 20px;
  --shadow-card: 0 10px 24px #173b2210;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #e9e4da;
  color: var(--ink);
  font-family: Cairo, system-ui, sans-serif;
}
img { max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

.app {
  max-width: 760px;
  margin: auto;
  background: var(--cream);
  min-height: 100vh;
  overflow-x: clip;
  box-shadow: 0 0 50px #18352a18;
}

section { scroll-margin-top: 76px; }

/* ---------- Header & navigation ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: #fffdf9ee;
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.logo { height: 52px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.topActions { display: flex; gap: 8px; align-items: center; }
.lang {
  border: 1px solid #cfc4b2;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: var(--green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.menu {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.nav {
  position: sticky;
  top: 73px;
  z-index: 1100;
  background: #fffdf9f5;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: none;
  padding: 8px 12px 12px;
  gap: 6px;
  flex-wrap: wrap;
}
.nav.open { display: flex; }
.nav a {
  text-decoration: none;
  color: var(--green);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
}
.nav a:hover { background: var(--green); color: #fff; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 570px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0b3925f2 0%, #0b39259c 35%, transparent 75%);
}
.heroText { position: relative; z-index: 2; color: #fff; padding: 28px 22px 34px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; color: #e7d19b; font-family: Montserrat, Cairo, sans-serif; }
.hero h1 { font-size: 42px; line-height: 1.04; margin: 8px 0 10px; font-family: Montserrat, Cairo, sans-serif; font-weight: 800; }
[dir="rtl"] .hero h1 { font-family: Cairo, sans-serif; font-size: 36px; line-height: 1.25; }
.hero p { margin: 0; line-height: 1.8; color: #f7f2e9; font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  margin-top: 16px;
  background: #fff;
  color: var(--green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* ---------- Sections ---------- */

.section { padding: 30px 17px; }
.kicker { font-size: 12px; letter-spacing: .2em; color: #9a7b4b; font-family: Montserrat, Cairo, sans-serif; font-weight: 700; }
.sectionTitle { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.sectionTitle h3 { font-size: 25px; margin: 0; }
.sectionTitle small { color: var(--muted); display: block; margin-top: 4px; }

.pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid #c9bda9;
  background: #fff;
  color: var(--green);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  text-decoration: none;
  transition: .15s;
}
.pill:hover { background: var(--green); color: #fff; }
.pill:active, .card:active { transform: scale(.98); }

/* Vision */
.vision { display: grid; grid-template-columns: 1fr; gap: 18px; }
.visionText { padding: 5px 2px; }
.vision h2 { font-size: 28px; line-height: 1.25; margin: 10px 0; color: var(--green); }
.vision p { line-height: 1.85; color: #5f665f; margin: 0; }
.visionImg { height: 230px; border-radius: 28px; overflow: hidden; position: relative; }
.visionImg img { width: 100%; height: 100%; object-fit: cover; }
.visionImg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, #174d2f55, transparent 55%); }

/* Pillars */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pillar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 17px 13px;
  text-align: center;
  box-shadow: 0 10px 25px #18352a0b;
}
.icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 11px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
}
.icon svg { width: 29px; height: 29px; }
.pillar h4 { margin: 0 0 5px; font-size: 17px; }
.pillar p { margin: 0; color: #6a706a; font-size: 12px; line-height: 1.6; }

/* Initiative cards */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: .2s;
}
.card img { width: 100%; aspect-ratio: 1.25 / 1; object-fit: cover; display: block; }
.cardBody { padding: 12px; }
.cardBody h4 { margin: 0 0 2px; font-size: 17px; }
.en { font-family: Montserrat, Cairo, sans-serif; color: var(--brown); font-size: 11px; }
.cardBody p { margin: 7px 0 0; color: #6a706a; font-size: 12px; line-height: 1.65; }
.arrow {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
}
[dir="rtl"] .arrow { transform: scaleX(-1); }

/* Events */
.events { background: var(--green); color: #fff; border-radius: 24px; overflow: hidden; }
.events img { width: 100%; height: 190px; object-fit: cover; display: block; }
.eventsBody { padding: 18px; }
.events h3 { margin: 0; font-size: 23px; }
.events p { color: #dbe9de; line-height: 1.8; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; display: block; }
.gallery img:nth-child(2), .gallery img:nth-child(5) { grid-column: span 2; }

/* Resources */
.materials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.material {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
}
.material img { width: 100%; aspect-ratio: 1.1 / 1; object-fit: cover; border-radius: 12px; display: block; }
.material b { display: block; margin-top: 7px; font-size: 13px; }

/* Useful locations */
.locationList { display: grid; gap: 10px; }
.locationCard {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  color: var(--green);
  box-shadow: var(--shadow-card);
}
.locationPin {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf0e7;
  color: var(--green);
  font-size: 27px;
}
.locationCopy { display: grid; gap: 3px; flex: 1; }
.locationCopy b { font-size: 16px; }
.locationCopy small { font-size: 12px; color: var(--muted); }
.locationArrow { font-size: 22px; color: var(--brown); }

/* ---------- No-camping map ---------- */

.mapWrap {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  background: #e6e2d8;
}
.mapCanvas { height: 380px; width: 100%; }
.mapTools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 650; /* above markers (600), below popups (700) */
  display: flex;
  gap: 6px;
}
.mapTools button {
  border: 1px solid #cfc4b2;
  background: #fffdf9f2;
  color: var(--green);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px #18352a22;
}
.mapTools button.active { background: var(--green); color: #fff; border-color: var(--green); }
.mapEmpty {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 650;
  background: #fffdf9f2;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.mapLegend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: #5f665f;
}
.mapLegend svg { width: 28px; height: 28px; flex-shrink: 0; }

/* Marker: sign on a post */
.nc-marker { background: none; border: 0; }
.nc-sign { width: 44px; height: 44px; filter: drop-shadow(0 4px 6px #0006); }
.nc-sign svg { width: 100%; height: 100%; display: block; }
.nc-pole { width: 4px; height: 16px; margin: -2px auto 0; background: #4a4a4a; border-radius: 0 0 2px 2px; }
.nc-zone { pointer-events: none; }
.nc-poly { cursor: pointer; }

/* Popup */
.leaflet-popup-content { margin: 12px 14px; font-family: Cairo, system-ui, sans-serif; min-width: 200px; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.nc-popup { display: grid; gap: 6px; text-align: start; }
.nc-board {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid var(--red);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  width: max-content;
  max-width: 100%;
}
.nc-board svg { width: 22px; height: 22px; flex-shrink: 0; }
.nc-popup strong { font-size: 15px; color: var(--ink); }
.nc-popup p { margin: 0; color: #5f665f; font-size: 13px; line-height: 1.6; }
.nc-popup small { color: var(--muted); font-size: 12px; }
.nc-popup a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin-top: 4px;
  text-decoration: none;
  background: var(--green);
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.me-marker { background: none; border: 0; }
.me-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2f7df6;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px #2f7df633, 0 2px 6px #0004;
}

/* Zone list under map */
.zoneList { display: grid; gap: 10px; margin-top: 14px; }
.zoneCard {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.zoneCard svg { width: 42px; height: 42px; flex-shrink: 0; }
.zoneCopy { flex: 1; display: grid; gap: 2px; }
.zoneCopy b { font-size: 15px; color: var(--ink); }
.zoneCopy span { font-size: 12px; color: #5f665f; line-height: 1.5; }
.zoneCopy small { font-size: 11px; color: var(--muted); }
.zoneCard a {
  text-decoration: none;
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
  border: 1px solid #c9bda9;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Detail page ---------- */

.detailHero { position: relative; height: 330px; }
.detailHero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detailHero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0d3d26e8, transparent 65%); }
.detailTitle { position: absolute; bottom: 18px; left: 18px; right: 18px; z-index: 2; color: #fff; }
.detailTitle h1 { margin: 10px 0 0; font-size: 32px; }
.detailTitle .en { color: #f3d99a; font-size: 13px; }
.detailBody { padding: 22px 18px; }
.detailBody h2 { font-size: 22px; margin: 22px 0 8px; }
.detailBody p { line-height: 1.9; color: #5f665f; }
.equip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.equipItem { position: relative; background: #f5f0e6; border-radius: 16px; padding: 10px; font-weight: 700; overflow: hidden; }
.equipItem .productImage {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f8f5ee;
  border-radius: 12px;
  margin-bottom: 7px;
  display: block;
}
.brandStamp {
  position: absolute;
  top: 15px;
  inset-inline-end: 15px;
  width: 48px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e8e0d3;
  border-radius: 7px;
  padding: 2px;
  box-shadow: 0 3px 12px #18352a22;
}
.back {
  display: inline-block;
  border: 0;
  background: #fff;
  color: var(--green);
  font: inherit;
  font-weight: 800;
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}

/* ---------- Footer ---------- */

.footer { background: var(--green2); color: #fff; padding: 30px 18px; position: relative; scroll-margin-top: 76px; }
.footer::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: var(--footer-image) center / cover;
  opacity: .13;
}
.footer > * { position: relative; }
.footer .logoBox { background: #fff; border-radius: 14px; width: max-content; padding: 6px; margin-bottom: 16px; }
.footer .logoBox img { height: 58px; width: auto; display: block; }
.contact { display: grid; gap: 10px; color: #dce7df; }
.contact strong { color: #fff; }
.contact a { color: #fff; text-decoration: none; }
.footer .admin { margin-top: 22px; font-size: 11px; color: #9fb5a6; text-decoration: none; }

/* ---------- Small screens ---------- */

@media (max-width: 430px) {
  .hero { min-height: 520px; }
  .hero h1 { font-size: 36px; }
  [dir="rtl"] .hero h1 { font-size: 31px; }
  .section { padding: 26px 14px; }
  .vision h2 { font-size: 25px; }
  .pillar { padding: 14px 9px; }
  .pillar h4 { font-size: 15px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img:nth-child(2), .gallery img:nth-child(5) { grid-column: span 1; }
  .mapCanvas { height: 320px; }
}
