/* Font globale */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0a0a0a;
    color: #eee;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header h1 {
    color: #ffc107;
    letter-spacing: 1px;
    transition: transform 0.3s;
}
header h1:hover {
    transform: scale(1.05);
}

/* --- NAVBAR DESKTOP --- */
.navbar {
  transition: background 0.3s ease, padding 0.3s ease;
}
.navbar-brand {
  transition: transform 0.3s, text-shadow 0.3s;
  text-shadow: 0 0 5px rgba(255, 193, 7, 0.6);
}
.navbar-brand:hover {
  transform: scale(1.05);
  text-shadow: 0 0 12px rgba(255, 193, 7, 1);
}

.nav-link {
  position: relative;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -3px;
  left: 50%;
  background-color: #ffc107;
  transition: width 0.3s ease, left 0.3s ease;
}
.nav-link:hover {
  color: #ffc107;
}
.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* --- NAVBAR MOBILE --- */
@media (max-width: 767.98px) {
  #navbarMenu {
    background: rgba(20, 20, 20, 0.95);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 0.5rem;
    animation: slideDown 0.3s ease;

    /* 🔧 FIX overflow */
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .nav-link {
    display: block;
    font-size: 1.1rem;
    padding: 0.7rem 0;
    border-radius: 0.3rem;
    text-align: center;
    white-space: normal;
    word-break: break-word;
  }
}


/* --- ANIMAZIONI --- */
@keyframes slideDown {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Hero banner */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: linear-gradient(
            rgba(0,0,0,0.5),
            rgba(0,0,0,0.5)
        ),
        url('../images/banner.jpg') center/cover no-repeat;
}

.hero h1,
.hero h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    animation: glowText 2s infinite alternate;
    margin-bottom: 1rem;
    padding-top: 5rem; /* aumenta il valore per spingere più giù */
}


.hero p {
    font-size: 1.2rem;
    margin-top: 15px;
    text-shadow: 1px 1px 8px rgba(0,255,255,0.4);
}

