/* === Google Font elegante === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap');

/* === Base globale === */
*{box-sizing:border-box}
html,body,button,input,select,textarea{margin:0;padding:0;font-family:"Playfair Display",serif;line-height:1.55;color:#222}
a{color:#b00020;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;display:block}
.container{width:min(1200px,94%);margin:0 auto}

/* Header / Navbar (desktop) */
.site-header{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid #eee}
.header-row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;gap:16px;position:relative}
.brand__img{height:56px;width:auto}
.main-nav{display:flex;gap:14px;flex-wrap:wrap}
.nav-pill{display:inline-block;padding:8px 14px;border-radius:999px;border:1px solid #e6e6e6;background:#fff;color:#333;font-weight:500}
.nav-pill.active{background:#d21c2b;color:#fff;border-color:#d21c2b}
.lang-switch{display:flex;align-items:center;gap:8px}
.flag{height:20px;width:auto}

/* Hero */
.hero{position:relative;overflow:hidden;background:#0f2236}
.hero__video{width:100%;height:72vh;min-height:360px;object-fit:cover;opacity:.9;display:block}
.hero__overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff;padding:2rem}
.hero__tagline{margin-top:12px;font-size:clamp(18px,2.5vw,26px);font-style:italic;text-shadow:0 2px 8px rgba(0,0,0,.35)}

/* Sezioni / card / slider / footer (come avevi) */
.section{padding:42px 0}
.h2{font-size:clamp(22px,2.6vw,28px);margin:0 0 12px}
.area-card{background:#fff;border:1px solid #ececec;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(0,0,0,.03)}
.grid-2{display:grid;grid-template-columns:1fr;gap:20px}
@media (min-width:900px){.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
.slider{position:relative;height:240px;overflow:hidden;border-radius:12px;background:#000}
.slider img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:opacity .6s ease;opacity:0}
.slider img:first-child{opacity:1}
@media (min-width:900px){.slider{height:340px}}
.slider.slider-lg{height:340px}
@media (min-width:900px){.slider.slider-lg{height:480px}}

.footer{background:#fff;border-top:1px solid #eee;padding:18px 44px;min-height:76px;position:relative}
.footer .footer-wrap{display:flex;align-items:center;justify-content:center;gap:12px;text-align:center;position:relative}
.footer .copyright{margin:0 auto;color:#555;font-size:14px;line-height:1.4}
.footer .dot{margin:0 6px;color:#bbb}
.footer img.partner24-badge{max-height:42px;position:absolute;right:0;top:50%;transform:translateY(-50%)}

/* ====== RESPONSIVE ONLY (mobile/tablet) ====== */
img[loading="lazy"]{content-visibility:auto}

@media (max-width:768px){
  .header-row{gap:10px;padding:10px 0}
  .brand__img{height:48px}

  /* NAV: versione hamburger (pancake) */
  .hamburger{display:block;cursor:pointer;font-size:28px;color:#900;position:absolute;right:14px;top:12px;z-index:60}
  .main-nav{display:none;flex-direction:column;position:absolute;top:60px;left:0;width:100%;background:#fff;box-shadow:0 8px 20px rgba(0,0,0,.06);padding:10px 14px;row-gap:10px;border-top:1px solid #eee}
  .main-nav.active{display:flex}
  .nav-pill{padding:10px 14px;line-height:22px;font-size:15px}
  .lang-switch{position:absolute;right:58px;top:14px}

  /* Migliora leggibilità titolo su hero (SVG) e contrasto video */
  .hero__video{height:60vh;min-height:300px}
  .hero::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.15),rgba(0,0,0,.45))}
  .hero__overlay svg{filter:drop-shadow(0 2px 10px rgba(0,0,0,.7));width:min(460px,70vw)}
  .hero__tagline{font-size:clamp(16px,4.2vw,20px)}

  /* Cover titoli (pagine interne) */
  .cover{height:38vh;min-height:240px}
  .cover__title{color:#fff;text-shadow:2px 2px 6px rgba(0,0,0,.8);font-size:clamp(22px,6.5vw,30px);font-weight:700}

  /* Card & griglie */
  .section{padding:34px 0}
  .grid-2{gap:16px}
  .area-card,.card,.pro-card,.cert-card{padding:16px;border-radius:12px}
  .area-title,.pro-name,.cert-title{font-size:1.1rem}
  .pro-card{grid-template-columns:120px 1fr;gap:14px}
  .pro-photo{width:120px;height:120px}
  .slider{height:280px}
  .slider.slider-lg{height:340px}

  /* Footer centrato su mobile */
  .footer{padding:18px}
  .footer .footer-wrap{flex-direction:column;gap:8px}
  .footer img.partner24-badge{position:static;transform:none;margin-top:8px}
}

/* Smartphone piccoli */
@media (max-width:480px){
  .nav-pill{font-size:14px;padding:9px 12px;line-height:20px}
  .brand__img{height:44px}
  .hero__video{height:56vh;min-height:260px}
  .btn,.btn-red,.btn-pill,.btn-att,.btn-view{padding:10px 16px;line-height:22px;font-size:15px}
}
/* === FIX DESKTOP + CONTATTI + HAMBURGER === */

/* 0) Riquadri grigi attorno alla pagina (desktop e mobile) */
html{background:#d9d9d9!important}
body{background:transparent!important}

/* 1) Hamburger: per default nascosto (desktop) */
.hamburger{display:none}

/* 2) Regole base COVER (pagine interne) */
.cover{
  position:relative;
  height:42vh;                 /* altezza desktop */
  min-height:280px;
  overflow:hidden;
  background:#0f2236 center/cover no-repeat;
}
.cover__inner{
  position:absolute; inset:0;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  color:#fff; padding:2rem; z-index:1;
}
.cover__title{font-size:clamp(28px,4.5vw,42px);margin:0}
.cover__rule{width:72px;height:4px;background:#c8102e;border-radius:2px;margin-top:14px}

/* 3) Regole base CONTATTI (card, form, mappe) */
.card, .form{
  background:#fff; border:1px solid #ececec;
  border-radius:14px; padding:16px 18px;
  box-shadow:0 2px 10px rgba(0,0,0,.03);
}
.mapwrap{position:relative;height:300px;border-radius:12px;overflow:hidden;margin-top:10px}
.mapwrap iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* 4) Solo mobile/tablet (<= 768px): hamburger ON, cover più compatta */
@media (max-width:768px){
  .hamburger{display:block;cursor:pointer;font-size:28px;color:#900;position:absolute;right:14px;top:12px;z-index:60}
  .main-nav{display:none;flex-direction:column;position:absolute;top:60px;left:0;width:100%;background:#fff;box-shadow:0 8px 20px rgba(0,0,0,.06);padding:10px 14px;row-gap:10px;border-top:1px solid #eee}
  .main-nav.active{display:flex}

  .cover{height:38vh;min-height:240px}
  .cover__title{font-size:clamp(22px,6.5vw,30px);text-shadow:2px 2px 6px rgba(0,0,0,.8);font-weight:700}
  .card, .form{padding:16px;border-radius:12px}
}

/* 5) Smartphone piccoli (<= 480px): bottoni più comodi */
@media (max-width:480px){
  .btn,.btn-red,.btn-pill,.btn-att,.btn-view{
    padding:10px 16px;line-height:22px;font-size:15px
  }
}
/* Cover Contatti IT + EN */
.cover--contact {
  background:#0f2236 url('/assets/img/contatti-cover.jpg') center 80%/cover no-repeat;
  position:relative;
}
.cover--contact::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.12), rgba(0,0,0,.38));
}
/* === CONTATTI: form + cover (IT + EN) === */

/* 1) Form elegante (vale per IT/EN perché usa #contactForm) */
#contactForm{
  background:#fff; border:1px solid #ececec; border-radius:14px;
  padding:16px 18px; box-shadow:0 2px 10px rgba(0,0,0,.03);
}
#contactForm .row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:700px){ #contactForm .row{grid-template-columns:1fr} }
#contactForm .field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
#contactForm input,#contactForm select,#contactForm textarea{
  padding:10px 12px; border:1px solid #ddd; border-radius:10px; font:inherit
}
#contactForm textarea{min-height:120px; resize:vertical}
#contactForm .privacy-consent{display:flex;align-items:flex-start;gap:10px;margin:10px 0 4px}
#contactForm .btn{
  display:inline-block;background:#b00020;color:#fff;border:0;border-radius:999px;
  padding:10px 18px;font-weight:600;cursor:pointer
}

/* 2) Cover contatti: sposta l’inquadratura verso il pavimento e aggiungi leggero gradiente
      (funziona sia se la cover è in linea con style="…contatti-cover.jpg" sia se usi .cover--contact) */
section.cover[style*="contatti-cover.jpg"],
.cover--contact{
  background-position: center 80% !important;
  position:relative;
}
section.cover[style*="contatti-cover.jpg"]::after,
.cover--contact::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.12), rgba(0,0,0,.38));
}
/* ====== SOLO CSS: menu mobile compatto + fix Team ====== */

/* Desktop: nessuna modifica al menu */
@media (min-width: 769px){
  /* nascondi eventuale icona hamburger definita altrove */
  .hamburger{display:none!important}
}

/* Mobile & tablet (<=768px): menu su 2 righe, centrato e cliccabile */
@media (max-width: 768px){
  .header-row{gap:10px;padding:10px 0}
  .brand__img{height:48px}

  /* Mostra SEMPRE il menu (niente JS), ma in forma compatta */
  .main-nav{
    display:flex !important;               /* visibile sempre */
    flex-wrap:wrap;                         /* manda a capo */
    justify-content:center;                 /* centrato */
    gap:10px 10px;                          /* spazi regolari */
    position:static;                        /* niente posizionamenti assoluti */
    background:transparent;                 /* fondo pulito */
    box-shadow:none; border-top:0; padding:0;
  }
  .nav-pill{
    padding:10px 14px; line-height:22px; font-size:15px;
    border-radius:999px;
  }
  .lang-switch{position:static; margin-left:6px}
}

/* ====== Card Team su mobile: allineamento foto/pulsanti/testo ====== */
@media (max-width: 768px){
  .pro-card{
    grid-template-columns:110px 1fr; gap:14px;
    padding:16px; border-radius:12px;
  }
  .pro-photo{width:110px;height:110px;border-radius:12px;object-fit:cover;object-position:top center}
  .pro-name{font-size:1.15rem;margin:0 0 6px}
  .pro-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 10px}
  .btn-chip{padding:8px 12px;line-height:20px;font-weight:600;border-radius:999px}
}
/* === MENU HAMBURGER VERO (override) – valido per tutto il sito === */

/* Desktop: hamburger nascosto */
@media (min-width:769px){
  .hamburger{display:none!important}
}

/* Mobile/Tablet: hamburger visibile, pill nascosti finché non si apre il menu */
@media (max-width:768px){
  .hamburger{
    display:block!important; cursor:pointer; font-size:28px; color:#900;
    position:absolute; right:14px; top:12px; z-index:60;
    background:transparent; border:0; line-height:1;
  }
  /* chiude pill “sempre visibili” di eventuali patch precedenti */
  .main-nav{
    display:none!important;              /* nascosti di default */
    flex-direction:column;
    position:absolute; top:60px; left:0; width:100%;
    background:#fff; border-top:1px solid #eee;
    box-shadow:0 8px 20px rgba(0,0,0,.06);
    padding:10px 14px; row-gap:10px; z-index:55;
  }
  .main-nav.active{ display:flex!important }   /* si apre */
  .nav-pill{ padding:10px 14px; line-height:22px; font-size:15px; border-radius:999px }
  .lang-switch{ position:absolute; right:58px; top:14px }
}
/* Fix layout cards Professionisti su mobile */
@media (max-width: 768px) {
  .pro-card {
    display: grid;
    grid-template-columns: 100px 1fr; /* foto a sinistra, testo a destra */
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
  }

  .pro-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
  }

  .pro-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap; /* i pulsanti vanno su due righe se serve */
  }

  .pro-actions .btn {
    flex: 1 1 auto; /* pulsanti più uniformi */
    text-align: center;
  }
}
