/* ============================================================
   SERVICE ENTERPRISES Srl — Main Stylesheet
   Palette: BLU_SCURO #0B2545 | BLU #1B4F8A | ARANCIO #E8600A
            GRIGIO #F4F6F8 | BIANCO #fff | TESTO #1A1A2E
   ============================================================ */

:root {
  --blu:     #0B2545;
  --blu2:    #1B4F8A;
  --blu3:    #2C6DAE;
  --arancio: #E8600A;
  --grigio:  #F4F6F8;
  --grmed:   #8A9BB0;
  --bianco:  #ffffff;
  --testo:   #1A1A2E;
  --radius:  6px;
  --shadow:  0 4px 24px rgba(11,37,69,.12);
  --transition: .3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--testo);
  background: var(--bianco);
  line-height: 1.6;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section--dark { background: var(--blu); color: var(--bianco); }
.section--grey { background: var(--grigio); }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--arancio);
  margin-bottom: 10px;
}
.section-title { color: var(--blu); margin-bottom: 14px; }
.section--dark .section-title { color: var(--bianco); }
.section-lead {
  font-size: 1.1rem;
  color: var(--grmed);
  max-width: 680px;
  margin-bottom: 48px;
}
.section--dark .section-lead { color: #9ab3cc; }

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--blu);
  padding: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
  transition: background var(--transition);
}
.navbar.scrolled { background: rgba(11,37,69,.97); backdrop-filter: blur(8px); }
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.navbar__brand {
  display: flex; align-items: center; gap: 14px;
  color: var(--bianco);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: .02em;
}
.navbar__brand span.accent { color: var(--arancio); }
.navbar__logo-mark {
  width: 40px; height: 40px;
  background: var(--arancio);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.1rem; color: var(--bianco);
  flex-shrink: 0;
}
.navbar__nav {
  display: flex; align-items: center; gap: 6px;
  list-style: none;
}
.navbar__nav a {
  color: #a8bed8;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.navbar__nav a:hover { color: var(--bianco); background: rgba(255,255,255,.08); }
.navbar__nav a.active { color: var(--bianco); }
.navbar__cta {
  background: var(--arancio);
  color: var(--bianco) !important;
  padding: 8px 18px !important;
  border-radius: var(--radius);
  font-weight: 700 !important;
}
.navbar__cta:hover { background: #c9520a !important; }
.navbar__hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px; color: var(--bianco);
}
.navbar__hamburger span {
  display: block; width: 24px; height: 2px;
  background: currentColor; margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar__mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  background: var(--blu); padding: 12px 24px 20px;
}
.navbar__mobile-menu.open { display: flex; }
.navbar__mobile-menu a {
  color: #a8bed8; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .95rem;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: 68px;
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: url('../img/hero.jpg');
  background-size: cover; background-position: center;
  filter: brightness(.45);
}
.hero__content {
  position: relative; z-index: 1;
  max-width: 760px;
}
.hero__label {
  display: inline-block;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--arancio);
  border: 1px solid var(--arancio);
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 24px;
}
.hero__title {
  color: var(--bianco);
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero__title span { color: var(--arancio); }
.hero__sub {
  font-size: 1.15rem; color: #c8d8ea;
  margin-bottom: 40px; max-width: 580px;
  line-height: 1.7;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.5); font-size: .75rem; letter-spacing: .1em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.6), transparent);
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius);
  font-weight: 700; font-size: .95rem;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--arancio); color: var(--bianco);
  border-color: var(--arancio);
}
.btn--primary:hover { background: #c9520a; border-color: #c9520a; color: var(--bianco); }
.btn--outline {
  background: transparent; color: var(--bianco);
  border-color: rgba(255,255,255,.5);
}
.btn--outline:hover { border-color: var(--bianco); background: rgba(255,255,255,.1); color: var(--bianco); }
.btn--blu {
  background: var(--blu); color: var(--bianco); border-color: var(--blu);
}
.btn--blu:hover { background: var(--blu2); border-color: var(--blu2); color: var(--bianco); }
.btn--sm { padding: 9px 18px; font-size: .85rem; }
.btn svg { width: 16px; height: 16px; }

/* ── CARDS ──────────────────────────────────────────────── */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--bianco);
  border-radius: 10px;
  border: 1px solid #e0e8f0;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(11,37,69,.16); }
