/* ============================================
   HERO CONTENT
============================================ */
.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 350px;
  padding: 40px 0;
  overflow: hidden;
  border-bottom: 1px solid #ddd;
  background: linear-gradient(135deg, #f7f8fa 0%, #e9ecf2 100%);
}

/* Overlay via ::before — NO div separato */
.hero-content::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to right, rgba(1, 32, 67, 0.8), rgba(1, 32, 67, 0.6), rgba(1, 32, 67, 0));
}

.hero-content__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.hero-content__container {
  position: relative; z-index: 2;
}

.hero-content__inner {
  color: #fff; display: flex; flex-direction: column;
}

.hero-content__title {
  margin: 0 0 1rem; color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700;
}

.hero-content__excerpt {
  margin-top: 0.5rem; color: #fff; font-size: 1.2rem; line-height: 1.4;
}
.hero-content__excerpt > *:last-child { margin-bottom: 0; }

.hero-content__pre-title {
  color: var(--color-secondary);
}

/* strong/b dentro pre-title eredita il colore del contenitore, non il dorato globale */
.hero-content__pre-title strong,
.hero-content__pre-title b {
  color: inherit;
  font-weight: inherit;
}

/* Below excerpt: lista CTA pills */
.hero-content__below-excerpt { margin-top: 40px; }

.hero-content__below-excerpt ul {
  list-style: none; margin: 0; padding: 0; display: flex;
}

.hero-content__below-excerpt ul li {
  display: inline-flex; justify-content: center; align-items: center; margin-right: 15px;
}

.hero-content__below-excerpt ul li a {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  font-family: var(--font-body); font-weight: var(--cta-font-weight);
  line-height: 1; text-decoration: none !important; cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease,
              color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  padding: .72rem 1.15rem;
  border: 2px solid var(--color-secondary); border-radius: var(--cta-radius);
  background: var(--color-secondary); color: var(--color-on-secondary) !important;
  box-shadow: var(--cta-shadow);
}
.hero-content__below-excerpt ul li a:hover, .hero-content__below-excerpt ul li a:focus {
  background: var(--color-secondary-hover); border-color: var(--color-secondary-hover);
  color: var(--color-on-secondary) !important;
  transform: translateY(-2px); box-shadow: var(--cta-shadow-hover);
}

/* Secondo CTA senza link (es. "Risultati misurabili"): testo bianco + icona scudo */
.hero-content__below-excerpt ul li:not(:has(a)) {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: rgba(255, 255, 255, 0.92); font-style: normal; font-weight: 500;
  font-family: var(--font-body); font-size: 1rem;
}
.hero-content__below-excerpt ul li:not(:has(a)) em,
.hero-content__below-excerpt ul li:not(:has(a)) strong {
  color: inherit; font-style: normal; font-weight: inherit;
}
.hero-content__below-excerpt ul li:not(:has(a))::before {
  content: "";
  flex-shrink: 0;
  display: inline-block;
  width: 1.35rem; height: 1.35rem;
  background-color: rgba(255, 255, 255, 0.9);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  mask-repeat: no-repeat; mask-position: center; mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain;
}

/* Animazioni hero */
main .hero-content__pre-title,
main .hero-content .hero-content__title,
main .hero-content .hero-content__excerpt,
main .hero-content .hero-content__below-excerpt {
  animation-fill-mode: both; will-change: opacity, transform;
}
main .hero-content__pre-title          { animation: project-hero-fade-up 0.65s ease-out 0.12s both; }
main .hero-content .hero-content__title   { animation: project-hero-fade-up 0.75s ease-out 0.22s both; }
main .hero-content .hero-content__excerpt { animation: project-hero-fade-up 0.75s ease-out 0.34s both; }
main .hero-content .hero-content__below-excerpt { animation: project-hero-fade-up 0.7s ease-out 0.46s both; }

@media (prefers-reduced-motion: reduce) {
  main .hero-content__pre-title, main .hero-content .hero-content__title,
  main .hero-content .hero-content__excerpt, main .hero-content .hero-content__below-excerpt {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
}

/* Desktop: inner max 75% */
@media (min-width: 992px) {
  .hero-content__inner { width: 75%; }
  .home .hero-content__inner { width: 80%; }
}

/* Mobile */
@media (max-width: 991px) {
  main .hero-content {
    height: calc(100dvh - var(--site-header-height-mobile));
  }
  main .hero-content .hero-content__bg { object-position: 90% center; }
  main .hero-content::before {
    background: linear-gradient(to right, rgba(1, 32, 67, 0.8), rgba(1, 32, 67, 0.7), rgba(1, 32, 67, 0));
  }

  .hero-content__below-excerpt ul {
    display: flex; flex-wrap: wrap; gap: 1rem;
  }
  .hero-content__below-excerpt ul li {
    margin: 0; box-sizing: border-box; justify-content: left;
  }
  .hero-content__below-excerpt ul li:nth-child(1) { order: 3; flex: 0 0 100%; margin-top: 15px; }
  .hero-content__below-excerpt ul li:nth-child(2) { order: 1; flex: 0 0 calc(40% - 0.5rem); }
  .hero-content__below-excerpt ul li:nth-child(3) { order: 2; flex: 0 0 calc(60% - 0.5rem); }

  /* Scroll indicator mobile */
  main .hero-content { overflow: visible; }
  body:has(.main-nav.is-open) main .hero-content::after { display: none; }
  main .hero-content::after {
    content: "";
    position: absolute; left: 50%; bottom: 1.45rem; z-index: 20;
    width: 24px; height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,0.95) 0 3px, transparent 4px) center 8px / 100% 100% no-repeat;
    transform: translateX(-50%); pointer-events: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    animation: hero-scroll-indicator 1.6s ease-in-out infinite;
  }
}

@media (min-width: 992px) { main .hero-content::after { display: none; } }

/* Home hero: ordine inversato (pre-title=headline, title=label) */
.home .hero-content__pre-title {
  order: 1;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 4vw, 4.1rem);
  font-weight: 800; line-height: 120%;
  letter-spacing: -0.04em; text-transform: none; margin-bottom: 25px;
}
.home .hero-content__title {
  order: 2;
  margin-bottom: 5px;
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 0.95vw, 0.95rem);
  font-weight: 700; line-height: 150%; letter-spacing: 0.04em; text-transform: uppercase;
}
.home .hero-content__excerpt { order: 3; margin: 0; }
.home .hero-content__below-excerpt { order: 4; }

.home .hero-content { min-height: 500px; }

@media (max-width: 991px) {
  .home .hero-content__pre-title { font-size: clamp(2rem, 8vw, 3rem); }
}
