/* ══ QUADRI ELETTRICI — layout da mockup "Tavola_disegno_1_copia_3_5" ══ */

.container { max-width: 1560px; }

/* ── HERO: quadro con display, titolo centrato, testo in basso a destra ── */
#q-hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 150px 0 5rem;
  background-color: var(--clr-bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
#q-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(28,63,145,0.78), rgba(0,106,156,0.66));
  z-index: 0;
}
#q-hero .container {
  position: relative; z-index: 1;
  max-width: none; width: 100%;
  padding: 0 clamp(1.5rem, 6vw, 7rem);
}
#q-hero h1 {
  font-family: var(--font-display);
  font-weight: 300; text-transform: uppercase;
  line-height: 1.1; letter-spacing: -0.005em;
  font-size: clamp(2.4rem, 5.6vw, 5.6rem);
  color: #ffffff; text-align: center;
  margin-bottom: 6.5rem;
}
#q-hero h1 strong { font-weight: 800; }
.q-hero-lead {
  font-family: var(--font-display);
  font-weight: 300; text-align: justify;
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  line-height: 1.4; color: #ffffff;
  max-width: 640px;
  margin-left: 55.5%;
}

/* ── INTRO — sfondo chiaro ── */
#q-intro { background: #f4f6f9; padding: 110px 0 120px; }
.q-intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 5rem;
  align-items: center;
}
.q-intro-title {
  font-family: var(--font-display);
  font-weight: 300; line-height: 1.15;
  font-size: clamp(2rem, 4vw, 4.2rem);
  letter-spacing: -0.015em;
  color: #5f6368;
}
.q-intro-title strong { font-weight: 800; }
.q-intro-text {
  font-family: var(--font-display);
  font-weight: 300; text-align: justify;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.5; color: #5f6368;
  max-width: 520px;
}

/* ── 4 card prodotto a tutta larghezza (gradiente continuo) ── */
.q-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 7rem;
}
.q-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 3rem 4.5% 2.25rem;
  min-height: 270px;
  color: #ffffff;
  background: var(--grad-brand);
  background-size: 400% 100%;
  transition: transform var(--transition), box-shadow var(--transition);
}
.q-card:nth-child(1) { background-position: 0% 0; }
.q-card:nth-child(2) { background-position: 33.3% 0; }
.q-card:nth-child(3) { background-position: 66.6% 0; }
.q-card:nth-child(4) { background-position: 100% 0; }
.q-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(8,15,30,0.25); }

.q-card h3 {
  font-family: var(--font-display);
  font-weight: 800; color: #ffffff;
  font-size: clamp(1.2rem, 1.6vw, 1.7rem);
  margin-bottom: 0.4rem;
}
.q-card p {
  font-family: var(--font-display);
  font-weight: 400; line-height: 1.35;
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  color: #ffffff;
  margin-bottom: 1.75rem;
}
.q-card-link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  transition: gap var(--transition);
}
.q-card:hover .q-card-link { gap: 0.9rem; }
.q-card-link svg { width: 22px; height: 22px; fill: none; stroke: #ffffff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Sezioni servizio: gradiente blu / chiaro con filigrana logo, foto in cornice arrotondata ── */
.q-service {
  position: relative;
  padding: 95px 0 75px;
  scroll-margin-top: 90px;
  overflow: hidden;
}
.q-service .container {
  position: relative; z-index: 1;
  max-width: none;
  padding: 0 3vw 0 7vw;
}
.q-service.is-dark { background: var(--grad-brand); color: #ffffff; }
.q-service.is-light { background: #f4f6f9; }

/* filigrana: marchio G ingrandito, tagliato dai bordi della sezione */
.q-service.is-light::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(28, 63, 145, 0.17), rgba(0, 106, 156, 0.19));
  -webkit-mask: url('../img/logo.png') 23.3vw -20.4vw / 104.2vw 104.2vw no-repeat;
          mask: url('../img/logo.png') 23.3vw -20.4vw / 104.2vw 104.2vw no-repeat;
  pointer-events: none;
}

.q-svc-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 8rem);
  align-items: center;
}
.q-svc-text { align-self: start; }

.svc-label {
  display: inline-block;
  min-width: min(100%, 22rem);
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.3vw, 1.5rem);
  padding: 0.7rem 2.4rem;
  border-radius: 20px;
  margin-bottom: 2.2rem;
}
.is-dark .svc-label { background: #ffffff; color: #5f6368; }
.is-light .svc-label { background: var(--grad-brand); color: #ffffff; }

.svc-title {
  font-family: var(--font-display);
  font-weight: 400; line-height: 1.02;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 3.7vw, 4.2rem);
  margin-bottom: 2.4rem;
}
.is-dark .svc-title { color: #ffffff; }
.is-light .svc-title { color: #5f6368; }

.q-svc-text p {
  font-family: var(--font-display);
  font-weight: 300; line-height: 1.28;
  font-size: clamp(1rem, 1.35vw, 1.6rem);
  margin-bottom: 2.6rem;
  max-width: 640px;
}
.is-light .q-svc-text p { text-align: justify; color: #5f6368; }
.is-dark .q-svc-text p { color: #ffffff; }

.svc-list { display: flex; flex-direction: column; gap: 1.6rem; }
.svc-list li {
  position: relative;
  padding-left: 1.5rem;
  font-family: var(--font-display);
  font-weight: 400; line-height: 1.25;
  font-size: clamp(1rem, 1.3vw, 1.5rem);
}
.svc-list li::before {
  content: '';
  position: absolute; left: 0; top: 0.42em;
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.is-dark .svc-list li { color: #ffffff; }
.is-light .svc-list li { color: #5f6368; }

.svc-photo { margin: 0; }
.svc-photo img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: clamp(18px, 1.8vw, 35px) clamp(40px, 5vw, 100px) clamp(40px, 5vw, 100px) clamp(36px, 4.5vw, 90px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .q-svc-grid { grid-template-columns: 1fr; gap: 2rem; }
  .q-service.is-light::before { opacity: 0.45; }
  .q-service.is-light::before { -webkit-mask-position: 5vw -30vw; mask-position: 5vw -30vw; -webkit-mask-size: 150vw 150vw; mask-size: 150vw 150vw; }
  .q-cards { grid-template-columns: repeat(2, 1fr); row-gap: 14px; margin-top: 5rem; }
  .q-card:nth-child(1), .q-card:nth-child(3) { background-position: 0% 0; }
  .q-card:nth-child(2), .q-card:nth-child(4) { background-position: 100% 0; }
  #q-hero h1 { margin-bottom: 2.5rem; }
  .q-hero-lead { margin-left: 0; }
}
@media (max-width: 768px) {
  #q-hero { padding: 120px 0 3rem; }
  .q-hero-lead, .is-light .svc-body p, .q-intro-text { text-align: left; }
  #q-intro { padding: 70px 0 80px; }
  .q-intro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .q-cards { grid-template-columns: 1fr; }
  .q-card { min-height: 0; }
  .q-service { padding: 60px 0 70px; }
  .q-service .container { padding: 0 1.5rem; }
}
