/* =========================
   RESET + VARIABILI
   ========================= */
:root{
  --bg:#D8DEE6;           /* grigio di base */
  --ink:#0F172A;          /* testo principale */
  --muted:#475569;        /* testo attenuato */
  --brand:#1E3A8A;        /* blu brand */
  --accent:#2563EB;       /* accento */
  --card:#FFFFFF;         /* card */
  --border:rgba(15,23,42,.12);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.6;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
.container{max-width:1200px;margin:0 auto;padding:0 16px}


/* =========================
   HEADER 2 RIGHE + LOGO
   ========================= */
.header{
  position:sticky; top:0; z-index:100;
  background:#fff;
  border-bottom:1px solid var(--border);
}
.header-inner{padding:12px 0}
.header-top{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand img{height:72px; width:auto}            /* logo grande con margine naturale */
#mobile-menu{display:none}

/* griglia 2x6: fino a 12 voci distribuite su due righe */
.nav-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px 18px;
  margin-top:12px;
  align-items:center;
}
.nav-grid a{
  justify-self:start;
  font-weight:700;
  font-size:16px;
  color:#0f172a;
  white-space:nowrap;
}
.nav-grid a:hover,
.nav-grid a[aria-current="page"]{color:var(--brand)}

/* lingue a tendina verticale */
.lang{position:relative}
#lang-toggle{display:inline-flex;align-items:center;gap:8px}
#lang-menu{
  position:absolute; right:0; top:calc(100% + 8px);
  background:#fff; border:1px solid var(--border); border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  padding:8px; display:none;
}
#lang-menu .badge{
  display:block; width:100%; text-align:left;
  padding:8px 10px; border:1px solid var(--border); border-radius:10px; background:#fff;
  font-weight:700; margin:4px 0;
}

/* Mobile header */
@media (max-width:1023.98px){
  .brand img{height:56px}
  #mobile-menu{
    display:inline-flex; align-items:center; justify-content:center;
    background:#e2e8f0; border:0; border-radius:10px; padding:8px; cursor:pointer;
  }
  .nav-grid{display:none}
  .nav-grid.show{
    display:grid; grid-template-columns:repeat(3, minmax(0,1fr));
    margin-top:12px;
  }
}

/* Normalizza larghezza header su tutte le pagine */
.header-inner{
  max-width:1200px;
  margin:0 auto;
  padding:12px 16px;
}
.header-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand img{height:64px;width:auto}

/* Fissa larghezza header su tutte le pagine */
.header-inner{
  max-width:1200px;
  margin:0 auto;
  padding:12px 16px;
}


/* =========================
   HERO HOME + HERO DEFAULT
   ========================= */
/* Home: cielo → grigio, immagine partners.png sopra */
.hero-home{
  position:relative;
  background:linear-gradient(180deg,#7aa5d8 0%, #cbd5e1 40%, #cbd5e1 100%);
}
.hero-home::before{
  content:""; position:absolute; inset:0;
  background:url('/images/partners.png') center/cover no-repeat;
  opacity:.88;
}
.hero-inner{
  position:relative; z-index:1;
  min-height:58vh;
  display:flex; align-items:flex-end; justify-content:center; text-align:center;
  padding:0 16px 64px;
}
.hero-inner h1{
  font-family:"Playfair Display",Georgia,serif;
  font-weight:800; color:#fff; margin:0 0 12px;
  font-size:48px; line-height:1.1;
}
.hero-inner .lead{
  color:#f1f5f9; font-size:18px; line-height:1.7; max-width:80ch; margin:0 auto;
}
@media(min-width:768px){ .hero-inner h1{font-size:56px} .hero-inner .lead{font-size:20px} }
@media(min-width:1024px){ .hero-inner h1{font-size:64px} }

/* Pagine interne: immagine di copertina + overlay leggero */
.hero-default{
  position:relative;
  background:#cbd5e1;
}
.hero-default::before{
  content:""; position:absolute; inset:0;
  background:var(--hero-img, url('/images/partners2.png')) center/cover no-repeat;
  opacity:.9;
}
.hero-default::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.35));
}
.hero-default .hero-inner h1{color:#fff}
.hero-default .hero-inner .lead{color:#e5e7eb}


/* =========================
   SEZIONI E TESTI
   ========================= */
.section{padding:40px 0}
.home-block{max-width:1000px;margin:0 auto}
.home-block h3{font-size:22px;font-weight:800;margin:18px 0 8px}
.home-block h3.big{font-size:24px}
.home-block p{margin:0 0 12px;color:#0f172a}

.flag-sm{ height:22px; width:auto; vertical-align:middle; margin-right:10px }
.country-title a{ text-decoration:none; color:#0f172a }
.country-title a:hover{ color:#1e3a8a }

/* =========================
   CARD STANDARD + LAYOUT
   ========================= */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
  padding:20px;
}
.cards-grid{display:grid; gap:24px}
@media(min-width:768px){ .cards-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media(max-width:767.98px){ .cards-grid{grid-template-columns:1fr} }


/* =========================
   FORM ELEMENTI
   ========================= */
.input, .textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px; background:#fff; color:#0f172a;
}
.textarea{min-height:160px; resize:vertical}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--accent); color:#fff; border:0; border-radius:12px;
  padding:12px 18px; font-weight:700; cursor:pointer;
}
.helper{font-size:12px;color:#64748b}
.form-note{margin-left:12px;font-size:12px;font-weight:700}


/* =========================
   FOOTER MINIMO
   ========================= */
.footer{
  border-top:1px solid var(--border);
  background:#F3F4F6; color:#475569;
}
.footer-inner{
  padding:28px 16px; text-align:center;
}
.footer a{color:#0f172a; font-weight:700}
.footer a:hover{color:var(--brand)}


/* =========================
   BACK TO TOP
   ========================= */
.backtotop{
  position:fixed; right:16px; bottom:16px; z-index:120;
  background:#0f172acc; color:#fff; border:0; border-radius:999px;
  padding:12px; display:none; cursor:pointer;
  box-shadow:0 6px 24px rgba(0,0,0,.18);
}
.backtotop.show{display:inline-flex}


/* =========================
   ACCESSIBILITÀ
   ========================= */
:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}