/* ============================
   BASE
============================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

section {
  scroll-margin-top: 80px;
}

/* ============================
   NAVBAR
============================ */
.navbar {
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.9) !important;
  transition: box-shadow 0.18s ease-out, background-color 0.18s ease-out;
}

/* linea morbida sotto il link attivo/hover */
.navbar .nav-link {
  position: relative;
  font-weight: 500;
}

.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.3rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1e60ff, #3b82ff);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width 0.18s ease-out;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.nav-link-active::after {
  width: 60%;
}

/* stato active (classe che aggiungiamo via JS sulla home) */
.navbar .nav-link.nav-link-active {
  color: #1d4ed8;
}

/* navbar quando scrolli */
.navbar.navbar-scrolled {
  background-color: rgba(248, 250, 252, 0.95);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

/* ============================
   HERO – layout & grafica
============================ */

#home {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at top left, #eff6ff 0, #eff6ff 28%, transparent 60%),
              radial-gradient(circle at bottom right, #e0ecff 0, #e0ecff 25%, transparent 55%),
              #ffffff;
}

#home h1 {
  letter-spacing: 0.02em;
}

#home .lead {
  max-width: 620px;
}

.hero-badge {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* rotatore frasi chiave (se usato) */
.hero-rotator {
  position: relative;
  min-height: 100px;
}

.hero-tagline {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  font-size: 0.95rem;
  color: #4b5563;
}

.hero-tagline.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.hero-tagline-label {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.4rem;
  background: rgba(37, 99, 235, 0.07);
  color: #1d4ed8;
  border: 1px solid rgba(191, 219, 254, 0.8);
}

/* Highlights a sinistra */
.hero-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hero-highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.hero-highlight-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero-highlight-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

.hero-highlight-text {
  font-size: 0.9rem;
  color: #6b7280;
}

/* HERO GRAPHIC – 2 cards con fade */
.hero-graphic {
  position: relative;
  max-width: 440px;
  margin-left: auto;
}

.hero-graphic-inner {
  position: relative;
  min-height: 260px;
}

.hero-graphic-card {
  position: absolute;
  inset: 0;
  border-radius: 1.6rem;
  background: #0b1220;
  color: #e5e7eb;
  padding: 1.6rem 1.8rem 1.8rem;
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.55);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.hero-graphic-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-graphic-card:not(.active) {
  pointer-events: none;
}

.hero-graphic-header {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.hero-graphic-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #4b5563;
}
.hero-graphic-dot:nth-child(1) { background: #f97316; }
.hero-graphic-dot:nth-child(2) { background: #22c55e; }
.hero-graphic-dot:nth-child(3) { background: #3b82f6; }

.hero-graphic-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hero-metric-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 0.7rem;
  align-items: center;
  font-size: 0.92rem;
}

.hero-metric-label {
  color: #e5e7eb;
  font-weight: 500;
}

.hero-metric-bar {
  height: 8px;
  background: rgba(31, 41, 55, 0.9);
  border-radius: 999px;
  overflow: hidden;
}

.hero-metric-fill-1,
.hero-metric-fill-2,
.hero-metric-fill-3 {
  height: 100%;
  border-radius: inherit;
}

.hero-metric-fill-1 {
  width: 74%;
  background: linear-gradient(90deg, #22c55e, #a3e635);
}

.hero-metric-fill-2 {
  width: 52%;
  background: linear-gradient(90deg, #f97316, #facc15);
}

.hero-metric-fill-3 {
  width: 67%;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}

.hero-metric-value {
  font-weight: 700;
  color: #f9fafb;
  font-size: 0.98rem;
}

/* badge “floating” */
.hero-graphic-badge {
  position: absolute;
  right: -4px;
  padding: 0.55rem 0.9rem;
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.hero-graphic-badge-top {
  top: -14px;
}

.hero-graphic-badge-bottom {
  bottom: -14px;
  left: 10%;
  right: auto;
}

.hero-graphic-badge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #111827;
}

.hero-graphic-badge-label i {
  color: #2563eb;
}

.hero-graphic-badge-value {
  font-weight: 700;
  color: #111827;
}

/* Caption sotto la card */
.hero-graphic-caption {
  margin-top: 1.6rem;
  max-width: 440px;
  margin-left: auto;
  font-size: 0.82rem;
  color: #6b7280;
}

/* ============================
   ANIMAZIONI SEZIONI
============================ */
.section-hidden {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   BOTTONI
============================ */

/* base comune per tutti i bottoni (esclusi quelli lingua) */
.btn:not(.btn-lang) {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1.7rem;
  
  background: linear-gradient(135deg, #1e60ff, #3b82ff);
  box-shadow: 0 8px 26px rgba(30, 96, 255, 0.25);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    opacity 0.18s ease-out,
    background 0.18s ease-out;
}

/* versione “large” mantiene solo padding un po’ più ampio */
.btn-lg:not(.btn-lang) {
  padding-inline: 1.9rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

/* bordo animato tipo hero CTA */
.btn:not(.btn-lang)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #93c5fd, #a855f7);
  opacity: 0;
  transition: opacity 0.2s ease-out;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.btn:not(.btn-lang):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30, 96, 255, 0.35);
  opacity: 0.97;
}

.btn:not(.btn-lang):hover::before {
  opacity: 1;
}

/* allinea esplicitamente lo stile della CTA hero a quello base */
.btn-cta-gradient {
  /* eredita già tutto da .btn:not(.btn-lang) */
}

/* varianti Bootstrap mappate sullo stesso stile base */

/* primaria – è già il default gradient */
.btn-primary,
.btn-primary:focus,
.btn-primary:active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #1e60ff, #3b82ff) !important;
  border: none !important;
  box-shadow: 0 8px 26px rgba(30, 96, 255, 0.25);
}

/* secondaria – stessa forma, gradient un po’ più soft */
.btn-secondary,
.btn-secondary:focus,
.btn-secondary:active {
  color: #0f172a !important;
  background: linear-gradient(135deg, #e5edff, #ffffff) !important;
  border: 1px solid rgba(148, 163, 184, 0.7) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

/* outline-primary – versione “ghost” con bordo gradient */
.btn-outline-primary,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #1e3a8a !important;
  background: #ffffff !important;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.7) !important;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.18);
}

/* outline-secondary – usata ad es. nel cookie banner */
.btn-outline-secondary,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
  color: #334155 !important;
  background: #ffffff !important;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* stato hover coerente per tutte le varianti */
.btn-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

/* Language Switch Buttons – restano con il loro stile dedicato */
.btn-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.4);
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.18s ease-out;
}

.btn-lang svg {
  display: block;
  border-radius: 3px;
  box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

.btn-lang:hover {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border-color: rgba(37,99,235,0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,23,42,0.15);
}

.btn-lang.active {
  background: linear-gradient(135deg, #1e60ff, #3b82ff);
  border-color: rgba(255,255,255,0.4);
  color: white !important;
  box-shadow: 0 6px 20px rgba(30,96,255,0.3);
}

.btn-lang.active svg {
  box-shadow: none;
}


/* ============================
   LISTE & FORM
============================ */

.list-group-item {
  border: none;
  padding-left: 0;
  padding-right: 0;
}

#contact .form-control {
  border-radius: 0.7rem;
}

/* ============================
   METODO DI LAVORO – STEPPER
============================ */

.method-steps {
  margin-top: 2rem;
}

.method-line {
  position: absolute;
  top: 52px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, #9fb5ff, #c5a9ff);
  opacity: 0.9;
  z-index: 0;
}

.method-step {
  position: relative;
  z-index: 1;
  padding-inline: 0.5rem;
}

.method-step-circle {
  width: 70px;
  height: 70px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e60ff, #3b82ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: 0 6px 14px rgba(30, 96, 255, 0.25);
  position: relative;
  isolation: isolate;
}

/* hover leggerissimo */
.method-step-circle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(30, 96, 255, 0.22);
  transition: all 0.16s ease-out;
}

/* alone glow */
.method-step-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 rgba(59, 130, 246, 0.0);
  transition: box-shadow 0.2s ease-out, transform 0.2s ease-out;
  z-index: -1;
}

.method-step:hover .method-step-circle::before {
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.45);
}

.method-step:hover .method-step-circle {
  transform: translateY(-2px);
}

/* ============================
   CARD SYSTEM – unified style
============================ */

/* base comune per tutte le family di card */
.card,
.feature-card,
.service-card,
.package-card,
.before-after-card {
  background: #ffffff;
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  padding: 1.6rem 1.4rem 1.4rem;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

/* hover “standard” per tutte le card principali */
.card:hover,
.feature-card:hover,
.service-card:hover,
.package-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  border-color: rgba(37, 99, 235, 0.6);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), #ffffff);
}

/* ===== Servizi principali – feature cards ===== */

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e60ff, #3b82ff);
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.feature-list li {
  font-size: 0.85rem;
  color: #6b7280;
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.25rem;
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #2563eb;
}

/* ===== Servizi & programmi – cards ===== */

.service-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1e60ff, #3b82ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(219, 234, 254, 0.9);
  color: #1d4ed8;
}

