/* ─── Reset & Variables ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #CC0000;
  --red-dark:   #8B0000;
  --red-light:  #E84444;
  --white:      #FFFFFF;
  --off-white:  #F7F7F7;
  --near-black: #1A1A1A;
  --gray:       #555555;
  --gray-lt:    #BBBBBB;
  --nav-h:      72px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--near-black);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

/* ─── Navbar ─────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--white);
  display: flex;
  align-items: center;
  padding: 0 48px;
  gap: 40px;
  transition: background var(--transition), box-shadow var(--transition);
  border-bottom: 2px solid var(--red);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

#navbar.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.14);
}

.nav-logo {
  text-decoration: none;
  margin-right: auto;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav ul li a {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 100%;
  height: 2px;
  background: var(--red);
  transition: right var(--transition);
}

nav ul li a:hover { color: var(--near-black); }
nav ul li a:hover::after { right: 0; }

.nav-cta {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white) !important;
  background: var(--red);
  padding: 10px 20px;
  border-radius: 2px;
  text-decoration: none !important;
  transition: background var(--transition) !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--red-dark) !important; color: var(--white) !important; }

/* ─── Language Switcher ──────────────────────────────────────────────────── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 16px;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-lt);
  transition: color var(--transition);
  border-bottom: 2px solid transparent;
}

.lang-btn:hover { color: var(--near-black); }

.lang-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.lang-sep {
  font-size: 12px;
  color: var(--gray-lt);
  user-select: none;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  background: var(--near-black);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--near-black) 45%, var(--red-dark) 100%);
  z-index: 0;
}

/* ── Carousel foto ─────────────────────────────────────────────────────────── */
.hero-carousel {
  position: absolute;
  top: 0; right: 0;
  width: 58%;
  height: 100%;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-slide.active {
  opacity: 1;
}

/* Gradiente dissolvenza: fonde le foto col testo a sinistra */
.hero-carousel-fade {
  position: absolute;
  top: 0; right: 0;
  width: 58%;
  height: 100%;
  background: linear-gradient(
    to right,
    var(--near-black)              0%,
    rgba(26, 26, 26, 0.92)        15%,
    rgba(26, 26, 26, 0.55)        40%,
    rgba(26, 26, 26, 0.15)        70%,
    transparent                  100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Geometric accents — sopra il carousel */
.hero-geo-1 {
  position: absolute;
  top: 0; right: 0;
  width: 420px; height: 420px;
  background: var(--red);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.85;
  z-index: 3;
}

.hero-geo-2 {
  position: absolute;
  top: 0; right: 0;
  width: 240px; height: 240px;
  background: var(--red-light);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.9;
  z-index: 3;
}

.hero-geo-3 {
  position: absolute;
  bottom: 0; left: 0;
  width: 180px; height: 80px;
  background: var(--red);
  clip-path: polygon(0 100%, 0 0, 100% 100%);
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: calc(var(--nav-h) + 60px) 80px 80px;
  max-width: 820px;
}

.hero-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--red);
}

.hero-h1 {
  font-size: clamp(52px, 7vw, 96px);
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -2px;
}

.hero-h1 .accent { color: var(--red); }

.hero-subtitle {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 300;
  color: var(--gray-lt);
  margin-bottom: 32px;
  font-style: italic;
  font-family: 'Open Sans', sans-serif;
}

.hero-divider {
  width: 80px;
  height: 3px;
  background: var(--red);
  margin-bottom: 28px;
}

.hero-tagline {
  font-size: 16px;
  color: var(--gray-lt);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: 48px;
}

.hero-tagline span { color: var(--white); font-weight: 600; }

.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  padding: 16px 36px;
  border-radius: 2px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  display: inline-block;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

.btn-outline {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.35);
  padding: 14px 34px;
  border-radius: 2px;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-lt);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
  text-decoration: none;
  animation: bounce 2s infinite;
}

