/* ============================================
   Rifacimento Tetti Brescia — style.css
   Palette: blu acciaio desaturato + sabbia
   Font: Archivo (titoli), Source Sans 3 (corpo)
   ============================================ */

:root {
  --notte: #182E3C;
  --acciaio: #2E5A74;
  --acciaio-chiaro: #5E8299;
  --cielo: #DDE8ED;
  --sabbia: #B08D4F;
  --sabbia-scuro: #8F7340;
  --carta: #F6F3EC;
  --carta-alt: #ECE7DB;
  --inchiostro: #26282B;
  --grigio: #5C615E;
  --bianco: #FFFFFF;
  --linea: #DED8C9;
  --font-titoli: 'Archivo', system-ui, sans-serif;
  --font-corpo: 'Source Sans 3', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-corpo);
  color: var(--inchiostro);
  background: var(--carta);
  line-height: 1.65;
  font-size: 17px;
}
h1, h2, h3, h4 { font-family: var(--font-titoli); line-height: 1.2; color: var(--notte); }
img { max-width: 100%; height: auto; }
a { color: var(--acciaio); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---------- BARRA SUPERIORE ---------- */
.topbar {
  background: var(--acciaio);
  color: var(--bianco);
  font-size: 14px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar a { color: var(--bianco); text-decoration: none; font-weight: 700; }
.topbar .topbar-phone { display: inline-flex; align-items: center; gap: 7px; }
.topbar .topbar-phone svg { width: 15px; height: 15px; fill: var(--sabbia); }

/* ---------- HEADER ---------- */
.site-header {
  background: var(--bianco);
  border-bottom: 1px solid var(--linea);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; padding-bottom: 14px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand svg { width: 34px; height: 34px; }
.brand-name {
  font-family: var(--font-titoli);
  font-weight: 800; font-size: 20px; color: var(--notte);
  line-height: 1.1;
}
.brand-name small { display: block; font-size: 11.5px; font-weight: 700; color: var(--sabbia); letter-spacing: 1.4px; text-transform: uppercase; }
.main-nav > ul { display: flex; gap: 24px; list-style: none; align-items: center; }
.main-nav a {
  text-decoration: none; color: var(--inchiostro); font-weight: 700; font-size: 15px;
  font-family: var(--font-titoli);
}
.main-nav a:hover { color: var(--acciaio); }
.nav-cta {
  background: var(--sabbia); color: var(--bianco) !important;
  padding: 10px 20px; border-radius: 6px; font-weight: 700;
}
.nav-cta:hover { background: var(--sabbia-scuro); }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--notte); cursor: pointer; }

/* ---------- HERO ---------- */
.hero {
  background: var(--notte);
  color: var(--bianco);
  padding: 78px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48' viewBox='0 0 96 48'%3E%3Cpath d='M0 48 Q24 12 48 48 T96 48' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='2'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-kicker {
  text-transform: uppercase; letter-spacing: 2px; font-size: 13px;
  color: var(--sabbia); font-weight: 800; margin-bottom: 14px;
}
.hero h1 { color: var(--bianco); font-size: 44px; font-weight: 800; max-width: 780px; margin-bottom: 20px; }
.hero h1 span { color: #D9BE8C; }
.hero p { max-width: 700px; font-size: 18px; color: #E2EAEF; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- PULSANTI ---------- */
.btn {
  display: inline-block; text-decoration: none; font-family: var(--font-titoli);
  font-weight: 700; padding: 15px 30px; border-radius: 7px; font-size: 16px;
  transition: background .18s ease;
}
.btn-primary { background: var(--sabbia); color: var(--bianco); }
.btn-primary:hover { background: var(--sabbia-scuro); }
.btn-outline { border: 2px solid var(--bianco); color: var(--bianco); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-acciaio { background: var(--acciaio); color: var(--bianco); }
.btn-acciaio:hover { background: var(--notte); }

/* ---------- SEZIONI ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--carta-alt); }
.section-scuro { background: var(--notte); color: var(--bianco); }
.section-scuro h2, .section-scuro h3 { color: var(--bianco); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-kicker {
  text-transform: uppercase; letter-spacing: 2px; font-size: 13px;
  color: var(--sabbia); font-weight: 800; margin-bottom: 10px;
}
.section h2 { font-size: 33px; font-weight: 800; margin-bottom: 14px; }
.section-head p { color: var(--grigio); font-size: 18px; }
.section-scuro .section-head p { color: #C9D8E0; }

/* ---------- GRIGLIE CARD ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  background: var(--bianco); border: 1px solid var(--linea); border-radius: 10px;
  padding: 30px 26px;
}
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--grigio); font-size: 15.5px; }
.card .card-icon {
  width: 46px; height: 46px; border-radius: 9px; background: var(--cielo);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card .card-icon svg { width: 24px; height: 24px; fill: var(--acciaio); }
.card-link {
  display: inline-block; margin-top: 14px; font-weight: 800; font-size: 14.5px;
  text-decoration: none; font-family: var(--font-titoli); color: var(--sabbia-scuro);
}
.card-link:hover { color: var(--sabbia); }
.card-scuro { background: #213B4B; border-color: #35536A; }
.card-scuro h3 { color: var(--bianco); }
.card-scuro p { color: #C9D8E0; }
.card-scuro .card-icon { background: #182E3C; }
.card-scuro .card-icon svg { fill: var(--sabbia); }

/* ---------- CARD SERVIZIO ---------- */
.service-card { display: flex; flex-direction: column; }
.service-card .card-link { margin-top: auto; padding-top: 14px; }

/* ---------- CARD PREZZI ---------- */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.price-card {
  background: var(--bianco); border: 1px solid var(--linea); border-radius: 10px;
  padding: 24px 26px; border-left: 5px solid var(--sabbia);
}
.price-card-tag { font-family: var(--font-titoli); font-weight: 700; font-size: 16px; color: var(--notte); margin-bottom: 6px; }
.price-card-val { font-family: var(--font-titoli); font-weight: 800; font-size: 26px; color: var(--acciaio); margin-bottom: 8px; }
.price-card p { color: var(--grigio); font-size: 14.5px; }
.price-note { font-size: 13.5px; color: var(--grigio); margin-top: 14px; }

/* ---------- BOX PREVENTIVO ---------- */
.quote-box {
  background: var(--bianco); border-radius: 12px; padding: 40px;
  box-shadow: 0 4px 24px rgba(24, 46, 60, .12); border: 1px solid var(--linea);
}
.quote-box h2 { font-size: 28px; margin-bottom: 8px; }
.quote-box > p { color: var(--grigio); margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.quote-box label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; font-family: var(--font-titoli); color: var(--notte); }
.quote-box input, .quote-box select, .quote-box textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--linea); border-radius: 7px;
  font-family: var(--font-corpo); font-size: 15.5px; background: #FBF9F4; color: var(--inchiostro);
}
.quote-box input:focus, .quote-box select:focus, .quote-box textarea:focus {
  outline: 2px solid var(--acciaio-chiaro); border-color: var(--acciaio-chiaro);
}
.quote-box button {
  margin-top: 8px; width: 100%; border: none; cursor: pointer;
  background: var(--sabbia); color: var(--bianco); font-family: var(--font-titoli);
  font-weight: 700; font-size: 17px; padding: 16px; border-radius: 7px;
}
.quote-box button:hover { background: var(--sabbia-scuro); }
.form-privacy { font-size: 12.5px; color: var(--grigio); margin-top: 12px; }

/* ---------- FAQ ---------- */
.faq-item { background: var(--bianco); border: 1px solid var(--linea); border-radius: 9px; margin-bottom: 12px; }
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-family: var(--font-titoli);
  font-weight: 700; font-size: 16.5px; color: var(--notte); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--sabbia); font-weight: 800; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-body { padding: 0 22px 18px; color: var(--grigio); font-size: 15.5px; }

/* ---------- TERRITORIO ---------- */
.zone-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; list-style: none; }
.zone-list a {
  display: block; text-align: center; text-decoration: none; background: var(--bianco);
  border: 1px solid var(--linea); border-radius: 8px; padding: 13px 8px;
  font-weight: 700; font-size: 14.5px; font-family: var(--font-titoli); color: var(--notte);
}
.zone-list a:hover { background: var(--cielo); border-color: var(--acciaio-chiaro); }

