/* ==============================
   BRANCHES PAGE
============================== */
.branches-map {
  position: relative;
  z-index: 1;
  height: 400px;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.branches-map__canvas {
  width: 100%;
  height: 100%;
}

.branches-map .leaflet-container {
  font-family: inherit;
}

.branches-map .leaflet-popup-content-wrapper {
  border-radius: 10px;
}

.branches-map .leaflet-popup-content {
  margin: 10px 12px;
  font-size: 0.95rem;
}

.branches-breadcrumb {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
}

.branches-breadcrumb__nav {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-base);
}

.branches-breadcrumb__nav a {
  color: var(--color-primary);
  text-decoration: underline;
}

.branches-hero {
  padding: 40px 0 20px;
  background: var(--color-bg-alt);
}

.branches-hero__title {
  font-size: clamp(2rem, 2.8vw, 2.65rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.branches-hero__desc {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

.branches-list-section {
  background: var(--color-bg-alt);
  padding: 8px 0 72px;
}

.branches-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.branches-list__item {
  margin: 0;
}

.branch-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  padding: 28px;
}

.branch-card--flash {
  animation: branch-card-flash 1.4s ease;
}

@keyframes branch-card-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 126, 138, 0);
    border-color: var(--color-border-light);
  }
  30% {
    box-shadow: 0 0 0 4px rgba(0, 126, 138, 0.18);
    border-color: var(--color-primary);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 126, 138, 0);
    border-color: var(--color-border-light);
  }
}

.branch-card__header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 18px;
}

.branch-card__title {
  font-size: clamp(1.6rem, 2.1vw, 2.1rem);
  margin-bottom: 8px;
}

.branch-card__address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--color-text-secondary);
}

.branch-card__route {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.branch-card__tag {
  align-self: flex-start;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 14px;
  white-space: nowrap;
}

.branch-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  padding: 20px 0;
}

.branch-card__subheading {
  font-size: var(--font-size-xl);
  margin-bottom: 10px;
}

.branch-card__hours {
  margin: 0;
}

.branch-card__hours div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 3px;
}

.branch-card__hours dt {
  font-weight: 700;
}

.branch-card__hours dd {
  margin: 0;
}

.branch-card__foyer,
.branch-card__note {
  margin: 0 0 10px 0;
  color: var(--color-text-secondary);
}

.branch-card__detail {
  border-top: 1px solid var(--color-border-light);
}

.branch-card__detail summary {
  list-style: none;
  cursor: pointer;
  font-size: var(--font-size-xl);
  font-weight: 700;
  padding: 16px 0;
  position: relative;
}

.branch-card__detail summary::-webkit-details-marker {
  display: none;
}

.branch-card__detail summary::after {
  content: '+';
  position: absolute;
  right: 2px;
  top: 14px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-text-secondary);
}

.branch-card__detail[open] summary::after {
  content: '-';
}

.branch-card__detail p {
  margin: 0;
  padding: 0 0 14px;
  color: var(--color-text-secondary);
}

@media (max-width: 980px) {
  .branch-card__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .branches-map {
    height: 280px;
  }

  .branch-card {
    padding: 20px;
  }

  .branch-card__header {
    flex-direction: column;
  }

  .branch-card__hours div {
    grid-template-columns: max-content minmax(0, 1fr);
  }
}
