/* =========================================================
   بن السعودي: contact, branches map, issues and suggestions
   ========================================================= */

/* ---------- ways to reach us ---------- */
.ways { padding-block: clamp(2rem, 5vw, 3.5rem) 0; }
.ways__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.way {
  display: grid; justify-items: center; gap: .3rem; padding: 1.4rem 1rem; text-align: center; text-decoration: none;
  background: var(--coffee-900); border: 1px solid rgba(243,230,211,.1); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.way:hover { border-color: var(--orange); transform: translateY(-3px); }
.way__ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(253,154,25,.12); color: var(--orange); margin-bottom: .3rem; transition: background .2s, color .2s; }
.way:hover .way__ico { background: var(--orange); color: var(--black); }
.way__ico svg { width: 24px; height: 24px; }
.way__label { font-weight: 700; color: var(--cream); }
.way__text { color: var(--cream-dim); font-size: .92rem; }

/* ---------- branches ---------- */
.branches { background: var(--pattern), var(--black); }
.branches__lead { color: var(--cream-dim); margin: .4rem 0 0; }
.branches__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.4rem; align-items: stretch; }
.branch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; align-content: start; }
.branch {
  display: flex; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: var(--radius);
  background: var(--coffee-900); border: 1.5px solid rgba(243,230,211,.1); transition: border-color .2s, background .2s;
}
.branch[tabindex] { cursor: pointer; }
.branch:hover { border-color: rgba(253,154,25,.5); }
.branch.is-active { border-color: var(--orange); background: linear-gradient(0deg, rgba(253,154,25,.07), rgba(253,154,25,.07)), var(--coffee-900); }
.branch:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.branch__n {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: var(--black); font-family: var(--font-en-display); font-weight: 700; font-size: 1.1rem;
}
.branch__body { min-width: 0; }
.branch__name { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; line-height: 1.2; margin: 0 0 .2rem; }
html:lang(en) .branch__name { font-weight: 700; font-size: 1.2rem; }
.branch__addr { margin: 0; color: var(--cream-dim); }
.branch__hours { margin: .2rem 0 0; color: var(--gold-soft); font-size: .9rem; }
.branch__actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .8rem; border-radius: 999px;
  border: 1px solid rgba(243,230,211,.25); color: var(--cream); text-decoration: none; font-size: .85rem; font-weight: 600;
  transition: border-color .2s, color .2s, background .2s;
}
.chip svg { width: 15px; height: 15px; }
.chip > span:first-child { display: inline-grid; }
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip--main { background: var(--orange); border-color: var(--orange); color: var(--black); }
.chip--main:hover { background: var(--orange-deep); color: var(--black); }

/* the map, tinted from OpenStreetMap's light style to the site's dark coffee colors */
.branch-map {
  min-height: 460px; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  border: 1px solid rgba(243,230,211,.15); background: #1b130d;
  font-family: var(--font-body);
}
.branch-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) sepia(.4) saturate(.8) brightness(.92) contrast(1.02); }
.branch-map .leaflet-control-zoom a { background: var(--coffee-800); color: var(--cream); border-color: rgba(243,230,211,.15); }
.branch-map .leaflet-control-zoom a:hover { background: var(--orange); color: var(--black); }
.branch-map .leaflet-control-attribution { background: rgba(14,10,7,.7); color: var(--cream-dim); font-size: 10px; }
.branch-map .leaflet-control-attribution a { color: var(--cream-dim); }
.branch-map .leaflet-popup-content-wrapper, .branch-map .leaflet-popup-tip { background: var(--coffee-800); color: var(--cream); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.branch-map .leaflet-popup-content-wrapper { border-radius: 14px; border: 1px solid rgba(253,154,25,.35); }
.branch-map .leaflet-popup-content { margin: .8rem 1rem; display: grid; gap: .25rem; font-size: .9rem; line-height: 1.5; min-width: 180px; }
.branch-map .leaflet-popup-content b { color: var(--orange); font-size: 1rem; }
.branch-map .leaflet-popup-content span { color: var(--cream-dim); }
.branch-map .leaflet-popup-content a { color: var(--orange); font-weight: 700; margin-top: .2rem; }

/* pin: an orange drop with the branch number */
.pin { background: none; border: 0; }
.pin__dot {
  position: absolute; left: 3px; top: 0; width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--orange); border: 2.5px solid var(--black); box-shadow: 0 6px 14px rgba(0,0,0,.55);
  display: grid; place-items: center; transition: transform .2s, background .2s;
}
.pin__dot b { transform: rotate(45deg); color: var(--black); font: 700 15px/1 var(--font-en-display); }
.pin.is-active .pin__dot, .pin:hover .pin__dot { transform: rotate(-45deg) scale(1.18); background: #ffb347; }
.pin.is-active { z-index: 1000 !important; }

/* ---------- issues / suggestions / message form ---------- */
.reach__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.reach-card {
  display: flex; gap: 1rem; align-items: center; padding: 1.4rem; border-radius: var(--radius); text-decoration: none;
  background: var(--coffee-900); border: 1px solid rgba(243,230,211,.1); transition: border-color .2s, transform .2s;
}
.reach-card:hover { border-color: var(--orange); transform: translateY(-3px); }
.reach-card__ico { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(253,154,25,.12); color: var(--orange); }
.reach-card__ico svg { width: 26px; height: 26px; }
.reach-card b { display: block; font-size: 1.15rem; color: var(--cream); }
.reach-card small { display: block; color: var(--cream-dim); font-size: .92rem; margin-top: .15rem; }
.reach__form { max-width: 760px; margin: 0 auto; text-align: center; }
.reach__lead { color: var(--cream-dim); margin: -.4rem 0 1.4rem; }
.reach__form .msgform { text-align: start; }

.page-head__ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(253,154,25,.12); color: var(--orange); margin: 0 auto 1rem; }
.page-head__ico svg { width: 30px; height: 30px; }
.feedback { max-width: 760px; }
.feedback__other { text-align: center; color: var(--cream-dim); display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.feedback__other a { color: var(--orange); font-weight: 600; }

.msgform__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
.msgform__wide { grid-column: 1 / -1; }
.msgform .field select, .msgform .field textarea { width: 100%; padding: .8rem 1rem; border-radius: 12px; background-color: var(--coffee-800); color: var(--cream); border: 1.5px solid rgba(243,230,211,.18); font: inherit; }
.msgform .field select:focus { outline: none; border-color: var(--orange); }
.msgform .field textarea[aria-invalid="true"] { border-color: #ff7a5c; }
.msgform__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.msgform__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.msgform__foot .form-err { margin: 0; }
.msgform__done { text-align: center; padding: 1.5rem 0 .5rem; }
.msgform__done p { font-size: 1.1rem; font-weight: 600; margin: .6rem 0 1.2rem; }
.msgform__tick { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--orange); color: var(--black); font-size: 2rem; font-weight: 700; }

@media (max-width: 860px) {
  .branches__grid { grid-template-columns: 1fr; }
  .branch-map { min-height: 340px; order: -1; }
  .reach__cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .msgform__fields { grid-template-columns: 1fr; }
  .ways__grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .way { padding: 1.1rem .6rem; }
  .way__text { font-size: .82rem; overflow-wrap: anywhere; }
  .msgform__foot .btn { width: 100%; }
}
