/* =========================================================
   VARIABILI GLOBALI
========================================================= */
:root{
  --container-max: 1280px;

  /* NAV */
  --nav-h: 96px;            
  --nav-pad-left: 8px;      
  --nav-pad-right: 24px;    
  --brand-gap: 12px;        
  --logo-h: 100px;          
  --brand-font: 20px;       

  /* Shifts personalizzati */
  --brand-left-shift: 310px;  
  --call-right-shift: 270px;  

  /* Box telefono */
  --phone-ic: 30px;
  --call-pad-y: 10px;
  --call-pad-x: 16px;

  /* HERO */
  --hero-h: 560px;
}

/* =========================================================
   RESET BASE
========================================================= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: #0b2239;
  background: #fff;
  line-height: 1.45;
}

/* =========================================================
   CONTENITORE
========================================================= */
.container{
  width: min(var(--container-max), 94vw);
  margin-inline: auto;
}

/* =========================================================
   HEADER / NAVBAR
========================================================= */
.site-header{
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  position: sticky; /* rimane fissata */
  top: 0;
  z-index: 1000;
}

/* Griglia interna nav: logo | menu | telefono */
.nav{
  height: var(--nav-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding-left: var(--nav-pad-left);
  padding-right: var(--nav-pad-right);
}

/* Brand (logo + testo) */
.brand{
  display: inline-flex;
  align-items: center;
  gap: var(--brand-gap);
  margin-left: calc(-1 * var(--brand-left-shift)); /* shift a sinistra */
}
.brand__logo{
  height: var(--logo-h);
  width: auto;
  object-fit: contain;
}
.brand__name{
  font-weight: 800;
  font-size: var(--brand-font);
  letter-spacing: .4px;
  white-space: nowrap;
}

/* Menu centrale */
.menu{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.menu a{
  font-weight: 600;
  padding: 8px 4px;
}
.menu a:hover{ color: #0a66c2; }

/* Box telefono */
.call-us{
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: var(--call-pad-y) var(--call-pad-x);
  border-radius: 10px;
  border: 1px solid #e1e7f0;
  background: #f3f6fb;
  white-space: nowrap;
  margin-right: calc(-1 * var(--call-right-shift));
}
.phone-ic{
  width: var(--phone-ic);
  height: var(--phone-ic);
  fill: #0a66c2;
  flex-shrink: 0;
}
.call-us__label{ font-size: 12px; line-height: 1.1; color:#385273; }
.call-us__num{ font-size: 16px; font-weight: 800; letter-spacing: .35px; }

/* =========================================================
   HERO SECTIONS
========================================================= */

/* Base comune */
.hero {
  position: relative;
  min-height: var(--hero-h, 520px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Primo hero (quello generico senza modifier) */
.hero:not([class*="hero--"]) {
  background-image: url('../immagini/sfondo.jpeg');
}

/* Hero specifici */
.hero--immigrazione   { background-image: url('../immagini/immigrazione.jpg'); }
.hero--ricongiungimenti { background-image: url('../immagini/ricongiugimento.jpg'); }
.hero--traduzioni     { background-image: url('../immagini/trafuzioni.jpg'); }
.hero--patronato      { background-image: url('../immagini/PATRONATO.jpg'); }

/* Overlay hero */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.65));
  z-index: 0;
}

/* Contenuto sopra overlay */
.hero__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 950px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}

/* Spaziatura tra hero */
.hero + .hero { margin-top: 40px; }

/* Tipografia hero */
.hero__eyebrow{
  margin-bottom: 8px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .95;
}
.hero__title{
  margin: 8px 0 10px;
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.05;
  font-weight: 900;
}
.hero__subtitle{
  max-width: 820px;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.55;
  opacity: .96;
  margin-bottom: 30px; /* aggiungi spazio sotto al testo */
}

/* Bottoni */
.btn-primary {
  display: inline-block;
  margin-top: 0px;
  padding: 12px 28px;
  background: #0a66c2;
  color: #fff;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.25s ease;
}
.btn-primary:hover {
  background: #084f97;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}
/* Sposta in alto SOLO il bottone del primo hero */
.hero:not([class*="hero--"]) .btn-primary {
  transform: translateY(-14px);
}

/* Mantieni l’effetto hover coerente */
.hero:not([class*="hero--"]) .btn-primary:hover {
  transform: translateY(-16px);
}

/* =========================================================
   HERO PATRONATO (con card interne)
========================================================= */
.hero--patronato {
  background: url('immagini/patronato-bg.jpg') center/cover no-repeat;
  color: #fff;
  padding: 100px 20px;
  position: relative;
  margin-bottom: 0;
}
.hero--patronato .hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1;
}
.hero--patronato .hero__inner {
  position: relative;
  z-index: 2;
}

/* Griglia card */
.ph-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

/* Card base */
.ph-card {
  background: #ffffff;
  color: #0b1220;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  padding: 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* animazione hover */
}

/* Card hover */
.ph-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

/* Card centrale */
.ph-card--highlight { box-shadow: 0 16px 35px rgba(0,0,0,.3); }

/* Tipografia card */
.ph-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.2;
}
.ph-card p {
  margin: 0;
  opacity: .85;
  line-height: 1.5;
}

/* Testo nota sotto le card */
.ph-note {
  margin-top: 16px;
  text-align: center;
  font-size: .95rem;
  opacity: .9;
}

/* Glass effect opzionale */
.ph-card--glass {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* Override finale Patronato (forzato) */
.hero.hero--patronato{
  background: url('../immagini/PATRONATO.jpg') center/cover no-repeat !important;
  min-height: var(--hero-h, 520px);
}

/* =========================================================
   STRIP CLAIM & FOOTER
========================================================= */
.claim{
  background: #0b4a6f;
  color: #fff;
  padding: 26px 0;
  text-align: center;
}
.claim h2{ margin: 0; font-size: clamp(18px, 2.4vw, 28px); }

.footer{
  background: #0b4a7a;
  color: white;
  padding: 20px 0;
  font-size: 14px;
  text-align: center;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.footer__left p { margin: 2px 0; }
.footer__links a {
  color: white;
  margin-left: 15px;
  text-decoration: none;
}
.footer__links a:hover { text-decoration: underline; }
.footer__social a { margin-left: 10px; display: inline-block; }
.footer__social img {
  width: 30px;
  height: 30px;
  filter: none;
}

/* =========================================================
   SERVIZI - CARDS PRINCIPALI
========================================================= */
.servizi-home {
  padding: 60px 0;
  background: #f9fafc;
}
.servizi-home .container {
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.servizio-card {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}
.servizio-card:nth-child(even) { flex-direction: row-reverse; }
.servizio-img {
  flex: 0 0 240px;
  height: 200px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}
.servizio-text h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #0b2239;
}
.servizio-text p {
  margin-bottom: 15px;
  color: #4a6076;
}
.servizio-text a {
  display: inline-block;
  padding: 10px 18px;
  background: #0a66c2;
  color: #fff;
  font-weight: bold;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.servizio-text a:hover { background: #084f97; }
.servizi-btn-finale {
  text-align: center;
  padding: 45px;
  border-top: 1px solid transparent; /* previene collasso, non si vede */
}

/* =========================================================
   HAMBURGER MENU MOBILE
========================================================= */
:root{ --nav-h: 96px; }

/* --- HAMBURGER --- */
.hamburger{
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid #e1e7f0; background:#f3f6fb;
  border-radius: 10px; cursor: pointer;
  position: relative; z-index: 1001; /* sopra overlay */
}
.hamburger__bar{
  display:block; width:22px; height:2px; background:#0b2239;
  margin:3px 0; transition: transform .2s ease, opacity .2s ease;
}
/* animazione a X */
body.menu-open .hamburger__bar:nth-child(1){ transform: translateY(5px) rotate(45deg); }
body.menu-open .hamburger__bar:nth-child(2){ opacity:0; }
body.menu-open .hamburger__bar:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }

/* overlay scuro quando il menu è aperto */
body.menu-open::before{
  content:""; position:fixed; inset: var(--nav-h) 0 0 0;
  background: rgba(0,0,0,.3); z-index: 900;
}

/* --- MENU MOBILE --- */
@media (max-width: 1024px){
  .hamburger{ display:flex; }

  /* menu chiuso di default */
  .menu{
    display:none; 
    top: var(--nav-h); left:0; right:0;
    background:#fff; padding:14px 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
    z-index:1000;
    flex-direction: column; gap:12px;
    justify-content: flex-start; align-items: center;
  }
  .menu a{ padding:12px 4px; font-size:18px; }

  /* quando il body ha menu-open → mostra menu */
  body.menu-open .menu{ display:flex; }
}

/* su desktop il menu è visibile e l'hamburger sparisce */
@media (min-width: 1025px){
  .menu{ display:flex; position:static; gap:22px; }
  .hamburger{ display:none; }
}


/* =========================================================
   RESPONSIVE BREAKPOINTS
========================================================= */
@media (max-width: 900px){
  .nav{
    grid-template-columns: auto auto;
    row-gap: 10px;
  }
  .menu{
    grid-column: 1 / -1;
    order: 3;
    justify-content: center;
  }
  .call-us{ justify-self: end; }

  /* layout mobile nav */
  .nav{
    grid-template-columns: auto 1fr auto auto;
  }
  .call-us{ grid-column: 3; }
  .hamburger{
    display: inline-flex;
    grid-column: 4;
    justify-self: end;
  }
  /* menu mobile */
  .menu{
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
    z-index: 1000;
    flex-direction: column;
    gap: 12px;
  }
  .menu a{
    padding: 12px 4px;
    font-size: 18px;
  }
  body.menu-open .menu{ display: flex; }
}

@media (max-width: 720px){
  :root{
    --brand-left-shift: 0px;
    --call-right-shift: 0px;
    --nav-pad-left: 12px;
    --nav-pad-right: 12px;
  }
  .brand__name{ display: none; }
  .brand__logo{ height: 72px; }
  .menu{ gap: 12px; }
  .call-us{ padding: 8px 12px; }
  .phone-ic{ width: 24px; height: 24px; }
}

@media (max-width: 992px) {
  .ph-grid { grid-template-columns: 1fr 1fr; }
  .ph-card--highlight { transform: none; }
}
@media (max-width: 640px) {
  .ph-grid { grid-template-columns: 1fr; }
}

/* Bottone WhatsApp */
.btn-whatsapp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px 16px;
  background:#25D366;
  color:#fff;
  font-weight:800;
  border-radius:10px;
  text-decoration:none;
  box-shadow:0 6px 16px rgba(37,211,102,.25);
  transition:.2s transform, .2s box-shadow, .2s background;
}
.btn-whatsapp:hover{
  background:#1ebe5d;
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(37,211,102,.35);
}
.btn-whatsapp svg{ fill:#fff; }
