.tpl-gallery-section-head {
  display: grid;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.75rem;
}

.tpl-gallery-section-head h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.tpl-gallery-section-head p {
  max-width: 620px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
}

.tpl-gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tpl-accent);
}

.tpl-gallery-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 1rem;
}

.tpl-gallery-preview-item {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 260px;
  border-radius: 28px;
  border: 1px solid rgba(13, 106, 113, 0.12);
  box-shadow: var(--tpl-shadow);
  text-decoration: none;
  isolation: isolate;
}

.tpl-gallery-preview-item img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tpl-gallery-preview-item.is-featured {
  grid-row: span 2;
  min-height: 540px;
}

.tpl-gallery-preview-item.is-featured img {
  min-height: 540px;
}

.tpl-gallery-preview-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 90, 86, 0.04), rgba(18, 27, 31, 0.42));
  z-index: 1;
}

.tpl-gallery-preview-item:hover img,
.tpl-gallery-preview-item:focus-visible img {
  transform: scale(1.04);
}

.tpl-gallery-preview-glow {
  position: absolute;
  inset: auto auto -35% -10%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  z-index: 1;
}

.tpl-gallery-preview-chip,
.tpl-gallery-preview-content {
  position: absolute;
  z-index: 2;
}

.tpl-gallery-preview-chip {
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tpl-ink);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(27, 27, 27, 0.14);
}

.tpl-gallery-preview-content {
  inset: auto 1.1rem 1.1rem 1.1rem;
  display: grid;
  gap: 0.65rem;
  padding: 1.2rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(13, 106, 113, 0.18), rgba(11, 36, 39, 0.78));
  color: #fff;
  backdrop-filter: blur(10px);
}

.tpl-gallery-preview-meta {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 244, 235, 0.78);
}

.tpl-gallery-preview-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.05;
}

.tpl-gallery-preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: var(--tpl-ink);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(27, 27, 27, 0.16);
}

.tpl-gallery-empty {
  padding: 2.5rem 1.4rem;
  border: 1px dashed rgba(13, 106, 113, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  color: var(--tpl-muted);
}

@media (max-width: 900px) {
  .tpl-gallery-preview {
    grid-template-columns: 1fr;
  }

  .tpl-gallery-preview-item,
  .tpl-gallery-preview-item.is-featured,
  .tpl-gallery-preview-item img,
  .tpl-gallery-preview-item.is-featured img {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .tpl-gallery-section-head {
    gap: 0.7rem;
  }

  .tpl-gallery-preview-item,
  .tpl-gallery-preview-item.is-featured,
  .tpl-gallery-preview-item img,
  .tpl-gallery-preview-item.is-featured img {
    min-height: 260px;
  }

  .tpl-gallery-preview-content {
    inset: auto 0.9rem 0.9rem 0.9rem;
  }
}
