.events-section {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #2a201d;
}

.events-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  color: #ffffff;
}

.events-gallery__images {
  position: absolute;
  inset: 0;
}

.events-gallery__image {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 0.7s ease, transform 0.85s ease;
}

.events-gallery__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(35, 24, 21, 0.2) 0%,
      rgba(35, 24, 21, 0.06) 28%,
      rgba(35, 24, 21, 0) 52%,
      rgba(35, 24, 21, 0.12) 100%
    ),
    linear-gradient(
      180deg,
      rgba(247, 238, 222, 0.18) 0%,
      rgba(247, 238, 222, 0.08) 24%,
      rgba(35, 24, 21, 0.08) 100%
    );
}

.events-gallery__image[data-active] {
  opacity: 1;
  transform: scale(1);
}

.events-gallery__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.events-gallery__image--placeholder {
  background:
    linear-gradient(180deg, rgba(245, 237, 222, 0.18) 0%, rgba(245, 237, 222, 0.08) 100%),
    linear-gradient(135deg, #d6c2a0 0%, #c7ad85 100%);
}

.events-gallery__heading {
  position: absolute;
  top: clamp(28px, 5vh, 64px);
  left: clamp(24px, 5vw, 72px);
  z-index: 3;
  pointer-events: none;
}

.events-gallery__heading p {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.85rem, 5vw, 5.3rem);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.events-gallery__bottom {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(560px, 49%);
  align-items: end;
}

.events-gallery__thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 14px 18px 10px;
  background: #ba9e76;
}

.events-gallery__thumbnail {
  position: relative;
  display: block;
  aspect-ratio: 1.85 / 1;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  overflow: hidden;
}

.events-gallery__thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) brightness(0.92);
  transition:
    filter 0.35s ease,
    transform 0.35s ease,
    opacity 0.35s ease;
}

.events-gallery__thumbnail-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%),
    rgba(78, 52, 46, 0.18);
}

.events-gallery__thumbnail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 24, 0.12);
  transition: opacity 0.3s ease;
}

.events-gallery__thumbnail::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.94);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.events-gallery__thumbnail:hover img,
.events-gallery__thumbnail[data-active] img,
.events-gallery__thumbnail:focus-visible img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.035);
}

.events-gallery__thumbnail:hover .events-gallery__thumbnail-placeholder,
.events-gallery__thumbnail[data-active] .events-gallery__thumbnail-placeholder,
.events-gallery__thumbnail:focus-visible .events-gallery__thumbnail-placeholder {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.1) 100%),
    rgba(78, 52, 46, 0.12);
}

.events-gallery__thumbnail:hover::before,
.events-gallery__thumbnail[data-active]::before,
.events-gallery__thumbnail:focus-visible::before {
  opacity: 0;
}

.events-gallery__thumbnail[data-active]::after {
  opacity: 1;
}

.events-gallery__thumbnail:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.88);
  outline-offset: 2px;
}

.events-gallery__panel {
  position: relative;
  min-height: 420px;
  padding: 42px 42px 48px;
  background: #4e342e;
  box-shadow: 0 -18px 40px rgba(18, 10, 8, 0.18);
}

.events-gallery__articles {
  position: relative;
  min-height: 320px;
}

.events-gallery__article {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.events-gallery__article[data-active] {
  opacity: 1;
  transform: translateY(0);
}

.events-gallery__article h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(1.95rem, 2.2vw, 2.65rem);
  line-height: 1.05;
  font-weight: 700;
}

.events-gallery__meta {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  line-height: 1.4;
}

.events-gallery__copy {
  margin: 0;
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
  line-height: 1.62;
}

.events-gallery__location {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  line-height: 1.45;
  font-style: italic;
}

.events-gallery__nav {
  position: absolute;
  right: 0;
  bottom: 100%;
  display: flex;
  flex-direction: row;
  width: auto;
  transform: translateY(0);
}

.events-gallery__arrow {
  width: 56px;
  height: 56px;
  border: 0;
  background: #4e342e;
  color: #ffffff;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    opacity 0.25s ease;
}

.events-gallery__arrow + .events-gallery__arrow {
  margin-left: 1px;
}

.events-gallery__arrow:hover,
.events-gallery__arrow:focus-visible {
  background: #6a483f;
  outline: none;
}

.events-gallery__arrow[disabled] {
  cursor: default;
  opacity: 0.42;
}

@media (max-width: 1024px) {
  .events-gallery__heading {
    top: 24px;
    left: 24px;
  }

  .events-gallery__heading p {
    font-size: clamp(2.3rem, 8vw, 4.25rem);
  }

  .events-gallery__bottom {
    grid-template-columns: 1fr;
  }

  .events-gallery__thumbnails {
    padding-right: 18px;
  }

  .events-gallery__panel {
    min-height: 0;
    padding: 30px 28px 28px;
  }

  .events-gallery__articles {
    min-height: 228px;
  }

  .events-gallery__copy {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .events-section {
    height: auto;
    min-height: auto;
  }

  .events-gallery {
    min-height: 100svh;
  }

  .events-gallery__heading {
    top: 22px;
    left: 18px;
  }

  .events-gallery__heading p {
    font-size: clamp(1.95rem, 10vw, 3rem);
  }

  .events-gallery__bottom {
    position: relative;
  }

  .events-gallery__thumbnails {
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .events-gallery__panel {
    padding: 24px 18px 24px;
  }

  .events-gallery__article h2 {
    font-size: 1.5rem;
  }

  .events-gallery__meta {
    margin-bottom: 14px;
    font-size: 0.96rem;
  }

  .events-gallery__copy {
    font-size: 0.94rem;
    line-height: 1.56;
  }

  .events-gallery__location {
    font-size: 0.82rem;
  }

  .events-gallery__nav {
    right: 0;
  }

  .events-gallery__arrow {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
}
