.gallery-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(178, 58, 72, 0.68), rgba(67, 170, 139, 0.34)),
    url("../images/galerie-hero.jpg") center center / cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 96px 0;
}

.gallery-hero::before,
.gallery-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
}

.gallery-hero::before {
  width: 270px;
  height: 270px;
  top: -70px;
  left: -60px;
}

.gallery-hero::after {
  width: 180px;
  height: 180px;
  right: 8%;
  bottom: -45px;
}

.gallery-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.gallery-hero__badge {
  display: inline-block;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.34);
  font-weight: 700;
  backdrop-filter: blur(3px);
}

.gallery-hero h1 {
  font-size: 3rem;
  line-height: 1.15;
  margin: 0 0 20px;
  text-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

.gallery-hero p {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.14rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.14);
}

.gallery-section {
  background: rgba(255,255,255,0.88);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.gallery-section__intro {
  margin-bottom: 24px;
}

.gallery-section__eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.gallery-section__intro h2 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 2rem;
  line-height: 1.2;
}

.gallery-section__intro p {
  margin: 0;
}

.gallery-featured {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.gallery-featured--two {
  grid-template-columns: 1.25fr 1fr;
}

.gallery-photo,
.gallery-thumb {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.gallery-photo {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-photo:hover,
.gallery-thumb:hover {
  transform: translateY(-3px);
}

.gallery-photo img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  background: #ececec;
}

.gallery-photo--large img {
  height: 420px;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.gallery-thumb {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-thumb img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  display: block;
  background: #ececec;
}

/* Modale */

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.gallery-modal.is-open {
  display: block;
}

.gallery-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.gallery-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  margin: 4vh auto;
  min-height: 80vh;
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  align-items: center;
}

.gallery-modal__content {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.gallery-modal__image {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #f4f4f4;
  border-radius: 16px;
}

.gallery-modal__caption {
  margin: 14px 0 0;
  text-align: center;
  color: var(--text);
}

.gallery-modal__close {
  position: absolute;
  top: -10px;
  right: 0;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #222;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.gallery-modal__nav {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #222;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.gallery-modal__nav--prev {
  justify-self: start;
}

.gallery-modal__nav--next {
  justify-self: end;
}

@media (max-width: 980px) {
  .gallery-featured,
  .gallery-featured--two {
    grid-template-columns: 1fr;
  }

  .gallery-photo img,
  .gallery-photo--large img {
    height: 260px;
  }

  .gallery-hero h1 {
    font-size: 2.3rem;
  }

  .gallery-hero p {
    font-size: 1.04rem;
  }

  .gallery-modal__dialog {
    width: min(94vw, 900px);
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 3vh auto;
  }

  .gallery-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .gallery-modal__nav--prev {
    left: 8px;
  }

  .gallery-modal__nav--next {
    right: 8px;
  }
}

@media (max-width: 640px) {
  .gallery-hero {
    padding: 78px 0;
  }

  .gallery-hero h1 {
    font-size: 1.95rem;
  }

  .gallery-section {
    padding: 20px;
  }

  .gallery-section__intro h2 {
    font-size: 1.55rem;
  }

  .gallery-thumb img {
    height: 82px;
  }

  .gallery-modal__content {
    padding: 12px;
  }

  .gallery-modal__image {
    max-height: 62vh;
  }
}

.gallery-photo,
.gallery-thumb {
  position: relative;
}

.gallery-item__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.gallery-modal__video {
  display: none;
  width: 100%;
  max-height: 75vh;
  border-radius: 16px;
  background: #000;
}

.gallery-photo,
.gallery-thumb {
  position: relative;
  overflow: hidden;
}

.gallery-video-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  min-height: 220px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f3954 0%, #4f5d7a 100%);
  color: #ffffff;
  text-align: center;
  padding: 24px 16px;
}

.gallery-video-card--large {
  min-height: 320px;
}

.gallery-video-card__icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  margin-bottom: 12px;
}

.gallery-video-card__label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gallery-modal__video {
  display: none;
  width: 100%;
  max-height: 75vh;
  border-radius: 16px;
  background: #000;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}