/*
  Gallery safety layer.

  Keep real JPG backgrounds disabled until every file in assets/images/gallery/
  is visually verified. This prevents accidental screenshots of the site from
  appearing inside gallery cards.

  To enable verified images later, add class="gallery-images-ready" to <body>.
*/

.gallery-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 243, 195, 0.26), transparent 32%),
    linear-gradient(180deg, rgba(18, 32, 24, 0.08) 0%, rgba(18, 32, 24, 0.25) 44%, rgba(18, 32, 24, 0.84) 100%);
  pointer-events: none;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(145deg, rgba(104, 128, 94, 0.94), rgba(192, 142, 49, 0.98));
  pointer-events: none;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(79, 59, 14, 0.18);
}

.gallery-card > span,
.gallery-card > small {
  position: relative;
  z-index: 1;
}

.gallery-card:nth-child(1)::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%),
    linear-gradient(145deg, #c49736 0%, #8b6a22 48%, #314224 100%);
}

.gallery-card:nth-child(2)::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%),
    linear-gradient(145deg, #7f9a59 0%, #526b3b 52%, #25351f 100%);
}

.gallery-card:nth-child(3)::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%),
    linear-gradient(145deg, #b48a2e 0%, #6f6f2c 50%, #26331c 100%);
}

.gallery-card:nth-child(4)::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(145deg, #d5a824 0%, #65702c 52%, #22351f 100%);
}

.gallery-card:nth-child(5)::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(145deg, #d9bf2b 0%, #7c8b2f 50%, #26341e 100%);
}

.gallery-card:nth-child(6)::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(145deg, #5f87b3 0%, #56714d 50%, #243420 100%);
}

/* Real crop photos are gated until all six JPG files are checked manually. */
.gallery-images-ready .gallery-card:nth-child(1) {
  background-image: url("./assets/images/gallery/wheat.jpg");
}

.gallery-images-ready .gallery-card:nth-child(2) {
  background-image: url("./assets/images/gallery/soy.jpg");
}

.gallery-images-ready .gallery-card:nth-child(3) {
  background-image: url("./assets/images/gallery/corn.jpg");
}

.gallery-images-ready .gallery-card:nth-child(4) {
  background-image: url("./assets/images/gallery/sunflower.jpg");
}

.gallery-images-ready .gallery-card:nth-child(5) {
  background-image: url("./assets/images/gallery/rapeseed.jpg");
}

.gallery-images-ready .gallery-card:nth-child(6) {
  background-image: url("./assets/images/gallery/flax.jpg");
}

.gallery-images-ready .gallery-card::after {
  display: none;
}
