/* =========================================================
   Pasquale Audia — Ditta Edile
   Palette dal logo:
   arancione #E8611C · navy #1B3A5C · crema #FBF7EF
   ========================================================= */

:root {
  --orange: #E8611C;
  --orange-dark: #cc5215;
  --navy: #1B3A5C;
  --navy-dark: #142c46;
  --cream: #FBF7EF;
  --white: #ffffff;
  --text: #333a42;
  --muted: #6b7480;
  --line: #e7e0d4;
  --wa: #25D366;
  --wa-dark: #1da851;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(27, 58, 92, .10);
  --shadow-lg: 0 18px 50px rgba(27, 58, 92, .18);
  --header-h: 76px;
  --container: 1180px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { color: var(--navy); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .96rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 20px; height: 20px; fill: currentColor; }

.btn-lg { padding: 15px 30px; font-size: 1.02rem; }

.btn-whatsapp { background: var(--wa); color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, .35); }
.btn-whatsapp:hover { background: var(--wa-dark); }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-outline-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.7); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(251, 247, 239, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--navy); font-size: 1.08rem; letter-spacing: -.01em; }
.brand-text small { color: var(--orange); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.nav-list { display: flex; gap: 26px; }
.nav-link {
  font-weight: 600;
  color: var(--navy);
  font-size: .97rem;
  position: relative;
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .25s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: var(--orange); }

.nav-cta { padding: 9px 18px; font-size: .9rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px; height: 22px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 3px; width: 100%;
  background: var(--navy); border-radius: 3px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(20,44,70,.88) 0%, rgba(27,58,92,.72) 45%, rgba(232,97,28,.45) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 760px; padding-top: 30px; padding-bottom: 60px; }
.hero-eyebrow {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 20px;
}
.hero-title { color: #fff; font-size: clamp(2rem, 5.2vw, 3.5rem); margin-bottom: 18px; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 620px; margin-bottom: 32px; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 110px) 0; }
.section-alt { background: var(--white); }

.section-head { max-width: 720px; margin: 0 auto clamp(38px, 5vw, 60px); text-align: center; }
.eyebrow {
  color: var(--orange);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .8rem;
  margin-bottom: 12px;
}
.section-title { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 16px; }
.section-lead { color: var(--muted); font-size: 1.08rem; }

/* ---------- Gallery ---------- */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.tab-btn {
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  padding: 11px 30px;
  border-radius: 50px;
  cursor: pointer;
  font-size: .98rem;
  transition: all .22s var(--ease);
}
.tab-btn:hover { border-color: var(--orange); color: var(--orange); }
.tab-btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.gallery-panel { display: none; }
.gallery-panel.is-active { display: block; }

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.gallery-item {
  border: none; padding: 0; cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--line);
  box-shadow: var(--shadow);
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.gallery-item::after {
  content: "🔍";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 1.6rem;
  background: rgba(27,58,92,.45);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover::after { opacity: 1; }

.grid-video {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.video-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.video-item video { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; background:#000; }

/* ---------- Chi siamo ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.about-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-text p { color: var(--text); margin-bottom: 16px; }
.about-text .eyebrow { text-align: left; }
.about-text .section-title { text-align: left; }

.values { margin-top: 26px; display: grid; gap: 16px; }
.values li { display: flex; gap: 14px; align-items: flex-start; }
.value-ico {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(232,97,28,.12);
  color: var(--orange);
  border-radius: 12px;
  font-size: 1.1rem;
}
.values strong { color: var(--navy); }

/* ---------- Chi siamo: contenuto espandibile ---------- */
.about-toggle { margin-top: 26px; }
.about-more {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  animation: aboutFade .35s var(--ease);
}
@keyframes aboutFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.about-more-title { font-size: 1.15rem; margin-bottom: 16px; }
.services-list { display: grid; gap: 12px; }
.services-list li { display: flex; gap: 12px; align-items: flex-start; }
.svc-ico {
  flex: 0 0 auto;
  margin-top: .2em;
  color: var(--orange);
  font-size: .7rem;
  line-height: 1.4;
}
.services-list strong { color: var(--navy); }

/* ---------- Dove siamo / Mappa ---------- */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.map-frame { width: 100%; height: 440px; border: 0; display: block; }
.map-link { position: absolute; top: 16px; right: 16px; background: var(--white); box-shadow: var(--shadow); }

/* ---------- Contatti ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.section-alt .contact-card { background: var(--cream); }
a.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--orange); }
.contact-ico {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
}
.contact-card--wa .contact-ico { background: var(--wa); }
.contact-body { display: flex; flex-direction: column; line-height: 1.35; }
.contact-body strong { color: var(--navy); font-size: 1.02rem; }
.contact-body span { color: var(--muted); font-size: .95rem; word-break: break-word; }

.contact-cta { text-align: center; margin-top: 44px; }
.cta-logo {
  display: block;
  width: 220px;
  max-width: 64%;
  height: auto;
  margin: 40px auto 0;
  padding: 18px;
  background: #FBF7EF;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.85);
  padding: 48px 0 28px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.footer-brand strong { color: #fff; font-size: 1.1rem; }
.footer-brand span { color: var(--orange); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { font-weight: 600; font-size: .95rem; transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--orange); }
.footer-legal { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; text-align: right; color: rgba(255,255,255,.6); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15,25,38,.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lb-img { max-width: 90vw; max-height: 86vh; border-radius: 8px; box-shadow: var(--shadow-lg); object-fit: contain; }
.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: var(--orange); }
.lb-close { top: 20px; right: 24px; width: 48px; height: 48px; font-size: 2rem; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.5rem; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* ---------- WhatsApp Floating ---------- */
.wa-float {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 58px; height: 58px;
  background: var(--wa);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 10px 25px rgba(37,211,102,.5);
  z-index: 900;
  animation: wa-pulse 2.4s infinite;
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 480px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 10px 0 20px;
    transform: translateY(-140%);
    transition: transform .35s var(--ease);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .nav-list { flex-direction: column; gap: 0; padding: 0 20px; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-link { display: block; padding: 15px 0; font-size: 1.05rem; }
  .nav-link::after { display: none; }
  .nav-cta { margin: 16px 20px 0; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-legal { text-align: center; }
}

@media (max-width: 560px) {
  :root { --header-h: 66px; }
  .brand-text small { font-size: .68rem; }
  .brand-logo { width: 40px; height: 40px; }
  .hero { min-height: 90vh; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .grid-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .tab-btn { padding: 10px 24px; }
  .map-frame { height: 340px; }
  .lb-nav { width: 44px; height: 44px; }
  .wa-float { width: 52px; height: 52px; bottom: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
