/* Stile comune alle pagine di servizio (Costruzioni, Ristrutturazioni) */
:root {
  --blue: #151D3F;
  --blue-light: #1e2852;
  --blue-dark: #0B1023;
  --yellow: #FFAE01;
  --white: #ffffff;
  --gray-bg: #F4F5F7;
  --text-dark: #151D3F;
  --text-muted: #5b6474;
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'Montserrat', sans-serif; background: var(--blue-dark); color: var(--white); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1 { font-size: clamp(34px, 5.6vw, 64px); font-weight: 900; line-height: 1.02; letter-spacing: -1.5px; }
h2 { font-size: clamp(24px, 3.2vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; }
h3 { font-size: clamp(16px, 1.6vw, 19px); font-weight: 700; line-height: 1.3; }
p { font-size: 15px; line-height: 1.7; color: rgba(255,255,255,0.68); }
.container { max-width: 1240px; margin: 0 auto; }
.label-tag { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--yellow); margin-bottom: 16px; }
.label-tag::before, .label-tag::after { content: ''; flex: 0 0 40px; height: 1px; background: rgba(255,174,1,0.3); margin: 0 14px; }
.light .label-tag { color: #9a6700; }

#progress-bar { position: fixed; top: 0; left: 0; z-index: 2000; height: 3px; width: 0%; background: var(--yellow); box-shadow: 0 0 12px rgba(255,174,1,0.6); }

/* Intestazione e menu */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; height: var(--header-h); transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.header.scrolled { background: rgba(11,16,35,0.96); backdrop-filter: blur(20px); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }
.header-inner { max-width: 1340px; margin: 0 auto; padding: 0 32px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header-logo img { height: 30px; }
.header-logo-text { font-weight: 800; font-size: 18px; letter-spacing: 2px; color: var(--white); }
.header-nav-group { display: flex; align-items: center; gap: 16px; }
nav.desk-nav { display: flex; align-items: center; gap: 8px; }
nav.desk-nav a { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); text-decoration: none; padding: 8px 14px; border-radius: 8px; transition: color 0.2s, background 0.2s; }
nav.desk-nav a:hover, nav.desk-nav a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,0.07); }
.btn-cta-header { background: var(--yellow); color: var(--blue); font-weight: 800; font-size: 13px; border-radius: 10px; padding: 11px 22px; text-decoration: none; letter-spacing: 0.5px; text-transform: uppercase; transition: transform 0.2s, box-shadow 0.2s; }
.btn-cta-header:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,174,1,0.4); }
.mobile-burger { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 12px; }
.mobile-burger span { display: block; width: 26px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s var(--ease); }
.mobile-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-burger.open span:nth-child(2) { opacity: 0; }
.mobile-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-drawer { position: fixed; inset: 0; z-index: 999; background: rgba(11,16,35,0.98); backdrop-filter: blur(20px); display: flex; flex-direction: column; padding: calc(var(--header-h) + 16px) 28px 32px; gap: 4px; transform: translateX(100%); transition: transform 0.35s var(--ease); overflow-y: auto; }
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.8); text-decoration: none; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; }
.mobile-drawer a::after { content: '→'; font-size: 13px; color: rgba(255,255,255,0.25); }
.mobile-drawer a:hover { color: var(--yellow); }
.btn-mobile-cta { background: var(--yellow) !important; color: var(--blue) !important; padding: 14px 24px !important; border-radius: 12px; font-size: 14px !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: 1px; margin-top: 20px; justify-content: center !important; border-bottom: none !important; }
.btn-mobile-cta::after { display: none !important; }

/* Pulsanti */
.btn-primary { display: inline-flex; align-items: center; gap: 10px; background: var(--yellow); color: var(--blue); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 16px 30px; border-radius: 14px; text-decoration: none; border: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(255,174,1,0.45); }
.btn-primary svg { width: 18px; height: 18px; fill: var(--blue); }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); color: var(--white); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 16px 26px; border-radius: 14px; text-decoration: none; transition: border-color 0.2s, background 0.2s, color 0.2s; }
.btn-ghost:hover { border-color: rgba(255,174,1,0.5); color: var(--yellow); }
.light .btn-ghost, .white .btn-ghost { color: var(--blue); border-color: rgba(21,29,63,0.2); background: transparent; }

/* Apertura con foto */
.hero { min-height: 82svh; position: relative; display: flex; align-items: center; padding: calc(var(--header-h) + 48px) 32px 72px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,16,35,0.94) 0%, rgba(11,16,35,0.74) 45%, rgba(11,16,35,0.28) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 1240px; width: 100%; margin: 0 auto; }
.hero-content > * { max-width: 680px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--yellow); margin-bottom: 18px; }
.hero-eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--yellow); border-radius: 50%; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .y { color: var(--yellow); }
.hero-sub { font-size: clamp(15px, 1.4vw, 17.5px); color: rgba(255,255,255,0.75); margin-bottom: 30px; font-weight: 500; line-height: 1.65; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-chips span { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.18); border-radius: 100px; padding: 7px 14px; background: rgba(11,16,35,0.4); }

