:root{
  --bg:#ffffff;
  --alt:#f6f7fb;
  --text:#1f2430;
  --muted:#5b6270;
  --line:rgba(0,0,0,.10);
  --brand:#002d8b;
  --accent:#ffd84d;
  --max:1100px;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.08);
}

*{ 
  box-sizing:border-box; 
}
html,body{ 
  height:100%; 
  scroll-behavior: smooth;
}
body{
  margin:0;
  font-family: system-ui, -apple-system;
  color:var(--text);
  background:#eee;
  overflow-x: clip; /* Sostituisci 'hidden' con 'clip' se presente */
  height: auto;
}

a{ 
  color:inherit; 
  text-decoration:none; 
}
a:hover{ 
  text-decoration:underline; 
}

.container{
  width:min(var(--max), calc(100% - 40px));
  margin:0 auto;
}

.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;
}

.skip-link{
  position:absolute; 
  left:-999px; 
  top:10px;
  background:#000; 
  color:#fff; 
  padding:10px 12px; 
  border-radius:10px;
}
.skip-link:focus{ 
  left:10px; 
  z-index:9999; 
}

/* Header */
.site-header {
  position: -webkit-sticky; /* Supporto Safari */
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 9999 !important; /* Forza l'header sopra ogni altra cosa */
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 220px;
}
.brand-mark{ 
  display:block; 
}
.brand-text{ 
  display:flex; 
  flex-direction:column; 
  line-height:1.05; 
}
.brand-name{ 
  font-weight:800; 
  letter-spacing:.01em;
  text-transform: uppercase;
  font-size: large;
}
.brand-sub{ 
  font-size:13px; 
  color:var(--muted); 
  margin-top:3px; 
  font-size: large;
}

.site-nav{
  display:flex;
  align-items:center;
  gap:18px;
}
.site-nav a{
  padding:10px 8px;
  border-radius:10px;
  font-weight:600;
  color:#2a2f3a;
  transition: background-color 0.3s ease;
}
.site-nav a:hover{
  background:rgba(0,45,139,.06);
  text-decoration:none;
}
.site-nav .nav-cta{
  background:var(--brand);
  color:#fff;
  padding:10px 12px;
}
.site-nav .nav-cta:hover{
  background:var(--brand);
  filter:brightness(1.05);
}

/* Mobile nav toggle */
.nav-toggle{
  display:none;
  background:transparent;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
}
.nav-toggle__bar{
  display:block;
  width:22px;
  height:2px;
  background:#2a2f3a;
  margin:4px 0;
}

/* Container principale */
.legal-hero {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 750px;
  /* Desktop: l'immagine è lo sfondo */
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
              url('img/foto\ elisa\ 3.jpeg') no-repeat;
  background-size: cover;
  background-position: center -12%;
  background-attachment: fixed;
}

.hero-text-content {
  color: #ffffff;
  padding: 50px 5%;
  text-align: center;
  max-width: 650px;
}

