/* =========================================
   Global Stylesheet
   Version: 1.0.0
   Date: 02.09.2025
/* =========================================
   Fonts
========================================= */

/* lato-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/lato-v24-latin-regular.woff2') format('woff2');
}
/* lato-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/lato-v24-latin-700.woff2') format('woff2');
}
/* lato-900 - latin */
@font-face {
  font-display: swap;
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  src: url('../fonts/lato-v24-latin-900.woff2') format('woff2');
}


/* =========================================
   Design Tokens
========================================= */
:root {
  /* Palette */
  --Blu-p-color: #2F4858;
  --Bianco-color: #ffffff;
  --Rosso-P-color: #FC2438;
  --Grigio-P-color: #A4B8C2;
  --Verde-P-color: #81C7AD;
  --Azz-P-color: #3C85BC;
  --Rosso-S-color: #FC596D;
  --Blu-S-color: #547B8C;
  --Verde-s-color: #BCEDD7;
  --Giallo-S-color: #F0F09D;
  --Azz-S-color: #B1CFE6;
  --Grigio-E6-color: #E6E6E6;
  --Grigio-FA-color: #FAFAFA;
  --Blu-p-rgb: 18, 52, 86;

  /* Typography */
  --font-family-primary: 'Lato', sans-serif;
  --font-weight-normal: 400;
  --font-weight-bold: 700;
  --font-weight-extra-bold: 900;

  --font-h1-size: clamp(3rem, 2.5385rem + 2.0513vw, 4rem);
  --font-h1-lineheight: clamp(3rem, 2.6385rem + 2.2513vw, 4rem);

  --font-h2-size: clamp(2.4rem, 2.1231rem + 1.2308vw, 3rem);
  --font-h2-lineheight: clamp(3rem, 2.5385rem + 2.0513vw, 4rem);

  --font-h3-size: clamp(2.1rem, 1.9154rem + 0.8205vw, 2.5rem);
  --font-h3-lineheight: clamp(2.4rem, 2.1231rem + 1.2308vw, 3rem);

  --font-h4-size: clamp(1.8rem, 1.7077rem + 0.4103vw, 2rem);
  --font-h4-lineheight: clamp(2.1rem, 1.9154rem + 0.8205vw, 2.5rem);

  --font-h5-size: clamp(1.6rem, 1.5308rem + 0.3077vw, 1.75rem);
  --font-h5-lineheight: clamp(1.8rem, 1.7077rem + 0.4103vw, 2rem);

  --font-h6-size: clamp(1.4rem, 1.3538rem + 0.2051vw, 1.5rem);
  --font-h6-lineheight: clamp(1.6rem, 1.5308rem + 0.3077vw, 1.75rem);

  --font-p-size: 1.125rem;
  --font-p-lineheight: 1.6rem;

  /* Layout */
  --header-h-desktop: 120px;
  --header-h-mobile: 60px;

  /* Misc */
  --shadow-default: rgba(33, 35, 38, 0.1) 0px 10px 10px -10px;
  --radius-20: 20px;
}


/* =========================================
   Base & Typography
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  color: var(--Blu-p-color);
  background-color: var(--Bianco-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
}

.title1 { font-size: var(--font-h1-size); line-height: var(--font-h1-lineheight); margin-bottom: 10px; }
.title2 { font-size: var(--font-h2-size); line-height: var(--font-h2-lineheight); margin-bottom: 10px; }
.title3 { font-size: var(--font-h3-size); line-height: var(--font-h3-lineheight); margin-bottom: 10px; }
.title4 { font-size: var(--font-h4-size); line-height: var(--font-h4-lineheight); margin-bottom: 10px; }
.title5 { font-size: var(--font-h5-size); line-height: var(--font-h5-lineheight); margin-bottom: 10px; }
.title6 { font-size: var(--font-h6-size); line-height: var(--font-h6-lineheight); margin-bottom: 10px; }
.title7 { font-size: clamp(1.2rem, 1.1769rem + 0.1026vw, 1.25rem); line-height: clamp(1.4rem, 1.3538rem + 0.2051vw, 1.5rem); margin-bottom: 10px; }

p { font-size: var(--font-p-size); line-height: var(--font-p-lineheight); margin-bottom: 10px; }

ul { font-weight: var(--font-weight-normal); font-size: var(--font-p-size); line-height: var(--font-p-lineheight); margin-bottom: 10px; list-style: circle; padding-left: 20px; padding-top: 10px; }

a { color: var(--Blu-p-color); font-weight: var(--font-weight-bold); text-decoration: underline !important; text-underline-offset: 3px !important; word-wrap: break-word; }

img { height: auto; max-width: 100%; }

main { flex: 1; margin-top: var(--header-h-desktop); }

[id] { scroll-margin-top: var(--header-h-desktop); }

.clearfix::before,
.clearfix::after { content: ""; display: block; height: 0; overflow: hidden; }
.clearfix::after { clear: both; }

.clearer { clear: both; }


/* =========================================
   Grid & Container
========================================= */
.container { max-width: 1380px; width: 100%; margin: 0 auto; padding: 0 20px; }

