* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Merriweather", serif;
  background-color: #f4eeda;
  color: #4a3f35;
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 2rem 1rem;
}

header img {
  width: 180px;
  margin-top: 1.5rem;
}

header h1 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  margin: 0;
}

.language-switch {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Immagini delle bandiere */
.language-switch button img {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  object-fit: cover;
  display: block;
}

/* Hover effect */
.language-switch button:hover {
  transform: scale(1.1);
  height: fit-content;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Click effect */
.language-switch button:active {
  transform: scale(0.95);
}

/* Active state - ora visibile */
.language-switch button.active {
  background-color: #6b5b4a;
  border-color: #8a7968;
  box-shadow: 0 0 20px rgba(138, 121, 104, 0.4);
  transform: scale(1.05);
}

.language-switch button.active:hover {
  transform: scale(1.15);
}

/* Focus per accessibilità */
.language-switch button:focus nav {
  background-color: transparent;
  margin: 0;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.menu a,
.dropdown > a {
  text-decoration: none;
  color: #4a3f35;
  font-weight: bold;
  transition: color 0.3s;
}

.menu a:hover {
  color: #6b4c3b;
}

.burger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  min-width: 160px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
}

/* Mostra il dropdown quando è attivo */
.dropdown-content.open {
  display: block;
}

.dropdown-content a {
  color: #4a3f35;
  background-color: #f0e4cd;
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  transition: background-color 0.3s;
  margin: 0;
  white-space: nowrap; /* Evita la rottura di riga */
}

.dropdown-content a:hover {
  background-color: #f0e4cd;
}
.dropdown-content a.active {
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
}
.dropdown-separator {
  margin: 0;
  border: none;
  border-top: 1px solid #d8c7af;
}
.nav-container .logo {
  border-radius: 10px;
  border-width: 100px;
  padding: 2px;
  border: 1px solid #4a3f35;
  background-color: #f0e4cd;
}
nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: #4a3f35;
  font-weight: bold;
  transition: color 0.3s;
}

section {
  max-width: 100%;
  margin: 0;
  padding: 0 1rem;
  align-items: center;
  text-align: center;
}
.benvenuto h2 {
  font-size: xx-large;
  font-weight: 600;
}
.benvenuto p {
  font-size: large;
  text-align: center;
  max-width: 80%; /* o 80%, o il valore che preferisci */
  margin: 0 auto; /* centra il blocco orizzontalmente */
  padding: 1rem; /* opzionale, migliora la leggibilità */
  border-radius: 8px; /* opzionale, per un tocco moderno */
}

.hero {
  position: relative;
  background-image: url("../img/Hero.jpg"); /* <-- sostituisci con il tuo file */
  background-size: cover;
  background-position: center;
  height: 60vh;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  top: 10px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* oscuramento leggero */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin: 0;
  font-family: "Merriweather", serif;
  color: #f4eeda;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.hero p {
  font-size: 1.2rem;
  margin-top: 1rem;
  font-family: "Merriweather", serif;
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 2;
}
.welcome {
  padding: 0.5rem 1rem;
  background-color: #fff8e8;
}

.welcome-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.welcome h2 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #4a3f35;
}

.welcome p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4a3f35;
}

.video-tour {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
  text-align: center;
}