.hero-text-content h1 {
  margin-bottom: 15px;
  font-size: 42px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.patrocinio-bold {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.aree-elenco {
  font-size: 18px;
  margin: 0 auto 40px; /* Centra il paragrafo dentro i 650px del contenitore */
  line-height: 1.8;
  color: #f8f9fa;
  text-align: center; /* Testo dell'elenco centrato */
}

/* Bottoni centrati rispetto al blocco di sinistra */
.hero-actions {
  display: flex;
  justify-content: center; 
  gap: 20px;
  flex-wrap: wrap;
}

.hero-actions .btn {
  padding: 14px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  display: inline-block;
}

/* Colori Bottoni */
.btn-primary { background-color: #004a99; color: white; border: 2px solid #004a99; }
.btn-ghost { background-color: transparent; color: white; border: 2px solid white; }

/* Responsive */
@media (max-width: 768px) {
  .legal-hero {
    flex-direction: column; /* Impila gli elementi verticalmente */
    min-height: auto;
    background: none;       /* Toglie lo sfondo dal contenitore */
  }

  /* La foto viene visualizzata sopra il testo */
  .legal-hero::before {
    content: "";
    display: block;
    width: 100%;
    height: 300px; /* Altezza della foto su mobile */
    background: url('img/foto\ elisa\ 3.jpeg') no-repeat;
    background-size: cover;
    background-position: center;
  }

  /* Area del testo sotto la foto */
  .hero-text-content {
    background-color: #ffffff; /* Sfondo bianco */
    max-width: 100%;
    padding: 40px 20px;
  }

  /* Cambio il colore del testo in NERO solo su mobile */
  .hero-text-content h1, 
  .patrocinio-bold, 
  .aree-elenco {
    color: #000000 !important; 
    text-shadow: none; /* Rimuove ombre se presenti */
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  /* Bottone ghost su mobile deve diventare scuro per vedersi sul bianco */
  .btn-ghost {
    border-color: #000000 !important;
    color: #000000 !important;
  }
}

/* Sections */
.section{
  background:#fff;
  padding:70px 0;
}
.section-alt{
  background:var(--alt);
}

.section-head{
  margin-bottom:18px;
}
.section-head h2{
  margin:0;
  font-size: clamp(22px, 2.2vw, 32px);
}
.section-sub{
  margin:8px 0 0;
  color:var(--muted);
}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
  transition: all 0.4s;
}
.card:hover{
    transform: translateY(-10px);
}

.prose p{
  margin:0 0 12px;
  line-height:1.7;
  color:#2a2f3a;
}
.prose p:last-child{ margin-bottom:0; }

.grid-cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
}
.grid-cards .card h3{
  margin:0 0 10px;
  font-size:18px;
}
.grid-cards .card p{
  margin:0;
  color:#2a2f3a;
  line-height:1.65;
}
/* ===== AREE (card + immagine affiancata) ===== */
.areas{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.area-row{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap:16px;
  align-items:stretch;
}

.area-card{
  height:100%;
}

.area-card h3{
  margin:0 0 10px;
  font-size:18px;
}

.area-card p{
  margin:0 0 10px;
  line-height:1.65;
  color:#2a2f3a;
}

.area-card p:last-child{
  margin-bottom:0;
}

.area-media{
  margin:0;
  height:100%;
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  background:#000;
  display:block;
  transition: all 0.4s;
}
.area-media:hover{
  transform: translateY(-10px);
}

.area-media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

/* usa il tuo placeholder già esistente, ma rendilo full-height qui */
.area-media .media-placeholder{
  height:100%;
  min-height:240px;
  border-radius:0;
  border:0;
  box-shadow:none;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
}

/* Responsive */
@media (max-width: 980px){
  .area-row,
  .area-row--reverse{
    grid-template-columns: 1fr;
  }

  /* su mobile facciamo sempre prima la card e poi immagine */
  .area-row--reverse .area-card{ 
    order:0; 
  }
  .area-row--reverse .area-media{ 
    order:1; 
  }

  .area-media .media-placeholder{
    min-height:200px;
  }
}
/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  font-weight:800;
  border:1px solid transparent;
  cursor:pointer;
  text-decoration:none;
  white-space:nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.btn:hover{
    background:rgb(167, 167, 167);
    color: #002d8b;
}
.btn-primary{
  background:var(--brand);
  color:#fff;
}
.btn-primary:hover{ 
  text-decoration:none; 
  filter:brightness(1.05); 
}
.btn-ghost{
  background:rgba(255, 255, 255, 0.438);
  color:var(--brand);
  transition: color 0.3s ease, background-color 0.3s ease;
}
.btn-ghost:hover{ 
    text-decoration:none; 
    background: rgba(0, 47, 255, 0.25);
    color: white;
}


/* Footer */
.site-footer{
  background:#fff;
  border-top:1px solid var(--line);
  padding:22px 0;
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.footer-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.footer-title{ 
  font-weight:900; 
}
.footer-sub{ 
  color:var(--muted); 
  font-size:13px; 
  margin-top:2px; 
}
.footer-meta{
  display:flex;
  gap:10px;
  align-items:center;
  color:var(--muted);
  flex-wrap:wrap;
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ 
    grid-template-columns: 1fr; 
  }
  .media-placeholder{ 
    height:260px; 
  }
  .grid-cards{ 
    grid-template-columns: repeat(2, 1fr); 
  }
}
@media (max-width: 720px){
  .nav-toggle{ display:inline-block; }
  .site-nav{
    position:absolute;
    left:0; right:0;
    top:64px;
    background:#fff;
    border-bottom:1px solid var(--line);
    display:none;
    flex-direction:column;
    align-items:stretch;
    padding:10px 20px 16px;
    gap:10px;
  }
  .site-nav.is-open{ 
    display:flex; 
  }
  .site-nav a{ 
    padding:12px; 
  }
  .grid-cards{ 
    grid-template-columns: 1fr; 
  }
  .contact-card .contact-row{ 
    grid-template-columns: 1fr; 
  }
}

/* ===== VARIABILI DI STILE ===== */
:root {
    --primary-color: #002d8b;
    --accent-color: #ff0015;
    --text-dark: #333;
    --text-muted: #666;
    --border-color: #ddd;
    --radius: 12px;
}

/* ===== CONTENITORE GENERALE E ALLINEAMENTO ===== */
.section-container {
    padding: 80px 0;
    scroll-margin-top: 80px;
    font-family: system-ui, -apple-system;
}

/* Header e Grid condividono lo stesso binario */
.section-header, .contact-grid {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== HEADER ===== */
.section-header {
    margin-bottom: 50px;
    text-align: left;
}

.sopratitolo {
    display: block;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.titolo-principale {
    font-size: clamp(28px, 5vw, 40px);
    margin: 0;
    color: var(--text-dark);
    line-height: 1.2;
}

/* ===== GRIGLIA CONTATTI ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-form h3, .contact-map h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 22px;
    color: var(--text-dark);
}

/* ===== FORM E INPUT ===== */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
}

.form input, .form textarea {
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: #fdfdfd;
    font-family: inherit;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form input:focus, .form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 45, 139, 0.1);
}

/* ===== BOTTONI SISTEMATI ===== */
.btn-invia {
    background-color: var(--primary-color);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    min-width: 200px;
    text-transform: uppercase;
}

.btn-invia:hover {
    background-color: #001f5f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 45, 139, 0.2);
}

.btn-maps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 14px 24px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    margin-top: 10px;
    width: fit-content;
}

.btn-maps:hover {
    background-color: var(--primary-color);
    color: white;
}

.form-note {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 15px 0 0;
}

/* ===== MAPPA ===== */
.map-box {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background: #fff;
    margin-bottom: 10px;
}

.map-box iframe {
    width: 100%;
    height: 500px; /* Pareggia visivamente la lunghezza del form */
    display: block;
}

/* ===== ANTI-SPAM ===== */
.hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .contact-grid { gap: 40px; }
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .section-header { text-align: center; }

    .btn-invia, .btn-maps {
        width: 100%;
        min-width: unset;
    }

    .map-box iframe { height: 350px; }
}


/*BARRA CHE AVANZA*/
.contenitore-progresso {
    position: fixed;
    top: 0;
    left: 0;
    /* Deve essere più alto dell'header (9999) */
    z-index: 10000; 
    width: 100%;
    height: 4px;
    background: transparent;
    display: block; 
    text-align: left; 
}

.barra-progresso {
    height: 100%;
    background: #002d8b; /* Blu professionale dello studio */
    width: 0%; 
    margin: 0; 
    padding: 0;
}
.tastoTornaSu {
    display: none; /* Gestito da JS */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: #002d8b;
    color: white;
    cursor: pointer;
    z-index: 9999 !important; /* Forza il tasto sopra a TUTTO */
    display: none; /* JS lo cambierà in 'flex' */
    
    /* Dimensioni fisse */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    
    /* IL TRUCCO PER IL CENTRAGGIO UNIVERSALE */
    display: flex;             /* Attiva il flexbox */
    align-items: center;       /* Centra verticalmente */
    justify-content: center;    /* Centra orizzontalmente */
    
    /* Rimuovi eventuali padding o line-height che potrebbero spostare l'icona */
    padding: 0 !important;
    line-height: 1 !important;
    
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

/* Assicurati che l'icona dentro non abbia margini strani */
.tastoTornaSu i {
    margin: 0;
    padding: 0;
    font-size: 1.2rem; /* Regola la grandezza della freccia qui */
}

.tastoTornaSu:hover {
    background-color: #333;
    transform: scale(1.1);
}

/* ===== FOOTER pulito e simmetrico ===== */
.site-footer{
  background:#fff;
  border-top:1px solid rgba(0,0,0,.10);
  margin-top:40px;
}

.footer-wrap{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap:32px;
  padding:40px 0;
  align-items:start;
}

.footer-col{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width: 0;
}

.footer-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.footer-logo{
  width:42px;
  height:42px;
  object-fit:contain;
  flex:0 0 auto;
}

.footer-brand-text{
  line-height:1.1;
}

.footer-title{
  font-weight:900;
}

.footer-sub{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

.footer-h{
  font-weight:900;
  font-size:15px;
}

.footer-lines{
  color:#2a2f3a;
  line-height:1.65;
}

.footer-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  width: max-content;
}

.footer-item{
  display:inline-flex;
  align-items:flex-start;
  gap:10px;
  text-decoration:none;
  color:#2a2f3a;
  line-height:1.4;
  width: max-content;
}

.footer-item:hover{
  text-decoration:underline;
}
.pec:hover{
  text-decoration:none;
  color:#0051ff;
}
.fi{
  width:20px;
  display: inline-flex;
}

.footer-note{
  color:var(--muted);
  font-size:13px;
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  color:var(--muted);
}

.footer-links a{
  color:#2a2f3a;
}

/* Barra sotto */
.footer-bottom{
  background:#f4f6fb;
  border-top:1px solid rgba(0,0,0,.08);
  padding:14px 0;
}

.footer-bottom-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  color:var(--muted);
}

.footer-bottom-links a{
  color:var(--muted);
}

/* Responsive */
@media (max-width: 980px){
  .footer-wrap{
    grid-template-columns: 1fr;
    gap:22px;
  }
  .footer-bottom-inner{
    justify-content:center;
    text-align:center;
  }
}





.cookie-banner{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: none;
}

.cookie-banner.is-open{ display:block; }

.cookie-banner__inner{
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
  padding: 14px 14px;
  display:flex;
  gap: 14px;
  align-items:center;
  justify-content: space-between;
}

.cookie-banner__text{
  color:#2a2f3a;
  line-height:1.5;
  font-size: 14px;
}

.cookie-banner__text a{ text-decoration: underline; }

.cookie-banner__actions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}

@media (max-width: 820px){
  .cookie-banner__inner{
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner__actions{
    justify-content: center;
  }
}