.row { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; row-gap: 30px; }

.col { padding-left: 15px; padding-right: 15px; flex: 1 0 0%; }

[class^="col-"] { padding-left: 15px; padding-right: 15px; }

/* 12 Columns (Desktop default) */
.col-1  { flex: 0 0 8.33%;  max-width: 8.33%; }
.col-2  { flex: 0 0 16.66%; max-width: 16.66%; }
.col-3  { flex: 0 0 25%;    max-width: 25%; }
.col-4  { flex: 0 0 33.33%; max-width: 33.33%; }
.col-5  { flex: 0 0 41.66%; max-width: 41.66%; }
.col-6  { flex: 0 0 50%;    max-width: 50%; }
.col-7  { flex: 0 0 58.33%; max-width: 58.33%; }
.col-8  { flex: 0 0 66.66%; max-width: 66.66%; }
.col-9  { flex: 0 0 75%;    max-width: 75%; }
.col-10 { flex: 0 0 83.33%; max-width: 83.33%; }
.col-11 { flex: 0 0 91.66%; max-width: 91.66%; }
.col-12 { flex: 0 0 100%;   max-width: 100%; }


/* =========================================
   Utilities
========================================= */
/* Padding */
.pad-s     { padding: clamp(1rem, 0.7692rem + 1.0256vw, 1.5rem); }
.pad-m     { padding: clamp(1.5rem, 1.2692rem + 1.0256vw, 2rem); }
.pad-l     { padding: clamp(2rem, 1.5385rem + 2.0513vw, 3rem); }

.pad-tb-s  { padding: clamp(1.5rem, 1.0385rem + 2.0513vw, 2.5rem) 0; }
.pad-tb-m  { padding: clamp(4rem, 3.5385rem + 2.0513vw, 5rem) 0; }
.pad-tb-l  { padding: clamp(7rem, 6.5385rem + 2.0513vw, 8rem) 0; }

.pad-nav   { padding: clamp(1.125rem, 1.077rem + 0.192vw, 1.25rem) 0; }
.pad-nav-tblr { padding: clamp(1.125rem, 1.077rem + 0.192vw, 1.25rem); }
.pad-her   { padding: 0 clamp(1.25rem, 0.288rem + 3.846vw, 3.75rem); }

.pad-t-s   { padding-top: clamp(1.5rem, 1.0385rem + 2.0513vw, 2.5rem); }
.pad-t-m   { padding-top: clamp(4rem, 3.5385rem + 2.0513vw, 5rem); }
.pad-t-l   { padding-top: clamp(7rem, 6.5385rem + 2.0513vw, 8rem); }

.pad-b-s   { padding-bottom: clamp(1.5rem, 1.0385rem + 2.0513vw, 2.5rem); }
.pad-b-m   { padding-bottom: clamp(4rem, 3.5385rem + 2.0513vw, 5rem); }
.pad-b-l   { padding-bottom: clamp(7rem, 6.5385rem + 2.0513vw, 8rem); }

.p-0       { padding: 0; }
.m-0       { margin: 0 !important; }

/* Align utilities (desktop default) */
.align-left   { display: flex; justify-content: flex-start; align-items: center; }
.align-center { display: flex; justify-content: center;     align-items: center; }
.align-right  { display: flex; justify-content: flex-end;   align-items: center; }

/* Radius */
.radius-20 { border-radius: var(--radius-20); }


/* =========================================
   Buttons
========================================= */
.btn {
  display: inline-block;
  padding: .5rem 1rem;
  border-radius: 100px;
  font-size: var(--font-p-size);
  font-weight: var(--font-weight-bold);
  text-decoration: none !important;
}
.btn-primary {
  background-color: var(--Bianco-color);
  border: 2px solid var(--Blu-p-color);
  color: var(--Blu-p-color);
  transition: background-color .3s ease, color .3s ease;
}
.btn-primary:hover {
  background-color: var(--Blu-p-color);
  color: var(--Bianco-color);
}


