/* Nasconde l'immagine in evidenza statica ridondante solo quando è attivo l'Hero */
.single-farmacia .page-header-image-single,
.single-farmacie .page-header-image-single {
  display: none;
}

/* 1. HERO SLIDESHOW A TUTTO SCHERMO (sotto l'header) */
.jar-full-hero {
  position: relative;
  width: 100%;
  height: 88vh;
  min-height: 480px;
  overflow: hidden;
  background: #0d0d0d;
}

.hero-slides-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.04);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5rem 3rem 3rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: #fff;
  z-index: 2;
  pointer-events: none;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  margin: 0;
  color: #fff;
}

.hero-scroll-indicator {
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
}

.hero-nav-controls {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 40px;
  color: #fff;
}

.hero-nav-controls button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.hero-counter {
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* 2. GRIGLIA FOTOGRAFICA NEL CONTENUTO */
.jar-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.jar-gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
}

.jar-gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.jar-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.jar-gallery-item:hover img {
  transform: scale(1.03);
}

/* 3. LIGHTBOX */
.jar-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.jar-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.jar-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(6px);
}

.jar-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 2;
}

.jar-lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.jar-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}