.hero-scroll svg { width: 20px; height: 20px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ─── Section Utilities ──────────────────────────────────────────────────── */
section { padding: 100px 80px; }

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 32px; height: 2px;
  background: var(--red);
}

.section-title {
  font-size: clamp(32px, 4vw, 52px);
  color: var(--near-black);
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.section-title .accent { color: var(--red); }

.section-intro {
  font-size: 17px;
  color: var(--gray);
  max-width: 600px;
  line-height: 1.75;
}

/* ─── Logo Big Band ──────────────────────────────────────────────────────── */
.logo-big-band {
  background: var(--white);
  padding: 64px 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.logo-big-img {
  max-width: 780px;
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Chi Siamo ──────────────────────────────────────────────────────────── */
#chi-siamo {
  background: var(--off-white);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 700px;
}

.about-text-col {
  padding: 100px 72px 100px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-logo {
  height: 56px;
  width: auto;
  max-width: 220px;
  display: block;
  align-self: flex-start; /* prevents flex stretching */
  margin-bottom: 28px;
  object-fit: contain;
}

.about-body {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 40px;
}

.about-body p + p { margin-top: 18px; }

.about-quote {
  border-left: 4px solid var(--red);
  padding-left: 24px;
  font-style: italic;
  font-size: 18px;
  color: var(--near-black);
  margin-bottom: 48px;
  line-height: 1.6;
}

.founder-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.founder-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--near-black);
}

.founder-role {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}

.about-photo-col {
  position: relative;
  overflow: hidden;
  background: var(--near-black);
}

.about-photo-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(20%);
  transition: transform 0.6s ease;
}

.about-photo-col:hover img { transform: scale(1.03); }

.about-photo-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(26,26,26,0.8));
  padding: 48px 40px 40px;
}

.about-stat-row {
  display: flex;
  gap: 40px;
  margin-top: 48px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray);
}

/* ─── Servizi ────────────────────────────────────────────────────────────── */
#servizi { background: var(--white); }

.servizi-header {
  margin-bottom: 56px;
}

.servizi-header .section-intro {
  margin-top: 16px;
  max-width: none;
  white-space: nowrap;
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

/* ─── Sector subsection ──────────────────────────────────────────────────── */
.sector-section {
  margin-top: 80px;
}

.sector-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  color: var(--near-black);
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.sector-heading .accent { color: var(--red); }

.sector-subtitle {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.65;
  margin-bottom: 40px;
  white-space: nowrap;
}

.sector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.sector-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: #111;
  cursor: default;
}

/* Red top bar — always visible */
.sector-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  z-index: 4;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.sector-card:hover::before,
.sector-card.is-active::before {
  transform: scaleX(1);
}

/* Background image — fades in on hover */
.sector-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: brightness(0.65) saturate(0.9);
  transition: opacity 0.65s ease;
  z-index: 0;
}

.sector-card:hover .sector-card-bg,
.sector-card.is-active .sector-card-bg {
  opacity: 1;
}

/* Gradient overlay for text readability */
.sector-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 25%, rgba(0,0,0,0.78) 100%);
  z-index: 1;
  pointer-events: none;
}

.sector-card-inner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 28px 32px 32px;
}

.sector-grid .sector-card:first-child .sector-card-inner {
  padding-top: 6px;
}

.sector-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  min-height: 44px;
  margin-bottom: 10px;
  transition: transform 0.35s ease;
}

.sector-card:hover .sector-name,
.sector-card.is-active .sector-name {
  transform: translateY(-4px);
}

.sector-phrase {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease 0.18s, transform 0.4s ease 0.18s;
}

.sector-card:hover .sector-phrase,
.sector-card.is-active .sector-phrase {
  opacity: 1;
  transform: translateY(0);
}

