/* Montserrat auto-ospitato: nessuna richiesta esterna, nessun cookie */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/montserrat-latin.woff2) format("woff2");
}

:root {
  --primary-color: #0b3d91;
  --primary-color-dark: #06265e;
  --accent-color: #00a8cc;
  --text-color: #2c3e50;
  --text-color-light: #546e7a;
  --background-light: #f8f9fa;
  --white: #fff;
  --box-shadow-light: 0 4px 6px rgba(0, 0, 0, 0.04);
  --box-shadow-dark: 0 10px 25px rgba(0, 0, 0, 0.08);
  --transition-standard: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*,
::after,
::before {
  box-sizing: border-box;
}

blockquote,
body,
dd,
dl,
figure,
h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

img,
picture {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

body {
  font-family: Montserrat, sans-serif;
  line-height: 1.8;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: var(--background-light);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.visible {
  opacity: 1;
  transform: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 15px 0;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition:
    transform 0.3s ease,
    padding 0.3s ease,
    box-shadow 0.3s ease;
}

header.scrolled {
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}



.logo {
  width: 80px;
  margin: 0 auto 10px auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1);
}

header h1 {
  margin: 0;
  font-size: 1.8em;
  font-weight: 700;
  color: var(--text-color);
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
  display: flex;
  justify-content: center;
  gap: 25px;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 1.1em;
  padding: 10px 15px;
  border-radius: 5px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

nav a.active,
nav a:hover {
  background-color: rgba(11, 61, 145, 0.05);
  color: var(--primary-color);
}

#hero {
  background:
    linear-gradient(135deg,
      rgba(248, 249, 250, 0.95) 0,
      rgba(255, 255, 255, 0.7) 100%),
    url("DrGianvitoFerrara.webp") no-repeat center center/cover;
  text-align: center;
  padding: 100px 20px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center,
      transparent 0,
      rgba(255, 255, 255, 0.4) 100%);
  pointer-events: none;
}

#hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.profile-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: translateY(-10px);
}

.hero-text h2 {
  font-size: clamp(2.5em, 5vw, 3.5em);
  margin-bottom: 15px;
  color: var(--primary-color);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-text p {
  font-size: clamp(1.1em, 4vw, 1.25em);
  color: var(--text-color-light);
  max-width: 600px;
  margin: 0 auto 20px auto;
}

section {
  padding: 60px 0;
}

section:nth-of-type(odd) {
  background-color: var(--white);
}

section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5em;
  color: var(--text-color);
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--accent-color);
}

#about p {
  font-size: 1.15em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  color: #666;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.service-item {
  background-color: var(--white);
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: var(--box-shadow-light);
  transition: var(--transition-standard);
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.service-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom,
      var(--accent-color),
      var(--primary-color));
  transition: width 0.3s ease;
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--box-shadow-dark);
}

.service-item:hover::before {
  width: 6px;
}

.service-item h3 {
  margin-top: 0;
  font-size: 1.4em;
  color: var(--primary-color);
}

.service-item p {
  font-size: 1em;
  color: var(--text-color-light);
}

#contact {
  background: linear-gradient(135deg,
      var(--primary-color-dark) 0,
      var(--primary-color) 100%);
  color: var(--white);
  border-radius: 16px;
  padding: 60px 40px;
  margin: 60px auto;
  box-shadow: var(--box-shadow-dark);
}

#contact h2 {
  color: var(--white);
}

#contact h2::after {
  background-color: var(--white);
}

#contact p {
  text-align: center;
  font-size: 1.25em;
  margin-bottom: 10px;
}

#contact a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  position: relative;
  transition: opacity 0.3s ease;
}

#contact a:hover {
  opacity: 0.8;
}

.contact-info {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-cta,
.floating-whatsapp {
  display: none;
  position: fixed;
  z-index: 1001;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05em;
  border: none;
  cursor: pointer;
}

footer {
  background-color: var(--text-color);
  color: var(--white);
  text-align: center;
  padding: 25px 0;
}

footer p {
  margin: 0;
}

.cookie-note {
  font-size: 0.85em;
  opacity: 0.75;
  margin-top: 8px;
}

.legal-line {
  font-size: 0.85em;
  opacity: 0.8;
  margin-top: 4px;
}

footer a {
  color: var(--white);
  opacity: 0.95;
}

footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Pagina Privacy / Note Legali */
.legal-page {
  padding: 40px 0 60px;
}

.legal-page h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 2em;
  color: var(--primary-color);
}

.legal-page .updated {
  text-align: center;
  color: var(--text-color-light);
  font-size: 0.9em;
  margin-bottom: 35px;
}