/* ===== Before / After ===== */

.before-after-card {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  border-color: rgba(148, 163, 184, 0.35);
}

.before-card {
  background: linear-gradient(135deg, #fef2f2, #ffffff);
  border-color: rgba(248, 113, 113, 0.45);
}

.after-card {
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  border-color: rgba(34, 197, 94, 0.55);
}

.before-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(248, 113, 113, 0.32);
  border-color: rgba(239, 68, 68, 0.85);
  background: linear-gradient(135deg, #fee2e2, #ffffff);
}

.after-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(34, 197, 94, 0.30);
  border-color: rgba(22, 163, 74, 0.9);
  background: linear-gradient(135deg, #dcfce7, #ffffff);
}

.ba-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.ba-list li {
  font-size: 0.9rem;
  color: #374151;
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.4rem;
}

.ba-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.before-card .ba-list li::before {
  color: #ef4444;
}

.after-card .ba-list li::before {
  color: #16a34a;
}

/* ===== Pacchetti consulenza ===== */

.package-card {
  /* eredita già stile base dal blocco card system */
}

/* ============================
   CTA FINALE
============================ */

#cta-final {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 3.5rem;
  background:
    radial-gradient(circle at top left, #1e60ff 0, #1e60ff 22%, transparent 55%),
    radial-gradient(circle at bottom right, #3b82ff 0, #3b82ff 28%, transparent 60%),
    #0f172a;
  color: #e5e7eb;
}

#cta-final .container {
  max-width: 900px;
}

.cta-title {
  max-width: 900px;
  margin: 0 auto 0.75rem auto;
  line-height: 1.2;
  color: #f9fafb;
}

#cta-final p {
  color: #e5e7eb;
}

