/* ============================================
   GESTEL — Stili hero con immagini reali
   ============================================ */

/* Hero con immagine reale — struttura comune */
.hero-img {
  position: relative;
  overflow: hidden;
  padding: 100px 0 90px;
  color: var(--bianco);
}
.hero-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: brightness(.45) saturate(1.1);
  z-index: 0;
  transition: transform 8s ease;
}
.hero-img:hover::before {
  transform: scale(1.04);
}
.hero-img > * { position: relative; z-index: 1; }

/* Overlay gradiente colorato sopra la foto */
.hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay, linear-gradient(135deg, rgba(15,35,71,.55) 0%, rgba(26,58,107,.3) 100%));
  z-index: 0;
  pointer-events: none;
}
.hero-img > * { position: relative; z-index: 2; }

/* ---- Homepage ---- */
.hero-home {
  --hero-bg: url('../assets/images/hero-home.jpg');
  --hero-overlay: linear-gradient(135deg, rgba(10,25,55,.70) 0%, rgba(26,58,107,.45) 100%);
}

/* ---- Ripetitori ---- */
.hero-ripetitori {
  --hero-bg: url('../assets/images/hero-ripetitori.jpg');
  --hero-overlay: linear-gradient(135deg, rgba(10,25,55,.65) 0%, rgba(26,58,107,.4) 100%);
}

/* ---- Fotovoltaico ---- */
.hero-fotovoltaico {
  --hero-bg: url('../assets/images/hero-fotovoltaico.jpg');
  --hero-overlay: linear-gradient(135deg, rgba(10,35,15,.65) 0%, rgba(26,74,43,.4) 100%);
}

/* ---- Batterie ---- */
.hero-batterie {
  --hero-bg: url('../assets/images/hero-batterie.jpg');
  --hero-overlay: linear-gradient(135deg, rgba(15,25,50,.70) 0%, rgba(26,58,107,.45) 100%);
}

/* Hero pagine interne con immagine */
.hero-inner-img {
  position: relative;
  padding: 80px 0 70px;
  text-align: center;
  color: var(--bianco);
  overflow: hidden;
}
.hero-inner-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center 30%;
  filter: brightness(.35) saturate(1.1);
  z-index: 0;
}
.hero-inner-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay, rgba(15,35,71,.5));
  z-index: 0;
}
.hero-inner-img > * { position: relative; z-index: 2; }
.hero-inner-img h1 { color: var(--bianco); margin-bottom: 12px; }
.hero-inner-img p  { color: rgba(255,255,255,.8); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* Sezione immagine reale — split foto */
.img-section {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.img-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 340px;
  transition: transform .6s ease;
}
.img-section:hover img { transform: scale(1.03); }

/* Card news con immagine */
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Parallax leggero (solo desktop) */
@media (min-width: 769px) {
  .hero-img::before {
    background-attachment: fixed;
  }
}