/* =========================================
   Header
========================================= */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
  color: var(--Blu-p-color)!important;
  text-decoration: none !important;
}

.skip-link:focus {
  left: 16px; top: 16px; width: auto; height: auto;
  padding: .5rem 1rem; background: var(--Grigio-FA-color); color: var(--Blu-p-color); z-index: 2000;
  border: 2px solid currentColor; border-radius: 6px;
}

:focus-visible {
    outline: none;
    outline: none !important;
    box-shadow: 0 0 0 4px white, 0 0 0 8px #2f4858 !important;
    transition: box-shadow 0.3s ease;
}

header {
  background-color: var(--Bianco-color);
  color: var(--Blu-p-color);
  padding: 0;
  text-align: left;
  border-bottom: 1px solid var(--Blu-p-color);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

.menu_servizio { background-color: var(--Blu-p-color); }

header .logo {
  border: none;
  border-radius: 0;
  box-shadow: none;
  height: auto;
  max-width: 100%;
  padding: .5rem;
}
header .logo img {
  display: block;
  height: auto;
  max-height: 40px;
}


/* =========================================
   Footer
========================================= */
footer {
  background-color: var(--Blu-p-color);
  color: var(--Bianco-color);
}
footer p {
  text-align: center;
  overflow-wrap: anywhere;      /* forza l'andata a capo anche su sequenze numeriche lunghe */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
 
.footer a {
  text-decoration: none !important;
  color: var(--Bianco-color);
  transition: color .3s ease;
  text-align: right;
  margin: 0 10px;
  font-weight: var(--font-weight-normal);
}
.footer a:hover { text-decoration: underline; }


/* =========================================
   Sections / Cards / Helpers
========================================= */
.hero { background-color: var(--Blu-S-color); }
.hero h1 {
  color: var(--Bianco-color);
  font-size: var(--font-h3-size);
  line-height: var(--font-h3-lineheight);
}
.hero p {
  color: var(--Bianco-color);
  margin-bottom: 1rem;
}

.area_clienti {
  background-color: var(--Bianco-color);
  padding: 2rem;
  border-radius: 10px;
}
.area_clienti hr {
  height: 6px; width: 25%;
  background-color: var(--Blu-p-color);
  margin: 1rem 0;
}
.area_imprese hr {
  height: 6px; width: 25%;
  background-color: var(--Azz-P-color);
  margin: 1rem 0;
}

.card {
  display: flex; flex-direction: column; justify-content: space-between;
  background-color: #fff;
  padding: 20px;
  box-shadow: var(--shadow-default);
  border-radius: var(--radius-20);
  width: 100%;
  min-height: 100%;
}
.card-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; }

.bg-gray-fa { background-color: var(--Grigio-FA-color); }
.bg-gray-e6 { background-color: var(--Grigio-E6-color); }

.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.card-header--row {
  display: flex; align-items: center; gap: 16px;
  border-bottom: 2px solid var(--Blu-p-color);
}
.border-red  { border-bottom: 2px solid var(--Rosso-S-color); }
.border-gray { border-bottom: 2px solid var(--Grigio-E6-color); }

.icon-container { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; }
.card-icon     { width: 60px; height: 60px; }
.card-title    { margin: 0; }

.card-body  { flex-grow: 1; font-size: .95rem; color: #555; }
.card-footer{ margin-top: 1.5rem; display: flex; justify-content: flex-start; }

.img-fluid {
  width: 90%;
  height: auto;
}

.img-50 {
  width: 50%;
  height: auto;
}

/* =========================================
   Dropdown / Off-canvas Navigation
========================================= */
.dropdown-nav { position: relative; text-align: right; }
.dropdown-nav.open { background: var(--Blu-p-color); color: var(--Bianco-color); }

/* === OVERLAY off-canvas (base, invisibile) ========================= */
.dropdown-nav::before{
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(var(--Blu-p-rgb),.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 1000; /* sotto al pannello (1002), sopra l’header (999) */
}


/* Trigger (desktop: label+icona / mobile: hamburger) */
.menu-toggle{
  background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  width: auto; height: auto; padding: .5rem 1rem;
  margin-left: auto; z-index: 10;
  transition: all .2s ease-in-out;
}
.menu-toggle:hover,
.dropdown-nav.open .menu-toggle {
  background-color: #475F6B; /* mantiene tua scelta cromatica */
  color: var(--Bianco-color);
}
.menu-icon { width:18px; height:18px; }
.menu-label {
  color: var(--Bianco-color);
  text-decoration: none !important;
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-p-size);
  line-height: var(--font-p-lineheight);
}

/* Barrette hamburger (nascoste di default, visibili su mobile) */
.menu-toggle .bar { display: none; width: 25px; height: 3px; background-color: var(--Blu-p-color); border-radius: 10px; transition: all .3s ease; transform-origin: center; }
.open .bar { background-color: var(--Bianco-color); }

/* Animazione a X via classi (non dipende dall’ordine) */
.dropdown-nav.open .bar-top { transform: rotate(45deg) translate(5px, 5px); }
.dropdown-nav.open .bar-mid { opacity: 0; }
.dropdown-nav.open .bar-bot { transform: rotate(-45deg) translate(5px, -5px); }

/* Menu (desktop dropdown) */
.nav-menu {
  position: absolute; top: 3.6rem; right: 0;
  background: var(--Blu-p-color);
  list-style: none;
  width: 40vw;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,.2);
  opacity: 0; pointer-events: none; transform: translateY(-10px);
  transition: opacity .3s ease, transform .3s ease;
  z-index: 5;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px;
}
.dropdown-nav.open .nav-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }

