/*
Theme Name: Vitoria SNC
Theme URI: https://vitoriasnc.it
Author: Vitoria S.n.c.
Description: Tema personalizzato per Vitoria S.n.c. — impresa edile: ristrutturazioni, infissi QFort, climatizzazione e riscaldamento. Palette navy e oro derivata dal logo aziendale.
Version: 1.3.202607081330
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: vitoria-snc
*/

/* =========================================================
   Vitoria S.n.c. — Foglio di stile principale
   Palette estratta dal logo aziendale:
   navy #121a26 · navy chiaro #1e2633 · oro #c9a84c · oro scuro #a08237
   ========================================================= */

:root {
  --navy: #121a26;
  --navy-2: #1a2332;
  --navy-3: #222b3a;
  --gold: #c9a84c;
  --gold-dark: #a08237;
  --ivory: #ece9e1;
  --muted: #a3abba;
  --line: rgba(201, 168, 76, 0.25);
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: #dcbf6d; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--navy);
  padding: .5rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 26, 38, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1.25rem;
  max-width: var(--maxw); margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: .75rem; }
.brand img { width: 52px; height: 52px; border-radius: 50%; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem; font-weight: 700;
  color: var(--gold); letter-spacing: .06em;
}
.brand-name small {
  display: block; font-family: var(--font-sans);
  font-size: .62rem; font-weight: 400; letter-spacing: .28em;
  color: var(--muted); text-transform: uppercase;
}

.main-nav ul { display: flex; gap: 1.6rem; list-style: none; }
.main-nav a {
  color: var(--ivory); font-size: .95rem; font-weight: 500;
  letter-spacing: .02em; padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--gold); border-bottom-color: var(--gold);
}
.nav-cta {
  background: var(--gold); color: var(--navy) !important;
  padding: .5rem 1.1rem !important; border-radius: 6px;
  border-bottom: none !important; font-weight: 600;
}
.nav-cta:hover { background: #dcbf6d; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 6px; padding: .45rem .6rem; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--gold);
  margin: 4px 0; transition: transform .2s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5.5rem;
  background: var(--navy-2);
  border-bottom: 1px solid var(--line);
}
.hero .container { position: relative; z-index: 1; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.5s ease-in-out;
}
.hero-slide.attiva { opacity: 1; }
.hero-slides::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(18, 26, 38, 0.88), rgba(18, 26, 38, 0.96));
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.15; font-weight: 700; max-width: 18ch;
}
.hero h1 em { color: var(--gold); font-style: normal; }

.hero .lead {
  margin-top: 1.2rem; max-width: 54ch;
  font-size: 1.15rem; color: var(--muted);
}