.service-card {
  background: var(--near-black);
  padding: 48px 36px;
  position: relative;
  overflow: hidden;
  transition: background var(--transition);
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { background: #222; }

.service-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.service-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 52px;
  font-weight: 900;
  color: var(--red);
  opacity: 0.3;
  line-height: 1;
}

.service-icon {
  width: 52px; height: 52px;
}

.service-icon svg {
  width: 100%; height: 100%;
  stroke: var(--red);
  fill: none;
  stroke-width: 1.5;
}

.service-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.service-desc {
  font-size: 14px;
  color: var(--gray-lt);
  line-height: 1.75;
}

/* ─── Portfolio ──────────────────────────────────────────────────────────── */
#portfolio { background: var(--off-white); }

.portfolio-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 48px;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  background: var(--white);
  border: 1px solid #ddd;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 2px;
  transition: all var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--near-black);
}

.portfolio-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.portfolio-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.7);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(26,26,26,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--transition);
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-year {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: 6px;
}

.portfolio-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.portfolio-client {
  font-size: 12px;
  color: var(--gray-lt);
  margin-top: 4px;
}

.portfolio-item.hidden { display: none; }

/* ─── Clienti ────────────────────────────────────────────────────────────── */
#clienti {
  background: var(--near-black);
  padding: 80px;
}

#clienti .section-title { color: var(--white); }
#clienti .section-label { margin-bottom: 12px; }

.clienti-intro {
  font-size: 16px;
  color: var(--gray-lt);
  max-width: 560px;
  margin-bottom: 60px;
}

.clienti-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
}

.client-card {
  background: var(--white);
  border: 1px solid #e8e8e8;
  padding: 28px 16px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 130px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Barra rossa che scorre da sinistra a destra */
.client-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.client-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(204, 0, 0, 0.15);
  border-color: rgba(204, 0, 0, 0.2);
}

.client-card:hover::before {
  transform: scaleX(1);
}

.client-logo-img {
  height: 52px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
  display: block;
  opacity: 0.8;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.client-card:hover .client-logo-img {
  opacity: 1;
  transform: scale(1.06);
}

.client-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.3s ease;
}

.client-card:hover .client-name {
  color: var(--near-black);
}

.client-card--dark {
  background: var(--near-black);
  border-color: rgba(255,255,255,0.06);
}

.client-card--dark .client-name { color: var(--white); }

.client-logo-invert {
  filter: invert(1);
}

.client-card:hover .client-logo-invert {
  filter: invert(1);
}


/* Categoria: invisibile a riposo, emerge solo al mouseover */
.client-sector {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-light);
  transform: translateY(5px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.client-card:hover .client-sector {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Contatti ───────────────────────────────────────────────────────────── */
#contatti {
  background: var(--white);
  padding: 100px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contatti-left .section-title { margin-bottom: 24px; }

.contatti-text {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 48px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  width: 44px; height: 44px;
  background: var(--red);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px; height: 20px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.8;
}

.contact-detail { display: flex; flex-direction: column; gap: 3px; }

.contact-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-lt);
}

.contact-value {
  font-size: 16px;
  color: var(--near-black);
  text-decoration: none;
  font-weight: 500;
}

.contact-value:hover { color: var(--red); }

.contatti-right {
  background: var(--near-black);
  padding: 56px 48px;
  position: relative;
}

.contatti-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
}

.form-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 32px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-lt);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 14px 18px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: var(--white);
  border-radius: 2px;
  outline: none;
  transition: border-color var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.3); }

.form-group input:focus,
.form-group textarea:focus { border-color: var(--red); }

.form-group textarea { min-height: 120px; }

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

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  text-align: center;
}

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

.footer-logo-img {
  height: 34px;
  width: auto;
  display: block;
  background: var(--white);
  padding: 4px 10px;
  border-radius: 3px;
}

.footer-copy {
  font-size: 12px;
  color: var(--gray-lt);
  text-align: center;
}

.footer-copy a {
  color: var(--red-light);
  text-decoration: none;
}

.footer-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-lt);
}