.legal-section {
  background-color: var(--white);
  border-radius: 12px;
  padding: 30px 35px;
  margin-bottom: 25px;
  box-shadow: var(--box-shadow-light);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.legal-section h3 {
  color: var(--primary-color);
  font-size: 1.3em;
  margin-bottom: 15px;
}

.legal-section p,
.legal-section li {
  color: var(--text-color-light);
  line-height: 1.75;
}

.legal-section ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 15px;
}

.legal-section li {
  margin-bottom: 8px;
}

/* FAQ */
.faq-intro {
  text-align: center;
  color: var(--text-color-light);
  max-width: 700px;
  margin: -20px auto 35px;
  font-size: 1.1em;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--white);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--box-shadow-light);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.faq-item:hover {
  box-shadow: var(--box-shadow-dark);
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 25px;
  font-weight: 700;
  font-size: 1.08em;
  color: var(--primary-color);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.6em;
  line-height: 1;
  color: var(--accent-color);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 25px 20px;
  color: var(--text-color-light);
}

.faq-item a {
  color: var(--primary-color);
  font-weight: 600;
}

/* Orari di apertura (sezione contatti) */
#contact .hours-box {
  margin-top: 25px;
  padding: 20px 25px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#contact .hours-box .hours-title {
  font-size: 1.15em;
  font-weight: 700;
  margin-bottom: 12px;
}

#contact .hours-box ul li {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

#contact .hours-box ul li:last-child {
  border-bottom: none;
}

#contact .hours-box ul li span:last-child {
  font-weight: 600;
  text-align: right;
}

@media (max-width: 768px) {
  #hero {
    flex-direction: column;
    padding: 40px 20px;
  }

  .hero-text {
    padding: 0 10px;
  }

  .profile-photo {
    margin-right: 0;
    margin-bottom: 20px;
    width: 180px;
    height: 180px;
  }

  header h1 {
    font-size: 1.4em;
    margin-left: 10px;
    text-align: left;
    line-height: 1.2;
  }

  .logo {
    margin: 0;
    width: 50px;
  }

  .hero-text h2 {
    font-size: 2.2em;
  }

  section h2 {
    font-size: 1.8em;
  }
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 16px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  margin-top: 25px;
  transition: var(--transition-standard);
  box-shadow: 0 8px 15px rgba(11, 61, 145, 0.3);
  border: 2px solid transparent;
}

.cta-button:hover {
  background-color: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(11, 61, 145, 0.4);
}

.cta-button-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none;
  margin-left: 10px;
}

.cta-button-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

@media (max-width: 768px) {
  .cta-button-secondary {
    margin-left: 0;
    margin-top: 10px;
  }
}

.cta-button-whatsapp {
  background-color: #25d366;
  border-color: transparent;
  box-shadow: 0 8px 15px rgba(37, 211, 102, 0.35);
  margin-left: 10px;
}

.cta-button-whatsapp:hover {
  background-color: #1eb857;
  color: var(--white);
  box-shadow: 0 12px 20px rgba(37, 211, 102, 0.45);
}

@media (max-width: 768px) {
  .cta-button-whatsapp {
    margin-left: 0;
    margin-top: 10px;
  }
}

/* Barra fissa in basso su mobile: "Chiama Ora" e "WhatsApp" affiancati, senza sovrapposizioni */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  .floating-cta,
  .floating-whatsapp {
    display: flex;
    position: fixed;
    bottom: 0;
    width: 50%;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding: 0 8px;
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    transform: none;
  }

  .floating-cta {
    left: 0;
    right: 50%;
    background-color: var(--primary-color);
  }

  .floating-cta:active {
    background-color: var(--primary-color-dark);
  }

  .floating-whatsapp {
    left: 50%;
    right: 0;
    background-color: #25d366;
  }

  .floating-whatsapp:active {
    background-color: #1eb857;
  }
}

.address-hero {
  font-size: 1.1em;
  font-weight: 600;
  color: #555;
  margin-top: 15px;
}

.hamburger {
  display: none;
  cursor: pointer;
  padding: 10px;
  background: 0 0;
  border: none;
  z-index: 1001;
}

.hamburger svg {
  stroke: var(--primary-color);
}

.icon-close {
  display: none;
}

.hamburger.is-active .icon-menu {
  display: none;
}

.hamburger.is-active .icon-close {
  display: block;
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  nav ul.is-active {
    display: flex;
  }

  nav li {
    text-align: center;
    padding: 15px 0;
  }

  .hamburger {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
  }

  header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 60px 0 20px;
  }
}