/* ===== HERO HOMEPAGE (split layout) ===== */
.hero-section {
  background-color: var(--dark, #1A1A1A);
  padding: 5rem 2rem 4.5rem;
  color: white;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 5rem;
  width: 100%;
}

.hero-text {
  flex: 1 1 55%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(251, 139, 4, 0.12);
  border: 1px solid rgba(251, 139, 4, 0.38);
  color: var(--accent, #FB8B04);
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.8rem;
  letter-spacing: 0.4px;
}

.hero-section h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 1.4rem;
  letter-spacing: -0.02em;
}

.hero-section p {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero-btn {
  display: inline-block;
  background-color: var(--accent, #FB8B04);
  color: white;
  padding: 1rem 2.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-bottom: 1.6rem;
  border: none;
  cursor: pointer;
}

.hero-btn:hover {
  background-color: var(--accent-hover, #e07c00);
  transform: translateY(-2px);
}

.hero-trust {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-trust span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-trust i {
  color: var(--accent, #FB8B04);
  font-size: 0.78rem;
}

/* Colonna foto */
.hero-image-col {
  flex: 1 1 38%;
  display: flex;
  justify-content: center;
}

.hero-photo-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.hero-photo-wrap::before {
  content: "";
  position: absolute;
  top: -14px;
  right: -14px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--accent, #FB8B04);
  border-radius: 24px;
  z-index: 0;
}

.hero-photo-wrap img {
  width: 100%;
  border-radius: 20px;
  display: block;
  position: relative;
  z-index: 1;
  object-fit: cover;
  object-position: top center;
}

/* ===== HERO PAGINA ANZIANI (mantiene il vecchio stile) ===== */
.hero-bg-header {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  color: white;
  box-sizing: border-box;
}

.hero-bg-header-anziani {
  background: url("../img/sfondo.png") center center / cover no-repeat;
}

.hero-bg-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.58) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

/* ===== RESPONSIVE HERO HOMEPAGE ===== */
@media (max-width: 900px) {
  .hero-section {
    padding: 4rem 1.5rem 3.5rem;
    min-height: auto;
  }

  /* Mobile: prima titolo, testo e pulsanti; la foto viene dopo, più piccola */
  .hero-inner {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-section p {
    max-width: 100%;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-photo-wrap {
    max-width: 200px;
  }

  .hero-photo-wrap::before {
    top: -10px;
    right: -10px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 3.5rem 1.2rem 3rem;
  }

  .hero-trust {
    gap: 0.7rem;
    flex-direction: column;
    align-items: center;
  }

  .hero-section h1 {
    font-size: 2.1rem;
  }
}

/* Link interni nel paragrafo hero */
.hero-section p a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-section p a:hover {
  color: var(--accent, #FB8B04);
}

/* Doppia CTA nella hero: consulenza + WhatsApp */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 1.6rem;
}

.hero-ctas .hero-btn { margin-bottom: 0; }

.hero-btn--wa {
  background-color: #25D366;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-btn--wa:hover { background-color: #1ebe5b; }

@media (max-width: 900px) {
  .hero-ctas { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .hero-btn { width: 100%; text-align: center; justify-content: center; }
}

/* ===== HERO MOBILE: layout "scheda" ===== */
.hero-avatar { display: none; }
.hero-lead--mobile { display: none; }

@media (max-width: 600px) {
  .hero-section {
    padding: 2.2rem 1.2rem 2.4rem;
  }

  .hero-inner { gap: 0; }

  /* Foto grande nascosta, avatar tondo al suo posto */
  .hero-image-col { display: none; }

  .hero-avatar {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--accent, #FB8B04);
    margin: 0 auto 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  }

  .hero-badge {
    font-size: 0.74rem;
    padding: 0.4rem 0.95rem;
    margin-bottom: 1.1rem;
  }

  .hero-section h1 {
    font-size: 1.85rem;
    line-height: 1.18;
    margin-bottom: 0.9rem;
  }

  /* Testo breve su mobile, quello completo resta su desktop */
  .hero-lead--desktop { display: none; }
  .hero-lead--mobile {
    display: block;
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
  }

  .hero-ctas { gap: 10px; margin-bottom: 1.1rem; }
  .hero-ctas .hero-btn { padding: 0.9rem 1.4rem; font-size: 1rem; }

  .hero-trust {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem 1rem;
  }

  .hero-trust span { font-size: 0.78rem; }
}

/* Mobile: niente righe forzate nel titolo, blocchi sempre entro la larghezza dello schermo */
@media (max-width: 600px) {
  .hero-text,
  .hero-ctas,
  .hero-trust {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-section h1 {
    font-size: 1.7rem;
    overflow-wrap: anywhere;
  }

  .hero-section h1 br { display: none; }

  .hero-ctas { flex-direction: column; }

  .hero-ctas .hero-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.95rem 1rem;
    font-size: 0.98rem;
  }
}