/* ─── Lightbox ───────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-close {
  position: absolute;
  top: -48px; right: 0;
  background: var(--red);
  color: var(--white);
  border: none;
  width: 40px; height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
}

.lightbox-caption {
  margin-top: 16px;
  text-align: center;
}

.lightbox-caption .lb-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.lightbox-caption .lb-year {
  font-size: 12px;
  color: var(--red-light);
  letter-spacing: 1px;
}

.lightbox-caption .lb-counter {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  letter-spacing: 1px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(204,0,0,0.75);
  border: none;
  color: var(--white);
  width: 48px; height: 48px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-nav:hover { background: var(--red); }
.lightbox-prev { left: -64px; }
.lightbox-next { right: -64px; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
/* ─── Hamburger button (hidden on desktop) ──────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  margin-left: 8px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--near-black);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#navbar.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#navbar.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#navbar.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Responsive: Tablet landscape ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .servizi-grid    { grid-template-columns: repeat(2, 1fr); }
  .sector-grid     { grid-template-columns: repeat(2, 1fr); }
  .clienti-grid    { grid-template-columns: repeat(4, 1fr); }
  .portfolio-grid  { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Responsive: Tablet portrait (≤900px) ──────────────────────────────── */
@media (max-width: 900px) {
  section { padding: 72px 40px; }

  #chi-siamo              { grid-template-columns: 1fr; }
  .about-photo-col        { min-height: 420px; order: -1; }
  .about-text-col         { padding: 64px 40px; }

  .servizi-header         { grid-template-columns: 1fr; }

  #contatti               { grid-template-columns: 1fr; gap: 40px; padding: 72px 40px; }

  footer                  { padding: 32px 40px; }

  .hero-content           { padding: calc(var(--nav-h) + 40px) 40px 60px; }

  #navbar                 { padding: 0 24px; gap: 16px; }
  nav ul                  { gap: 16px; }

  #clienti                { padding: 72px 40px; }
  .clienti-grid           { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Responsive: Mobile (≤768px) ───────────────────────────────────────── */
@media (max-width: 768px) {

  /* Navbar */
  #navbar {
    padding: 0 20px;
    gap: 0;
    position: fixed;
  }

  .servizi-header .section-intro { white-space: normal; }
  .sector-subtitle { white-space: normal; }

  .nav-hamburger { display: flex; }

  /* Nav links hidden by default, shown when nav-open */
  nav {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid #eee;
    border-bottom: 2px solid var(--red);
    padding: 0 20px 20px;
    display: none;
    flex-direction: column;
    z-index: 999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  }

  #navbar.nav-open nav { display: flex; }

  nav ul {
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
  }

  nav ul li { border-bottom: 1px solid #f0f0f0; }
  nav ul li:last-child { border-bottom: none; }

  nav ul li a {
    display: block;
    padding: 14px 4px;
    font-size: 13px;
    letter-spacing: 1.5px;
  }

  .nav-cta {
    display: inline-block;
    margin-top: 16px;
    padding: 13px 20px;
    text-align: center;
    border-radius: 2px;
  }

  .lang-switch { margin-left: auto; }

  /* Hero */
  .hero-carousel {
    width: 100%;
    opacity: 0.35;
  }

  .hero-carousel-fade {
    width: 100%;
    background: linear-gradient(
      to bottom,
      rgba(26,26,26,0.5)  0%,
      rgba(26,26,26,0.75) 40%,
      var(--near-black)   100%
    );
  }

  .hero-geo-1 { width: 180px; height: 180px; }
  .hero-geo-2 { width: 110px; height: 110px; }
  .hero-geo-3 { width: 100px; height: 50px; }

  .hero-content {
    padding: calc(var(--nav-h) + 32px) 24px 72px;
    max-width: 100%;
  }

  .hero-h1 { font-size: clamp(40px, 10vw, 60px); letter-spacing: -1px; }

  .hero-tagline { font-size: 13px; margin-bottom: 36px; }

  .hero-cta-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-primary, .btn-outline { width: 100%; text-align: center; padding: 16px 24px; }

  /* Logo big band */
  .logo-big-band { padding: 40px 24px; }
  .logo-big-img  { max-width: 480px; }

  /* Chi Siamo */
  #chi-siamo { min-height: auto; }
  .about-photo-col { min-height: 300px; order: -1; }
  .about-text-col  { padding: 48px 24px; }
  .about-quote     { font-size: 16px; }
  .about-stat-row  { gap: 24px; flex-wrap: wrap; }
  .stat-number     { font-size: 32px; }

  /* Servizi */
  section#servizi { padding: 64px 24px; }
  .servizi-header { gap: 16px; margin-bottom: 40px; }
  .servizi-grid   { grid-template-columns: 1fr; gap: 2px; }
  .sector-grid    { grid-template-columns: 1fr; gap: 2px; }
  .sector-card    { min-height: 220px; }
  .service-card   { padding: 36px 28px; }

  /* Portfolio */
  #portfolio { padding: 64px 24px; }
  .portfolio-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .portfolio-grid { grid-template-columns: 1fr; gap: 8px; }
  .portfolio-item { aspect-ratio: 16/9; }
  .portfolio-overlay { opacity: 1; background: linear-gradient(transparent 30%, rgba(26,26,26,0.88) 100%); }

  /* Clienti */
  #clienti { padding: 64px 24px; }
  .clienti-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .client-card  { min-height: 110px; padding: 20px 12px 16px; }
  .client-logo-img { height: 40px; max-width: 90px; }

  /* Contatti */
  #contatti { padding: 64px 24px; gap: 32px; }
  .contatti-right { padding: 40px 24px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }

  /* Footer */
  footer {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
    gap: 16px;
  }

  /* Lightbox — touch-friendly */
  .lightbox-inner {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .lightbox-inner img {
    max-width: 100vw;
    max-height: 78vh;
  }

  .lightbox-nav {
    width: 48px;
    height: 48px;
    font-size: 20px;
    top: 50%;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .lightbox-caption { margin-top: 12px; padding: 0 60px; }
}

/* ─── Responsive: Small phones (≤480px) ─────────────────────────────────── */
@media (max-width: 480px) {
  section { padding: 56px 20px; }

  .hero-content { padding: calc(var(--nav-h) + 24px) 20px 64px; }
  .hero-h1      { font-size: clamp(34px, 10vw, 48px); }
  .hero-tagline { letter-spacing: 1px; font-size: 12px; }

  .logo-big-img { max-width: 320px; }

  .about-text-col { padding: 40px 20px; }

  #portfolio, section#servizi, #clienti, #contatti { padding: 56px 20px; }

  .clienti-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }

  .servizi-grid { gap: 1px; }

  footer { padding: 28px 20px; }

  .section-title { font-size: clamp(28px, 8vw, 40px); }
}

/* ─── Page Nav (inner pages) ─── */
#navbar.page-nav { box-shadow: 0 2px 24px rgba(0,0,0,0.14); }

/* ─── Breadcrumb ─── */
.breadcrumb {
  padding: 16px 80px;
  background: var(--off-white);
  border-bottom: 1px solid #eee;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: var(--nav-h);
}
.breadcrumb a { color: var(--red); text-decoration: none; }
.breadcrumb span { margin: 0 8px; color: var(--gray-lt); }

/* ─── Page Hero (inner pages) ─── */
.page-hero {
  background: var(--near-black);
  padding: 80px 80px 72px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 300px;
  background: var(--red);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.7;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(40px, 5vw, 72px);
  color: var(--white);
  letter-spacing: -2px;
  margin-top: 12px;
}
.page-hero h1 .accent { color: var(--red); }

/* ─── CTA Band ─── */
.cta-band {
  background: var(--near-black);
  padding: 80px;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.cta-band h2 .accent { color: var(--red); }
.cta-band p {
  font-size: 16px;
  color: var(--gray-lt);
  margin-bottom: 40px;
}
.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-band .btn-outline {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}

/* ─── Footer expanded ─── */
footer.footer-full {
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 64px 80px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  text-align: left;
}
footer.footer-full .footer-brand img {
  height: 36px; width: auto; margin-bottom: 16px;
  background: var(--white); padding: 4px 10px; border-radius: 3px;
}
footer.footer-full .footer-brand p {
  font-size: 13px; color: var(--gray-lt); line-height: 1.7; max-width: 260px;
}
footer.footer-full .footer-links h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 16px;
}
footer.footer-full .footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
footer.footer-full .footer-links ul li a {
  font-size: 13px; color: var(--gray-lt); text-decoration: none;
  transition: color var(--transition);
}
footer.footer-full .footer-links ul li a:hover { color: var(--white); }
.footer-bottom-bar {
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 80px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.footer-bottom-bar p {
  font-size: 11px; color: rgba(255,255,255,0.3);
  font-family: 'Montserrat', sans-serif; letter-spacing: 0.5px;
}

/* ─── About section on inner pages ─── */
#chi-siamo.page-about { padding: 0; }
.page-about .about-text-col { padding: 80px; }

/* ─── Process section ─── */
.process-section { background: var(--off-white); padding: 100px 80px; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 56px;
}
.process-step {
  background: var(--near-black);
  padding: 40px 32px;
  position: relative;
}
.process-step::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.process-step:hover::before { transform: scaleX(1); }
.process-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px; font-weight: 900;
  color: var(--red); opacity: 0.25; line-height: 1;
  margin-bottom: 20px;
}
.process-title {
  font-size: 17px; font-weight: 700;
  color: var(--white); margin-bottom: 12px;
}
.process-desc { font-size: 14px; color: var(--gray-lt); line-height: 1.75; }

/* ─── Values grid (chi-siamo) ─── */
.values-section { background: var(--white); padding: 100px 80px; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 56px;
}
.value-card {
  background: var(--off-white);
  padding: 48px 36px;
  position: relative;
}
.value-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.value-card:hover::before { transform: scaleX(1); }
.value-icon { width: 48px; height: 48px; margin-bottom: 24px; }
.value-icon svg { width: 100%; height: 100%; stroke: var(--red); fill: none; stroke-width: 1.5; }
.value-title { font-size: 18px; font-weight: 700; color: var(--near-black); margin-bottom: 12px; }
.value-desc { font-size: 14px; color: var(--gray); line-height: 1.75; }

/* ─── Responsive additions ─── */
@media (max-width: 900px) {
  .breadcrumb { padding: 14px 40px; }
  .page-hero { padding: 60px 40px 56px; }
  .cta-band { padding: 64px 40px; }
  footer.footer-full { grid-template-columns: 1fr; padding: 48px 40px 0; gap: 32px; }
  .footer-bottom-bar { padding: 16px 40px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .process-section { padding: 72px 40px; }
  .values-section { padding: 72px 40px; }
}
@media (max-width: 768px) {
  .breadcrumb { padding: 12px 24px; font-size: 10px; }
  .page-hero { padding: 48px 24px 44px; }
  .page-hero::after { width: 150px; height: 150px; }
  .cta-band { padding: 56px 24px; }
  .cta-row { flex-direction: column; align-items: center; }
  footer.footer-full { padding: 40px 24px 0; }
  .footer-bottom-bar { padding: 14px 24px; flex-direction: column; text-align: center; }
  .process-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .process-section { padding: 56px 24px; }
  .values-section { padding: 56px 24px; }
  #chi-siamo.page-about .about-text-col { padding: 48px 24px; }
}

/* ── Privacy checkbox ───────────────────────────────────────────────────── */
.form-group--privacy { margin-top: 4px; margin-bottom: 20px; }
.privacy-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.privacy-check-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--red);
  cursor: pointer;
}
.privacy-check-label span {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}
.privacy-check-label span a {
  color: var(--red);
  text-decoration: underline;
}
