/* =========================================================
   DELTA ELECTRONIC — Main Stylesheet
   ========================================================= */

:root {
  --navy:    #0d1b3e;
  --navy-2:  #162347;
  --blue:    #0057d9;
  --blue-2:  #0047b8;
  --accent:  #f97316;
  --white:   #ffffff;
  --gray-50: #f8fafc;
  --gray-100:#f1f5f9;
  --gray-200:#e2e8f0;
  --gray-400:#94a3b8;
  --gray-600:#475569;
  --gray-800:#1e293b;
  --radius:  8px;
  --shadow:  0 4px 24px rgba(0,0,0,.10);
  --transition: .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── CONTAINER ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── AVVISO BANNER ── */
.avviso {
  padding: 12px 20px;
  text-align: center;
  font-size: .9rem;
  font-weight: 500;
}
.avviso-info    { background: #dbeafe; color: #1e40af; }
.avviso-warning { background: #fef3c7; color: #92400e; }
.avviso-danger  { background: #fee2e2; color: #991b1b; }
.avviso-success { background: #d1fae5; color: #065f46; }
.avviso-font-sm { font-size: .78rem; }
.avviso-font-md { font-size: .9rem; }
.avviso-font-lg { font-size: 1.05rem; }

/* ── HEADER / NAV ── */
.sticky-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.site-header {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: none;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.scrolled {
  background: var(--navy);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

/* Nav links: white at top, white when scrolled */
.main-nav a {
  color: rgba(255,255,255,.85);
}
.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,.15);
  color: var(--white);
}
.site-header.scrolled .main-nav a {
  color: rgba(255,255,255,.8);
}
.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active {
  background: rgba(255,255,255,.1);
  color: var(--white);
}

/* Hamburger */
.nav-toggle {
  color: var(--white);
}
.site-header.scrolled .nav-toggle {
  color: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img { display: block; }

/* Nav */
.main-nav { display: flex; gap: 4px; }

.main-nav a {
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { display: block; }

/* ── CAROUSEL ── */
.carousel {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  padding-top: var(--sticky-h, 64px);
}

.carousel-track { position: relative; }

.carousel-slide {
  display: none;
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6e 100%);
  min-height: 480px;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active { display: flex; }

.carousel-slide.fade-in  { animation: fadeIn .5s ease; }
.carousel-slide.fade-out { animation: fadeOut .5s ease; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,62,.35) 0%, rgba(22,35,71,.20) 100%);
}

.carousel-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 80px 20px;
  max-width: 700px;
  margin: 0 auto;
}

.carousel-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.carousel-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.8);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Alignment variants */
.carousel-slide.align-left  .carousel-content { text-align: left; margin-left: 60px; margin-right: auto; }
.carousel-slide.align-right .carousel-content { text-align: right; margin-left: auto; margin-right: 60px; }

.carousel-slide.align-left  .carousel-content p { margin-left: 0; margin-right: auto; }
.carousel-slide.align-right .carousel-content p { margin-left: auto; margin-right: 0; }

.carousel-slide.align-left  .carousel-btns { justify-content: flex-start; }
.carousel-slide.align-right .carousel-btns { justify-content: flex-end; }

@media (max-width: 768px) {
  .carousel-slide.align-left  .carousel-content,
  .carousel-slide.align-right .carousel-content { text-align: center; margin-left: auto; margin-right: auto; }
  .carousel-slide.align-left  .carousel-btns,
  .carousel-slide.align-right .carousel-btns { justify-content: center; }
}

/* Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}

.carousel-arrow:hover { background: rgba(255,255,255,.3); }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.carousel-dot.active {
  background: white;
  transform: scale(1.2);
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6e 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; max-width: 700px; margin: 0 auto; }

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.8);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--blue-2);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,87,217,.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--white);
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover {
  background: #ea6c0f;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── SECTIONS ── */
.section { padding: 72px 0; }
.section-alt { background: var(--gray-50); }
.section-dark { background: var(--navy); color: var(--white); }

.section-header { text-align: center; margin-bottom: 48px; }

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: inherit;
}

.section-header p {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.section-dark .section-header p { color: rgba(255,255,255,.7); }

/* ── CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 32px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card-icon {
  width: 52px;
  height: 52px;
  background: #dbeafe;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--blue);
}

.card-icon svg { width: 26px; height: 26px; }

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gray-800);
}

.card p { color: var(--gray-600); font-size: .95rem; line-height: 1.65; }

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--blue);
}

.card .card-link:hover { gap: 8px; text-decoration: none; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  /* background: linear-gradient(135deg, rgba(15,23,42,.82) 0%, rgba(60,117,163,.75) 100%); */
  background: url('/assets/img/bg-delta.jpg') center/cover no-repeat;
  color: var(--white);
  padding: calc(var(--sticky-h, 64px) + 56px) 20px 56px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.page-hero p {
  color: rgba(255,255,255,.75);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── INTRO TEXT ── */
.intro-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ── LIST STEPS ── */
.steps-list {
  list-style: none;
  counter-reset: step;
  max-width: 600px;
  margin: 0 auto 36px;
}

.steps-list li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}

.steps-list li:last-child { border-bottom: none; }

.steps-list li::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
}

/* ── MARCHE GRID ── */
.marche-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.marca-tag {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .88rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ── FORM ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.form-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gray-800);
}

.form-subtitle {
  color: var(--gray-600);
  margin-bottom: 28px;
  font-size: .95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray-800);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,87,217,.12);
}

