/* =====================================
   VARIABILI GLOBALI
===================================== */
:root {
  --blue: #0047FF;
  --blue-2: #4FA3FF;
  --dark: #0A0F1F;
  --text: #1d2636;
  --light: #f5f7ff;
  --white: #ffffff;
}

/* =====================================
   REGOLE DI BASE
===================================== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  scroll-behavior: smooth;
}

img { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }
.container {
  width: min(80%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* =====================================
   BOTTONI
===================================== */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 0.75em 1.5em;
  border-radius: 12px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 20px rgba(0, 71, 255, .25);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 71, 255, .35);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: #fff;
}

/* =====================================
   NAVBAR
===================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid #eef2ff;
}
.navbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.8em;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #385dc4;
}
.brand img {
  height: 38px;
  width: auto;
  border-radius: 8px;
}
.nav-links {
  display: flex;
  gap: 1.2em;
  font-weight: 600;

}
.nav-links a {
  padding: 0.5em 0.8em;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.nav-links a.active,
.nav-links a:hover {
  background: var(--light);
}

/* =====================================
   HERO SECTION
===================================== */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/mountain.jpeg') center center / cover no-repeat;
  filter: brightness(0.55);
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  padding: clamp(1rem, 4vw, 3rem);
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 0.4em;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.95;
  margin-bottom: 1.5em;
}
.hero .cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
}

/* =====================================
   SEZIONI
===================================== */
.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}
.section.alt { background: var(--light); }
.section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1em;
  color: #0b1535;
  text-align: center;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  background: #fff;
  border: 1px solid #eef2ff;
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 10px 30px rgba(12,21,53,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(12,21,53,.1);
}
.card h3 { margin-top: 0; color: #0b1535; }
.card p, .card strong { color: #0b1535; }
.small { opacity: .8; }

/* =====================================
   PORTFOLIO
===================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.portfolio-item {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #eef2ff;
  background: #fff;
  box-shadow: 0 10px 30px rgba(12,21,53,.06);
  transition: 0.3s ease;
}
.portfolio-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(12,21,53,.15);
}

.portfolio-item img {
  height: 350px;
  width: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.portfolio-item:hover img {
  transform: scale(1.06);
}
.portfolio-item .info { padding: 14px 16px; }

/* =====================================
   FORM
===================================== */
form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  width: 100%;
}
input, textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d9e3ff;
  font-size: 1rem;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus {
  outline: 2px solid rgba(79,163,255,.35);
  border-color: var(--blue);
}
#form-msg {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
  background: #e7f7ee;
  color: #0f5132;
}

/* =====================================
   FOOTER
===================================== */
footer {
  background: #0b132b;
  color: #cfe0ff;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-block: 2rem;
}
footer h3 { margin-bottom: .3em; }
footer a { color: #cfe0ff; transition: color .2s ease; }
footer a:hover { color: #fff; }
.copy {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-block: 12px;
  text-align: center;
  font-size: .9rem;
  color: #a9c4ff;
}

/* =====================================
   MENU HAMBURGER (MOBILE)
===================================== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: var(--blue);
  border-radius: 10px;
  transition: all 0.3s ease;
}
/* Spaziatura tra le barre */
.menu-toggle .bar:not(:last-child) {
  margin-bottom: 5px;
}

/* --- ANIMAZIONE X --- */
.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -5px);
}

/* =====================================
   NAV MOBILE
===================================== */
/* .nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  transition: opacity 0.3s ease;
}
.nav-overlay.active {
  display: block;
  opacity: 1;
} */
@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 360px;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
  }
  .nav-links.active { right: 0; }
  .nav-links a {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    color: var(--blue);
    padding: 12px 0;
  }
  body.menu-open { overflow: hidden; }
}

/* =====================================
   RESPONSIVE GRID & FOOTER
===================================== */
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .card { margin-bottom: 1rem; }
  footer .wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero .cta { flex-direction: column; gap: 12px; }
  .copy { font-size: .8rem; }
}


/* =====================================
   MAPPA
===================================== */

.map-container iframe {
  border-radius: 12px;
  filter: saturate(1.05) contrast(1.05);
}

/* =====================================
   LOGO INIZIALE
===================================== */

.brand img {
  animation: logoFade 2s ease forwards;
  opacity: 0;
}