.nav-menu li:last-child {
  grid-column: 1 / -1;
  display: block;
  padding-top: 1rem;
  border-top: 1px solid var(--Blu-S-color);
}

.nav-menu a {
  display: flex; align-items: center; gap: .5rem;
  padding: 1rem;
  color: var(--Bianco-color);
  font-size: var(--font-p-size);
  text-decoration: none !important;
  transition: background .2s;
  border-radius: 30px;
  text-align: left;
}
.nav-menu a:hover { background: var(--Blu-S-color); border-radius: 30px; }

.icon {
  display: inline-block; width: 12px; height: 12px;
  background-image: url(../img/arrow-forward.svg);
  background-repeat: no-repeat; background-size: contain; background-position: center;
  flex-shrink: 0;
}

/* Header del pannello off-canvas: nascosto di default (mostrato su mobile) */
.offcanvas-top { display: none; }

/* =========================================
   Responsive
========================================= */

/* <=1380px */
@media (max-width: 1380px) {
  .container { padding: 0 4%; }
  .align-left-xl   { display: flex; justify-content: flex-start; align-items: center; }
  .align-center-xl { display: flex; justify-content: center;     align-items: center; }
  .align-right-xl  { display: flex; justify-content: flex-end;   align-items: center; }
  /* immagini un filo più strette rispetto al desktop large */
  .img-fluid, .img-50 { width: 80%; height: auto; }
}

