/* Square photo destination cards — same recipe as homepage popular categories.
   Used by Climate Hub stations, /cities index, nearby climate. */

.geo-dest-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

@media (min-width: 769px) {
  .geo-dest-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
  }
}

a.geo-dest-photo-card.category-card.category-card--photo,
.geo-dest-photo-grid .category-card.category-card--photo {
  position: relative;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  isolation: isolate;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  min-height: unset !important;
  height: auto !important;
  width: 100%;
  max-width: 100% !important;
  border-radius: var(--z-card-radius, 20px) !important;
  overflow: hidden !important;
  text-decoration: none !important;
  color: inherit;
  box-shadow:
    0 1px 2px rgba(60, 64, 67, 0.06),
    0 4px 14px rgba(60, 64, 67, 0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

a.geo-dest-photo-card.category-card.category-card--photo:hover,
.geo-dest-photo-grid .category-card.category-card--photo:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 10px rgba(60, 64, 67, 0.1),
    0 12px 28px rgba(60, 64, 67, 0.14) !important;
}

a.geo-dest-photo-card .category-card__photo,
.geo-dest-photo-grid .category-card--photo .category-card__photo {
  position: absolute;
  inset: -2px;
  z-index: 0;
  background-image: var(--cat-bg, none),
    linear-gradient(145deg, #1e3a5f 0%, #0d9488 55%, #0f172a 100%);
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  border-radius: 0 !important;
  transform: scale(1.01);
  transform-origin: center center;
  transition: transform 0.45s ease;
}

a.geo-dest-photo-card:hover .category-card__photo,
.geo-dest-photo-grid .category-card--photo:hover .category-card__photo {
  transform: scale(1.05);
}

a.geo-dest-photo-card .category-card__glass-top,
.geo-dest-photo-grid .category-card--photo .category-card__glass-top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 0 auto;
  width: 100%;
  margin: auto 0 0;
  padding: 0.75rem 0.55rem 0.85rem;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.55) 42%, rgba(15, 23, 42, 0.78) 100%) !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
}

a.geo-dest-photo-card .category-title,
.geo-dest-photo-grid .category-card--photo .category-title {
  margin: 0 0 0.25rem;
  padding: 0 !important;
  color: #fff !important;
  font-size: clamp(0.92rem, 1.6vw, 1.12rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-shadow:
    -1px -1px 0 rgba(15, 23, 42, 0.72),
    1px -1px 0 rgba(15, 23, 42, 0.72),
    -1px 1px 0 rgba(15, 23, 42, 0.72),
    1px 1px 0 rgba(15, 23, 42, 0.72),
    0 2px 10px rgba(0, 0, 0, 0.35);
}

a.geo-dest-photo-card .category-description,
.geo-dest-photo-grid .category-card--photo .category-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
  text-transform: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Override legacy white text tiles when photo class is present */
.geo-hub-index-card.geo-dest-photo-card,
.wx-station-card.geo-dest-photo-card,
.wx-country-card.geo-dest-photo-card {
  gap: 0;
  border: none !important;
  background: transparent !important;
}

.geo-hub-index-card.geo-dest-photo-card[hidden] {
  display: none !important;
}
