/* Wrapper centers the grid within typical theme content widths */
.tec-photo-grid-wrap {
  max-width: var(--wp--style--global--content-size, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

/* TEC Photo Grid – image-first tiles */
.tec-photo-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.tec-photo-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tec-photo-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tec-photo-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .tec-photo-grid[class*="--cols-"] { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tec-photo-grid { grid-template-columns: 1fr; } }

.tec-photo-grid__item { position: relative; overflow: hidden; border-radius: 16px; }
.tec-photo-grid__link { display: block; text-decoration: none; color: inherit; }

.tec-photo-grid__figure {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-color: #f2f2f2; /* fallback if no image */
}
.tec-photo-grid__figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 45%, rgba(0,0,0,0.55) 100%);
  transition: opacity .25s ease;
}
.tec-photo-grid__item:hover .tec-photo-grid__figure::after { opacity: 0.85; }

.tec-photo-grid__badge {
  position: absolute; top: 12px; left: 12px;
  padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .2px;
  background: rgba(255,255,255,0.9); color: #111; backdrop-filter: blur(4px);
}

.tec-photo-grid__caption {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  color: #fff;
}
.tec-photo-grid__title {
  margin: 0 0 6px 0; font-size: 18px; line-height: 1.25; font-weight: 700;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.tec-photo-grid__meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 13px; opacity: 0.95;
  color: #fff; /* ensure white meta text */
}
.tec-photo-grid__sep { opacity: 0.7; }
.tec-photo-grid__location { opacity: 0.9; }

/* Nice hover lift */
.tec-photo-grid__item { transform: translateY(0); transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.tec-photo-grid__item:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,0.12); }
