/* ----------------------------------------------------
   RESET E BASE
---------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f4f1eb; /* Beige chiaro tecnico */
  color: #1a1a1a; /* Nero profondo */
  line-height: 1.6;
}

/* Contenitore standard */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ----------------------------------------------------
   HEADER
---------------------------------------------------- */
.header {
  background: #ffffff;
  border-bottom: 3px solid #1a1a1a;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #000;
}

.logo__subtitle {
  font-size: 12px;
  color: #666;
}

.nav {
  display: flex;
  gap: 25px;
}

.nav__link {
  text-decoration: none;
  color: #000;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: 0.2s;
  border-bottom: 2px solid transparent;
}

.nav__link:hover {
  border-bottom: 2px solid #1a1a1a;
}

.nav__cta {
  background: #1a1a1a;
  color: #fff;
  padding: 8px 15px;
  border-radius: 4px;
}

.nav__cta:hover {
  background: #333;
}

/* ----------------------------------------------------
   HERO — versione chiara beige
---------------------------------------------------- */
.hero {
  background: #e9e3d7; /* beige elegante */
  padding: 140px 0;
  border-bottom: 4px solid #1a1a1a;
  color: #1a1a1a;
  position: relative;
}

.hero::after {
  content: none; /* rimuove l'overlay scuro */
}

.hero__content {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  max-width: 600px;
  color: #000;
}

.hero p {
  font-size: 18px;
  margin-top: 15px;
  max-width: 550px;
  color: #333;
}

.btn--primary {
  background: #1a1a1a;
  color: #fff;
}

.btn--ghost {
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
}

.hero__badges span {
  background: #fff;
  color: #000;
  padding: 6px 12px;
  margin-top: 6px;
  border-left: 4px solid #000;
}


/* ----------------------------------------------------
   SEZIONI GENERALI
---------------------------------------------------- */
.section {
  padding: 80px 0;
}

.section--accent {
  background: #e5dfd6; /* Beige tecnico più saturo */
}

.section__header {
  text-align: center;
  margin-bottom: 40px;
}

.section__header h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #000;
}

