@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #24202c;
  --muted: #6d6875;
  --muted-2: #8d8795;
  --paper: #ffffff;
  --surface: #f6f4f8;
  --surface-strong: #efebf3;
  --line: #e7e2eb;
  --purple: #7660a5;
  --purple-deep: #57437f;
  --purple-soft: #e9e2f4;
  --warning: #a4663c;
  --warning-bg: #fff5ed;
  --shadow: 0 22px 60px rgba(53, 41, 73, 0.1);
  font-family: 'Cairo', 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: inherit; }
button, a { font: inherit; }
a { color: inherit; }

.site-header {
  background: var(--paper);
  min-height: 88px;
  padding: 18px clamp(20px, 5vw, 74px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 16px 16px 16px 5px;
  background: var(--purple); color: white; display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(118, 96, 165, .25); font-weight: 800; font-size: 22px;
}
.eyebrow, .section-kicker { margin: 0; color: var(--purple); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.site-header h1 { margin: 2px 0 0; font-size: clamp(18px, 2vw, 23px); line-height: 1.35; font-weight: 800; }
.header-meta { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 13px; font-weight: 600; }
.meta-dot, .status-pulse { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #71a884; box-shadow: 0 0 0 4px rgba(113,168,132,.13); }

.app-shell { max-width: 1440px; margin: 0 auto; padding: 42px clamp(20px, 5vw, 74px) 52px; }
.intro-panel { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.intro-copy { max-width: 680px; }
.intro-copy h2 { margin: 4px 0 10px; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.04em; line-height: 1.15; }
.intro-copy > p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.9; max-width: 640px; }
.trust-note { padding: 13px 16px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 14px; display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; line-height: 1.65; min-width: 215px; }
.trust-note strong { color: var(--ink); font-size: 13px; }
.trust-icon { width: 29px; height: 29px; border-radius: 10px; display: grid; place-items: center; color: var(--purple-deep); background: var(--purple-soft); font-weight: 800; font-size: 16px; }

.map-layout { min-height: 620px; display: grid; grid-template-columns: minmax(290px, 390px) minmax(0, 1fr); direction: ltr; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.branches-panel { direction: rtl; padding: 28px 24px 20px; display: flex; flex-direction: column; min-height: 620px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 3px 0 0; font-size: 21px; }
.branch-count { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--purple-deep); background: var(--purple-soft); font-size: 17px; font-weight: 800; }
.branch-list { display: grid; gap: 12px; padding-top: 18px; }
.branch-card { appearance: none; text-align: right; width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.branch-card:hover, .branch-card:focus-visible { transform: translateY(-2px); border-color: #c8bbdc; box-shadow: 0 10px 24px rgba(77, 57, 105, .08); outline: none; }
.branch-card.is-active { background: #fbf9fd; border-color: var(--purple); box-shadow: inset -3px 0 var(--purple); }
.branch-card.is-unverified { background: #fffdfb; }
.branch-card__head { display: flex; gap: 11px; align-items: start; }
.branch-number { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--purple); color: #fff; font-weight: 800; font-size: 13px; }
.is-unverified .branch-number { background: #b9afb8; }
.branch-card h3 { margin: 1px 0 3px; font-size: 15px; line-height: 1.5; }
.branch-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.branch-state { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 6px; color: var(--purple-deep); font-size: 11px; font-weight: 700; }
.is-unverified .branch-state { color: var(--warning); }
.state-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.branch-card__cta { display: inline-flex; align-items: center; gap: 6px; color: var(--purple-deep); text-decoration: none; margin-top: 10px; font-size: 12px; font-weight: 800; }
.branch-card__cta::after { content: '↗'; font-size: 14px; }
.branch-card__cta:hover { text-decoration: underline; }
.panel-footnote { display: flex; align-items: start; gap: 10px; margin-top: auto; padding: 16px 0 0; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11px; line-height: 1.8; }
.panel-footnote p { margin: 0; }
.footnote-line { width: 3px; min-height: 32px; flex: 0 0 3px; border-radius: 3px; background: #c5946e; }

.map-panel { direction: ltr; position: relative; min-height: 620px; background: #e7e2d9; }
.map { position: absolute; inset: 0; min-height: 620px; z-index: 1; }
.leaflet-container { font-family: 'Cairo', 'Noto Sans Arabic', Tahoma, Arial, sans-serif; background: #eae6de; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 8px 20px rgba(40,30,55,.12) !important; }
.leaflet-control-zoom a { color: var(--purple-deep) !important; border: 0 !important; }
.leaflet-control-attribution { font-family: inherit; font-size: 9px; }
.map-overlay-status, .map-legend { direction: rtl; position: absolute; z-index: 500; background: rgba(255,255,255,.94); box-shadow: 0 8px 20px rgba(40,30,55,.1); border: 1px solid rgba(231,226,235,.85); border-radius: 12px; font-size: 11px; color: var(--muted); }
.map-overlay-status { top: 18px; right: 18px; padding: 10px 13px; display: flex; align-items: center; gap: 9px; font-weight: 700; }
.map-legend { left: 18px; bottom: 18px; padding: 10px 12px; display: grid; gap: 7px; }
.map-legend span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend-marker { width: 20px; height: 20px; border-radius: 7px 7px 7px 2px; display: inline-grid; place-items: center; color: white; font-size: 10px; font-style: normal; font-weight: 800; transform: rotate(-45deg); }
.legend-marker::first-letter { transform: rotate(45deg); }
.legend-marker--purple { background: var(--purple); }
.legend-marker--gray { background: #a59da7; }
.custom-marker { width: 36px; height: 36px; border-radius: 13px 13px 13px 4px; background: var(--purple); border: 3px solid white; box-shadow: 0 7px 15px rgba(74, 49, 110, .3); color: white; font-weight: 800; display: grid; place-items: center; font-size: 13px; transform: rotate(-45deg); }
.custom-marker--review { background: #a59da7; box-shadow: 0 7px 15px rgba(87, 75, 91, .24); }
.custom-marker span { transform: rotate(45deg); }
.leaflet-popup-content-wrapper { border-radius: 15px; box-shadow: 0 15px 30px rgba(45,35,60,.18); }
.leaflet-popup-content { margin: 15px 16px; min-width: 210px; direction: rtl; text-align: right; }
.popup-number { color: var(--purple); font-size: 11px; font-weight: 800; }
.popup-title { margin: 3px 0 5px; font-weight: 800; font-size: 14px; line-height: 1.5; }
.popup-address { margin: 0 0 11px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.popup-link { display: inline-flex; color: var(--purple-deep); font-size: 11px; font-weight: 800; text-decoration: none; }
.popup-link:hover { text-decoration: underline; }

.verification-banner { display: flex; align-items: start; gap: 14px; max-width: 930px; margin: 24px auto 0; padding: 18px 20px; border: 1px solid #f0d8c4; background: var(--warning-bg); border-radius: 16px; }
.verification-icon { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--warning); border-radius: 50%; font-weight: 800; }
.verification-banner h2 { margin: 0 0 3px; color: #633c26; font-size: 14px; }
.verification-banner p { margin: 0; color: #765b4b; font-size: 12px; line-height: 1.9; }
.site-footer { max-width: 1440px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 74px) 34px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted-2); font-size: 11px; }

@media (max-width: 920px) {
  .map-layout { grid-template-columns: 1fr; }
  .branches-panel { min-height: auto; }
  .branch-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel-footnote { margin-top: 20px; }
  .map-panel, .map { min-height: 500px; }
}
@media (max-width: 680px) {
  .site-header { align-items: start; flex-direction: column; }
  .header-meta { padding-right: 62px; margin-top: -10px; }
  .app-shell { padding-top: 28px; }
  .intro-panel { display: block; }
  .trust-note { margin-top: 18px; }
  .map-layout { border-radius: 18px; }
  .branches-panel { padding: 22px 16px 17px; }
  .branch-list { grid-template-columns: 1fr; }
  .map-panel, .map { min-height: 420px; }
  .map-overlay-status { top: 12px; right: 12px; left: 12px; justify-content: center; }
  .map-legend { left: 12px; bottom: 12px; }
  .site-footer { flex-direction: column; gap: 5px; }
}