textarea { resize: vertical; min-height: 100px; }

.form-note {
  font-size: .82rem;
  color: var(--gray-400);
  margin-top: 12px;
}

.form-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-weight: 500;
}

.form-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* ── CONTATTI INFO ── */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.contatti-map-col {
  display: flex;
  flex-direction: column;
}

.contatti-map-wrap {
  flex: 1;
  min-height: 300px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.contatti-map-wrap iframe,
.contatti-map-wrap > div {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.contatti-grid iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.info-list { list-style: none; }

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
}

.info-list li:last-child { border-bottom: none; }

.info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: #dbeafe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}

.info-icon svg { width: 22px; height: 22px; }

.info-label {
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-400);
  margin-bottom: 2px;
}

.info-value {
  font-size: 1rem;
  color: var(--gray-800);
  font-weight: 500;
}

.info-value a { color: var(--gray-800); }
.info-value a:hover { color: var(--blue); text-decoration: none; }

/* ── FOOTER ── */
.site-footer {
  background: #f0f0f0;
  color: var(--gray-600);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo-name {
  color: var(--gray-800);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-desc {
  font-size: .9rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.footer-col h4 {
  color: var(--gray-800);
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a {
  color: var(--gray-500);
  font-size: .9rem;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col ul li a:hover { color: var(--blue); }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  margin-bottom: 10px;
}

.footer-contact-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--blue); }
.footer-contact-item a { color: var(--gray-600); }
.footer-contact-item a:hover { color: var(--blue); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--gray-300);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .82rem;
}

/* ── SEZIONE 3 COLONNE ── */
.colonne-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.colonna-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 36px 28px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.colonna-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.colonna-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.colonna-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.colonna-titolo {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gray-800);
}

.colonna-testo {
  color: var(--gray-600);
  font-size: .95rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 24px;
}

/* ── SEZIONE BANNER ── */
.sezione-banner {
  position: relative;
  background: var(--navy);
  min-height: 340px;
  display: flex;
  align-items: center;
}

.banner-dimmer {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.banner-inner {
  position: relative;
  z-index: 2;
  padding-top: 60px;
  padding-bottom: 60px;
}

.banner-box {
  max-width: 620px;
  border-radius: 14px;
  padding: 40px 44px;
}

.banner-overlay-dark {
  background: rgba(13, 27, 62, .72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--white);
}

.banner-overlay-light {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.6);
  color: var(--gray-800);
}

.banner-box h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.banner-overlay-dark h2 { color: var(--white); }
.banner-overlay-dark p  { color: rgba(255,255,255,.8); margin-bottom: 0; }
.banner-overlay-light p { color: var(--gray-600); margin-bottom: 0; }

@media (max-width: 768px) {
  .colonne-grid { grid-template-columns: 1fr; }
  .banner-box   { padding: 28px 24px; }
  .carousel-arrow { display: none; }
}

/* ── FORM HINT ── */
.form-hint {
  display: block;
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: 3px;
}
.fattura-req { color: var(--blue); }

/* ── RICH TEXT OUTPUT ── */
.prose p   { margin-bottom: .9em; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: .9em; }
.prose li  { margin-bottom: .3em; }
.prose strong { font-weight: 700; }
.prose h2, .prose h3, .prose h4 { margin: 1.2em 0 .5em; }

/* ── LOGHI GRID ── */
.loghi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 40px;
}
.loghi-grid .logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
}
.loghi-grid .logo-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(40%);
  opacity: .75;
  transition: filter .2s, opacity .2s;
}
.loghi-grid .logo-item img:hover {
  filter: none;
  opacity: 1;
}

/* ── UTILITY ── */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,.1);
  }

  .main-nav.open { display: flex; }

  .site-header { position: relative; }

  .form-grid { grid-template-columns: 1fr; }
  .contatti-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .hero { padding: 56px 20px; }
  .section { padding: 48px 0; }

  .form-card { padding: 24px 20px; }

  .loghi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── REVEAL ON SCROLL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

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