/**
 * Locations & Interactive Map Widget Styles - AGP
 */
.agp-page-hero {
  width: 100%;
}

.agp-page-hero-grid {
  width: 100%;
  max-width: var(--agp-max, 1440px);
  min-height: 35rem;
  margin: 0 auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.65fr);
  gap: 0.75rem;
}

.agp-page-hero-title,
.agp-page-hero-note {
  border-radius: var(--agp-radius-lg, 2.1rem);
  overflow: hidden;
}

.agp-page-hero-title {
  padding: clamp(2rem, 5vw, 5rem);
  background: var(--agp-white, #ffffff);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.agp-page-hero-title h1 {
  max-width: 10ch;
  margin: auto 0 0;
  font-size: clamp(3.5rem, 7vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  font-weight: 550;
  color: var(--agp-ink, #101727);
}

.agp-page-hero-note {
  padding: clamp(2rem, 4vw, 4rem);
  background: var(--agp-yellow, #ffbd00);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--agp-ink, #101727);
}

.agp-page-hero-note > p {
  max-width: 31rem;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.5;
  margin: 0;
}

.agp-location-total {
  margin-top: 2.2rem;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.agp-location-total strong {
  font-size: clamp(4.5rem, 8vw, 8rem);
  line-height: 0.75;
  letter-spacing: -0.08em;
  font-weight: 800;
  color: var(--agp-ink, #101727);
}

.agp-location-total span {
  padding-bottom: 0.25rem;
  font-weight: 780;
  line-height: 1.15;
  font-size: 0.95rem;
}

/* Interactive Map Layout */
.agp-locations-page {
  width: 100%;
}

.agp-locations-layout {
  width: 100%;
  max-width: var(--agp-max, 1440px);
  margin: 0 auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.75rem;
  align-items: stretch;
}

.agp-map-card {
  width: 100%;
  height: 100%;
  min-height: 52rem;
  align-self: stretch;
  overflow: hidden;
  background: var(--agp-ink, #101727);
  border-radius: var(--agp-radius-lg, 2.1rem);
  box-shadow: 0 12px 40px rgba(16, 23, 39, 0.12);
  display: flex;
  flex-direction: column;
}

.agp-map-toolbar {
  min-height: 5rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--agp-white, #ffffff);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.agp-map-toolbar span {
  color: #aeb6c6;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.agp-map-toolbar strong {
  color: var(--agp-yellow, #ffbd00);
  font-size: 1.25rem;
  font-weight: 800;
}

/* ── Leaflet Map Container & Iframe (100% altura) ── */
.agp-leaflet-map,
.agp-map-card iframe,
.agp-map-iframe {
  width: 100%;
  height: 100%;
  flex: 1 1 0;
  min-height: 0;
  border: 0;
  display: block;
  background: #080c15;
}

/* Leaflet tile override for dark mode feel */
.agp-leaflet-map .leaflet-tile {
  filter: saturate(0.55) brightness(0.88) contrast(1.1);
}

/* ── Custom AGP Marker ── */
.agp-map-pin {
  position: relative;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.agp-map-pin-dot {
  position: absolute;
  inset: 0;
  width: 36px;
  height: 36px;
  background: var(--agp-yellow, #ffbd00);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 14px rgba(255, 189, 0, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.agp-map-pin:hover .agp-map-pin-dot,
.agp-map-pin.is-active .agp-map-pin-dot {
  transform: rotate(-45deg) scale(1.2);
  box-shadow: 0 6px 22px rgba(255, 189, 0, 0.75);
}

.agp-map-pin-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--agp-ink, #101727);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Pulse ring for active pin */
.agp-map-pin.is-active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  background: rgba(255, 189, 0, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: agp-pin-pulse 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes agp-pin-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.7); opacity: 0.8; }
  70%  { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* ── Leaflet Popup AGP Style ── */
.leaflet-popup-content-wrapper {
  background: var(--agp-ink, #101727) !important;
  color: var(--agp-white, #fff) !important;
  border-radius: 1.1rem !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35) !important;
  padding: 0 !important;
  font-family: var(--agp-font) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  min-width: 220px;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.agp-popup {
  padding: 1.25rem 1.5rem;
}

.agp-popup-city {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--agp-yellow, #ffbd00);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.agp-popup-address {
  font-size: 0.8rem;
  color: #aeb6c6;
  margin: 0 0 0.25rem;
  line-height: 1.45;
}

.agp-popup-phone {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--agp-white, #fff);
  margin: 0;
}

.leaflet-popup-tip {
  background: var(--agp-ink, #101727) !important;
}

.leaflet-popup-close-button {
  color: #aeb6c6 !important;
  font-size: 1.1rem !important;
  top: 0.6rem !important;
  right: 0.75rem !important;
}

.agp-office-selector {
  display: grid;
  gap: 0.75rem;
}

.agp-office-option {
  width: 100%;
  padding: 1.6rem;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 1rem;
  text-align: left;
  color: var(--agp-ink, #101727);
  background: var(--agp-white, #ffffff);
  border: 1px solid #e0e1e3;
  border-radius: var(--agp-radius-md, 1.35rem);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.agp-office-option:hover,
.agp-office-option:focus-visible {
  transform: translateX(-4px);
  border-color: var(--agp-yellow, #ffbd00);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.agp-office-option.is-active {
  background: var(--agp-yellow, #ffbd00);
  border-color: var(--agp-yellow, #ffbd00);
  box-shadow: 0 8px 24px rgba(255, 189, 0, 0.25);
}

.agp-office-option > span {
  font-size: 0.74rem;
  font-weight: 850;
  color: var(--agp-muted, #667084);
}

.agp-office-option.is-active > span {
  color: var(--agp-ink, #101727);
}

.agp-office-option h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.55rem, 2.5vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: var(--agp-ink, #101727);
}

.agp-office-option p {
  margin: 0 0 0.7rem;
  color: #606979;
  font-size: 0.88rem;
  line-height: 1.45;
}

.agp-office-option.is-active p {
  color: #2c3340;
}

.agp-office-option strong {
  font-size: 0.88rem;
  font-weight: 760;
  color: var(--agp-ink, #101727);
}

/* Bottom CTA Strip */
.agp-location-cta {
  width: 100%;
}

.agp-location-cta > div {
  width: 100%;
  max-width: var(--agp-max, 1440px);
  margin: 0 auto;
  box-sizing: border-box;
  padding: 2.2rem clamp(1.5rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--agp-yellow, #ffbd00);
  border-radius: var(--agp-radius-lg, 2.1rem);
}

.agp-location-cta p {
  max-width: 34rem;
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--agp-ink, #101727);
}

@media (max-width: 1000px) {
  .agp-page-hero-grid,
  .agp-locations-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .agp-page-hero-title {
    min-height: 27rem;
  }
  .agp-map-card {
    position: static;
    height: 38rem;
    min-height: 38rem;
  }
  .agp-leaflet-map,
  .agp-map-card iframe,
  .agp-map-iframe {
    height: 33rem;
    min-height: 33rem;
  }
}

@media (max-width: 768px) {
  .agp-page-hero-title,
  .agp-page-hero-note {
    padding: 2.2rem 1.35rem;
    border-radius: var(--agp-radius-md, 1.35rem);
  }
  .agp-page-hero-title {
    min-height: 22rem;
  }
  .agp-page-hero-title h1 {
    font-size: clamp(2.8rem, 13vw, 4.4rem);
  }
  .agp-map-card {
    height: 30rem;
    min-height: 30rem;
    border-radius: var(--agp-radius-md, 1.35rem);
  }
  .agp-leaflet-map,
  .agp-map-card iframe,
  .agp-map-iframe {
    height: 25rem;
    min-height: 25rem;
  }
  .agp-office-option {
    padding: 1.25rem;
    border-radius: var(--agp-radius-md, 1.35rem);
  }
  .agp-location-cta > div {
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.35rem;
    border-radius: var(--agp-radius-md, 1.35rem);
  }
  .agp-location-cta .agp-button {
    width: 100%;
  }
}