@keyframes logoFade {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

/* =====================================
   ANIAMZIONI SCRITTE
===================================== */

.hero h1, .hero p, .hero .cta {
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
}

.hero h1 { animation-delay: 0.2s; }
.hero p { animation-delay: 0.4s; }
.hero .cta { animation-delay: 0.6s; }

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}


/* =====================================
   COMPARISON SECTION
===================================== */

.comparison h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.compare-card {
  background: #fff;
  border: 1px solid #eef2ff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(12,21,53,.06);
  transition: transform .2s ease;
}

.compare-card:hover {
  transform: translateY(-4px);
}

.compare-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #0d1c4e;
  font-size: 1.4rem;
}

.compare-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.compare-card li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #eef2ff;
  font-size: 1rem;
}

.compare-card li:last-child {
  border-bottom: none;
}

/* Evidenzia NovaWeb */
.compare-card.highlight {
  background: #c0ccda;
  border-color: #091e3b;
  box-shadow: 0 12px 30px rgba(10, 39, 112, 0.674);
}

/* MOBILE */
@media (max-width: 768px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

/* ======================================
   ANIMAZIONE "NOVAWEB SUPERIORE"
====================================== */

/* Stato iniziale: tutto leggermente nascosto */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

/* Quando appare */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* NovaWeb: animazione speciale */
.reveal.visible .compare-card.highlight {
  transform: scale(1.08) translateY(-6px);
  box-shadow: 0 18px 45px rgba(2, 14, 43, 0.35);
  background: #e8f2ff;
  transition: all .6s ease;
}

/* Aziende tradizionali: resta normale */
.reveal.visible .compare-card:not(.highlight) {
  transform: scale(1);
  opacity: 1;
}

/* =====================================
   WORKFLOW SECTION
===================================== */

.workflow h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.workflow .subtitle {
  text-align: center;
  margin-bottom: 2.5rem;
  font-weight: 400;
  opacity: 0.85;
  font-size: 1.15rem;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.workflow-step {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid #eef2ff;
  box-shadow: 0 10px 30px rgba(12,21,53,.06);
  transition: 0.2s ease;
  position: relative;
}

.workflow-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(12,21,53,.12);
}

.workflow-step h3 {
  margin-top: 0;
  margin-bottom: .5rem;
  color: #0b1535;
  font-size: 1.3rem;
}

.workflow-step p {
  margin: 0;
  line-height: 1.4;
  font-size: 0.98rem;
}

.workflow-step p strong {
  color: var(--blue);
}

/* Cerchio numerato */
.step-number {
  position: absolute;
  top: -12px;
  left: -12px;
  background: var(--blue);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,71,255,0.25);
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .workflow-step {
    padding: 1.5rem;
  }
  .step-number {
    top: -10px;
    left: -10px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

/* =====================================
   METRICS SECTION
===================================== */

.metrics {
  text-align: center;
  margin-top: -1rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-box {
  background: #fff;
  padding: 1.8rem;
  border-radius: 16px;
  border: 1px solid #eef2ff;
  box-shadow: 0 10px 30px rgba(12,21,53,.06);
  transition: .2s ease;
}

.metric-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 32px rgba(12,21,53,.10);
}

.metric-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
}

.metric-label {
  margin-top: .4rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

/* Frase finale */
.trust-phrase {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: .85;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
  padding-inline: 1rem;
}

@media (max-width: 768px) {
  .metric-number { font-size: 1.8rem; }
  .trust-phrase { font-size: 1.05rem; }
}


/* =====================================
   CTA CENTRALE
===================================== */
.cta-mid {
  text-align: center;
  background: rgb(29, 64, 223);
  color: #fff;
  padding-block: 4rem;
  border-radius: 20px;
  margin: 3rem auto;
  width: min(80%, 1100px);
  box-shadow: 0 18px 40px rgba(116, 137, 192, 0.25);
}

.cta-mid h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: .5rem;
  font-weight: 700;
  color: #357ecd;
}

.cta-mid p {
  opacity: .95;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}

.cta-mid .btn {
  background: #fff;
  color: var(--blue);
  font-weight: 500;
  padding: 0.9em 1.8em;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(255,255,255,0.25);
}

.cta-mid .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255,255,255,0.4);
}

/* =====================================
   TARGET SECTION (Per chi lavoriamo)
===================================== */

