/* Homepage — Multi-location map layout */

.home-hero {
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.home-hero__logo {
  max-width: 110px;
  height: auto;
  margin-bottom: 0.5rem;
}

.home-hero__brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: #b03a5b;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.home-hero__url {
  color: #b03a5b;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  opacity: 0.85;
}

.home-hero__title {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #1a4a7a;
  margin-bottom: 0.75rem;
}

.home-hero__subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: #4a5568;
  max-width: 640px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.home-hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.home-stat {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(176, 58, 91, 0.15);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  color: #4a5568;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.home-stat strong {
  color: #b03a5b;
}

/* Map + location panel */
.locations-hub {
  padding: 1rem 0 3rem;
}

.locations-hub__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.locations-hub__header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: #1a4a7a;
  margin-bottom: 0.5rem;
}

.locations-hub__header p {
  color: #6b7280;
  margin: 0;
}

.locations-hub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.locations-map-panel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: #e8f4fc;
  min-height: 520px;
}

.map-locate-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff;
  color: #8B3A6B;
  border: 2px solid #8B3A6B;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.map-locate-btn:hover:not(:disabled) {
  background: #8B3A6B;
  color: #fff;
}

.map-locate-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.map-locate-btn.is-active {
  background: #8B3A6B;
  color: #fff;
}

.nearest-result {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  z-index: 1000;
  max-width: min(280px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid #b03a5b;
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #374151;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.nearest-result strong {
  color: #b03a5b;
}

.nearest-result.is-error {
  border-color: #d97706;
  color: #92400e;
}

#locations-map {
  width: 100%;
  height: 520px;
  z-index: 1;
}

/* Sidebar list hidden — full cards shown in grid below map */
.locations-list-panel {
  display: none;
}

.locations-cards-mobile {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Location card (compact, map-linked) */
.loc-card {
  background: #fff;
  border-radius: 16px;
  border: 2px solid transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.loc-card:hover,
.loc-card.is-active {
  border-color: #b03a5b;
  box-shadow: 0 8px 28px rgba(176, 58, 91, 0.18);
  transform: translateY(-2px);
}

.loc-card.is-nearest {
  border-color: #b03a5b;
  box-shadow: 0 8px 28px rgba(176, 58, 91, 0.22);
}

.loc-card__distance {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a4a7a;
  background: #eef6fc;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  margin-bottom: 0.5rem;
}

.loc-card__distance--nearest {
  background: #fde8ef;
  color: #b03a5b;
}

.loc-card__header {
  background: linear-gradient(135deg, #8B3A6B 0%, #B8577A 100%);
  color: #fff;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.loc-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.loc-card__badge {
  background: rgba(255, 215, 0, 0.9);
  color: #5c3d00;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.loc-card__rating {
  text-align: right;
  font-size: 0.8rem;
  white-space: nowrap;
}

.loc-card__stars {
  color: #FFD700;
  letter-spacing: 1px;
}

.loc-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.loc-card__region {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8B3A6B;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.loc-card__address {
  font-size: 0.88rem;
  color: #4a5568;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.loc-card__phones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.loc-card__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f8f0f4;
  color: #8B3A6B;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.loc-card__phone:hover {
  background: #8B3A6B;
  color: #fff;
}

.loc-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
}

.loc-card__actions .btn {
  font-size: 0.82rem;
  padding: 0.45rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.loc-card__actions .btn-primary {
  background: linear-gradient(135deg, #8B3A6B, #B8577A);
  border: none;
}

.loc-card__actions .btn-outline-primary {
  border-color: #8B3A6B;
  color: #8B3A6B;
}

.loc-card__actions .btn-outline-primary:hover {
  background: #8B3A6B;
  color: #fff;
}

.loc-card__note {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 0.65rem;
  line-height: 1.4;
}

/* Leaflet overrides */
.ma-pin-wrapper {
  background: transparent !important;
  border: none !important;
}

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

/* Leaflet custom pin */
.ma-pin {
  background: linear-gradient(135deg, #8B3A6B, #B8577A);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  width: 32px;
  height: 32px;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(139, 58, 107, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ma-pin i {
  transform: rotate(45deg);
  color: #fff;
  font-size: 12px;
}

.user-pin-wrapper {
  background: transparent !important;
  border: none !important;
}

.user-pin {
  background: #2563eb;
  border: 3px solid #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25), 0 4px 12px rgba(37, 99, 235, 0.4);
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.leaflet-popup-content {
  margin: 12px 14px;
  font-family: inherit;
  line-height: 1.5;
}

.map-popup__title {
  font-weight: 700;
  color: #8B3A6B;
  margin-bottom: 0.25rem;
}

.map-popup__addr {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.map-popup__link {
  font-size: 0.85rem;
  color: #1a4a7a;
  font-weight: 600;
  text-decoration: none;
}

.map-popup__link:hover {
  color: #b03a5b;
}

/* Region filter pills */
.region-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.region-filter {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.region-filter:hover,
.region-filter.is-active {
  border-color: #b03a5b;
  color: #b03a5b;
  background: #fdf2f6;
}

/* Hours section refresh */
.home-hours {
  padding: 0 0 3rem;
}

.home-hours__card {
  background: linear-gradient(135deg, #E0F6FF 0%, #B0E0E6 50%, #87CEEB 100%);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.home-hours__card h3 {
  color: #1a4a7a;
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
}

.home-hours__times {
  font-size: 1.25rem;
  font-weight: 600;
  color: #8B3A6B;
}

.home-hours__note {
  margin-top: 0.75rem;
  color: #6b7280;
  font-size: 0.9rem;
}

/* Responsive */
@media (min-width: 992px) {
  .loc-card__actions .btn {
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
  }
}

@media (max-width: 1199px) {
  .locations-cards-mobile {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .map-locate-btn {
    top: auto;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .nearest-result {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .locations-cards-mobile {
    grid-template-columns: 1fr;
  }

  #locations-map,
  .locations-map-panel {
    min-height: 360px;
    height: 360px;
  }

  #locations-map {
    height: 360px;
  }
}

@media (max-width: 576px) {
  .loc-card__actions {
    grid-template-columns: 1fr;
  }

  .home-hero__stats {
    flex-direction: column;
    align-items: center;
  }
}
