/* ==========================================================================
   Cooperativa Humanitas - foglio di stile del sito
   Indice: 1 Font | 2 Base | 3 Barra laterale | 4 Hero | 5 Layout | 6 Componenti
           7 Footer | 8 Cookie | 9 Responsive | 10 Utilità | 11 Sfondi
   ========================================================================== */

/* ===== 1. Font locali =====
   Open Sans 400: testo | Open Sans Condensed 300: titoli | PT Sans 700: pulsanti
   Per ogni famiglia: sottoinsieme latin e latin-ext (caratteri accentati estesi) */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/open-sans-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/open-sans-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans Condensed";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/assets/fonts/open-sans-condensed-300-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans Condensed";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/assets/fonts/open-sans-condensed-300-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/pt-sans-700-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/pt-sans-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== 2. Base ===== */
:root {
  --testo: #595f6b;
  --accento: #f05858;
  --pulsante: #ef6262;
  --rosso: #f44336;
  --laterale: #f1f0ec;
  --laterale-scuro: #e6e5df;
  --larghezza-laterale: 325px;
  --larghezza-contenuto: 1170px;
  --condensed: "Open Sans Condensed", Arial, Helvetica, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-y: scroll; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: #fff;
  color: var(--testo);
  font: 400 14px/2 "Open Sans", Arial, Helvetica, sans-serif;
}
img { max-width: 100%; height: auto; border: 0; vertical-align: top; }
a { color: #333; text-decoration: none; }
a:hover { color: var(--accento); }
p { margin: 0 0 20px; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; }
h2 { margin: 0 0 .25em; font: 300 72px/1 var(--condensed); }
h3 { margin: .5em 0; font: 300 24px/1.5 var(--condensed); }
ul { padding-left: 40px; }
.menu, .social, .checklist { margin: 0; padding: 0; list-style: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ===== 3. Barra laterale ===== */
.site-header {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 3000;
  width: var(--larghezza-laterale);
  padding: 0 60px 20px;
  background: var(--laterale);
}
/* Su schermi bassi il menu non entra: la barra scorre con la pagina */
@media (min-width: 1024px) and (max-height: 840px) {
  .site-header { position: absolute; bottom: auto; min-height: 100vh; }
}
.site-logo { display: block; margin: 75px 0; }
.site-logo img { display: block; width: 205px; height: auto; }
.nav-toggle { display: none; }
.menu li { position: relative; height: 51px; }
.menu li:first-child { height: 52px; }
.menu a {
  display: block; position: relative;
  margin: 0 -60px; padding: 0 60px;
  color: var(--testo); font-size: 16px; line-height: 50px;
}
.menu li:first-child a { border-top: 1px solid transparent; }
.menu a:hover, .menu .is-current a { color: var(--accento); }
.menu .is-current a::after {
  content: ""; position: absolute; top: 12.5px; right: -12px;
  border-left: 13px solid var(--laterale);
  border-top: 12.5px solid transparent; border-bottom: 12.5px solid transparent;
}
.social { display: flex; justify-content: center; margin: 80px -5px 0; }
.social a {
  display: block; width: 40px; height: 40px; margin: 0 5px 10px;
  border: 1px solid #fff; border-radius: 50%; background: #fff;
  color: #ed232a; font-size: 18px; line-height: 38px; text-align: center;
}
.social a:hover { background: #ed232a; border-color: #ed232a; color: #fff; }

/* ===== 4. Hero (immagine di testata con titolo) =====
   Il titolo scala con la larghezza della finestra (15px = scrollbar), come nel tema originale.
   Su desktop l'hero resta fermo mentre la pagina scorre sopra di esso. */
.site-body { margin-left: var(--larghezza-laterale); }
.hero {
  position: sticky; top: 0; z-index: 1; overflow: hidden;
  --n: 100; --lh: 1.2;
}
.hero--tall { height: 100vh; }
.hero--short { width: 100%; aspect-ratio: 2 / 1; min-height: 200px; max-height: 400px; }
.hero-text {
  position: absolute; top: 50%; left: 0; right: 0;
  padding: 0 30px; transform: translateY(-50%);
}
.hero-text > div { max-width: 1170px; margin: 0 auto 0 100px; }
.hero h2, .hero p { margin-left: 0; margin-right: 0; }
.hero h2 {
  display: block; margin-bottom: 14px; color: #fff; font-weight: 300; font-family: var(--condensed);
  font-size: min(calc(var(--n) * 1px), calc(var(--n) * (100vw - 15px) / 1170)); line-height: var(--lh);
}
.hero p { margin: 0; padding-bottom: .0857em; color: #fff; font: 300 max(21px, min(28px, calc(28 * (100vw - 15px) / 1170)))/1.2 var(--condensed); }

/* ===== 5. Layout: pagina, sezioni, righe e colonne =====
   Pagine "wide" (home e servizi): sezioni a tutta larghezza.
   Pagine "text": colonna centrale da 1170px con 55px di spazio sopra. */
.page { position: relative; z-index: 2; background: #fff; }
.page--text { padding: 55px 30px 0; }
.page--text > * { max-width: var(--larghezza-contenuto); margin-left: auto; margin-right: auto; }
:where(.page--wide) .section { padding-left: 30px; padding-right: 30px; }
.section, .col, .tile-img, .hero { background-repeat: no-repeat; background-size: cover; background-position: center; }
.row { display: flex; flex-wrap: wrap; gap: 0 4%; max-width: var(--larghezza-contenuto); margin: 0 auto; }
.col { position: relative; flex: 1 1 0; min-width: 0; }
.col-full { flex: 0 0 100%; }
.col-2 { flex-grow: 2; }
.sp { display: table; box-sizing: content-box; width: 100%; height: 2px; clear: both; }
.section--wide .row { max-width: none; gap: 0; }
.row--flush { gap: 0; }
.panel { background-color: rgba(255, 255, 255, .94); }

/* ===== 6. Componenti ===== */
.btn {
  display: inline-block; position: relative; padding: 13px 29px; cursor: pointer;
  border: 0 solid #fff; border-radius: 2px; background: var(--pulsante);
  color: #fff; font: 700 14px/17px "PT Sans", Arial, Helvetica, sans-serif;
  text-align: center; text-transform: uppercase; transition: all .3s;
}
.btn:hover { background: #d65a5a; color: #fff; }
.btn--outline { border: 1px solid var(--rosso); background: transparent; color: var(--rosso); }
.btn--outline:hover { border-color: #ffc107; background: transparent; color: #ffc107; }
.btn--accent { background: rgba(237, 79, 52, .94); }
.btn--accent:hover { background: #ed4f34; }
.btn--3d { border-radius: 4px; box-shadow: inset 0 1px 0 #fff, 0 4px 0 #db5353, 1px 6px 6px 3px rgba(0, 0, 0, .3); }
.btn i { display: inline-block; width: 17.5px; margin-left: 10px; font-size: 14px; line-height: 14px; text-align: center; }
.pdf-viewer { display: block; width: 100%; height: 85vh; border: 0; }
.map { max-width: 100%; border: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tessere della home: immagine con etichetta colorata in basso */
.tiles { display: flex; }
.tile { position: relative; display: flex; flex: 1 1 0; align-items: flex-end; height: 677px; overflow: hidden; color: #fff; }
.tile-img { position: absolute; inset: 0; transition: transform .35s; }
.tile:hover .tile-img { transform: scale(1.2); }
.tile-label { position: relative; display: block; width: 100%; height: 125px; padding: 30px 50px; color: #fff; opacity: .95; }
.tile-label h3 { color: #fff; }
.tile--viola .tile-label { background: #9a89d1; }
.tile--salmone .tile-label { background: #fa9988; }
.tile--verde .tile-label { background: #64ada4; }
.tile--azzurro .tile-label { background: #74c5e3; }

/* Elenco con spunte verdi */
.checklist { margin-top: 10px; }
.checklist li { position: relative; margin-bottom: 11px; }
.checklist i { position: absolute; left: 0; top: 0; width: 1.7em; height: 1.7em; color: #19a020; font-size: 1em; line-height: 1.7em; text-align: center; }
.checklist li > div { margin-left: 2.4em; }

/* Toggle (apri/chiudi) con icona quadrata */
.toggle summary {
  display: block; position: relative; padding: 10px 0 10px 40px; cursor: pointer; list-style: none;
  color: #333; font: 300 20px/30px var(--condensed);
}
.toggle summary::-webkit-details-marker { display: none; }
.toggle-icon {
  position: absolute; left: 0; top: 16px; width: 22px; height: 22px;
  background: #333; color: #fff; font-size: 13px; line-height: 22px; text-align: center;
}
.toggle .fa-minus, .toggle[open] .fa-plus { display: none; }
.toggle[open] .fa-minus { display: inline-block; }
.toggle[open] summary, .toggle summary:hover { color: var(--accento); }
.toggle[open] .toggle-icon, .toggle summary:hover .toggle-icon { background: var(--accento); }
.toggle-body { padding: 10px 0 15px; }
.person-photo { display: block; margin: 0 auto; }

/* Testimonianze */
.testimonial { margin: 0; }
.testimonial blockquote { margin: 0; padding: 25px; background: #f6f6f6; font-style: italic; line-height: normal; }
.testimonial blockquote :last-child { margin-bottom: 0; }
.testimonial figcaption { position: relative; display: flex; align-items: flex-start; padding: 12px 0 0 2px; }
.testimonial figcaption::after { content: " "; position: absolute; left: 35px; top: 0; border: 10px solid transparent; border-top-color: #f6f6f6; pointer-events: none; }
.testimonial .avatar { display: block; flex: none; width: 58px; height: 41px; padding-right: 30px; font-size: 28px; line-height: 41px; text-align: center; }
.testimonial figcaption strong { display: flex; align-items: center; height: 41px; }

/* Modulo di contatto */
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  display: block; width: 100%; padding: 0 15px; border: 1px solid #d2d2d2; background: #fff;
  color: #747474; font: 400 13px/20px "Open Sans", Arial, Helvetica, sans-serif;
}
.contact-form input[type="text"], .contact-form input[type="email"] { height: 45px; }
.contact-form textarea { height: 150px; padding: 8px 15px; }
.contact-form .field--check { display: block; }
.contact-form .field--check input { margin: 3px 3px 3px 4px; }
.contact-form .field--check label { display: inline; }
.field-error { color: #f00; }
.form-response {
  margin: 2em 0 1em; padding: 25px; text-align: center; text-transform: uppercase;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
}
.form-response.is-ok { border: 1px solid #468847; background: #dff0d8; color: #468847; }
.form-response.is-error { border: 1px solid #b94a48; background: #f2dede; color: #b94a48; }
.pdf-viewer { display: block; width: 100%; height: 85vh; border: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== 7. Footer ===== */
.site-footer { position: relative; z-index: 2; background: #fff; }
.footer-logo { padding: 113px 30px 40px; background: var(--testo); text-align: center; }
.footer-logo img { display: inline-block; }
.footer-copy { margin: 0; padding: 25px 30px 26px; font-size: 12px; line-height: 24px; text-align: center; }

/* ===== 8. Banner cookie e pulsante "torna su" ===== */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999999;
  padding: 12px 10px; background: #fff; color: #000;
  font-size: 15px; line-height: 30px; text-align: center;
  box-shadow: 0 -1px 10px rgba(172, 171, 171, .3);
}
.cookie-bar p { margin: 0; }
.cookie-btn {
  display: inline-block; margin: 5px 0 0 5px; padding: 9px 12px; border: 0;
  background: #dd3333; color: #fff; cursor: pointer;
  font: 400 13px/13px "Open Sans", Arial, Helvetica, sans-serif;
}
.cookie-btn:hover { background: #b12929; color: #fff; }
.cookie-again {
  position: fixed; right: 100px; bottom: 0; z-index: 99999998;
  padding: 5px 10px; border: 0; background: #fff; color: #000; cursor: pointer;
  box-shadow: 2px 2px 5px 2px #161616;
  font: 400 13.3333px/26.6667px "Open Sans", Arial, Helvetica, sans-serif;
}
.to-top {
  position: fixed; right: 30px; bottom: 0; z-index: 100000;
  width: 48px; height: 35px; border-radius: 4px 4px 0 0; opacity: .9;
  background: #333; color: #fff; font-size: 22px; line-height: 35px; text-align: center;
}
.to-top:hover { background: var(--accento); color: #fff; }
[hidden] { display: none !important; }

/* ===== 9. Responsive =====
   I titoli h2/h3 diminuiscono in modo lineare sotto i 1185px (e con altra pendenza sotto gli 800px). */
@media (max-width: 1185px) {
  h2 { --fs: calc(72px - (1185px - 100vw) * .0369); font-size: var(--fs); line-height: var(--fs); }
  h3 { --fs: max(21px, calc(24px - (1185px - 100vw) * .0123)); font-size: var(--fs); line-height: calc(var(--fs) * 1.5); }
}
@media (max-width: 640px) {
  .page--text { padding-bottom: 50px; }
  .footer-logo { padding-bottom: 90px; }
}
@media (max-width: 815px) {
  .tile { height: 327px; }
  h2 { --fs: calc(71.19px - (800px - 100vw) * .054); }
  h3 { --fs: max(21px, calc(23.73px - (800px - 100vw) * .018)); }
}

/* Sotto i 1125px le colonne si impilano; sotto i 1023px la barra laterale diventa
   un'intestazione in alto con il menu a tendina "Go to...". */
@media (max-width: 1125px) {
  .tiles { flex-direction: column; }
  .tile { flex: 0 0 auto; }
  .row { flex-direction: column; gap: 0; }
  .col, .col-2, .col-full { flex: 0 0 auto; width: 100%; }
}
@media (max-width: 1023px) {
  .site-header { position: static; width: auto; min-height: 0; padding: 20px 30px; }
  .site-logo { margin: 0 0 20px; }
  .site-logo img { margin: 0 auto; width: 210px; }
  .nav-toggle {
    display: flex; justify-content: space-between; align-items: center; width: 100%; height: 45px;
    padding: 0 0 0 12px; border: 0; background: var(--laterale-scuro); color: #333; cursor: pointer;
    font: 400 12px/45px "Open Sans", Arial, Helvetica, sans-serif;
  }
  .nav-toggle i { width: 50px; height: 43px; margin-top: 1px; background: #efeeea; color: var(--accento); font-size: 21px; line-height: 43px; text-align: center; }
  .menu { display: none; }
  .menu.is-open { display: block; }
  .menu li, .menu li:first-child { height: auto; margin-top: 1px; background: var(--laterale-scuro); }
  .menu li:first-child a { border-top: 0; }
  .menu a, .menu a:hover, .menu .is-current a { margin: 0; padding: 0 12px; color: #333; font-size: 12px; line-height: 44px; }
  .menu .is-current a::after { display: none; }
  .social { display: none; }
  .site-body { margin-left: 0; }
  .hero { position: relative; }
  .hero--tall { height: calc(100vh - 185px); }
  .hero-text > div { margin-left: 0; }
}
@media (max-width: 800px) {
  .hero h2 { font-size: min(calc(var(--n) * 1px), calc(var(--n) * (100vw - 15px) / 800)); }
  .hero p { font-size: max(21px, min(28px, calc(28 * (100vw - 15px) / 800))); }
}

/* ===== 10. Utilità e sfondi (generati) ===== */
.c-black { color: #000000; }
.c-dark { color: #333333; }
.c-gold { color: #ffcc00; }
.c-red { color: #ea000a; }
.c-white { color: #ffffff; }
.checklist--20 { font-size: 20px; line-height: 34px; }
.checklist--23 { font-size: 23px; line-height: 39.1px; }
.col-30_67 { flex-grow: 30.6666; }
.col-65_33 { flex-grow: 65.3333; }
.ff-serif { font-family: Georgia, Palatino, serif; }
.fs-11pt { font-size: 11pt; }
.fs-12pt { font-size: 12pt; }
.fs-14pt { font-size: 14pt; }
.fs-15pt { font-size: 15pt; }
.fs-16pt { font-size: 16pt; }
.fs-18pt { font-size: 18pt; }
.fs-24pt { font-size: 24pt; }
.fs-8pt { font-size: 8pt; }
.hero--t100 { --n: 100; --lh: 1.2; }
.hero--t60 { --n: 60; --lh: 1.3333; }
.hero--t95 { --n: 95; --lh: 1.2; }
.img-left { float: left; max-width: calc(100% - 25px); margin-right: 25px; }
.mb-10 { margin-bottom: 10px; }
.pad-20-0-10-0 { padding: 20px 0px 10px 0px; }
.pad-80-14pc-80-14pc { padding: 80px 14% 80px 14%; }
.pb-110 { padding-bottom: 110px; }
.pb-200 { padding-bottom: 200px; }
.pl-0 { padding-left: 0px; }
.pr-0 { padding-right: 0px; }
.pr-50 { padding-right: 50px; }
.pt-110 { padding-top: 110px; }
.pt-200 { padding-top: 200px; }
.sp-b10 { padding-bottom: 10px; }
.sp-b20 { padding-bottom: 20px; }
.sp-b25 { padding-bottom: 25px; }
.sp-b30 { padding-bottom: 30px; }
.sp-b39 { padding-bottom: 39px; }
.sp-b40 { padding-bottom: 40px; }
.sp-b60 { padding-bottom: 60px; }
.sp-t10 { padding-top: 10px; }
.sp-t15 { padding-top: 15px; }
.sp-t20 { padding-top: 20px; }
.sp-t25 { padding-top: 25px; }
.sp-t30 { padding-top: 30px; }
.sp-t350 { padding-top: 350px; }
.sp-t40 { padding-top: 40px; }
.sp-t45 { padding-top: 45px; }
.sp-t60 { padding-top: 60px; }
.t-center { text-align: center; }
.t-justify { text-align: justify; }
.t-right { text-align: right; }

/* ===== 11. Sfondi ===== */
.bg-201-right-center { background-image: url(/assets/img/201.jpg); background-position: right center; }
.bg-colored-pencils-2361663 { background-image: url(/assets/img/colored-pencils-2361663.jpg); background-position: center center; }
.bg-foto-marina { background-image: url(/assets/img/foto-marina-e1496141146978.jpg); background-position: center center; }
.bg-foto-marina-left-center { background-image: url(/assets/img/foto-marina-e1496141146978.jpg); background-position: left center; }
.bg-grass-family { background-image: url(/assets/img/grass-family.jpg); background-position: center center; }
.bg-laptop-820274 { background-image: url(/assets/img/laptop-820274.jpg); background-position: center center; }
.bg-leghorn-2034861 { background-image: url(/assets/img/leghorn-2034861.jpg); background-position: center center; }
.bg-leghorn-2034861-2 { background-image: url(/assets/img/leghorn-2034861-2.jpg); background-position: center center; }
.bg-liv-3-1 { background-image: url(/assets/img/liv-3-1-e1496148905821.jpg); background-position: center center; }
.bg-liv-4 { background-image: url(/assets/img/liv-4-e1496147925591.jpg); background-position: center center; }
.bg-liv-4-center-top { background-image: url(/assets/img/liv-4-e1496147925591.jpg); background-position: center top; }
.bg-liv-5 { background-image: url(/assets/img/liv-5.jpg); background-position: center center; }
.bg-liv-5-center-top { background-image: url(/assets/img/liv-5.jpg); background-position: center top; }
.bg-lotus-1205631-1920 { background-image: url(/assets/img/lotus-1205631_1920.jpg); background-position: center center; }