/* Sezioni */
.sec { padding: 88px 32px; }
.sec.light { background: var(--gray-bg); color: var(--text-dark); }
.sec.white { background: var(--white); color: var(--text-dark); }
.sec.dark { background: var(--blue); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head p { margin-top: 12px; }
.light .sec-head h2, .white .sec-head h2 { color: var(--text-dark); }
.light p, .white p { color: var(--text-muted); }

/* Schede servizi con foto */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.svc-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--blue); min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; transition: transform 0.35s var(--ease), box-shadow 0.35s; }
.svc-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(11,16,35,0.3); }
.svc-card-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.8; transition: transform 0.55s var(--ease), opacity 0.4s; }
.svc-card:hover .svc-card-photo { transform: scale(1.06); opacity: 0.95; }
.svc-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,16,35,0.94) 0%, rgba(11,16,35,0.42) 55%, rgba(11,16,35,0.04) 100%); }
.svc-card-content { position: relative; z-index: 2; padding: 22px; }
.svc-num { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--yellow); margin-bottom: 8px; display: block; }
.svc-card h3 { color: var(--white); margin-bottom: 8px; }
.svc-card p { font-size: 13.5px; color: rgba(255,255,255,0.75); line-height: 1.55; }
.svc-grid.n5 { grid-template-columns: repeat(5, 1fr); }
.svc-grid.n5 .svc-card { min-height: 380px; }
/* numero e titolo alla stessa altezza in tutte le schede della riga */
@media (min-width: 641px) {
  .svc-grid .svc-card-content { min-height: 215px; }
  .svc-grid.n5 .svc-card-content { min-height: 255px; }
}
.svc-more { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 800; color: var(--yellow); text-transform: uppercase; letter-spacing: 1px; }

/* Approfondimento (coperture) */
.focus { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
.focus-img { border-radius: var(--radius); aspect-ratio: 4 / 5; max-height: calc(100vh - 140px); width: 100%; position: sticky; top: 110px; background-size: cover; background-position: center; }
.focus-body { display: flex; flex-direction: column; gap: 16px; }
.focus-body .label-tag { justify-content: flex-start; }
.focus-body .label-tag::before { display: none; }
.focus-body .label-tag::after { flex: 0 0 40px; }
.focus-body h2 { color: var(--text-dark); }
.focus-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.focus-types.two { grid-template-columns: repeat(2, 1fr); }
.focus-types div { background: var(--gray-bg); border: 1px solid rgba(21,29,63,0.08); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.focus-types b { font-size: 14px; color: var(--text-dark); }
.focus-types span { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.focus-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }
.focus-list li { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); padding-left: 22px; position: relative; }
.focus-list li::before { content: ''; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 3px; background: var(--yellow); }
.focus-list b { color: var(--text-dark); }
.focus .btn-primary { align-self: flex-start; }

/* Fasi di lavoro */
.steps { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 16px; counter-reset: st; }
.step { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 18px; padding: 26px 22px; }
.step b { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,174,1,0.14); color: var(--yellow); font-size: 15px; font-weight: 900; margin-bottom: 16px; }
.step h3 { margin-bottom: 8px; }
@supports (grid-template-rows: subgrid) {
  .steps { grid-auto-rows: auto; }
  .step { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; row-gap: 0; }
  .step h3 { align-self: start; }
}
.step p { font-size: 14px; }