/* Glow animation */
@keyframes glowText {
    0% { text-shadow: 0 0 5px #00fff5, 0 0 10px #00fff5; }
    100% { text-shadow: 0 0 15px #00fff5, 0 0 30px #00cfff; }
}

/* Pulsanti */
.btn-primary, .btn-warning {
    background: linear-gradient(135deg,#ff6b00,#ff3d00);
    border: none;
    color: #fff;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255,107,0,0.5);
}

.btn-primary:hover, .btn-warning:hover {
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(255,107,0,0.8);
}

/* Card auto futuristica */
.card-hover {
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(145deg,#1c1c1c,#2c2c2c);
    color: #fff;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0,255,255,0.4), 0 0 20px rgba(0,255,255,0.2) inset;
}

.card-hover img {
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease, box-shadow 0.6s ease;
    filter: brightness(0.9);
    border-bottom: 2px solid #00fff5;
}

.card-hover img:hover {
    transform: scale(1.15) rotate(1.5deg);
    filter: brightness(1.1);
    box-shadow: 0 0 20px #00fff5, 0 0 40px #00cfff inset;
}

.card-title {
    font-weight: 800;
    font-size: 1.4rem;
    text-shadow: 1px 1px 6px rgba(0,255,255,0.6);
}

/* Badge offerta auto (sulle card auto in evidenza) */
.card-hover .badge-offerta {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg,#00fff5,#00cfff);
    color: #000;
    font-weight: 800;
    padding: 0.6em 1em;
    border-radius: 18px;
    box-shadow: 0 0 25px rgba(0,255,255,0.6);
    text-transform: uppercase;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover .badge-offerta {
    transform: scale(1.15);
    box-shadow: 0 0 35px rgba(0,255,255,0.9);
}

/* Card offerte futuristiche */
.card-offerta {
    border-radius: 20px;
    background: linear-gradient(135deg,#00cfff,#006bff);
    color: #fff;
    text-shadow: 1px 1px 8px rgba(0,0,0,0.3);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    padding: 2rem 1rem;
}

/* Badge offerta inline (dentro le offerte speciali) */
.card-offerta .badge-offerta {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
    margin-right: 8px;
    background: linear-gradient(135deg,#ff4e50,#f9d423);
    color: #fff;
    font-weight: 700;
    padding: 0.4em 0.9em;
    border-radius: 14px;
    box-shadow: 0 0 12px rgba(255,80,50,0.6);
    font-size: 0.95rem;
    text-transform: uppercase;
}


/* Titoli sezioni */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2rem;
    position: relative;
    text-shadow: 1px 1px 8px rgba(0,255,255,0.6);
}

.section-title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: #ff6b00;
    margin: 8px auto 0;
    border-radius: 2px;
}

/* FAB Container */
.fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
}

/* Bottone principale (icona chat) */
.fab-main {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(13, 165, 253, 0.707); /* blu trasparente */
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.35);
  transition: transform 0.3s ease, background 0.3s ease;
}
.fab-main:hover {
  background: rgba(11, 94, 215, 0.95);
}

/* Wrapper pulsanti */
.fab-options {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

/* Bottone singola opzione */
.fab-option {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15); /* base semi trasparente */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, background 0.3s ease;
}

/* Colori specifici */
.fab-option.whatsapp {
  color: #25d366;
  background: rgba(37, 211, 102, 0.15);
}
.fab-option.contatti {
  color: #ff6b00;
  background: rgba(255, 107, 0, 0.15);
}

.fab-option:hover {
  transform: scale(1.15);
  background: rgba(255,255,255,0.25);
}

/* Stato attivo */
.fab-container.active .fab-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.fab-container.active .fab-main {
  transform: rotate(0); /* niente rotazione, resta icona chat */
}


/* Footer */
main {
    flex: 1;
}

/* Footer stile */
footer a {
    transition: color 0.3s;
}
footer a:hover {
    color: #ffc107;
    text-decoration: none;
}
footer .ratio iframe {
    border-radius: 10px;
}

/* Swiper container */
.swiper {
    padding-bottom: 50px;
}

.swiper-slide {
    display: flex;
    justify-content: center;
}

.search-bar {
  max-width: 700px;
  margin: 0 auto;
  border-radius: 16px;
}
.search-bar input {
  border-radius: 8px;
}
.search-bar button {
  border-radius: 8px;
  font-weight: 600;
}


/* Mobile */
@media (max-width: 768px) {
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .card-hover img { height: 180px; }
    .card-offerta { padding: 1rem 0.5rem; }
}

/* --- FIX COMPLETO CLICK + HOVER SWIPER COVERFLOW --- */

/* Forza lo swiper a non bloccare interazioni */
.swiper {
  overflow: visible !important;
}

/* Rimuove eventuali overlay invisibili */
.swiper-slide-shadow-left,
.swiper-slide-shadow-right {
  display: none !important;
}

/* Tutte le slide sono cliccabili e animabili */
.swiper-slide {
  pointer-events: auto !important;
  z-index: 1 !important;
  transform-style: preserve-3d !important;
}

/* Porta sempre la slide attiva sopra le altre */
.swiper-slide-active {
  z-index: 999 !important;
}

/* Garantisce che l’interno della card risponda a hover e click */
.swiper-slide .card-hover,
.swiper-slide .card-hover * {
  pointer-events: auto !important;
}

/* --- CURSORE E INTERAZIONE SWIPER FIX DEFINITIVO --- */

/* Tutta la slide mostra la manina, ma niente flicker */
.swiper-slide {
  cursor: pointer;
}

/* La card mantiene la stessa animazione già definita */
.swiper-slide .card-hover {
  cursor: pointer;
}

/* Pulsanti restano cliccabili */
.swiper-slide .btn {
  cursor: pointer;
  z-index: 10;
  position: relative;
}

/* Sicurezza: nessuna overlay blocca */
/* --- ANIMAZIONE UNIFORME SLIDE COVERFLOW --- */
.swiper-slide {
  transition: transform 0.6s ease, opacity 0.6s ease;
  will-change: transform, opacity;
}

.swiper-slide-active {
  transform: scale(1.05) !important;
  opacity: 1 !important;
}

.swiper-slide-next,
.swiper-slide-prev {
  opacity: 0.8 !important;
  transform: scale(0.95) !important;
}

/* --- FIX OVERFLOW SWIPER (mantiene lo swipe funzionante) --- */
html, body {
  overflow-x: hidden !important; /* blocca scroll pagina */
}

/* Limita solo l’overflow esterno, non quello interno allo swiper */
.swiper {
  width: 100vw !important;
  overflow: hidden !important; /* nasconde solo slide fuori area visiva */
}

.swiper-wrapper {
  overflow: visible !important; /* necessario per lo swipe */
}

.swiper-slide {
  max-width: 100%;
  transform-origin: center center !important;
}

/* --- CENTRATURA PRECISA DELLA SLIDE ATTIVA RISPETTO ALLA SEZIONE --- */

/* Assicura che lo swiper occupi la stessa larghezza del container */
.container > .swiper,
.swiper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Usa slide width fissa su desktop/tablet e 'auto' su mobile per flessibilità */
.swiper-slide {
  width: 280px;            /* valore consigliato: regola a 240/300 a seconda del design */
  max-width: 90%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

/* Per schermi piccoli lascia più flessibilità */
@media (max-width: 575.98px) {
  .swiper-slide { width: 85vw; } /* la slide occupa quasi tutta la viewport su mobile */
}

/* Mantieni wrapper flessibile per lo swipe e centratura */
.swiper-wrapper {
  align-items: center;
  /* let Swiper gestisca la translate per il centeredSlides */
}

/* Piccola correzione per coverflow in modo che l'elemento attivo resti perfettamente centrale */
.swiper-slide-active {
  transform-origin: center center !important;
}

/* Rimuove margini indesiderati dalla card interna */
.swiper-slide .card-hover { margin: 0; width: 100%; }

/* ============================= */
/* 🎨 HERO RESPONSIVE E PROFESSIONALE */
/* ============================= */

.hero {
  height: 90vh;
  min-height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url('../images/banner.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 60%, rgba(0, 255, 255, 0.05), transparent 70%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

/* Titolo elegante */
.hero h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
  animation: glowText 2s infinite alternate;
  margin-bottom: 1rem;
}

/* Testo descrittivo */
.hero p {
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: #e0e0e0;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

/* Barra di ricerca */
.hero .search-bar {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.2);
}

/* Pulsante cerca */
.hero .search-bar button {
  font-weight: 700;
  background: linear-gradient(135deg, #00fff5, #00cfff);
  color: #000;
  border: none;
  transition: all 0.3s ease;
}
.hero .search-bar button:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #00cfff, #00fff5);
}

/* Alert responsive */
.hero .alert {
  font-size: 0.95rem;
  max-width: 800px;
  margin: 1rem auto 0;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(0, 255, 255, 0.3);
}

/* ============================= */
/* 📱 MOBILE FIX COMPLETO HERO */
/* ============================= */

@media (max-width: 768px) {
  .hero {
    height: auto;
    padding: 6rem 1rem 3rem;
    background-position: center top;
  }

  header.navbar {
    padding: 0.6rem 1rem;
  }

  .hero h2 {
    font-size: 1.6rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .hero .search-bar {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
  }

  .hero .search-bar input,
  .hero .search-bar button {
    width: 100%;
  }

  .hero .alert {
    font-size: 0.85rem;
    text-align: center;
    gap: 0.6rem;
  }
}

/* Ultra small devices */
@media (max-width: 400px) {
  .hero h2 {
    font-size: 1.4rem;
  }
  .hero p {
    font-size: 0.85rem;
  }
  .hero .alert {
    font-size: 0.8rem;
  }
}