/* ============================================================
   BRANCHES.CSS
   ------------------------------------------------------------
   Styles ONLY for branches.html. Every selector below is
   namespaced with a "br-" / "bcp-" prefix so nothing here can
   collide with, or override, classes used on other pages.
   Colors, fonts and radii are pulled from the site's existing
   CSS variables defined in css/style.css (:root) — no new
   palette is introduced.
   ============================================================ */

/* ---------- Section wrapper ---------- */
.br-section{padding-top:8px;}

/* ---------- 1. BRANCH NETWORK MAP ---------- */
.br-map-wrap{
  display:grid;
  grid-template-columns:1fr;
  gap:0;
  border-radius:var(--radius-l);
  overflow:hidden;
  box-shadow:0 24px 50px -30px rgba(23,26,51,.35);
  background:var(--white);
  margin-bottom:40px;
}

.br-map-frame{
  position:relative;
  width:100%;
  min-height:420px;
  background:
    linear-gradient(160deg,var(--blue-tint),var(--white) 60%);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.br-map-frame img{
  width:100%;
  height:100%;
  max-height:520px;
  object-fit:contain;
  border-radius:var(--radius-m);
}

/* Placeholder shown until a real map image is uploaded */
.br-map-placeholder{
  border:2px dashed var(--line);
  border-radius:var(--radius-m);
  width:100%;
  min-height:380px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-align:center;
  color:var(--ink-soft);
  background:rgba(255,255,255,.6);
  padding:40px 24px;
}
.br-map-placeholder svg{width:56px;height:56px;color:var(--blue);opacity:.55;}
.br-map-placeholder strong{color:var(--blue-dark);font-size:1.05rem;}
.br-map-placeholder span{font-size:.88rem;max-width:360px;}

.br-map-badge{
  position:absolute;top:20px;left:20px;
  background:var(--red);color:var(--white);
  font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  padding:8px 14px;border-radius:999px;
  box-shadow:0 10px 20px -10px rgba(237,28,36,.6);
}

/* ---------- Stat strip under the map ---------- */
.br-stats-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-top:1px solid var(--line);
}
.br-stat{
  padding:26px 20px;
  text-align:center;
  border-right:1px solid var(--line);
}
.br-stat:last-child{border-right:none;}
.br-stat-num{
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(1.6rem,3vw,2.2rem);
  color:var(--blue-dark);
  line-height:1;
}
.br-stat-label{
  margin-top:8px;
  font-size:.85rem;
  color:var(--ink-soft);
  font-weight:600;
  letter-spacing:.02em;
}

/* ---------- 2. QUICK SUMMARY (premium stat cards) ---------- */
.br-summary{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
  margin-bottom:44px;
}
.br-summary-card{
  position:relative;
  background:linear-gradient(150deg,var(--blue-dark),var(--blue) 120%);
  color:var(--white);
  border-radius:var(--radius-m);
  padding:26px 22px;
  overflow:hidden;
  box-shadow:0 18px 34px -22px rgba(27,30,92,.55);
}
.br-summary-card::after{
  content:"";position:absolute;right:-30px;bottom:-30px;
  width:110px;height:110px;border-radius:50%;
  background:rgba(255,255,255,.08);
}
.br-summary-card.is-live{
  background:linear-gradient(150deg,var(--red-dark),var(--red) 120%);
}
.br-summary-num{
  font-family:var(--font-display);
  font-weight:800;
  font-size:clamp(1.7rem,3vw,2.3rem);
  position:relative;z-index:1;
}
.br-summary-label{
  margin-top:6px;
  font-size:.86rem;
  opacity:.9;
  position:relative;z-index:1;
}
.br-summary-card.is-live .br-summary-label{display:flex;align-items:center;gap:8px;}
.br-live-dot{
  width:9px;height:9px;border-radius:50%;background:#4CFF7A;
  box-shadow:0 0 0 0 rgba(76,255,122,.7);
  animation:brPulse 1.8s infinite;
  display:inline-block;
}
@keyframes brPulse{
  0%{box-shadow:0 0 0 0 rgba(76,255,122,.6);}
  70%{box-shadow:0 0 0 10px rgba(76,255,122,0);}
  100%{box-shadow:0 0 0 0 rgba(76,255,122,0);}
}

