/* ================================================================
   MAP — map.css
   Google Maps container + InfoWindow popup.
   ================================================================ */

/* --- Container -------------------------------------------------- */
.gmap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.map-listing {
  height: clamp(300px, 55vh, 520px);
}
.map-fullheight {
  height: calc(100vh - var(--nav-h));
  min-height: 400px;
}

/* --- InfoWindow popup ------------------------------------------- */
.gm-style .gm-style-iw-c {
  padding: 0 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
  max-width: 200px !important;
  overflow: hidden !important;
  background: #fff !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 0.875rem 1rem !important;
  max-height: none !important;
  text-align: center;
}

.gm-style .gm-style-iw-ch {
  display: none;
}

/* Cover image */
.gm-style .gm-style-iw-d img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: none;
  padding: 0;
  margin: 0 0 0.75rem;
  background: #f5f5f5;
}

/* Community/showhome logo — small, contained (overrides cover style) */
.gm-style .gm-style-iw-d img.community-logo-gmap {
  width: auto;
  max-width: 120px;
  height: 84px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  border-radius: 6px;
  background: #fff;
}

/* Typography */
.gm-style .gm-style-iw-d * {
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.4;
}

.gm-style .gm-style-iw-d h3,
.gm-style .gm-style-iw-d strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dark, #1a1a1a);
  margin-bottom: 0.25rem;
  display: block;
}

.gm-style .gm-style-iw-d p {
  font-size: 0.75rem;
  color: #6b6b6b;
  margin-bottom: 0.2rem;
}

.gm-style .gm-style-iw-d ul {
  display: none !important;
}

/* CTA — fully self-contained so Google Maps styles can't strip it */
.gm-style .btn-primary,
.gm-style .theme-btn {
  display: block !important;
  width: 100% !important;
  background: var(--ink, --primary) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 30px !important;
  padding: 0.5rem 0.75rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  letter-spacing: 0.04em !important;
  line-height: 1.4 !important;
}
.gm-style .btn-primary:hover,
.gm-style .theme-btn:hover {
  background: var(--ink, --primary) !important;
  color: #fff !important;
}

/* Tail arrow */
.gm-style .gm-style-iw-tc::after,
.gm-style .gm-style-iw-t::after {
  background: #fff !important;
}

/* Close button */
.gm-style button.gm-ui-hover-effect {
  top: 4px !important;
  right: 4px !important;
  opacity: 0.6 !important;
}
.gm-style button.gm-ui-hover-effect:hover {
  opacity: 1 !important;
}

/* --- Pins ------------------------------------------------------- */
.map-pin {
  background: var(--red, --primary);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  position: relative;
}

.map-pin::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--red, --primary);
  border-bottom: none;
}

.map-cluster {
  background: var(--dark, #1a1a1a);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.popup-card-btns {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.popup-card-btns a {
  background-color: var(--red);
  color: white;
  border-radius: 30px;
  padding: 6px 15px;
  display: block;
  text-decoration: none;
  font-size: 12px;
}

/*new*/
/* ==========================================================
   Map Section Component
========================================================== */

.map-section {
  background: linear-gradient(180deg, var(--soft), #fff);
}

.map-card {
  overflow: hidden;

  background: #fff;

  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;

  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.map-card #cMap {
  min-height: 520px;
  border-radius: 0;
}

@media (max-width: 767.98px) {
  .map-card #cMap {
    min-height: 420px;
  }
}