.video-tour h2 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.video-link-container {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.video-link {
  display: block;
  position: relative;
  text-decoration: none;
}

.video-thumbnail {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: block;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Wrapper per lo sfondo pieno */
.geocaching-bg {
  background-color: #fff8e8;
  padding: 1rem 0; /* Spazio verticale */
  width: 100%;
}

/* Contenuto centrato */
.geocaching {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.geocaching h2 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.geocaching img {
  max-width: 50%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.geocaching p {
  font-size: 1rem;
  color: #4a3f35;
  line-height: 1.6;
}
.activities {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.activities h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-family: "Merriweather", serif;
  font-size: 2rem;
}

.activity {
  display: flex;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.activity.reverse {
  direction: rtl; /* inverte visivamente l’ordine */
}

.activity.reverse .activity-text,
.activity.reverse .activity-image {
  direction: ltr; /* riporta testo normale */
}

.activity-text {
  font-size: 1rem;
  max-width: 50%;
}

.activity-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 2px 2px 5px rgba(0.9, 0, 0.4, 0.4);
}

.activity-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}
.activity-divider {
  border: none;
  height: 1px;
  background-color: #4a3f35;
  margin: 2rem auto;
  width: 90%;
  max-width: 800px;
  opacity: 0.5;
}

.services {
  margin: 1rem auto;
  padding: 0.5rem;
  text-align: center;
  background-color: #f0e4cd;
}

.services h2 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.services-list {
  max-width: 800px;
  margin: 1rem auto; /* centra il contenitore */
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  justify-content: center; /* centra gli elementi */
}

.services-list li {
  background-color: #f4eeda;
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
  color: #4a3f35;
  text-align: center;
  border: 1px solid #4a3f35;
}

.location {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
  text-align: center;
}

.location h2 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
/*Inizio css mappe*/

#map {
  height: 450px;
  width: 100%;
  margin-bottom: 5%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#map-sognodor {
  height: 450px;
  width: 100%;
  margin-bottom: 5%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.map-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn-map {
  background-color: #f0e4cd;
  color: #6b4c3b;
  border: 1px solid #6b4c3b;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn-map[data-i18n="dovesiamo.applebutton"]::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  background-image: url("../img/icons8-apple-logo-24.png"); /* metti il percorso corretto */
  background-size: contain;
  background-repeat: no-repeat;
}

/*fine*/

.house {
  margin-bottom: 2rem;
}
.house h2 {
  font-family: "Merriweather", serif;
  font-size: 1.5rem;
}

.contact-options {
  background-color: #fff8e8;
  padding: 4rem 1rem;
  text-align: center;
  margin-bottom: 0;
}

.contact-options h2 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #4a3f35;
}

.contact-options p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #4a3f35;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.contact-buttons .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
}

.btn.whatsapp {
  background-color: #f0e4cd;
  border: 1px solid #1ebe5b;
  color: #25d366;
}
.btn.whatsapp:hover {
  background-color: #f0e4cd;
  transform: scale(1.05);
}

.btn.airbnb {
  background-color: #f0e4cd;
  color: #ff5a5f;
  border: 1px solid #ff5a5f;
}
.btn.airbnb:hover {
  background-color: #f0e4cd;
  transform: scale(1.05);
}

.btn.booking {
  background-color: #f0e4cd;
  color: #002766;
  border: 1px solid #002766;
}

.btn.booking:hover {
  background-color: #f0e4cd;
  transform: scale(1.05);
}

/* Stile del footer */
footer {
  background-color: #4a3f35;
  color: #f4eeda;
  padding: 1rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.footer-info h3 {
  text-align: center;
  font-family: "Merriweather", serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #f4eeda;
}

.footer-info p {
  margin: 0.2rem 0;
  color: #f0e4cd;
}

.footer-info a {
  color: #f4eeda;
  text-decoration: none;
}

.footer-info a:hover {
  color: #d3c6a3;
}

.footer-bottom {
  border-top: 1px solid #f0e4cd;
  padding-top: 1rem;
  margin-top: 1rem;
  color: #f0e4cd;
}
.cookies {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cookies .cookie {
  background-color: #f4eeda;
  color: #4a3f35;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
}

.slideshow {
  max-width: 600px;
  margin: 3rem auto;
  text-align: center;
}

.slideshow h2 {
  font-family: "Merriweather", serif;
  font-size: 2rem;
}

.swiper {
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 10px;
  overflow: hidden;
}

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

.swiper-slide img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.swiper-button-prev,
.swiper-button-next {
  color: #f4eeda;
}

.swiper-pagination-bullet {
  background-color: #bbb;
}

.swiper-pagination-bullet-active {
  background-color: #6b4c3b;
}

/* Centra il contenitore dei pulsanti */
.language-switch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

/* Stile dei pulsanti */
.language-switch button {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  transition: transform 0.2s;
}

/* Effetto al passaggio del mouse */
.language-switch button:hover {
  transform: scale(1.2);
}

/* Stile per la pagina Work in Progress */
.work-in-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50vh;
  background-color: #f4eeda;
  color: #4a3f35;
  text-align: center;
  padding: 2rem;
}

.work-in-progress-container h1 {
  font-family: "Merriweather", serif;
  font-size: 3rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.work-in-progress-container p {
  font-size: 1.2rem;
  color: #4a3f35;
  margin-bottom: 2rem;
}

/* Animazione del caricamento */
.loader {
  min-width: 40px;
  min-height: 40px;
  width: 40px;
  height: 40px;
  border: 5px solid #f0e4cd;
  border-top-color: #4a3f35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 40px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Prefissi per vecchi browser */
@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

.privacypolicy {
  display: block;
  text-align: center;
}

/*   query per mobile */
@media (max-width: 1100px) {
  header h1 {
    font-size: 1.5rem;
  }

  .menu {
    flex-direction: column;
    display: none;
    width: 100%;
    text-align: center;
    background-color: #f4eeda;
  }

  .menu.active {
    display: flex;
  }

  .hero {
    margin-top: 0;
  }

  .nav-container {
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    height: auto;
  }

  .logo a {
    font-size: 1.2rem;
    padding: 0 10px;
    display: inline-block;
    line-height: 1;
  }

  .activity-divider2 {
    margin: 1.5rem auto;
  }

  /* Contenitore burger */
  .burger {
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1000;
  }

  /* Linee burger */
  .burger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #4a3f35;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
  }

  /* Animazione attiva: trasforma in X */
  .burger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .burger.active span:nth-child(2) {
    opacity: 0;
  }
  .burger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .dropdown-content {
    position: relative;
  }

  nav a {
    display: block;
    margin: 0.5rem 0px;
  }
  .geocaching img {
    max-width: 100%;
  }
  .activity,
  .activity.reverse {
    flex-direction: column;
  }
  .activity-text {
    max-width: 100%;
  }
  .activity-image img {
    width: 100%;
  }
  .contact-form {
    padding: 1rem;
    margin: 1rem;
  }
  .prev,
  .next {
    font-size: 1.2rem;
    padding: 0.5rem;
  }
  .benvenuto p {
    max-width: 100%;
  }
}