/* ---------- 3 & 4. SEARCH + DISTRICT FILTER ---------- */
.br-toolbar{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:center;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-m);
  padding:16px;
  margin-bottom:14px;
  box-shadow:0 14px 28px -22px rgba(23,26,51,.2);
}
.br-search-field{
  flex:1;
  min-width:240px;
  position:relative;
  display:flex;
  align-items:center;
}
.br-search-field svg{
  position:absolute;left:14px;width:18px;height:18px;color:var(--ink-soft);
}
.br-search-field input{
  width:100%;
  padding:13px 16px 13px 42px;
  border-radius:var(--radius-s);
  border:1.5px solid var(--line);
  background:var(--bg-alt);
  font-size:.95rem;
  transition:border-color var(--speed-s),background var(--speed-s);
}
.br-search-field input:focus{
  border-color:var(--blue);
  background:var(--white);
  outline:none;
}
.br-filter-field select{
  padding:13px 40px 13px 16px;
  border-radius:var(--radius-s);
  border:1.5px solid var(--line);
  background:var(--bg-alt) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232E3192"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 12px center/18px;
  appearance:none;
  font-size:.95rem;
  min-width:200px;
  cursor:pointer;
}
.br-filter-field select:focus{border-color:var(--blue);outline:none;}

.br-result-count{
  font-size:.85rem;
  color:var(--ink-soft);
  margin:0 0 28px 4px;
  font-weight:600;
}

/* ---------- 5 & 8 & 9. BRANCH GRID + CARD ---------- */
.br-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:26px;
  align-items:stretch;
}

.branch-card-pro{
  display:flex;
  flex-direction:column;
  background:var(--white);
  border-radius:var(--radius-m);
  border:1px solid var(--line);
  box-shadow:0 16px 30px -24px rgba(23,26,51,.3);
  overflow:hidden;
  transition:transform var(--speed-s) var(--ease),box-shadow var(--speed-s) var(--ease);
  height:100%;
}
.branch-card-pro:hover{
  transform:translateY(-6px);
  box-shadow:0 26px 44px -22px rgba(23,26,51,.32);
}

.bcp-top{
  background:linear-gradient(120deg,var(--blue-dark),var(--blue) 130%);
  padding:20px 22px 18px;
  position:relative;
}
.bcp-top::after{
  content:"";position:absolute;right:-20px;top:-20px;width:80px;height:80px;
  border-radius:50%;background:rgba(237,28,36,.18);
}
.bcp-district-tag{
  display:inline-block;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  background:rgba(255,255,255,.16);
  color:var(--white);
  padding:5px 10px;
  border-radius:999px;
  margin-bottom:10px;
  position:relative;z-index:1;
}
.bcp-top h3{
  color:var(--white);
  font-size:1.12rem;
  margin:0;
  position:relative;z-index:1;
}

.bcp-details{
  padding:18px 22px 6px;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.bcp-details li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:.86rem;
  color:var(--ink-soft);
  line-height:1.45;
}
.bcp-details li svg{
  flex:none;
  width:17px;height:17px;
  color:var(--blue);
  margin-top:2px;
}
.bcp-details li.muted{opacity:.65;font-style:italic;}

.bcp-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:18px 22px 22px;
}
.bcp-btn{
  text-align:center;
  padding:11px 8px;
  border-radius:var(--radius-s);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.01em;
  transition:transform var(--speed-s),box-shadow var(--speed-s);
}
.bcp-btn:hover{transform:translateY(-2px);}
.bcp-btn-map{background:var(--blue-tint);color:var(--blue);}
.bcp-btn-dir{background:var(--blue);color:var(--white);}
.bcp-btn-call{background:var(--red);color:var(--white);grid-column:1 / -1;box-shadow:0 12px 22px -12px rgba(237,28,36,.55);}

/* ---------- 11. EMPTY STATE ---------- */
.br-empty{
  display:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:70px 20px;
  text-align:center;
  color:var(--ink-soft);
  background:var(--white);
  border:1px dashed var(--line);
  border-radius:var(--radius-m);
}
.br-empty svg{width:48px;height:48px;color:var(--blue);opacity:.5;}
.br-empty strong{color:var(--blue-dark);font-size:1.1rem;}

/* ============================================================
   RESPONSIVE — desktop / laptop / tablet / mobile
   (kept local to this page only)
   ============================================================ */

/* Laptop */
@media (max-width:1180px){
  .br-summary{grid-template-columns:repeat(2,1fr);}
  .br-grid{grid-template-columns:repeat(2,1fr);}
}

/* Tablet */
@media (max-width:960px){
  .br-stats-row{grid-template-columns:1fr;}
  .br-stat{border-right:none;border-bottom:1px solid var(--line);}
  .br-stat:last-child{border-bottom:none;}
}

/* Mobile */
@media (max-width:640px){
  .br-summary{grid-template-columns:1fr 1fr;}
  .br-grid{grid-template-columns:1fr;}
  .br-toolbar{flex-direction:column;align-items:stretch;}
  .br-filter-field select{width:100%;}
  .bcp-actions{grid-template-columns:1fr 1fr;}
}
