/* =========================
   RESET E BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */
header {
  background: #fff;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo h1 {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  color: #0A4D68; /* colore principale blu dentistico */
  font-weight: 700;
}

/* Hamburger menu */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  height: 3px;
  background: #0A4D68; /* blu dentistico */
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px,5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px,-5px);
}

/* Nav menu */
.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  height: 100%;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: right 0.3s;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  padding-top: 80px;
}

.nav-menu.active {
  right: 0;
}

.nav-menu ul {
  list-style: none;
  width: 100%;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  align-items: center;
}

.nav-menu a {
  font-size: 1.3rem;
  font-weight: 500;
  color: #0A4D68; /* blu dentistico */
  text-decoration: none;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: #083A4F; /* blu scuro */
}

.menu-whatsapp-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.menu-whatsapp-item img:hover {
  transform: scale(1.15);
}

/* =========================
   HERO SECTION
========================= */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh;
  text-align: center;
  padding: 0 1rem;
  background: url('img/banner-dentista.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 77, 104, 0.55); /* overlay blu dentistico trasparente */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1 {
  font-family: 'Lora', serif;
  color: #fff;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-content p {
  font-family: 'Roboto', sans-serif;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

/* Pulsante CTA */
.btn-cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.8rem 2rem;
  background-color: #0A4D68; /* blu dentistico */
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-cta:hover {
  background-color: #083A4F; /* blu scuro */
  transform: translateY(-2px);
}

/* =========================
   SEZIONE SERVIZI
========================= */
.servizi {
  padding: 6rem 2rem;
  text-align: center;
  background: #fefefe;
}

.servizi h2 {
  color: #0A4D68; /* blu dentistico */
  margin-bottom: 3rem;
  font-size: 2.2rem;
  font-weight: 700;
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.servizio {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: default;
  opacity: 0;
  transform: translateY(30px);
}

.servizio.visible {
  opacity: 1;
  transform: translateY(0);
}

.servizio:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

.servizio img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.servizio:hover img {
  transform: scale(1.05);
}

.servizio h3 {
  color: #0A4D68; /* blu dentistico */
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1rem 1rem 0.5rem 1rem;
}

.servizio p {
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
  margin: 0 1rem 1.5rem 1rem;
}

/* =========================
   CHI SIAMO
========================= */
.chi-siamo {
  padding: 6rem 2rem;
  background: #f8f9fa;
}

.chi-siamo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.chi-siamo-video {
  flex: 0 0 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.chi-siamo-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chi-siamo-video:hover {
  transform: scale(1.05);
}

.chi-siamo-testo {
  flex: 1;
  max-width: 600px;
  text-align: left;
}

.chi-siamo h2 {
  color: #0A4D68; /* blu dentistico */
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.chi-siamo p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.chi-siamo-video,
.chi-siamo-testo {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.chi-siamo-video.visible,
.chi-siamo-testo.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   CONTATTI
========================= */
.contatti {
  padding: 6rem 2rem;
  text-align: center;
  background: #ffffff;
}

.contatti h2 {
  color: #0A4D68; /* blu dentistico */
  font-size: 2rem;
  margin-bottom: 2rem;
}

.contatti-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.modulo-contatti {
  background: #f9f9f9;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  width: 90%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modulo-contatti input,
.modulo-contatti textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.modulo-contatti button {
  padding: 0.8rem 1.8rem;
  background-color: #0A4D68; /* blu dentistico */
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.modulo-contatti button:hover {
  background-color: #083A4F; /* blu scuro */
}

/* =========================
   FOOTER
========================= */
footer {
  background: #f8f9fa;
  padding: 2rem 0;
  text-align: center;
}

footer .social a {
  margin: 0 0.5rem;
  color: #0A4D68; /* blu dentistico */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

footer .social a img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

footer .social a:hover {
  transform: scale(1.2);
  opacity: 0.85;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .nav-menu {
    width: 80%;
  }
  .hero {
    height: 75vh;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .chi-siamo-container {
    flex-direction: column;
    gap: 2rem;
  }
  .chi-siamo-testo {
    text-align: center;
  }
}

/* Logo top menu - versione mobile ottimizzata */
.menu-top-logo {
  width: 100%;
  text-align: center;
  padding: 2rem 1rem 1rem 1rem;
}

.menu-top-logo h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0A4D68; /* blu dentistico */
  line-height: 1.2;
  word-wrap: break-word;
}

@media (max-width: 480px) {
  .menu-top-logo h1 {
    font-size: 1.2rem;
  }
}

/* DISTANZA NOME E PRIMA VOCE MENU */
.menu-top-logo {
  width: 100%;
  text-align: center;
  padding: 2.5rem 1rem 2rem 1rem;
  position: relative;
}

/* LINEA DIVISORIA MENU */
.menu-top-logo .underline {
  display: block;
  height: 1px;
  width: 100%;
  max-width: 220px;
  margin: 1.5rem auto 0 auto;
  background: linear-gradient(to right, #0A4D68, #083A4F);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

/* ANIMAZIONE LINEA */
.nav-menu.active .underline {
  transform: scaleX(1);
}

.menu-top-logo .underline {
  display: block;
  height: 1px;
  width: 100%;
  max-width: 200px;
  margin: 1.8rem auto 0 auto;
  background: linear-gradient(
    to right,
    transparent,
    #0A4D68,
    #0A4D68,
    transparent
  );
  opacity: 0.8;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(.77,0,.18,1);
}

/* ANIMAZIONE A CASCATA */
.menu-right li {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.nav-menu.active .menu-right li {
  opacity: 1;
  transform: translateY(0);
}

.nav-menu.active .menu-right li:nth-child(1) {
  transition-delay: 0.15s;
}

.nav-menu.active .menu-right li:nth-child(2) {
  transition-delay: 0.25s;
}

.nav-menu.active .menu-right li:nth-child(3) {
  transition-delay: 0.35s;
}

.nav-menu.active .menu-right li:nth-child(4) {
  transition-delay: 0.45s;
}

/* BLUR quando menu aperto */
.site-content {
  transition: filter 0.4s ease, transform 0.4s ease;
}

.site-content.menu-open {
  filter: blur(6px);
  transform: scale(0.995);
}

/* CENTRATURA */
.contatti-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}