/* styles.css - completo, responsive, demo-ready */

/* RESET BASE */

html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cormorant Garamond', serif;
  }

body {
  background: #DCEFDA;
  color: #004B37;
  line-height: 1.6;
  font-size: clamp(14px, 1.5vw, 18px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #DCEFDA;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1000;
  font-size: clamp(14px, 4vw, 18px);
}

/* LOGO MOBILE - centered on mobile, hidden on desktop */
.logo-mobile {
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 400;
  color: #004B37;
  pointer-events: none;
}

@media (min-width: 968px) {
  .logo-mobile {
  display: none;
  }
}

/* NAV DESKTOP */
nav {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex: 1;
}
nav a {
  text-decoration: none;
  color: #004B37;
  font-weight: 600;
  font-size: clamp(16px, 5vw, 20px);
  transition: color 0.3s;
  padding-right: 6px;
  padding-left: 6px;
}
nav a:hover {
  border-radius: 6px;
  background: #004B37;
  color: #DCEFDA;
}

/* BURGER MENU */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.burger div {
  width: 25px;
  height: 3px;
  background: #004B37;
  transition: all 0.3s;
}
/* MOBILE-FIRST */
.burger {
  display: flex; /* sempre visibile su piccoli dispositivi */
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
@media (min-width: 968px) {
  .burger {
    display: none; /* nascondi su desktop */
  }
}

/* MOBILE-FIRST */
nav {
  display: none; /* default mobile, nascosto */
  flex-direction: column;
  position: absolute;
  top: 56px; /* sotto header */
  left: 0;
  width: 100%;
  background: #DCEFDA;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-in-out;
  padding-bottom: 5px;
  padding-top: 5px;
}
nav a {
  text-decoration: none;
  color: #004B37;
  font-weight: 600;
  font-size: clamp(16px, 5vw, 20px);
  transition: color 0.3s;
  padding-right: 6px;
  padding-left: 6px;
}
nav.show {
  display: flex;
  max-height: 500px;
  background: #DCEFDA;
  margin-bottom: 15px;
  margin-top: 15px;
}

/* Desktop: nav sempre visibile */
@media (min-width: 968px) {
  nav {
    display: flex !important;
    flex-direction: row;
    position: static;
    max-height: none;
    box-shadow: none;
  }
  .burger {
    display: none;
  }
}

/* LANGUAGE SWITCHER */
.lang-switch {
  position: relative;
  display: flex;
  gap: 0.5rem;
}

.lang-current {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #DCEFDA;
  background: #DCEFDA;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

.lang-current:hover {
  border-color: #004B37;
  transform: scale(1.1);
}

.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  background: #DCEFDA;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  gap: 0;
  z-index: 1001;
}

.lang-dropdown button {
  width: 50px;
  height: 40px;
  border: none;
  border-bottom: 1px solid #eee;
  background: #DCEFDA;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
  margin: 0;
  padding: 0;
}

.lang-dropdown button:last-child {
  border-bottom: none;
}

.lang-dropdown button:hover {
  background: #004B37;
  transform: scale(1.05);
}

.lang-switch.open .lang-dropdown {
  display: flex;
}

/* MAIN CONTENT */
main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}
main h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 1rem;
}
main h2 {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
main h3 {
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 500;
  margin-bottom: 0.6rem;
}
main p {
  font-size: clamp(14px, 4vw, 18px);
  line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 968px) {
  nav {
    display: none;
  }
  .burger {
    display: flex;
  }
  nav.show {
  margin-bottom: 15px;
  margin-top: 15px;
  gap: 0px;
}
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  position: relative;
}

/* Aree */
.left, .center, .right {
  display: flex;
  align-items: center;
}

/* ===== HERO IMG ===== */
.home_hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.home_hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.home_hero img.loaded {
  opacity: 1;
}

.home_hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.45) 30%,
    rgba(0, 0, 0, 0.15) 60%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

.hero_content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding-left: 2rem;
  padding-right: 2rem;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.hero_content h1 {
  font-size: clamp(56px, 5vw, 20px);
}

.hero_content p {
  font-size: clamp(26px, 5vw, 20px);
  width: 60%;
  text-align: justify;
  text-justify: inter-character;
}

.home_cta {
  position: absolute;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3; /* sopra ::after */
  text-align: center;
  background: transparent;
  padding: 0;
  margin: 0;
}


.home_cta_button {
  display: inline-block;
  padding: 16px 40px;
  background: #DCEFDA;
  color: #004B37;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: clamp(20px, 2vw, 20px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home_cta_button:hover {
  background: #2D8B6F;
  color: #DCEFDA;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Desktop */
@media (min-width: 968px) {
  .header {
    justify-content: space-between;
  }
  .center { order: 2; }
  .left { order: 1; }
  .right { order: 3; }
}
/* Mobile */
@media (max-width: 968px) {
  .header {
    justify-content: center; /* logo centrato */
  }
  .left, .right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  .left { left: 1rem; }
  .right { right: 1rem; }
  .center { justify-content: center; }
  nav a {
    padding-right: 20px;
    padding-left: 20px;
    gap: 20px;
    padding-bottom: 15px;
    padding-top: 15px;
  }
  .hero_content h1 {
    font-size: clamp( 32px, 5vw, 20px);
  }
  .hero_content p {
    padding: 0px;
    font-size: clamp(20px, 5vw, 20px);
    width: 100%;
    text-align: left;
    text-justify: auto;
  }
  .home_cta {
    width: 100%;
  }
}
/* FOOTER */
#main-footer {
  text-align: center;
  padding: 0;
  background: #DCEFDA;
  border-top: 1px solid rgba(0, 75, 55, 0.15);
  color: #004B37;
  font-size: clamp(12px, 1.2vw, 14px);
  opacity: 0.75;
}