.card__img { width: 100%; height: 200px; object-fit: cover; }
.card__body { padding: 24px; }
.card__tag {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--arancio);
  margin-bottom: 8px; display: block;
}
.card__title { color: var(--blu); margin-bottom: 12px; font-size: 1.1rem; }
.card__text { color: #4a5a6e; font-size: .92rem; line-height: 1.65; }
.card__footer { padding: 14px 24px; border-top: 1px solid #eef2f7; }

/* ── FEATURE BOX ────────────────────────────────────────── */
.feature {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 28px; border-radius: 10px;
  background: var(--bianco); border: 1px solid #e0e8f0;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.feature:hover { box-shadow: 0 8px 32px rgba(11,37,69,.14); }
.feature__icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--blu2), var(--blu3));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bianco); font-size: 1.4rem;
}
.feature__title { color: var(--blu); margin-bottom: 8px; font-size: 1rem; }
.feature__text { color: #4a5a6e; font-size: .9rem; line-height: 1.6; }

/* ── DIGITAL TWIN HIGHLIGHT ─────────────────────────────── */
.dt-highlight {
  background: linear-gradient(135deg, var(--blu) 0%, #0d3360 50%, #142d52 100%);
  border-radius: 14px;
  padding: 56px 48px;
  color: var(--bianco);
  position: relative; overflow: hidden;
}
.dt-highlight::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,96,10,.2), transparent 70%);
}
.dt-highlight__label {
  font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--arancio);
  font-weight: 700; margin-bottom: 14px;
}
.dt-highlight__title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 16px; }
.dt-highlight__text { color: #9ab3cc; line-height: 1.7; font-size: 1rem; margin-bottom: 32px; }
.dt-highlight__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.dt-point {
  border-left: 3px solid var(--arancio);
  padding-left: 16px;
}
.dt-point__title { font-weight: 700; color: var(--bianco); margin-bottom: 6px; font-size: .95rem; }
.dt-point__text  { color: #7a9ab8; font-size: .85rem; line-height: 1.5; }

/* ── STATS BAR ──────────────────────────────────────────── */
.stats { background: var(--blu2); padding: 40px 0; }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; }
.stat {
  text-align: center; padding: 20px 16px;
  border-right: 1px solid rgba(255,255,255,.15);
}
.stat:last-child { border-right: none; }
.stat__num { font-size: 2.2rem; font-weight: 800; color: var(--arancio); }
.stat__label { font-size: .8rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }

/* ── PROCESS STEPS ──────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; }
.step {
  text-align: center; padding: 36px 24px;
  position: relative;
}
.step::after {
  content: '→';
  position: absolute; right: -12px; top: 50%;
  transform: translateY(-50%);
  color: var(--arancio); font-size: 1.4rem; font-weight: 700;
}
.step:last-child::after { display: none; }
.step__num {
  width: 52px; height: 52px;
  background: var(--arancio);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.3rem; font-weight: 800; color: var(--bianco);
}
.step__title { color: var(--blu); font-size: 1rem; margin-bottom: 8px; }
.step__text  { color: #5a6a7e; font-size: .85rem; line-height: 1.55; }

/* ── IMAGE + TEXT SPLIT ─────────────────────────────────── */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__img { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.split__img img { width: 100%; height: 420px; object-fit: cover; }
.split__content { }
.split__list { list-style: none; margin-top: 20px; }
.split__list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #eef2f7;
  font-size: .93rem; color: #3a4a5e;
}
.split__list li::before {
  content: '▸';
  color: var(--arancio);
  font-size: .9rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── SECTOR GRID ────────────────────────────────────────── */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.sector-item {
  position: relative; border-radius: 8px; overflow: hidden;
  height: 160px; cursor: default;
}
.sector-item__img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); transition: filter var(--transition); }
.sector-item:hover .sector-item__img { filter: brightness(.7); }
.sector-item__label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px; background: linear-gradient(to top, rgba(11,37,69,.9), transparent);
  color: var(--bianco); font-weight: 700; font-size: .85rem;
}
.sector-item__icon { position: absolute; top: 12px; right: 12px; font-size: 1.4rem; }

