/* Service-area map (Leaflet, no Google Maps API key).
   Renders the UAEL "google map" widget with free Carto dark tiles and the
   Red Eagle bird as the location marker. */

.uael-google-map { height: 460px !important; width: 100%; }
/* Leaflet is applied directly to .uael-google-map (it becomes .leaflet-container).
   Give it its own stacking context (z-index:0) so its tiles/markers/controls
   stay contained and the van + card overlays (z-index:5) can sit above them. */
.uael-google-map.leaflet-container {
  position: relative;
  z-index: 0;
  border-radius: 10px;
  background: #0f0f10;
  font-family: "Poppins", "Roboto", Helvetica, Arial, sans-serif;
}

/* eagle marker */
.ref-map-marker {
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

/* popup styling to match the dark map */
.uael-google-map .leaflet-popup-content-wrapper {
  background: #1c1c1c;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.uael-google-map .leaflet-popup-tip { background: #1c1c1c; }
.uael-google-map .leaflet-popup-content {
  margin: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.uael-google-map .leaflet-popup-close-button { color: #cfcfcf; }

/* keep attribution subtle */
.uael-google-map .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.55);
  color: #cfcfcf;
  font-size: 10px;
}
.uael-google-map .leaflet-control-attribution a { color: #8ab4f8; }

/* ---- van + SERVICE AREA card overlays on the map ---- */
.uael-google-map-wrap.ref-map-stage { position: relative; }

.ref-map-van {
  position: absolute;
  left: -1%;
  bottom: 0;
  width: 34%;
  max-width: 520px;
  height: auto;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55));
}

.ref-map-areas {
  position: absolute;
  right: 3.5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44%;
  max-width: 560px;
  box-sizing: border-box;
  background: #C7191E;
  color: #fff;
  padding: 34px 44px;
  border-radius: 3px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  font-family: "Poppins", "Roboto", Helvetica, Arial, sans-serif;
}
.ref-areas-title {
  font-weight: 800;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  line-height: 1.1;
}
.ref-areas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 14px 26px;
}
.ref-areas-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 600;
  line-height: 1.2;
}
.ref-areas-list li img {
  width: 30px;
  height: 27px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Subtle entrance animation when the section scrolls into view.
   Mirrors the live site's van "slideInRight" (500ms delay); the card gets a
   gentle staggered fade-up to complement it. Honors reduced-motion: those
   users see both immediately (no opacity:0 outside this block). */
@media (prefers-reduced-motion: no-preference) {
  .ref-map-stage .ref-map-van,
  .ref-map-stage .ref-map-areas { opacity: 0; will-change: transform, opacity; }
  .ref-map-stage.ref-inview .ref-map-van {
    animation: refVanIn 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.4s both;
  }
  .ref-map-stage.ref-inview .ref-map-areas {
    animation: refCardIn 0.7s ease-out 0.65s both;
  }
  @keyframes refVanIn {
    from { opacity: 0; transform: translateX(64px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  /* card keeps its translateY(-50%) vertical centering throughout */
  @keyframes refCardIn {
    from { opacity: 0; transform: translate(0, calc(-50% + 16px)); }
    to   { opacity: 1; transform: translate(0, -50%); }
  }
}

/* tablet: map still visible (widget is hidden-mobile only) */
@media (max-width: 1024px) {
  .ref-map-van { width: 32%; }
  .ref-map-areas { padding: 24px 28px; right: 2.5%; }
  .ref-areas-list { gap: 10px 16px; }
}

@media (max-width: 767px) {
  .uael-google-map { height: 360px !important; }
}
