/* Examples landing grid */
.examples-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
}

.examples-section {
  margin: 2.5rem 0 3rem;
}
.examples-section__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

/* .examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
} */

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* .examples-card {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  transform: translateY(0);
  transition: transform .15s ease, box-shadow .15s ease;
} */

.examples-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f6f6;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* .examples-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
} */

.examples-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* .examples-card__img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
} */

.examples-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* .examples-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 60%);
} */

.examples-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.65), rgba(0,0,0,0.05)  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.examples-card:hover .examples-card__overlay {
  opacity: 1;
}

/* .examples-card__title {
  color: #fff;
  font-weight: 650;
  letter-spacing: -0.2px;
  font-size: 1.0rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
} */

.examples-card__title {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.2;
}

/* Dark mode tweak */
/* html[data-theme="dark"] .examples-card {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
} */

.gallery-grid {
  display: block;
  columns: 3;
  column-gap: 1.25rem;
}

@media (max-width: 991px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 575px) {
  .gallery-grid {
    columns: 1;
  }
}

.gallery-card {
  text-decoration: none;
  color: inherit;
  display: block;
  break-inside: avoid;
  margin-bottom: 1.25rem;
}

.gallery-card__imgwrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card__imgwrap img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  display: block;
}

.gallery-card__image-link {
  display: block;
}

.gallery-card__imgwrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.18);
}

/* Tags stay visible; the image shade and title appear on hover or focus. */
.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.gallery-card__overlay a {
  pointer-events: auto;
}

.gallery-card__imgwrap:hover .gallery-card__overlay,
.gallery-card__imgwrap:focus-within .gallery-card__overlay {
  background: rgba(0,0,0,0.55);
}

.gallery-card__title {
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
  display: block;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  text-decoration: none;
}

.gallery-card__imgwrap:hover .gallery-card__title,
.gallery-card__imgwrap:focus-within .gallery-card__title {
  opacity: 1;
}

.gallery-card__title:hover {
  color: #fff;
  text-decoration: underline;
}

.gallery-card__tags {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  right: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: 100%;
  gap: 0.35rem;
  margin-top: 0;
}

.content-tag {
  background: rgba(0, 0, 0, 0.75);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
  text-transform: none;
}

.content-tag:hover,
.content-tag:focus-visible {
  color: #fff;
  background: #222;
}

html[data-theme="dark"] .examples-card {
  background: #1e1e1e;
}
