html {
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Helvetica Neue", sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
  min-height: 100vh; /* Assicura che il body occupi l'intera viewport */
}
a {
  text-decoration: none;
}
img {
  max-width: 100%; /* TUTTE le immagini sono responsive per default */
  height: auto;
}

/* ----------------------------------- */
/* 1. NAVBAR */
/* ----------------------------------- */
.navbar {
  background: #15628f;
  color: #fff;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 999;
}
.navbar-container {
  max-width: 1200px;
  margin: auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Permette il wrapping su schermi molto stretti */
}
.logo {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 20px;
}
.logo img {
  height: 55px;
  margin-right: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-links a {
  color: #fff;
  font-size: 15px;
  padding: 5px 0;
}
.nav-links .button {
  background: #fff;
  color: #15628f;
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: bold;
}

/* ----------------------------------- */
/* 2. HERO FULLSCREEN & SUBHEADER */
/* ----------------------------------- */
.fullscreen-hero {
  background: url('foto/fotohome/sfondohome1.jpeg') no-repeat center/cover;
  height: 100vh;
  padding-top: 75px; /* Spazio per la navbar fissa */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.overlay-content {
  background: rgba(0, 70, 100, 0.6);
  padding: 40px;
  margin: 0 20px; /* Margini laterali reattivi */
  border-radius: 10px;
  color: #fff;
  max-width: 800px;
}
.overlay-content h1 {
  font-size: clamp(30px, 5vw, 42px); /* Scala la dimensione del testo in base alla viewport */
  margin-bottom: 20px;
}
.overlay-content p {
  font-size: clamp(16px, 2.5vw, 18px);
  margin-bottom: 30px;
}
.cta-button {
  background: #15628f;
  color: #fff;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
  display: inline-block;
}
.cta-button:hover {
  background: #0e4c70;
}
.subheader {
  background: #f2f2f2;
  text-align: center;
  padding: 40px 20px;
  font-size: 16px;
}
.subheader h2 {
  margin-bottom: 10px;
}

/* ----------------------------------- */
/* 3. SEZIONE PRINCIPALE (HERO & FEATURES) */
/* ----------------------------------- */
.hero {
  display: flex;
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap; /* Fondamentale per il responsivo */
}
.hero-text {
  flex: 1;
  min-width: 300px; /* Assicura che il testo non diventi troppo stretto prima di wrappare */
}
.hero-text h1 {
  font-size: 28px;
  margin-bottom: 20px;
}
.hero-text p {
  margin-bottom: 15px;
}
.hero-image {
  flex-basis: 350px; /* Larghezza base per l'immagine */
  flex-grow: 1; /* Permette all'immagine di crescere */
  min-width: 250px; /* Limite minimo per l'immagine */
}
.hero-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Features */
.features {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  display: flex;
  justify-content: center; /* Centra le card quando non sono affiancate */
  gap: 20px;
  flex-wrap: wrap; /* Le card si dispongono su più righe */
}
.feature-card {
  flex: 1 1 250px; /* Flessibile, cresce e ha una larghezza base di 250px */
  background: #fff;
  padding: 25px;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}
.feature-card .icon {
  font-size: 28px;
  margin-bottom: 15px;
}
.feature-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 14px;
  color: #555;
}

/* ----------------------------------- */
/* 4. DESTINATION GALLERY */
/* ----------------------------------- */
.destination-gallery {
  display: grid;
  /* La griglia si adatta automaticamente: ogni colonna ha una dimensione minima di 250px */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  gap: 30px; /* Riduci il gap per schermi più piccoli */
  max-width: 1200px; /* Usa la larghezza standard del contenitore */
  margin: 50px auto;
  padding: 0 20px;
}
.destination-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #333;
  transition: transform 0.3s ease;
}
.destination-link img {
  width: 100%;
  height: 250px; /* Riduci leggermente l'altezza fissa */
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}
.destination-link span {
  margin-top: 12px;
  font-size: 18px;
  font-weight: bold;
}
.destination-link:hover img {
  transform: scale(1.03); /* Riduci leggermente lo zoom */
}

/* ----------------------------------- */
/* 5. BOOKING */
/* ----------------------------------- */
.booking-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}
.booking-section h2 {
  font-size: 32px;
  margin-bottom: 10px;
}
.booking-section p {
  color: #777;
  margin-bottom: 40px;
}
.booking-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}
.booking-card {
  flex: 1 1 350px; /* Flessibile, cresce e ha una larghezza base di 350px */
  max-width: 500px;
  background: #fff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
}
.booking-card h3 {
  margin-bottom: 15px;
}
.booking-card ul {
  list-style: none;
  padding: 0;
}
.booking-card li {
  margin-bottom: 10px;
}
.booking-card a {
  color: #15628f;
}

/* ----------------------------------- */
/* 6. FOOTER */
/* ----------------------------------- */
.footer {
  background: #15628f;
  color: #fff;
  padding: 50px 20px 20px;
}
.footer-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}
.footer-column {
  flex: 1 1 280px; /* Flessibile con larghezza base */
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.footer-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}
.footer-column h3,
.footer-column h4 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}
.footer-column p,
.footer-column a {
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
}
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: 30px auto 20px;
  width: 90%;
}
.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #ccc;
}
.footer-left-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-slogan span {
  display: block;
  font-size: 14px;
  line-height: 1.6;
}
.social-icons a {
  display: inline-flex;
  margin-right: 10px; /* Aggiunto spazio tra le icone */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: background 0.3s ease;
  overflow: hidden;
}
.social-icons a:hover {
  background: rgba(255,255,255,0.3);
}
.social-icons img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ----------------------------------- */
/* 7. RESPONSIVE MEDIA QUERIES */
/* ----------------------------------- */

/* Per Tablet e Smartphone (schermi <= 768px) */
@media (max-width: 768px) {
  /* Navbar: stack su schermi più piccoli */
  .navbar-container {
    flex-direction: column;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo {
    margin-bottom: 10px;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 15px;
  }

  /* Hero Section: impila testo e immagine */
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .hero-image {
    order: -1; /* Metti l'immagine sopra il testo sul mobile */
    flex-basis: auto;
  }

  /* Footer: impila le colonne e centra il testo */
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-left {
    align-items: center;
  }
  .footer-brand {
    justify-content: center;
  }
}

/* Per Smartphone molto piccoli (schermi <= 480px) */
@media (max-width: 480px) {
  /* Diminuisci i margini e i padding generali */
  .overlay-content {
    padding: 25px;
  }
  .subheader {
    padding: 30px 15px;
  }

  /* Riduci il testo principale della hero */
  .overlay-content h1 {
    font-size: 30px;
  }
  .overlay-content p {
    font-size: 16px;
  }
  
  /* Riduci la dimensione del logo nella navbar */
  .logo img {
    height: 45px;
  }
}

.fotogallery-section {
  margin-top: 120px;
}