/* ----------------------------------------------------
   GRID SYSTEM
---------------------------------------------------- */
.grid {
  display: grid;
  gap: 30px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* ----------------------------------------------------
   CARDS TECNICHE
---------------------------------------------------- */
.card {
  background: #ffffff;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 6px 6px 0 #1a1a1a;
  transition: 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 10px 10px 0 #000;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.card__list li {
  margin-left: 20px;
  list-style: square;
}

/* ----------------------------------------------------
   PERCHÉ SCEGLIERCI — FEATURE BOX
---------------------------------------------------- */
.feature {
  background: #fff;
  padding: 25px;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  box-shadow: 6px 6px 0 #1a1a1a;
  text-align: center;
}

.feature__icon {
  font-size: 36px;
  display: inline-block;
  margin-bottom: 10px;
}

/* ----------------------------------------------------
   PROGETTI — CARD CON SFONDO
---------------------------------------------------- */
.project-card {
  border: 2px solid #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 6px 6px 0 #000;
  background: #fff;
}

.project-card__image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.project-card__image--1 { background-image: url('img/progetto1.jpg'); }
.project-card__image--2 { background-image: url('img/progetto2.jpg'); }
.project-card__image--3 { background-image: url('img/progetto3.jpg'); }

.project-card__body {
  padding: 20px;
}

.project-card__tag {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  background: #000;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
}

/* ----------------------------------------------------
   CHI SIAMO
---------------------------------------------------- */
.about-box {
  background: #ffffff;
  padding: 25px;
  border: 2px solid #000;
  border-radius: 8px;
  box-shadow: 6px 6px 0 #000;
}

/* ----------------------------------------------------
   CONTATTI
---------------------------------------------------- */
.contact {
  display: grid;
  gap: 40px;
}

input, textarea, select {
  padding: 10px;
  border: 2px solid #000;
  border-radius: 4px;
  background: #fff;
}

.btn--full {
  width: 100%;
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
.footer {
  background: #1a1a1a;
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.footer a {
  color: #f4f1eb;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}
/* LOGO MIGLIORATO */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo__img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo__title {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.logo__subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ✅ SISTEMAZIONE PULSANTI HOME */
.btn {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* ✅ SISTEMAZIONE BADGE HOME */
.hero__badges span {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding-left: 10px;
  font-weight: 500;
}

/* ✅ RIMOZIONE BLOCCHI NERI */
.hero__badges span::before {
  content: "✓ ";
  color: #000;
  font-weight: bold;
}

/* ====== Professional layout (Servizi) ====== */
:root{
  --bg: #efe7d6;         /* beige */
  --paper: #f6f1e6;
  --text: #111;
  --muted:#5b5b5b;
  --accent:#d8c7a2;      /* beige più forte */
  --border:#1a1a1a;
  --shadow: 0 12px 30px rgba(0,0,0,.08);
}

body{ background: var(--bg); color: var(--text); }

.container{ width:min(1120px, 92%); margin-inline:auto; }

.topbar{
  background:#111; color:#fff; font-size:14px;
}
.topbar a{ color:#fff; text-decoration:none; }
.topbar__inner{ display:flex; justify-content:space-between; align-items:center; padding:10px 0; gap:12px; }
.topbar__left{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dot{ opacity:.6; }

.header--solid{ background: rgba(246,241,230,.88); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,.12); position: sticky; top:0; z-index:50; }
.brand{ display:flex; gap:12px; align-items:center; text-decoration:none; color:inherit; }
.brand__logo{ width:56px; height:auto; }
.brand__title{ font-weight:800; letter-spacing:.5px; }
.brand__subtitle{ color:var(--muted); font-size:14px; }

.nav__link{ text-decoration:none; color:#111; font-weight:600; padding:10px 10px; border-radius:10px; }
.nav__link:hover{ background: rgba(0,0,0,.06); }
.nav__cta{ background:#111; color:#fff !important; padding:10px 14px; }
.nav__cta:hover{ background:#000; }
.nav .is-active{ outline:2px solid rgba(0,0,0,.15); }

.page-hero{ padding: 42px 0 12px; }
.page-hero__grid{ display:grid; grid-template-columns: 1.1fr .9fr; gap:28px; align-items:center; }
.eyebrow{ display:inline-block; background: rgba(0,0,0,.08); padding:6px 10px; border-radius:999px; font-weight:700; letter-spacing:.6px; font-size:12px; }
.page-hero h1{ font-size: clamp(32px, 4vw, 48px); line-height:1.05; margin:14px 0 10px; }
.accent{ background: linear-gradient(transparent 60%, var(--accent) 60%); padding:0 .15em; }
.lead{ font-size:18px; color:#222; max-width: 58ch; }

.actions{ display:flex; gap:12px; flex-wrap:wrap; margin:18px 0 18px; }
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:12px 16px; border-radius:12px; border:2px solid #111; font-weight:800; text-decoration:none; }
.btn--primary{ background:#111; color:#fff; }
.btn--ghost{ background:transparent; color:#111; }
.btn--primary:hover{ background:#000; }
.btn--ghost:hover{ background: rgba(0,0,0,.06); }

.kpi-row{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; margin-top:10px; }
.kpi{ background: rgba(246,241,230,.9); border:1px solid rgba(0,0,0,.12); border-radius:14px; padding:12px; box-shadow: 0 8px 20px rgba(0,0,0,.05); }
.kpi__n{ font-weight:900; }
.kpi__t{ color:var(--muted); font-size:13px; margin-top:2px; }

.page-hero__media{ position:relative; }
.page-hero__img{ width:100%; height: 420px; object-fit:cover; border-radius:18px; box-shadow: var(--shadow); border:1px solid rgba(0,0,0,.12); }
.page-hero__badge{
  position:absolute; left:14px; bottom:14px;
  background: rgba(17,17,17,.92); color:#fff;
  padding:10px 12px; border-radius:12px; font-weight:800;
}

.section{ padding: 34px 0 64px; }
.section__header h2{ font-size: 34px; margin:0 0 6px; }
.section__header p{ margin:0 0 22px; color:var(--muted); }

.services-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:16px;
}
.svc{
  background: var(--paper);
  border:1px solid rgba(0,0,0,.12);
  border-radius:18px;
  padding:18px 18px 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
}
.svc__icon{ font-size:22px; background: rgba(0,0,0,.07); width:44px; height:44px; border-radius:14px; display:flex; align-items:center; justify-content:center; }
.svc h3{ margin:12px 0 8px; }
.svc p{ margin:0 0 10px; color:#2b2b2b; }
.svc ul{ margin:0; padding-left:18px; color:#2b2b2b; }
.svc li{ margin:6px 0; }

.mini-gallery{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:12px;
}
.mini-gallery img{
  width:100%;
  height:160px;
  object-fit:cover;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.12);
  box-shadow: 0 10px 22px rgba(0,0,0,.05);
}

.cta{
  margin-top:18px;
  background:#111;
  color:#fff;
  border-radius:18px;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.cta p{ margin:6px 0 0; opacity:.9; }
.cta .btn{ border-color:#fff; }
.cta .btn--primary{ background:#fff; color:#111; }
.cta .btn--primary:hover{ background:#f4f4f4; }

@media (max-width: 980px){
  .page-hero__grid{ grid-template-columns: 1fr; }
  .page-hero__img{ height: 340px; }
  .services-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mini-gallery{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi-row{ grid-template-columns: 1fr; }
  .cta{ flex-direction:column; align-items:flex-start; }
}
@media (max-width: 560px){
  .services-grid{ grid-template-columns: 1fr; }
}

/* IMMAGINI SERVIZI – FIX DEFINITIVO */
.svc img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  margin-bottom: 15px;
}

/* HERO GRID */
.page-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

/* TESTO */
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

/* IMMAGINE */
.hero-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);

  opacity: 0;
  transform: translateX(60px);
  animation: slideIn 1s ease-out forwards;
}

/* ANIMAZIONE */
@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* MOBILE */
@media (max-width: 900px) {
  .page-hero__grid {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }
}

/* ===== HERO LAYOUT ===== */
.hero {
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-text h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 520px;
}

.hero-image img {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image img {
    margin: 0 auto;
  }
}

/* ===== HERO SLIDER ===== */
.hero-slider{
  position: relative;
  width: 100%;
  max-width: 520px;      /* dimensione simile alla tua foto attuale */
  aspect-ratio: 4 / 3;   /* mantiene proporzione bella */
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  background: #ddd;
}

.hero-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.hero-slide.is-active{
  opacity: 1;
  transform: translateX(0);
}

.hero-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-caption{
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  backdrop-filter: blur(6px);
}

.hero-slider {
  position: relative;
  width: 420px;
  height: 280px;
  overflow: hidden;
  border-radius: 12px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
}

/* --- PROGETTI: area foto dentro il riquadro (non deve allungare la card) --- */
.project-card {
  overflow: hidden;           /* evita che qualcosa “sbordi” */
}

.project-media {
  width: 100%;
  height: 220px;              /* <<< scegli tu l’altezza fissa del riquadro foto */
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #e9e9e9;        /* colore di fallback mentre carica */
}

/* l’immagine (o le slide) devono riempire il box */
.project-media img,
.project-media .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* <<< IMPORTANTISSIMO: la foto si adatta al riquadro */
  display: block;
}

.works-title a {
  color: inherit;
  text-decoration: none;
}

.works-title a:hover {
  text-decoration: underline;
}

.works-link {
  margin-top: 8px;
  font-weight: 500;
}

.works-link a {
  color: #000;
  text-decoration: underline;
}

/* ===========================
   MOBILE (solo smartphone)
   Non cambia la versione desktop
   =========================== */
@media (max-width: 900px){

  /* contenitore più “comodo” su mobile */
  .container{
    width: min(100% - 28px, 1100px);
  }

  /* TOPBAR: va a capo e resta leggibile */
  .topbar__inner{
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .topbar__left{
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar__right{
    opacity: .9;
  }

  /* HEADER: logo + hamburger */
  .header__content{
    gap: 12px;
  }
  .brand{
    gap: 10px;
  }
  .brand__logo{
    max-height: 44px;
    width: auto;
  }
  .brand__title{
    font-size: 14px;
    line-height: 1.2;
  }
  .brand__subtitle{
    font-size: 12px;
  }

  /* MENU MOBILE (hamburger) */
  .nav-toggle{
    display: inline-flex;
  }
  .nav{
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 10px);
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0,0,0,.12);
    z-index: 50;
  }
  .nav.is-open{
    display: flex;
  }
  .nav__link{
    padding: 10px 12px;
    border-radius: 10px;
  }
  .nav__cta{
    text-align: center;
  }

  /* TITOLI */
  h1{
    font-size: 34px;
    line-height: 1.05;
  }
  h2{
    font-size: 28px;
    line-height: 1.1;
  }

  /* GRIGLIE: da 2 colonne a 1 colonna */
  .grid--2{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* HERO: testo sopra, slider sotto (o viceversa) ordinato */
  .page-hero .container,
  .page-hero .container.page-hero__grid,
  .page-hero .container.page-hero__content,
  .page-hero .container.page-hero__inner{
    grid-template-columns: 1fr !important;
  }

  /* slider immagini in hero: pieno e centrato */
  .hero-slider{
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
  .hero-slide img{
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
  }

  /* BOTTONI: uno sotto l’altro */
  .actions{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }
  .btn{
    width: 100%;
    text-align: center;
  }

  /* SERVICES GRID / CARD GRID: 3 colonne -> 1 colonna */
  .services-grid{
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  /* PROGETTI / “alcuni lavori svolti”: cards in colonna */
  .projects-grid,
  .works-grid{
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  /* card quadrate con foto che si adatta (se le usi) */
  .work-card .work-media,
  .project-card .project-media{
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
  }
  .work-card .work-media img,
  .project-card .project-media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* CONTATTI: form a colonna e campi full width */
  form, .form, .contact-form{
    width: 100%;
  }
  input, select, textarea{
    width: 100%;
    max-width: 100%;
  }
  textarea{
    min-height: 120px;
  }

  /* FOOTER: va a colonne */
  .footer__content{
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: left;
  }
  .footer__links{
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
  }
}

.social-link {
  display: inline-block;
  margin-left: 16px;
  font-weight: 600;
  color: #111;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.social-link:hover {
  opacity: 0.7;
}

/* ===== HERO SLIDER ===== */
.hero-slider{
  position: relative;
  width: 100%;
  max-width: 520px;      /* dimensione simile alla tua foto attuale */
  aspect-ratio: 4 / 3;   /* mantiene proporzione bella */
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  background: #ddd;
}

.hero-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.hero-slide.is-active{
  opacity: 1;
  transform: translateX(0);
}

.hero-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-caption{
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  backdrop-filter: blur(6px);
}

/* === SOA BADGE === */
.soa-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}

.soa-badge img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.soa-badge span {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 768px) {
  .soa-badge {
    display: none;
  }
}


.hero-actions{
display:flex;
gap:10px;
flex-wrap:wrap;
align-items:center;
}

.hero-actions .btn{
min-width:140px;
text-align:center;
}


/* PULSANTI CONTATTO NELL'HEADER */

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 15px;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.header-btn:hover {
    opacity: 0.85;
}

/* VERSIONE TELEFONO */

@media (max-width: 768px) {

    .header__content {
        gap: 8px;
    }

    .header-actions {
        gap: 5px;
        margin-right: 5px;
    }

    .header-btn {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 13px;
        border-radius: 7px;
    }

    .header-actions .header-btn:first-child {
        padding-left: 9px;
        padding-right: 9px;
    }

}