/* FONT */
@import url('https://fonts.cdnfonts.com/css/raider-crusader');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

/* VARIABILI */
:root {
  --rosso: #d10000;
  --blu-scuro: #0b1e2d;
  --bianco: #fff;
}

/* BASE */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: var(--blu-scuro);
  line-height: 1.6;
}

/* ------------------------------------------------------------- */
/* HEADER                                                        */
/* ------------------------------------------------------------- */

.top-banner {
  background-color: var(--rosso);
  color: var(--bianco);
  padding: 1rem 0;
}

.top-banner .container {
  width: 90%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-banner h1 {
  font-family: 'Raider Crusader', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  padding-left: 1rem;
  margin: 0;
}

.top-banner nav a {
  color: var(--bianco);
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 600;
}

.top-banner nav a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------- */
/* HERO                                                          */
/* ------------------------------------------------------------- */

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
}

.hero .slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero .slide.active {
  opacity: 1;
}

.hero .slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45));
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}

.hero-text h2 {
  font-family: 'Raider Crusader', sans-serif;
  font-size: clamp(1.8rem, 3vw, 3rem);
  margin-bottom: 0.5rem;
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* BOTTONI HERO */
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  background: var(--rosso);
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  padding: 0.9rem 1.6rem;
  transition: 0.3s ease;
  white-space: nowrap;
}

.btn:hover {
  background-color: #b71c1c;
  transform: scale(1.05);
}

.btn.secondary {
  background: white;
  color: var(--rosso);
  border: 2px solid var(--rosso);
}

.btn.secondary:hover {
  background: #ffeaea;
  transform: scale(1.05);
}

/* FRECCE SLIDER */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 3;
}

.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

.slider-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* ------------------------------------------------------------- */
/* SEZIONI                                                       */
/* ------------------------------------------------------------- */

.section {
  padding: 3rem 10%;
  background: var(--bianco);
}

.section.alt {
  background: #f7f7f7;
}

.section h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.section ul {
  list-style: none;
  padding: 0;
}

.section li {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  margin-bottom: 0.6rem;
}

/* ------------------------------------------------------------- */
/* CONTATTI                                                      */
/* ------------------------------------------------------------- */

.socials a {
  color: var(--rosso);
  font-size: 1.5rem;
  margin: 0 0.5rem;
}

.map-container {
  margin-top: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

footer {
  text-align: center;
  padding: 1rem;
  background: var(--blu-scuro);
  color: var(--bianco);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------- */
/* POPUP LISTINO                                                 */
/* ------------------------------------------------------------- */

#popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  z-index: 99999; /* sopra tutto */
}

.popup-content {
  position: relative;
  background: white;
  padding: 15px;
  border-radius: 10px;
  max-width: 95vw;
  max-height: 95vh;
  overflow: auto;
}

#popupImages {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}


#popupImages img {
  max-width: 48vw;     /* prima era 45 */
  max-height: 95vh;    /* più alto */
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

/* Chiudi popup */
.close {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 2rem;
  color: #000;
  cursor: pointer;
}

/* ------------------------------------------------------------- */
/* RESPONSIVE                                             */
/* ------------------------------------------------------------- */

@media (max-width: 768px) {
  .top-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .hero {
    height: 70vh;
    padding: 2rem 1rem;
  }

  .section {
    padding: 2rem 1.5rem;
  }

  #popupImages img {
    max-width: 90vw;
    max-height: 75vh;
  }
}

@media (max-width: 480px) {
  .btn {
    font-size: 0.9rem;
    max-width: 80%;
    white-space: normal;
  }
}
