.single-news__gallery {
  margin-top: clamp(2.4rem, 4vw, 3.6rem);
  width: 100%;
}

.eber-post-gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.4rem);
  width: 100%;
}

.eber-post-gallery__viewer {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #f1f1ef;
}

.eber-post-gallery__viewer img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 720px);
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
}

.eber-post-gallery__carousel-wrap {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.85rem;
  padding: 0;
}

.eber-post-gallery__carousel {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.eber-post-gallery__thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  appearance: none;
  box-shadow: none;
  text-transform: none;
}

.eber-post-gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  border: 0;
  transition: filter 0.25s ease;
}

/* Tinta arancione sfuocata solo sulla miniatura selezionata (non bordo). */
.eber-post-gallery__thumb-overlay {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 102, 2, 0.18) 0%, rgba(255, 102, 2, 0.55) 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.eber-post-gallery__thumb.is-active img {
  filter: saturate(0.85);
}

.eber-post-gallery__thumb.is-active .eber-post-gallery__thumb-overlay {
  opacity: 1;
}

.eber-post-gallery__thumb:focus-visible {
  outline: 2px solid var(--color-primary, #ff6602);
  outline-offset: 2px;
}

.eber-post-gallery__nav {
  position: relative;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  border: 2px solid var(--color-primary, #ff6602);
  border-radius: 999px;
  background: #fff;
  color: transparent;
  cursor: pointer;
  appearance: none;
  grid-row: 1;
  box-shadow: none;
  text-transform: none;
}

.eber-post-gallery__nav::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--color-primary, #ff6602);
  border-bottom: 2px solid var(--color-primary, #ff6602);
}

.eber-post-gallery__nav--prev {
  grid-column: 1;
}

.eber-post-gallery__nav--prev::before {
  transform: translateX(0.15rem) rotate(135deg);
}

.eber-post-gallery__nav--next {
  grid-column: 3;
}

.eber-post-gallery__nav--next::before {
  transform: translateX(-0.15rem) rotate(-45deg);
}

.eber-post-gallery__nav:hover,
.eber-post-gallery__nav:focus-visible {
  background: rgba(255, 102, 2, 0.1);
  outline: none;
}

.eber-post-gallery__nav.swiper-button-disabled,
.eber-post-gallery__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.eber-post-gallery__pagination {
  grid-column: 1/-1;
  grid-row: 2;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-height: 0.75rem;
  margin-top: 0.15rem;
}

.eber-post-gallery__dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  padding: 0;
  margin: 0;
  border: 2px solid var(--color-primary, #ff6602);
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  appearance: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}
.eber-post-gallery__dot.is-active {
  background-color: var(--color-primary, #ff6602);
}
.eber-post-gallery__dot:hover:not(.is-active), .eber-post-gallery__dot:focus-visible:not(.is-active) {
  background-color: rgba(255, 102, 2, 0.35);
  outline: none;
}

@media (max-width: 980px) {
  .single-news__gallery {
    margin-top: 2rem;
  }
  .eber-post-gallery__viewer img {
    max-height: none;
    aspect-ratio: 4/3;
  }
  .eber-post-gallery__carousel-wrap {
    column-gap: 0.5rem;
  }
  .eber-post-gallery__nav {
    width: 2.1rem;
    height: 2.1rem;
  }
}