/* ---------- BARRA CTA FINALE ---------- */
.cta-band { background: var(--acciaio); color: var(--bianco); padding: 54px 0; text-align: center; }
.cta-band h2 { color: var(--bianco); font-size: 30px; margin-bottom: 10px; }
.cta-band p { color: #C9D8E0; max-width: 640px; margin: 0 auto 26px; font-size: 17px; }
.cta-phone {
  display: inline-block; font-family: var(--font-titoli); font-weight: 800;
  font-size: 26px; color: var(--bianco); text-decoration: none; margin-bottom: 22px;
}

/* ---------- FOOTER ---------- */
.site-footer { background: #12222D; color: #B8C7CF; padding: 56px 0 26px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 38px; }
.site-footer h4 { color: var(--bianco); font-size: 15px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: #B8C7CF; text-decoration: none; }
.site-footer a:hover { color: var(--bianco); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand svg { width: 30px; height: 30px; }
.footer-brand span { font-family: var(--font-titoli); font-weight: 800; color: var(--bianco); font-size: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; }

/* ---------- PAGINE INTERNE ---------- */
.page-hero { background: var(--notte); color: var(--bianco); padding: 60px 0 64px; position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48' viewBox='0 0 96 48'%3E%3Cpath d='M0 48 Q24 12 48 48 T96 48' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='2'/%3E%3C/svg%3E");
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--bianco); font-size: 38px; font-weight: 800; max-width: 820px; margin-bottom: 14px; }
.page-hero p { max-width: 720px; color: #E2EAEF; font-size: 17.5px; }
.breadcrumb { font-size: 13.5px; margin-bottom: 16px; color: #9FB4C0; }
.breadcrumb a { color: #C2D3DB; text-decoration: none; }
.content-body h2 { font-size: 27px; margin: 40px 0 14px; }
.content-body h3 { font-size: 20px; margin: 28px 0 10px; }
.content-body p { margin-bottom: 16px; color: var(--inchiostro); }
.content-body ul, .content-body ol { margin: 0 0 18px 24px; }
.content-body li { margin-bottom: 8px; }
.content-body strong { color: var(--notte); }
.local-facts {
  background: var(--cielo); border-left: 4px solid var(--sabbia);
  border-radius: 0 9px 9px 0; padding: 22px 26px; margin: 30px 0;
}
.local-facts h3 { margin-top: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .zone-list { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .form-grid, .price-grid { grid-template-columns: 1fr; }
  .zone-list { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bianco); border-bottom: 2px solid var(--acciaio); padding: 18px 22px; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: flex-start; gap: 14px; }
  .nav-toggle { display: block; }
  .hero { padding: 56px 0 60px; }
  .hero h1 { font-size: 29px; }
  .page-hero h1 { font-size: 27px; }
  .section { padding: 52px 0; }
  .quote-box { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
}


/* ---------- DROPDOWN SERVIZI ---------- */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: " \25BE"; font-size: 11px; color: var(--sabbia); }
.dropdown {
  position: absolute; top: 100%; left: -10px; min-width: 235px;
  background: var(--bianco); border: 1px solid var(--linea); border-radius: 9px;
  box-shadow: 0 10px 30px rgba(24,46,60,.16); padding: 8px 0;
  display: none; list-style: none; z-index: 300;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }
.dropdown a {
  display: block !important; padding: 9px 18px !important; font-size: 14px !important;
  font-weight: 600 !important; white-space: nowrap;
}
.dropdown a:hover { background: var(--cielo); }

/* ---------- RESPONSIVE FIX ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.page-img { border-radius: 10px; margin: 4px 0 26px; box-shadow: 0 3px 14px rgba(24,46,60,.12); }

@media (max-width: 640px) {
  .has-dropdown .dropdown {
    display: block; position: static; box-shadow: none; border: none;
    border-left: 3px solid var(--cielo); border-radius: 0;
    padding: 2px 0 6px 16px; margin-top: 4px;
  }
  .dropdown a { white-space: normal; padding: 7px 0 !important; }
  .has-dropdown > a { color: var(--notte) !important; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .cta-phone { font-size: 22px; }
  .brand-name { font-size: 17px; }
  .topbar { font-size: 12.5px; }
}


/* ---------- DROPDOWN A DUE COLONNE ---------- */
.dropdown-wide {
  min-width: 430px;
  column-count: 2;
  column-gap: 0;
  padding: 10px 0;
}
.dropdown-wide li { break-inside: avoid; }
@media (max-width: 640px) {
  .has-dropdown .dropdown-wide { min-width: 0; column-count: 1; }
}

/* evita overflow del dropdown largo su schermi medi */
@media (min-width: 641px) and (max-width: 1100px) {
  .dropdown-wide { min-width: 235px; column-count: 1; left: auto; right: 0; }
}


/* ---------- IMMAGINI NELLE CARD SERVIZIO ---------- */
.service-card .card-img {
  width: 100%; height: 150px; object-fit: cover;
  border-radius: 8px; margin-bottom: 16px;
}

/* ---------- MENU HAMBURGER FINO A 1024px ---------- */
@media (max-width: 1024px) {
  .brand-name { font-size: 17px; white-space: normal; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bianco); border-bottom: 2px solid var(--acciaio); padding: 18px 22px; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: flex-start; gap: 14px; }
  .nav-toggle { display: block; }
  .has-dropdown .dropdown {
    display: block; position: static; box-shadow: none; border: none;
    border-left: 3px solid var(--cielo); border-radius: 0;
    padding: 2px 0 6px 16px; margin-top: 4px;
  }
  .dropdown-wide { min-width: 0; column-count: 1; }
  .dropdown a { white-space: normal; padding: 7px 0 !important; }
}
@media (min-width: 1025px) {
  .brand-name { white-space: nowrap; }
}


/* ---------- HERO A DUE COLONNE CON FORM ---------- */
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: start; }
.hero-quote { padding: 30px 28px; }
.hero-quote h2 { font-size: 24px; }
.hero-quote > p { font-size: 15px; margin-bottom: 18px; }
.hero-quote input, .hero-quote select { padding: 11px 13px; font-size: 15px; }
.hero-quote button { padding: 14px; font-size: 16px; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
}

/* ---------- CONTRASTO FORM NELL'HERO ---------- */
.page-hero .quote-box p, .hero .quote-box p { color: var(--grigio); }
.page-hero .quote-box h2, .hero .quote-box h2 { color: var(--notte); }
.page-hero .quote-box strong, .hero .quote-box strong { color: var(--notte); }
.page-hero .quote-box a, .hero .quote-box a { color: var(--acciaio); }
.page-hero .quote-box .form-privacy, .hero .quote-box .form-privacy { color: var(--grigio); }
