:root {
  --primary-color: #ffcf00;
  /* Giallo Tecnoelettra */
  --primary-dark: #cc9900;
  --primary-light: #fff5cc;
  --accent-color: #0076ca;
  /* Blu Tecnoelettra */
  --accent-light: #e6f1f9;
  --band-bg: #0a2540;
  /* Navy per le fasce (intestazioni pagine, CTA) */
  --secondary-color: #ffffff;
  --text-main: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --success: #10b981;
  --warning: #FFB800;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius: 0.5rem;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.25rem;
  color: var(--accent-color);
}

h3 {
  font-size: 1.5rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

/* Accessibilità: nasconde visivamente ma resta per screen reader */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title span {
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-main);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-main);
}

/* Header */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
}

.logo img {
  height: 68px;
  transition: var(--transition);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.4rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: var(--accent-color);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color);
}

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

.nav-menu .btn-primary {
  padding: 0.6rem 1.5rem;
  box-shadow: 0 2px 6px rgba(255, 207, 0, 0.4);
}

.nav-menu .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(204, 153, 0, 0.5);
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: var(--transition);
  background-color: var(--text-main);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(0, 118, 202, 0.58), rgba(0, 86, 150, 0.68)), url('../img/hero-bg.webp');
  /* Blu brand Tecnoelettra come overlay sulla foto hero */
  background-size: cover;
  background-position: center;
  color: white;
  padding: 8rem 0;
  text-align: center;
}

.hero .btn-primary {
  box-shadow: var(--shadow-md);
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-btns .btn {
  margin-left: 0 !important;
}

/* Hero delle pagine interne: foto con overlay navy.
   Se l'immagine non è ancora presente, resta lo sfondo navy (--band-bg). */
.hero h1,
.hero p,
.page-hero h1,
.page-hero p {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.page-hero {
  background-color: var(--band-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  text-align: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.page-hero > .container {
  width: 100%;
}

.page-hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin: 0 auto;
  max-width: 700px;
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 45vh;
    padding: 3rem 0;
  }

  .page-hero h1 {
    font-size: 2rem;
  }
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.5rem;
  font-size: 3.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

/* Features/Values */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--accent-color);
  font-size: 1.5rem;
}

/* Services Preview */
.services-preview {
  background-color: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
}

.service-img {
  height: 200px;
  background-color: #cbd5e1;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-img img {
  transform: scale(1.05);
}

.service-content {
  padding: 1.5rem;
}

.service-content h3 {
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.service-link {
  color: var(--accent-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
}

.service-link:hover {
  text-decoration: underline;
}

/* Contact/Map */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-icon {
  background-color: var(--primary-color);
  color: var(--band-bg);
  /* navy su giallo: contrasto AA, prima era bianco su giallo (illeggibile) */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 118, 202, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background-color: #0f172a;
  /* Navy più scuro per contrastare meglio col giallo e celeste */
  color: #e2e8f0;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .logo img {
    height: 52px;
  }

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

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 80px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .contact-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Collassa tutte le griglie a 2 colonne inline (chi-siamo, servizi) */
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    direction: ltr !important;
  }

  .hero {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  h1 {
    font-size: 2.25rem;
  }
}

/* ============================================================
   COMPONENTI AGGIUNTIVI (rev. marketing/grafica)
   ============================================================ */

/* --- Utility layout: due colonne con riga alternata --- */
.split-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-2col.reverse .split-media {
  order: 2;
}

@media (max-width: 768px) {
  .split-2col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .split-2col.reverse .split-media {
    order: 0;
  }
}

/* --- Benefit cards (home: vantaggi concreti) --- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.benefit-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--primary-color);
}

.benefit-card .benefit-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-color);
  background: var(--accent-light);
}

.benefit-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.benefit-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
}

/* --- Stats band (fascia numeri su navy) --- */
.stats-band {
  background:
    linear-gradient(135deg, rgba(10, 37, 64, 0.96), rgba(10, 37, 64, 0.96)),
    url('../img/sfondo-ripetuto.png');
  color: white;
  padding: 3.5rem 0;
}

.stats-band .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stats-band .stat-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stats-band .stat-label {
  font-weight: 600;
  opacity: 0.92;
}

/* --- Processo in step --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 2.25rem 1.5rem 1.5rem;
  background: var(--bg-light);
  border-radius: var(--border-radius);
  text-align: center;
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--band-bg);
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 207, 0, 0.45);
}

.process-step h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.4rem;
  color: var(--accent-color);
}

.process-step p {
  color: var(--text-light);
  font-size: 0.92rem;
  margin: 0;
}

/* --- Strip marchi trattati --- */
.brands-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 820px;
  margin: 0 auto;
}

.brand-item {
  background: #fff;
  border: 1px solid #edf1f5;
  border-radius: 14px;
  height: 96px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.4px;
  color: var(--accent-color);
  line-height: 1.2;
  transition: var(--transition);
}

.brand-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
  color: var(--band-bg);
}

@media (max-width: 600px) {
  .brands-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Testimonianze --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.testimonial-card blockquote {
  font-style: italic;
  color: var(--text-main);
  margin: 0 0 1.25rem;
  line-height: 1.65;
}

.testimonial-author {
  margin-top: auto;
  font-weight: 700;
  color: var(--accent-color);
}

.testimonial-author span {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* --- CTA recensioni Google + QR --- */
.reviews-cta {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.reviews-cta-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.reviews-cta .btn i {
  margin-right: 0.5rem;
}

/* --- Floating action buttons (chiama / WhatsApp) --- */
.fab-stack {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fab-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.fab-btn:hover {
  transform: scale(1.08);
  color: white;
}

.fab-call {
  background: var(--accent-color);
}

.fab-whatsapp {
  background: #25d366;
}

.fab-btn span.fab-pulse {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.55;
  animation: fabPulse 2.2s ease-out infinite;
  z-index: -1;
}

@keyframes fabPulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* --- Cookie banner --- */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1300;
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.5rem;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1 1 320px;
}

.cookie-text strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--band-bg);
}

.cookie-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.cookie-text a {
  color: var(--accent-color);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-actions .btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

.cookie-btn-link {
  background: none;
  border: none;
  color: var(--text-light);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.9rem;
}

.cookie-prefs {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

.cookie-prefs[hidden] {
  display: none;
}

.cookie-pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.cookie-pref-row + .cookie-pref-row {
  border-top: 1px solid #f1f5f9;
}

.cookie-pref-row small {
  color: var(--text-light);
}

.cookie-pref-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .btn {
    flex: 1 1 auto;
  }
}

/* --- Blocco mappa in attesa di consenso --- */
.map-wrap {
  position: relative;
  margin-top: 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 300px;
}

.map-consent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  height: 300px;
  padding: 1.5rem;
  background:
    linear-gradient(rgba(10, 37, 64, 0.9), rgba(10, 37, 64, 0.9)),
    url('../img/sfondo-ripetuto.png');
  color: white;
}

.map-consent[hidden] {
  display: none;
}

.map-consent i {
  font-size: 2rem;
  color: var(--primary-color);
}

.map-consent p {
  margin: 0;
  max-width: 360px;
  font-size: 0.95rem;
  opacity: 0.95;
}

/* --- Reveal allo scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .fab-btn span.fab-pulse {
    animation: none;
  }
}