/* ===== BRANCHES PAGE HERO ===== */
.branches-hero {
  background: var(--dark);
  color: #fff;
  padding: 4rem 0 0;
  position: relative;
  overflow: hidden;
}
.branches-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(17,17,17,0.93) 0%, rgba(42,61,143,0.82) 100%),
    radial-gradient(ellipse at 80% 30%, #0d1a4a 0%, transparent 55%);
}
.branches-hero .wrap { position: relative; z-index: 1; }
.branches-hero .breadcrumb {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.2rem;
}
.branches-hero .breadcrumb a { color: rgba(255,255,255,0.55); }
.branches-hero .breadcrumb a:hover { color: #fff; }
.branches-hero .breadcrumb span { color: rgba(255,255,255,0.35); margin: 0 0.5rem; }
.branches-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  margin: 0 0 0.6rem;
}
.branches-hero .hero-lede {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 0 2rem;
}

/* ===== SEARCH BAR (inside hero, flush bottom) ===== */
.search-bar-wrap {
  background: rgba(255,255,255,0.07);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  margin-top: 1rem;
}
.search-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr auto;
  gap: 0.75rem;
  align-items: center;
}
.search-bar select,
.search-bar input {
  padding: 0.72rem 1rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s, background 0.2s;
}
.search-bar select option { color: var(--charcoal); background: #fff; }
.search-bar select:focus,
.search-bar input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.15);
}
.search-bar input::placeholder { color: rgba(255,255,255,0.45); }
.search-bar .btn-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

/* ===== STATS STRIP ===== */
.branch-stats-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.bss-inner {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.bss-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
.bss-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--charcoal);
}
.bss-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bss-dot.branch { background: var(--red); }
.bss-dot.atm    { background: #1a73e8; }
.bss-dot.agent  { background: #2e7d32; }

/* ===== MAIN LAYOUT ===== */
.locator-section { padding: 3rem 0 5rem; background: var(--light); }
.locator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* ===== RESULTS PANEL ===== */
.results-panel {}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.results-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.results-count strong { color: var(--charcoal); }
.results-sort {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  background: var(--white);
  font: inherit;
  cursor: pointer;
}
.branch-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 680px;
  overflow-y: auto;
  padding-right: 4px;
}
.branch-list::-webkit-scrollbar { width: 4px; }
.branch-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ===== BRANCH CARD ===== */
.branch-card {
  background: var(--white);
  border-radius: 12px;
  border: 1.5px solid var(--border);
  padding: 1.2rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.branch-card:hover,
.branch-card.active {
  border-color: var(--red);
  box-shadow: 0 4px 20px rgba(42,61,143,.12);
  transform: translateY(-1px);
}
.branch-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}
.branch-name { font-size: 0.97rem; font-weight: 800; color: var(--charcoal); margin: 0; }
.branch-type-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-branch { background: rgba(42,61,143,.1); color: var(--red); }
.badge-atm    { background: rgba(26,115,232,.1);  color: #1a73e8; }
.badge-agent  { background: rgba(46,125,50,.1);   color: #2e7d32; }

.branch-addr {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}
.branch-addr svg { flex-shrink: 0; margin-top: 2px; }

.branch-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.branch-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.branch-meta-item svg { color: var(--red); }

.branch-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--charcoal);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}
.btn-sm:hover { border-color: var(--red); color: var(--red); }
.btn-sm.primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm.primary:hover { background: #a81b21; }

/* ===== MAP PANEL ===== */
.map-panel {
  position: sticky;
  top: 80px;
}
.map-container {
  background: #e8eaed;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 680px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-placeholder {
  /* Simulated map background */
  background:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(42,61,143,0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(42,61,143,0.04) 60px),
    linear-gradient(160deg, #dde3ea 0%, #c9d3dc 50%, #d4dbe3 100%);
  position: absolute;
  inset: 0;
}
.map-roads {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.map-road {
  position: absolute;
  background: rgba(255,255,255,0.7);
}
.map-road.h { height: 3px; left: 0; right: 0; }
.map-road.v { width: 3px; top: 0; bottom: 0; }
.map-road.h.major { height: 5px; background: rgba(255,255,255,0.85); }
.map-road.v.major { width: 5px; background: rgba(255,255,255,0.85); }

.map-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.map-icon-wrap {
  width: 72px; height: 72px;
  background: var(--red);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(42,61,143,.4);
}
.map-content h3 { margin: 0; font-size: 1.1rem; color: var(--charcoal); }
.map-content p  { margin: 0; font-size: 0.85rem; color: var(--muted); max-width: 240px; }

/* Map pins overlay */
.map-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: all;
  cursor: pointer;
  transition: transform 0.2s;
}
.map-pin:hover { transform: scale(1.2); }
.pin-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.pin-dot.branch { background: var(--red); }
.pin-dot.atm    { background: #1a73e8; }
.pin-dot.agent  { background: #2e7d32; }
.pin-label {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 2px;
}

/* Selected branch info panel */
.map-info-card {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  z-index: 3;
  display: none;
}
.map-info-card.visible { display: flex; }
.mic-icon {
  width: 42px; height: 42px;
  background: rgba(42,61,143,.1);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--red);
  flex-shrink: 0;
}
.mic-body { flex: 1; min-width: 0; }
.mic-name { font-weight: 800; font-size: 0.9rem; margin: 0 0 0.2rem; }
.mic-addr { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.5rem; }
.mic-actions { display: flex; gap: 0.4rem; }

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  display: none;
}
.no-results svg { color: var(--border); margin-bottom: 0.75rem; }
.no-results p { margin: 0; font-size: 0.9rem; }

/* ===== QUICK INFO SECTION ===== */
.branch-info-section {
  padding: 4rem 0;
  background: var(--white);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.info-card {
  border-radius: 14px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, transform 0.25s;
}
.info-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.info-card .ic-icon {
  width: 52px; height: 52px;
  background: rgba(42,61,143,.1);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--red);
}
.info-card h4 { margin: 0; font-size: 1rem; }
.info-card p  { margin: 0; font-size: 0.87rem; color: var(--muted); line-height: 1.65; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .locator-layout { grid-template-columns: 1fr; }
  .map-panel { position: static; }
  .map-container { height: 400px; }
  .branch-list { max-height: none; overflow-y: visible; }
}
@media (max-width: 768px) {
  .search-bar { grid-template-columns: 1fr 1fr; }
  .search-bar .btn-search { grid-column: 1 / -1; }
  .bss-inner { gap: 1.25rem; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .search-bar { grid-template-columns: 1fr; }
}
