/* ==========================================================================
   CAROSELLO FULL-WIDTH MONUMENTALE (HERO SLIDER)
   Studio Vetrarte di Paolo Corpetti - vetrateartistiche.com
   Design System Luxury & Editorial (Playfair Display, Antique Gold, 94vh)
   ========================================================================== */

html, body {
  overflow-x: clip;
}

.hero-carousel-b2c {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 720px;
  max-height: none;
  overflow: hidden;
  background: #0d0d0c;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.6s ease-in-out, visibility 1.6s ease-in-out;
  will-change: opacity;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Immagine di Sfondo ad altissima definizione con Effetto Ken Burns Lento e Maestoso */
.slide-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  transform: scale(1.0);
  transition: transform 5s cubic-bezier(0.16, 1, 0.3, 1);
  image-rendering: -webkit-optimize-contrast;
  will-change: transform;
}

.carousel-slide.active .slide-bg-img {
  transform: scale(1.08);
}

/* Overlay cinematografico per esaltare i contrasti cromatici e la leggibilità */
.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}

/* Contenuto Testuale Sovraimpresso */
.slide-content-container {
  position: absolute;
  bottom: 100px;
  left: 6%;
  right: 6%;
  max-width: 980px;
  z-index: 3;
  color: #ffffff;
  transform: translateY(24px);
  opacity: 0;
  transition: all 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.carousel-slide.active .slide-content-container {
  transform: translateY(0);
  opacity: 1;
}

.slide-tag {
  display: inline-block;
  font-family: var(--sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-lt, #DFD0B8);
  margin-bottom: 14px;
  background: rgba(182, 142, 72, 0.22);
  border: 1px solid rgba(223, 208, 184, 0.35);
  padding: 5px 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.slide-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 16px 0;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.7);
  letter-spacing: -0.01em;
}

.slide-desc {
  font-family: var(--sans, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1rem, 1.22vw, 1.18rem);
  line-height: 1.7;
  color: #f0ede8;
  max-width: 760px;
  margin-bottom: 28px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  font-weight: 300;
}

.slide-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.slide-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold, #B68E48);
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(182, 142, 72, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slide-btn-primary:hover {
  background: var(--gold-dark, #8F6E30);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(182, 142, 72, 0.55);
}

.slide-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(250, 248, 245, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: var(--sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* Frecce di Navigazione Laterali Eleganti */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(17, 17, 16, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(223, 208, 184, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-arrow:hover {
  background: rgba(182, 142, 72, 0.9);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.prev {
  left: 28px;
}

.carousel-arrow.next {
  right: 28px;
}

/* Controlli Inferiori: Dots e Barra di Progresso */
.carousel-controls-bottom {
  position: absolute;
  bottom: 34px;
  left: 6%;
  right: 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-dot {
  width: 32px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  padding: 0;
}

.carousel-dot.active {
  width: 56px;
  background: var(--gold, #B68E48);
  box-shadow: 0 0 12px rgba(182, 142, 72, 0.8);
}

/* Barra di Progresso Temporizzato */
.carousel-progress-bar {
  width: 140px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.carousel-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold, #B68E48);
  transition: width 0.1s linear;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero-carousel-b2c {
    height: 86vh;
    min-height: 600px;
  }
  .slide-content-container {
    bottom: 80px;
    left: 20px;
    right: 20px;
  }
  .slide-title {
    font-size: 2.1rem;
  }
  .slide-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 20px;
  }
  .carousel-arrow {
    display: none; /* Su smartphone lo swipe orizzontale è lo standard */
  }
  .carousel-controls-bottom {
    bottom: 24px;
    left: 20px;
    right: 20px;
  }
  .carousel-progress-bar {
    display: none;
  }
}


/* ==========================================================================
   OTTIMIZZAZIONE SPAZI E INGRANDIMENTO IMMAGINI (HOMEPAGE LUXURY B2C)
   ========================================================================== */

/* Hero a schermo intero senza vuoti */
.hero-carousel-b2c {
  height: 100vh !important;
  min-height: 720px !important;
  max-height: none !important;
}

/* Riduzione spazi vuoti e padding eccessivi tra le sezioni */
.stmt-section-b2c {
  padding: 55px 6% 45px 6% !important;
}

.atelier-section-b2c {
  padding: 55px 6% 65px 6% !important;
}

.gallery-section-b2c {
  padding: 65px 6% 75px 6% !important;
}

.split-section-b2c {
  padding: 65px 6% 75px 6% !important;
}

.yacht-banner-section-b2c {
  padding: 55px 6% !important;
}

.details-section-b2c {
  padding: 65px 6% 75px 6% !important;
}

/* Ingrandimento Sezione Atelier */
.atelier-grid-b2c {
  gap: 3.5rem !important;
}

.atelier-frame-b2c {
  max-width: 100% !important;
}

.atelier-img-wrap-b2c {
  height: 65vh !important;
  min-height: 520px !important;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(17, 17, 16, 0.15);
}

.atelier-img-b2c {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Ingrandimento Galleria Grandi Progetti */
.gallery-grid-b2c {
  gap: 2.5rem !important;
}

.gallery-item-b2c {
  height: 74vh !important;
  min-height: 560px !important;
  max-height: 780px !important;
}

.gallery-frame-b2c img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ingrandimento Sezione Cristalli / Incisioni */
.engraving-grid-b2c {
  gap: 2.2rem !important;
}

.engraving-img-wrap-b2c {
  height: 68vh !important;
  min-height: 520px !important;
}

/* Ingrandimento Griglie Dettaglio Restauro e Corsi */
.details-grid-b2c {
  gap: 3.5rem !important;
}

.details-text-col {
  max-width: 100% !important;
}

.details-img-item-b2c {
  height: 520px !important;
  border-radius: 6px;
}

.details-img-item-b2c img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Home Blog Section Luxury Styling */
.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.2rem;
}

.home-blog-card {
  background: #faf8f5;
  border: 1px solid rgba(144, 117, 51, 0.15);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.home-blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 16px 40px rgba(182, 142, 72, 0.18);
}

.home-blog-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  display: block;
}

.home-blog-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-blog-card:hover .home-blog-img-wrap img {
  transform: scale(1.08);
}

.home-blog-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(17, 17, 16, 0.8);
  color: var(--gold-lt);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 14px;
  border: 1px solid rgba(223, 208, 184, 0.3);
}

.home-blog-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.home-blog-date {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--mid);
  margin-bottom: 10px;
}

.home-blog-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0 0 10px 0;
  font-weight: 500;
}

.home-blog-title a {
  color: var(--dark);
  text-decoration: none;
  transition: color 0.2s;
}

.home-blog-title a:hover {
  color: var(--gold);
}

.home-blog-summary {
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #555550;
  margin-bottom: 18px;
  flex-grow: 1;
}

.home-blog-cta {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
}

.home-blog-cta:hover {
  transform: translateX(4px);
  color: var(--gold-dark);
}


/* ==========================================================================
   PULIZIA HERO & BOTTONI FLOTTANTI SU SMARTPHONE (Lascia respirare le opere)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-carousel-b2c {
    height: 82svh !important;
    min-height: 520px !important;
  }
  .slide-content-container {
    bottom: 92px !important;
    left: 18px !important;
    right: 18px !important;
  }
  .slide-tag {
    font-size: 0.58rem !important;
    letter-spacing: 0.16em !important;
    padding: 4px 12px !important;
    margin-bottom: 8px !important;
  }
  .slide-title {
    font-size: 1.65rem !important;
    line-height: 1.15 !important;
    margin-bottom: 12px !important;
  }
  .slide-desc {
    display: none !important;
  }
  .slide-actions {
    gap: 10px !important;
  }
  .slide-btn-primary {
    padding: 11px 20px !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.1em !important;
  }
  .slide-btn-secondary {
    display: none !important;
  }
  .carousel-controls-bottom {
    bottom: 66px !important;
    left: 18px !important;
    right: 18px !important;
  }
  /* Pulsante WhatsApp verde compatto (solo icona) su smartphone per massima riconoscibilita */
  .whatsapp-btn {
    background: #25D366 !important;
    border-color: #25D366 !important;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.38) !important;
    padding: 0 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }
  .whatsapp-btn span {
    display: none !important;
  }
}