/* ============================
   COOKIE BANNER & FOOTER LINK
============================ */

#cookie-banner.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.15);
  padding: 20px 15px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cookie-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.cookie-buttons {
  margin-top: 15px;
}

.cookie-buttons button {
  margin: 5px 10px;
}

.footer-link {
  color: #6c757d;
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  color: #0d6efd;
  text-decoration: underline;
}

/* ============================
   MOBILE TWEAKS – global
============================ */

@media (max-width: 767.98px) {

  /* Stepper metodo di lavoro */
  .method-line {
    display: none;
  }

  .method-step {
    margin-bottom: 2rem;
  }

  .method-step-circle {
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
  }

  /* Gerarchia titoli più morbida su smartphone */
  h1, .h1 {
    font-size: 1.9rem;
  }

  h2, .h2 {
    font-size: 1.5rem;
  }

  /* Hero meno “alto” su schermi piccoli */
  #home {
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 3rem;
    background: #ffffff;
  }

  #home .lead {
    font-size: 0.98rem;
  }

  .hero-rotator {
    min-height: 120px;
  }

  .hero-tagline {
    position: absolute;
  }

  .hero-highlights {
    gap: 0.9rem;
  }

  .hero-highlight-text {
    font-size: 0.88rem;
  }

  /* Card: un filo più compatte su mobile */
  .feature-card,
  .service-card,
  .package-card,
  .before-after-card {
    padding: 1.4rem 1.2rem 1.3rem;
    margin-bottom: 0.4rem;
  }

  /* Sezioni meno “spesse” in verticale */
  section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  /* CTA Finale un po’ più compatta su mobile */
  #cta-final {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }
}

/* ============================
   TESTIMONIALS
============================ */
.testimonial-card {
  background: #f8faff;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(30, 96, 255, 0.1);
}

.testimonial-quote {
  font-size: 0.97rem;
  line-height: 1.7;
  color: #1e293b;
  font-style: italic;
  position: relative;
  padding-left: 1.4rem;
  flex: 1;
}

.testimonial-quote::before {
  content: ‘\201C’;
  position: absolute;
  left: 0;
  top: -0.2rem;
  font-size: 2.2rem;
  line-height: 1;
  color: #3b82f6;
  font-style: normal;
  font-weight: 700;
}

.testimonial-author {
  border-top: 1px solid rgba(37, 99, 235, 0.12);
  padding-top: 1rem;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
}

.testimonial-role {
  font-size: 0.82rem;
}

/* ============================
   VOCALL HERO GRAPHIC
============================ */
.vocall-hero-graphic {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vocall-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.2);
  animation: vocall-pulse 3s ease-out infinite;
}

.vocall-ring-1 { width: 130px; height: 130px; animation-delay: 0s; }
.vocall-ring-2 { width: 195px; height: 195px; animation-delay: 0.6s; }
.vocall-ring-3 { width: 260px; height: 260px; animation-delay: 1.2s; }

@keyframes vocall-pulse {
  0%   { transform: scale(0.95); opacity: 0.6; }
  60%  { transform: scale(1);    opacity: 0.25; }
  100% { transform: scale(1.02); opacity: 0; }
}

.vocall-icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e60ff, #3b82ff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 36px rgba(30, 96, 255, 0.35);
  z-index: 1;
}

.vocall-icon {
  font-size: 2.4rem;
  color: #ffffff;
}

.vocall-label {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
}