.target-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.target-subtitle {
  text-align: center;
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.target-item {
  background: #fff;
  padding: 1.6rem;
  border-radius: 16px;
  border: 1px solid #eef2ff;
  box-shadow: 0 10px 30px rgba(12,21,53,.06);
  transition: 0.25s ease;
}

.target-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(12,21,53,.12);
}

.target-item .emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.target-item p {
  margin: 0;
  font-weight: 600;
  color: #0b1535;
}


/* =====================================
   CTA PORTFOLIO ELEGANTE
===================================== */

.cta-portfolio {
  padding-top: 0;
}

.cta-box-portfolio {
  text-align: center;
  background: #ffffff;
  border: 1px solid #e6e9f5;
  border-radius: 24px;
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 18px 40px rgba(0,0,0,0.05);
}

.cta-box-portfolio h2 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  margin-bottom: 0.8rem;
  font-weight: 800;
  color: #0b1535;
}

.cta-box-portfolio p {
  font-size: 1.1rem;
  margin-bottom: 1.8rem;
  opacity: 0.85;
}

.btn-blue {
  background: var(--blue);
  color: #fff;
  padding: 1rem 2.2rem;
  font-size: 1.1rem;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,71,255,0.25);
  transition: 0.25s ease;
}

.btn-blue:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0,71,255,0.35);
}


/* ============================
   MISSION SECTION
============================ */

.mission-section {
  text-align: center;
  padding-block: 4rem;
}

.mission-section h2 {
  margin-bottom: 1rem;
}

.mission-text {
  font-size: 1.15rem;
  max-width: 750px;
  margin: 0 auto 1.5rem auto;
  opacity: 0.9;
  line-height: 1.6;
}

.mission-quote {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0047FF;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .mission-text {
    font-size: 1.05rem;
  }
  .mission-quote {
    font-size: 1.15rem;
  }
}


/* ============================
   TIMELINE SECTION
============================ */

.timeline-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.timeline {
  border-left: 3px solid #0047FF;
  padding-left: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.timeline-item {
  margin-bottom: 2rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: #0047FF;
  border-radius: 50%;
}

.timeline-date {
  font-weight: 700;
  font-size: 1.2rem;
  color: #0047FF;
}

.timeline-item p {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .timeline {
    padding-left: 1rem;
  }

  .timeline-item::before {
    left: -10px;
  }
}

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

.cta-final-section {
  padding-top: 0;
}

.cta-final {
  background: #ffffff;
  padding: 3rem 2rem;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.06);
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid #eef2ff;
}

.cta-final h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: #0b1535;
  font-weight: 800;
}

.cta-final p {
  font-size: 1.05rem;
  opacity: 0.88;
  margin-bottom: 1.6rem;
}

.btn-cta-final {
  font-size: 1.05rem;
  padding: 0.9em 2.1em;
  font-weight: 700;
}


/* =====================================
   FAQ SECTION
===================================== */

.faq-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

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

.faq-item {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e4e8ff;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 28px rgba(12,21,53,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(12,21,53,0.12);
  border-color: #c4d2ff;
}

.faq-question {
  margin: 0 0 .4rem 0;
  font-size: 1.05rem;
  color: #0b1535;
}

.faq-answer {
  margin: 0;
  font-size: 0.98rem;
  opacity: 0.9;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .faq-item {
    padding: 1.2rem 1.1rem;
  }
}


/* ================================
   SEZIONE SERVIZI PREMIUM
================================ */

.services-sub {
  text-align: center;
  margin-top: -10px;
  opacity: .85;
  margin-bottom: 2rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.service-card {
  border-radius: 18px;
  padding: 1.8rem;
  background: #fff;
  border: 1px solid #e6ebff;
  box-shadow: 0 12px 28px rgba(12,21,53,0.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(12,21,53,0.12);
}

.service-card h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #0b1535;
}

.services-cta {
  text-align: center;
  margin-top: 3rem;
  background: #f4f7ff;
  border: 1px solid #dbe4ff;
  padding: 2.2rem;
  border-radius: 20px;
  box-shadow: 0 16px 30px rgba(12,21,53,0.07);
}

.services-cta h3 {
  font-size: 1.6rem;
  margin-bottom: .3rem;
}

.services-cta p {
  margin-bottom: 1rem;
  opacity: .85;
}

/* MOBILE */
@media (max-width: 850px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

