/* GIS Visits Block - Frontend Styles */

.synpact-gis-visits {
  margin: 2vh 0 5vh 0;
}

/* ── Grid ── */
.gis-visits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ── Card: 16:9 on desktop, squarer as window narrows ── */
.gis-visit-card {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #ccc;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
}

.gis-visit-card:hover {
  z-index: 10;
}

/* ── Overlay: 1/3 card height, vertically centered ── */
.gis-visit-overlay {
  position: absolute;
  height: 40%;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  background-color: rgba(174, 39, 97, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gis-visit-title {
  color: #f1f2eb;
  font-family: "PT Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 400;
  text-align: center;
  line-height: 1.3;
  margin: 0;
}

/* ── Dropdown (hidden, grows down from overlay's bottom edge on hover) ── */
.gis-visit-dropdown {
  position: absolute;
  top: 70%;
  left: 0;
  right: 0;
  background-color: #ae2761;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 0 0 14px 14px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  z-index: 2;
}

.gis-visit-card:hover .gis-visit-dropdown {
  max-height: 200px;
  padding: 14px 18px;
}

.gis-visit-link {
  color: #f1f2eb;
  font-family: "Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 400;
  text-decoration: none;
  line-height: 1.4;
  display: block;
}

.gis-visit-link:hover {
  text-decoration: underline;
  color: #f1f2eb;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .gis-visit-card {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 768px) {
  .gis-visits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gis-visit-card {
    aspect-ratio: 3 / 2;
  }

  .gis-visit-title {
    font-size: clamp(13px, 2.5vw, 17px);
  }
}

@media (max-width: 480px) {
  .gis-visits-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gis-visit-card {
    aspect-ratio: 1;
  }

  /* On touch (single column), keep dropdown always visible */
  .gis-visit-dropdown {
    max-height: 200px;
    padding: 14px 18px;
  }
}
