/* Fotos: one card per gallery with a horizontal image slider */

.fotos-container {
  margin-top: 2rem;
}

.galerie-block {
  margin-bottom: 3rem;
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.galerie-title {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.galerie-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.galerie-content a {
  color: var(--color-red);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(206, 23, 25, 0.4);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
}

.galerie-content a:hover {
  text-decoration-color: var(--color-red);
}

.gallery-slider-wrapper {
  position: relative;
  margin-top: 1rem;
  /* Lets the row height follow the card width (cqw units below) */
  container-type: inline-size;
}

/* Filmstrip: all photos share one row height and keep their own aspect
   ratio, so portrait and landscape shots are shown uncropped. */
.gallery-slider {
  --row-height: min(460px, 60vh, 66.6cqw);
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0.75rem;
  padding: 0 0 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) rgba(0, 0, 0, 0.04);
}

.gallery-slider::-webkit-scrollbar {
  height: 8px;
}

.gallery-slider::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

.gallery-slider::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 4px;
}

.gallery-slider::-webkit-scrollbar-thumb:hover {
  background: var(--color-red);
}

.gallery-slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
  max-width: 100%;
}

.gallery-slide img {
  display: block;
  /* width/height attributes give the browser the aspect ratio before load */
  height: var(--row-height);
  width: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  background: var(--color-bg-light);
  transition: filter 0.2s ease;
}

.gallery-slide img:hover {
  filter: brightness(1.06);
}

.nav-btn {
  position: absolute;
  top: calc(50% - 0.5rem);
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-white);
  color: var(--color-navy);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 19, 43, 0.2);
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-btn:hover {
  background: var(--color-red);
  color: var(--color-white);
}

.nav-btn[hidden] {
  display: none;
}

.prev-btn {
  left: -22px;
}

.next-btn {
  right: -22px;
}

@media (max-width: 768px) {
  .fotos-container {
    margin-top: 0.5rem;
  }

  .galerie-block {
    margin-bottom: 2rem;
    padding: 1.25rem;
    border-radius: var(--radius);
  }

  .prev-btn {
    left: 6px;
  }

  .next-btn {
    right: 6px;
  }
}