/* ── CONTACT SECTION ────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.contact-info__item { display: flex; gap: 16px; margin-bottom: 28px; align-items: flex-start; }
.contact-info__icon {
  width: 44px; height: 44px; background: var(--arancio);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--bianco); font-size: 1.1rem; flex-shrink: 0;
}
.contact-info__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grmed); margin-bottom: 4px; }
.contact-info__value { color: var(--blu); font-weight: 600; }
.contact-form { background: var(--bianco); border-radius: 12px; padding: 36px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--blu); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid #d0dce8; border-radius: var(--radius);
  font-size: .93rem; font-family: inherit; color: var(--testo);
  background: var(--bianco);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--blu2);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-privacy { font-size: .8rem; color: var(--grmed); margin-top: 14px; }
.form-privacy a { color: var(--blu2); }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer { background: #06172d; color: var(--bianco); padding: 60px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer__brand { font-size: 1rem; font-weight: 700; color: var(--bianco); margin-bottom: 14px; }
.footer__brand span { color: var(--arancio); }
.footer__text { font-size: .85rem; color: #5e7a96; line-height: 1.65; }
.footer__heading { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--arancio); margin-bottom: 16px; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 10px; }
.footer__links a { font-size: .87rem; color: #5e7a96; transition: color var(--transition); }
.footer__links a:hover { color: var(--bianco); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer__copy { font-size: .8rem; color: #3e5a72; }
.footer__legal { display: flex; gap: 20px; }
.footer__legal a { font-size: .8rem; color: #3e5a72; }
.footer__legal a:hover { color: var(--grmed); }

/* ── COOKIE BANNER ──────────────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: #06172d; border-top: 3px solid var(--arancio);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
  transform: translateY(0);
  transition: transform .4s ease;
}
#cookie-banner.hidden { transform: translateY(110%); }
#cookie-banner p { color: #a0b8cc; font-size: .85rem; flex: 1; min-width: 260px; }
#cookie-banner p a { color: var(--arancio); }
.cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── BACK TO TOP ────────────────────────────────────────── */
#back-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--arancio); color: var(--bianco);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  box-shadow: 0 4px 16px rgba(232,96,10,.4);
}
#back-top.visible { opacity: 1; pointer-events: all; }

/* ── PAGE HERO (interno) ────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--blu) 0%, #0d3360 100%);
  padding: 120px 0 60px;
  color: var(--bianco);
}
.page-hero__title { margin-bottom: 14px; }
.page-hero__sub { color: #9ab3cc; font-size: 1.1rem; }
.breadcrumb { display: flex; gap: 8px; font-size: .8rem; color: #5e7a96; margin-bottom: 16px; }
.breadcrumb a { color: #5e7a96; }
.breadcrumb a:hover { color: var(--grmed); }
.breadcrumb span { color: var(--arancio); }

/* ── UTILITY ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-arancio { color: var(--arancio); }
.text-blu { color: var(--blu); }
.text-grmed { color: var(--grmed); }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .navbar__nav { display: none; }
  .navbar__hamburger { display: block; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .section { padding: 54px 0; }
  .hero { min-height: 90vh; }
  .dt-highlight { padding: 32px 24px; }
  .footer__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
