/* GALLERY SECTION */
.gallery-section {
  padding: 70px 5%;
  background: #fff;
  overflow: hidden;
}

.gallery-heading {
  text-align: center;
  margin: 0 auto 35px;
}

.gallery-eyebrow {
  display: block;
  color: #56845b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.gallery-heading h2 {
  color: #333;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 750;
  margin: 0 0 10px;
}

.gallery-heading p {
  color: #666;
  margin: 0;
  font-size: 15px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  min-width: 0;
  border-radius: 17px;
  overflow: hidden;
}

.gallery-viewport {
  height: 290px;
  position: relative;
  overflow: hidden;
  background: #e8e8e8;
}

.gallery-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 650ms ease-in-out;
  will-change: transform;
}

.gallery-track img {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-shade {
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 0, 0, 0.65)
  );
  pointer-events: none;
}

.gallery-card h3 {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 22px 18px 18px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.gallery-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid #d7d7d7;
  border-radius: 50%;
  background: #fff;
  color: #164a32;
  font-size: 20px;
  cursor: pointer;
  transition: background 200ms, color 200ms;
}

.gallery-arrow:hover {
  background: #164a32;
  color: #fff;
}

.gallery-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}

.gallery-dot.is-active {
  background: #17613c;
  transform: scale(1.25);
}

.gallery-arrow:focus-visible,
.gallery-dot:focus-visible {
  outline: 2px solid #17613c;
  outline-offset: 4px;
}

/* TABLETS */
@media (max-width: 900px) {
  .gallery-section {
    padding: 55px 4%;
  }

  .gallery-grid {
    gap: 12px;
  }

  .gallery-viewport {
    height: 230px;
  }

  .gallery-card h3 {
    font-size: 14px;
    padding: 18px 12px 14px;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .gallery-section {
    padding: 42px 18px;
  }

  .gallery-heading {
    margin-bottom: 25px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-viewport {
    height: 250px;
  }
}

/* REDUCED MOTION ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    transition: none;
  }

  .gallery-arrow {
    transition: none;
  }
}