/* Numeri */
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.num { background: var(--white); border: 1px solid rgba(21,29,63,0.08); border-radius: 18px; padding: 24px; }
.num-v { font-size: clamp(26px, 2.6vw, 34px); font-weight: 900; color: var(--blue); letter-spacing: -0.5px; line-height: 1.1; }
.num-v .y { color: #c98700; }
.num-l { font-size: 13px; font-weight: 800; color: var(--blue); margin: 8px 0 6px; text-transform: uppercase; letter-spacing: 1px; }
.num p { font-size: 13.5px; line-height: 1.55; }
.nums-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.nums-foot p { font-size: 13px; max-width: 720px; }

/* Esempi */
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ex { background: var(--white); border: 1px solid rgba(21,29,63,0.08); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.light .ex { background: var(--white); }
.white .ex { background: var(--gray-bg); }
.ex-img { aspect-ratio: 4 / 3; background-size: cover; background-position: center; }
.ex-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ex-tag { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #9a6700; }
.ex h3 { color: var(--text-dark); }
.ex p { font-size: 14px; }
.ex dl { margin-top: auto !important; display: grid; grid-template-columns: 145px 1fr; gap: 6px 12px; margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(21,29,63,0.08); font-size: 13px; min-height: 92px; align-content: start; }
.ex dt { color: var(--text-muted); font-weight: 600; }
.ex dd { color: var(--text-dark); font-weight: 700; }
.ex-note { text-align: center; font-size: 12.5px; margin-top: 22px; }

/* Video */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.video-grid.n2 { grid-template-columns: repeat(2, 1fr); max-width: 960px; margin: 0 auto; }
.video-card { border-radius: 16px; overflow: hidden; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; }
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-wrapper.yt { display: block; width: 100%; border: none; cursor: pointer; background-color: #000; background-size: cover; background-position: center; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255,174,1,0.92); box-shadow: 0 8px 24px rgba(0,0,0,0.4); transition: transform 0.2s; }
.yt-play::after { content: ''; position: absolute; left: 26px; top: 20px; border-left: 18px solid var(--blue); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.video-wrapper.yt:hover .yt-play { transform: scale(1.08); }
.video-label { font-size: 13.5px; font-weight: 700; color: var(--white); padding: 14px 16px 4px; }
.video-card p { font-size: 13px; padding: 0 16px 16px; }

/* Domande frequenti */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--white); border: 1px solid rgba(21,29,63,0.08); border-radius: 14px; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 20px; font-size: 15px; font-weight: 700; color: var(--text-dark); display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: #c98700; font-weight: 900; font-size: 18px; line-height: 1; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding: 0 20px 18px; font-size: 14.5px; }
.faq-item a { color: var(--blue); font-weight: 700; }

/* Chiamata finale */
.cta-box { max-width: 860px; margin: 0 auto; text-align: center; }
.cta-box h2 { color: var(--text-dark); margin-bottom: 12px; }
.cta-box p { margin: 0 auto 28px; max-width: 560px; }
.cta-box .hero-actions { justify-content: center; }

/* Piè di pagina */
.footer { background: var(--blue-dark); padding: 60px 32px 28px; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 60px; margin-bottom: 44px; }
.f-brand { display: flex; flex-direction: column; gap: 18px; }
.f-brand-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.f-brand-logo img { height: 28px; }
.f-brand-logo span { font-weight: 800; font-size: 18px; letter-spacing: 2px; color: var(--white); }
.f-brand p { font-size: 14px; color: rgba(255,255,255,0.45); max-width: 320px; }
.f-col-title { font-size: 11px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 18px; }
.f-col-links { display: flex; flex-direction: column; gap: 6px; }
.f-col-links a { font-size: 14px; color: rgba(255,255,255,0.6); text-decoration: none; padding: 9px 0; }
.f-info a { display: inline-block; padding: 8px 0; }
.f-col-links a:hover { color: var(--yellow); }
.f-info p { font-size: 14px; color: rgba(255,255,255,0.55); line-height: 1.9; }
.f-info a { color: rgba(255,255,255,0.75); }
.footer-tech { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 22px; margin-bottom: 20px; font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.45); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 24px; font-size: 12px; color: rgba(255,255,255,0.3); }

/* Comparsa allo scorrimento */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Schermi medi e piccoli */
@media (max-width: 1100px) {
  .svc-grid, .svc-grid.n5 { grid-template-columns: 1fr 1fr; }
  .focus { grid-template-columns: 1fr; gap: 28px; }
  .focus-img { aspect-ratio: 16 / 10; max-height: none; position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nums { grid-template-columns: 1fr 1fr; }
  .ex-grid { grid-template-columns: 1fr 1fr; }
  .video-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  nav.desk-nav, .btn-cta-header { display: none; }
  .header-inner { padding: 0 20px; }
  .hero { padding: calc(var(--header-h) + 36px) 20px 56px; min-height: 0; }
  .hero::after { background: linear-gradient(180deg, rgba(11,16,35,0.88) 0%, rgba(11,16,35,0.95) 100%); }
  .sec { padding: 60px 20px; }
  .sec-head { margin-bottom: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .svc-grid, .svc-grid.n5, .steps, .nums, .ex-grid, .video-grid, .focus-types { grid-template-columns: 1fr; }
  .focus-img { aspect-ratio: 4 / 3; }
  .focus .btn-primary { align-self: stretch; }
  .svc-card { min-height: 280px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { justify-content: center; padding: 15px 20px; font-size: 13px; }
  .nums-foot { flex-direction: column; align-items: stretch; }
}

.eco { background: linear-gradient(135deg, #0B1023 0%, #0F2A1E 100%); color: #fff; padding: 72px 32px; }
.eco-in { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }
.eco-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: #4ADE80; margin-bottom: 14px; }
.eco-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 12px #4ADE80; }
.eco h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 900; line-height: 1.15; margin: 0 0 14px; color: #fff; }
.eco p { font-size: 15.5px; line-height: 1.7; color: rgba(255,255,255,.7); margin: 0 0 18px; }
.eco-link { color: #FFAE01; font-weight: 800; font-size: 14px; text-decoration: none; }
.eco-link:hover { text-decoration: underline; }
.eco-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.eco-grid div { background: rgba(255,255,255,.05); border: 1px solid rgba(74,222,128,.18); border-radius: 16px; padding: 18px 18px 16px; }
.eco-grid b { display: block; font-size: 26px; font-weight: 900; color: #FFAE01; line-height: 1.1; margin-bottom: 6px; }
.eco-grid span { display: block; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.72); }
@media (max-width: 900px) { .eco-in { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 480px) { .eco { padding: 52px 16px; } .eco-grid { gap: 10px; } .eco-grid div { padding: 14px; } .eco-grid b { font-size: 21px; } .eco-grid span { font-size: 12.5px; } }
