/* =======================================================
   VARIABILI & FONT
======================================================== */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #fafafa;
  --color-text-main: #111827;     /* Nero morbido (molto elegante) */
  --color-text-muted: #6b7280;    /* Grigio per sottotitoli */
  --color-primary: #0a4d22;       /* Il tuo verde scuro */
  --color-primary-light: #157a39; /* Verde scuro leggermente più chiaro per hover */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --shadow-glow: 0 10px 30px rgba(10, 77, 34, 0.25); /* Ombra verde */
  
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.py-6 { padding-top: 80px; padding-bottom: 80px; }
.bg-light-gray { background-color: var(--color-bg-alt); }

/* NAVBAR OTTIMIZZATA PER IPHONE 17 PRO (ZERO LAG) */
.custom-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 12px 0;
  /* Il segreto: isoliamo la navbar dal resto del documento per evitare repaint a catena */
  contain: layout; 
}

/* Transizione fluida e accelerata */
.collapsing {
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: height;
}

/* Evitiamo che il browser provi a calcolare il layout di ciò che sta sotto */
.navbar-collapse.collapsing, 
.navbar-collapse.show {
  display: block;
  backface-visibility: hidden;
  transform: translateZ(0);
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    /* Creiamo un'area dedicata per evitare che lo scorrimento del menu influenzi la pagina */
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Link più reattivi al tocco */
  .nav-link {
    padding: 15px 0 !important;
    font-size: 1.1rem;
    transition: opacity 0.1s ease;
  }
  
  .nav-link:active {
    opacity: 0.5; /* Feedback immediato al tocco */
  }
}
/* Modifica la classe .logo-text con queste proprietà */
.logo-text {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 600; /* Corrisponde al SemiBold */
  font-size: 1.6rem;
  letter-spacing: 0.03em; /* Un pizzico di respiro tra le lettere per eleganza */
  color: var(--color-primary); /* Usa il tuo verde scuro per il nome del brand */
  text-transform: none; /* Mantieni "Locally" come scritto nell'HTML */
  line-height: 1;
}

/* =======================================================
   BOTTONI (Stile Pillola come Rojak)
======================================================== */
.btn-primary-pill {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 20px 45px;
  font-weight: 800;
  border-radius: 50px;
  font-family: var(--font-heading);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}
.btn-primary-pill:hover {
  background-color: var(--color-primary-light);
  color: white;
  transform: translateY(-2px);
}
.shadow-glow { box-shadow: var(--shadow-glow); }

.btn-outline-pill {
  background-color: transparent;
  color: var(--color-text-main);
  border: 1px solid #d1d5db;
  border-radius: 50px;
  padding: 20px 45px;
  font-weight: 800;
  font-family: var(--font-heading);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}
.btn-outline-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: rgba(10, 77, 34, 0.03);
}

/* =======================================================
   HERO SECTION
======================================================== */
.hero-section {
  padding: 120px 0 100px;
  overflow: hidden;
}
/* La "macchia" di luce sfocata dietro al testo, come in Rojak */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(10, 77, 34, 0.08) 0%, rgba(255,255,255,0) 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem); /* Testo enorme e responsivo */
  line-height: 1.1;
  color: var(--color-text-main);
}
.text-gradient {
  color: var(--color-primary);
  /* Se vuoi l'effetto testo sfumato togli il commento sotto */
  /* background: linear-gradient(90deg, #0a4d22 0%, #20994d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; */
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* =======================================================
   CARDS & FEATURES (Stile minimal senza bordi duri)
======================================================== */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
}
.custom-card {
  background: var(--color-bg);
  border: 1px solid #f3f4f6; /* Bordo grigio chiarissimo quasi invisibile */
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
  height: 100%;
  cursor: pointer;
}
.custom-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: #e5e7eb;
}
.card-icon-wrapper {
  width: 60px;
  height: 60px;
  background-color: rgba(10, 77, 34, 0.05);
  color: var(--color-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto;
  transition: all 0.3s;
}
.custom-card:hover .card-icon-wrapper {
  background-color: var(--color-primary);
  color: white;
}
.card-title { font-size: 1.3rem; margin-bottom: 10px; }
.card-text { color: var(--color-text-muted); font-size: 0.95rem; }
.soft-divider { border-top: 1px solid #e5e7eb; margin: 20px 0; opacity: 1; }
.feature-list { padding-left: 20px; color: var(--color-text-muted); }

/* =======================================================
   CHATBOT WIDGET (Effetto App)
======================================================== */
.chat-widget {
  background: var(--color-bg);
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.shadow-lg-custom { box-shadow: var(--shadow-lg); }
.chat-header {
  padding: 20px 25px;
  border-bottom: 1px solid #f3f4f6;
  background-color: var(--color-bg);
}
.bot-avatar {
  width: 45px;
  height: 45px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.chat-body { padding: 25px; background-color: var(--color-bg-alt); }
.chat-messages {
  height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-right: 10px;
}
/* Scrollbar custom per la chat */
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.chat-footer {
  padding: 20px;
  background: var(--color-bg);
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 15px;
}
.chat-input {
  border-radius: 50px;
  border: 1px solid #d1d5db;
  padding: 12px 25px;
  background-color: var(--color-bg-alt);
}
.chat-input:focus {
  box-shadow: none;
  border-color: var(--color-primary);
  background-color: var(--color-bg);
}
.btn-send {
  background-color: var(--color-primary);
  color: white;
  border-radius: 50px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: 0.3s;
}
.btn-send:hover { background-color: var(--color-primary-light); color: white; transform: scale(1.05); }

/* Stile dei Messaggi */
.message {
  padding: 14px 20px;
  border-radius: 20px;
  max-width: 80%;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-line;
}
.message.user {
  background-color: var(--color-primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.message.bot {
  background-color: white;
  color: var(--color-text-main);
  border: 1px solid #e5e7eb;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

/* =======================================================
   ACCORDION & PRICING
======================================================== */
.custom-accordion { border-radius: 16px; overflow: hidden; }
.custom-accordion .accordion-item { border: none; border-bottom: 1px solid #f3f4f6; }
.custom-accordion .accordion-item:last-child { border-bottom: none; }
.custom-accordion .accordion-button {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 20px 25px;
  color: var(--color-text-main);
}
.custom-accordion .accordion-button:not(.collapsed) {
  background-color: rgba(10, 77, 34, 0.03);
  color: var(--color-primary);
  box-shadow: none;
}
.custom-accordion .accordion-button:focus { box-shadow: none; }

.pricing-card {
  background: var(--color-bg);
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 40px;
  height: 100%;
  position: relative;
  transition: all 0.3s ease;
}
.pricing-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.pricing-card.popular {
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.badge-popular {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.price-tag .currency { font-size: 1.5rem; vertical-align: top; font-weight: 700; color: var(--color-text-main); }
.price-tag .amount { font-size: 3.5rem; font-weight: 800; font-family: var(--font-heading); color: var(--color-text-main); line-height: 1; }
.price-tag .period { color: var(--color-text-muted); }
.pricing-features { list-style: none; padding: 0; }
.pricing-features li { margin-bottom: 12px; color: var(--color-text-main); font-size: 0.95rem; }
.pricing-features i { font-size: 1.2rem; margin-right: 10px; vertical-align: middle; }

/* =======================================================
   ANIMAZIONI
======================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0; /* Partono invisibili e vengono animate dal keyframe */
}