/* <=991.98px (tablet) */
@media (max-width: 991.98px) and (min-width: 576px) {
  .container { padding: 0 4%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-6  { flex: 0 0 50%;  max-width: 50%; }
  .col-md-4  { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-md-3  { flex: 0 0 25%;  max-width: 25%; }

  .align-left-md   { display: flex; justify-content: flex-start; align-items: center; }
  .align-center-md { display: flex; justify-content: center;     align-items: center; }
  .align-right-md  { display: flex; justify-content: flex-end;   align-items: center; }
  .img-fluid, .img-50 { width: 80%; height: auto; }
}

/* <576px (mobile) */
@media (max-width: 575.98px) {
  /* colonne */
  .col-xs-12 { flex: 0 0 100%; max-width: 100%; }
  .col-xs-6  { flex: 0 0 50%;  max-width: 50%; }
  .col-xs-4  { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-xs-3  { flex: 0 0 25%;  max-width: 25%; }

  /* align utils */
  .align-left-sm   { display: flex; justify-content: flex-start; align-items: center; }
  .align-center-sm { display: flex; justify-content: center;     align-items: center; }
  .align-right-sm  { display: flex; justify-content: flex-end;   align-items: center; }

  .img-fluid, .img-50 { width: 80%; height: auto; }
  .card-row { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; }
  .row { flex-wrap: wrap; }

  /* Header: un’unica riga visiva */
  main { margin-top: var(--header-h-mobile); }
  [id] { scroll-margin-top: var(--header-h-mobile); }

  /* Barra blu: riga da 5px */
  .menu_servizio { height: 5px !important; padding: 0 !important; overflow: hidden; }

  /* Logo centrale: colonna dx nascosta */
  header .row.align-center-sm > .col-8.col-md-6.col-xs-6 { display: none !important; }
  header .row.align-center-sm > .col-4.col-md-6.col-xs-6 {
    flex: 0 0 100% !important; max-width: 100% !important; text-align: center !important;
  }
  header .logo {padding: 0.7rem;}
  header .logo img { max-height: 30px; }
  header{height: var(--header-h-mobile);}

  /* Trigger hamburger a sinistra, sopra tutto, non tagliato */
  .menu-toggle {
    position: fixed;
    left: 16px;
    top: 12px;
    width: 32px; height: 32px;
    padding: 0;
    background: transparent !important; border: 0 !important;
    z-index: 1001; /* sopra header (999) */
  }
  /* Mostro le barrette, nascondo label+icona */
  .menu-toggle .menu-label,
  .menu-toggle .menu-icon { display: none !important; }
  /* HAMBURGER BARS */
  .innerBar{
    display: flex;
    flex-direction: column;
    width: 30px;
    justify-content: center;
    align-items: stretch;
  }

  .menu-toggle .bar {
    display: block; /* <— fondamentale: da inline a block */
    width: 30px;
    height: 2px;
    background-color: var(--Blu-p-color);
    border-radius: 2px; /* prima 10px: con 3px di altezza dava l’effetto “pallino” */
    transition: transform .3s ease, opacity .3s ease, background-color .3s ease;
    transform-origin: center;
    margin-top: 5px;
  }
  .dropdown-nav.open .innerBar .bar{display: none!important;}

  /* Off-canvas: pannello a sinistra, 80% larghezza, 100vh */
  .nav-menu {
    position: fixed !important;
    background-color: var(--Bianco-color);
    top: 0 !important; 
    left: 0 !important; 
    right: auto !important;
    height: 100vh !important; 
    width: 90vw !important; 
    max-width: 520px;
    border-radius: 0 !important; 
    box-shadow: none !important;
    display: block !important; 
    overflow-y: auto;
    padding: 1rem 0 2rem 0 !important;
    margin: 0!important;
    transform: translateX(-100%) !important; 
    opacity: 1 !important;
    transition: transform .3s ease, opacity .3s ease !important;
    grid-template-columns: none !important; 
    gap: 0 !important; /* verticale */
    z-index: 1002 !important; /* overlay = 1000, toggle = 1001 */
  }
  .nav-menu a:hover {
    background: none;
    border-radius: 30px;
}

  .dropdown-nav.open .nav-menu { transform: translateX(0) !important; }

  /* Overlay visibile SOLO in mobile quando il menu è aperto */
  .dropdown-nav.open::before{
    opacity: 1;
    pointer-events: auto;
  }

  .icon {background-image: url(../img/arrow-forward-blue.svg);}

  /* Testatina off-canvas: logo sx + X dx */
  .offcanvas-top {
    display: flex!important; 
    align-items: center; 
    justify-content: space-between; 
    gap: .5rem;
    padding: 0 1rem 5rem 1rem; 
    border-bottom: 1px solid rgba(255,255,255,.25);
    grid-column: 1 / -1;
  }
  .offcanvas-top .offcanvas-logo img { height: 40px; width: auto; display: block; }
  .offcanvas-top .offcanvas-logo { padding: 0; }

  .menu-close {
    background: transparent; border: 0; width: 46px; height: 46px; position: relative;
  }
  .menu-close span {
    position: absolute; left: 8px; right: 8px; height: 2px; top: 50%; background: var(--Blu-p-color);
  }
  .menu-close span:first-child { transform: translateY(-50%) rotate(45deg); }
  .menu-close span:last-child  { transform: translateY(-50%) rotate(-45deg); }

  /* Voci verticali, tappable */
  .nav-menu li { 
    display: block; 
    width: 100%; 
    border-top: 1px solid rgba(var(--Blu-p-rgb), 0.2); /* colore al 50% */
  }
  
  .nav-menu li:nth-child(1),
  .nav-menu li:nth-child(2) {
    border-top: none;
  }

  .nav-menu li:nth-last-child(2) {
    border-top: 1px solid rgba(var(--Blu-p-rgb), 0.2);
    border-bottom: 1px solid rgba(var(--Blu-p-rgb), 0.2);
  }

  .nav-menu a {
    display: flex; 
    align-items: center;
    color: var(--Blu-p-color);
    font-weight: var(--font-weight-normal);
    flex-direction: row-reverse;
    justify-content: space-between;
  }
  .nav-menu li:last-child { border-top: 1px solid rgba(255,255,255,.2); }
}