.hero-actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .65rem 1.35rem; border-radius: 7px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: background .2s, color .2s, border-color .2s;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #dcbf6d; color: var(--navy); }
.btn-outline { border: 1.5px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: rgba(201, 168, 76, .12); color: #dcbf6d; }
.btn-wa { background: #4d8069; color: #0e1f17; }
.btn-wa:hover { background: #5d9279; color: #0e1f17; }

/* ---------- Sezioni ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--navy-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  color: var(--gold); font-size: .8rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
}
.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: .5rem 0 1rem; font-weight: 700;
}
.section .intro { max-width: 62ch; color: var(--muted); margin-bottom: 2.5rem; }

/* ---------- Griglia servizi ---------- */
.services-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.service-card {
  background: var(--navy-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  transition: transform .2s, border-color .2s;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.service-card .icon {
  width: 44px; height: 44px; color: var(--gold); margin-bottom: 1rem;
}
.service-card h3 {
  font-family: var(--font-serif); font-size: 1.2rem;
  margin-bottom: .5rem; color: var(--ivory);
}
.service-card p { font-size: .95rem; color: var(--muted); }

/* ---------- Badge QFort ---------- */
.qfort-banner {
  display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--navy-3), var(--navy-2));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 2.2rem 2.5rem;
}
.qfort-banner img { width: 190px; flex: none; }
.qfort-banner .badge-label {
  display: inline-block; background: var(--gold); color: var(--navy);
  font-size: .75rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; padding: .3rem .8rem; border-radius: 4px;
  margin-bottom: .8rem;
}
.qfort-banner h2, .qfort-banner h3 {
  font-family: var(--font-serif); font-size: 1.6rem; margin-bottom: .6rem;
}
.qfort-banner p { color: var(--muted); max-width: 58ch; }

/* ---------- Zona operativa ---------- */
.zone-list { display: flex; gap: 1rem; flex-wrap: wrap; list-style: none; margin-top: 1.5rem; }
.zone-list li {
  border: 1px solid var(--gold); border-radius: 999px;
  padding: .5rem 1.4rem; color: var(--gold); font-weight: 500;
}

/* ---------- Lavori: prima/dopo ---------- */
.project-card {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2.5rem;
}
.project-card h3 {
  font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: .4rem;
}
.project-meta { color: var(--gold); font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1rem; }
.project-card .desc { color: var(--muted); max-width: 70ch; margin-bottom: 1.8rem; }

.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.ba-col figure { position: relative; border-radius: 8px; overflow: hidden; }
.ba-col img { width: 100%; height: 340px; object-fit: cover; }
.ba-tag {
  position: absolute; top: .8rem; left: .8rem;
  padding: .3rem .9rem; border-radius: 4px;
  font-size: .78rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
}
.ba-tag.prima { background: rgba(18, 26, 38, .85); color: var(--ivory); border: 1px solid var(--muted); }
.ba-tag.dopo { background: var(--gold); color: var(--navy); }

.gallery-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.gallery-row figure { border-radius: 8px; overflow: hidden; }
.gallery-row img { width: 100%; height: 240px; object-fit: cover; transition: transform .3s; }
.gallery-row img:hover { transform: scale(1.04); }

/* ---------- Contatti ---------- */
.contact-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.contact-card {
  background: var(--navy-3); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem 1.5rem;
}
.contact-card .icon { width: 38px; height: 38px; color: var(--gold); margin-bottom: .9rem; }
.contact-card h3 { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: .4rem; }
.contact-card p, .contact-card a { font-size: .98rem; }
.contact-card .note { color: var(--muted); font-size: .85rem; margin-top: .3rem; }

.social-row { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }

/* ---------- Form preventivo ---------- */
.form-wrap {
  background: var(--navy-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2.3rem; max-width: 760px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: .9rem; font-weight: 600; color: var(--ivory); }
.form-field label .req { color: var(--gold); }
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--navy); border: 1px solid var(--line);
  border-radius: 6px; padding: .75rem .9rem;
  color: var(--ivory); font-family: var(--font-sans); font-size: 1rem;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.form-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.form-check input { margin-top: .3rem; accent-color: var(--gold); }
.form-msg-ok {
  background: rgba(37, 211, 102, .12); border: 1px solid #25d366;
  color: #7ee2a8; padding: 1rem 1.2rem; border-radius: 6px; margin-bottom: 1.4rem;
}
.form-msg-err {
  background: rgba(220, 80, 80, .12); border: 1px solid #dc5050;
  color: #f0a0a0; padding: 1rem 1.2rem; border-radius: 6px; margin-bottom: 1.4rem;
}

/* ---------- CTA finale ---------- */
.cta-final {
  text-align: center; padding: 4.5rem 1.25rem;
  background: linear-gradient(rgba(18,26,38,.92), rgba(18,26,38,.92)), var(--navy-2);
  border-top: 1px solid var(--line);
}
.cta-final h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .8rem; }
.cta-final p { color: var(--muted); margin-bottom: 1.8rem; }
.cta-final .hero-actions { justify-content: center; margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0d131d; border-top: 1px solid var(--line);
  padding: 3rem 0 2rem; font-size: .92rem; color: var(--muted);
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 2rem;
}
.site-footer h4 {
  font-family: var(--font-serif); color: var(--gold);
  font-size: 1.05rem; margin-bottom: .8rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(163, 171, 186, .15);
  padding-top: 1.4rem; font-size: .82rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}

/* ---------- WhatsApp flottante ---------- */
.wa-float {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #4d8069; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; color: #fff; }

/* ---------- Pagina interna: intestazione ---------- */
.page-head {
  padding: 3.8rem 0 3rem;
  background: linear-gradient(rgba(18,26,38,.55), rgba(18,26,38,.9)), var(--navy-2);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 2.9rem); }
.page-head p { color: var(--muted); max-width: 60ch; margin-top: .8rem; }

/* ---------- Chi siamo ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.about-grid .photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.values-list { list-style: none; margin-top: 1.5rem; display: grid; gap: 1rem; }
.values-list li { display: flex; gap: .8rem; align-items: flex-start; color: var(--muted); }
.values-list svg { width: 22px; height: 22px; color: var(--gold); flex: none; margin-top: .3rem; }
.values-list strong { color: var(--ivory); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy-2); border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.4rem;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: .9rem; }
  .nav-toggle { display: block; }
  .ba-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .qfort-banner { padding: 1.8rem 1.5rem; }
  .hero { padding: 4rem 0 3.5rem; }
}

/* ---------- Lightbox galleria lavori ---------- */
body.lb-blocco { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(13, 19, 29, 0.96);
  padding: 3.5rem 1rem 1rem;
}
.lightbox.aperta { display: flex; }

.project-card figure img { cursor: zoom-in; }

.lb-stage { display: flex; flex-direction: column; align-items: center; min-height: 0; }
.lb-img {
  max-width: min(1600px, 92vw); max-height: 68vh;
  width: auto; height: auto; object-fit: contain;
  border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.lb-caption {
  color: var(--muted); font-size: .85rem; margin-top: .7rem;
  text-align: center; max-width: 80ch;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2;
  background: rgba(34, 43, 58, .8); color: var(--ivory);
  border: 1px solid var(--line); border-radius: 50%;
  width: 46px; height: 46px; font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--gold); color: var(--navy); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

.lb-thumbs {
  display: flex; gap: .6rem; margin-top: 1.1rem;
  max-width: 92vw; overflow-x: auto; padding: .3rem;
  scrollbar-width: thin;
}
.lb-thumb {
  flex: none; width: 76px; height: 56px;
  background-size: cover; background-position: center;
  border: 2px solid transparent; border-radius: 5px;
  cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s;
}
.lb-thumb:hover { opacity: .85; }
.lb-thumb.attiva { border-color: var(--gold); opacity: 1; }

@media (max-width: 700px) {
  .lb-prev, .lb-next { width: 40px; height: 40px; }
  .lb-img { max-height: 58vh; }
}

/* Etichette Prima/Dopo: anche in galleria e nell'overlay ingrandito */
.gallery-row figure { position: relative; }
.gallery-row .ba-tag { top: .6rem; left: .6rem; }
.lb-stage { position: relative; }
.lb-tag { z-index: 2; }
