/* =========================================================================
   ESG Impact — foglio di stile unico.

   Il design originale usa stili inline su ogni elemento: qui stanno solo le
   regole che gli inline non possono esprimere (font, reset, media query,
   stati :hover, header, footer, form). Non serve toccarlo per cambiare
   contenuti — solo per cambiare regole globali.

   Indice:
     1. Font
     2. Base e reset
     3. Responsive delle griglie
     4. Stati hover (generati dalla conversione)
     5. Header
     6. Footer
     7. Risorse: chip e filtro
     8. Contact Form 7
   ========================================================================= */

/* ---------- 1. Font ------------------------------------------------------ */
/* Poppins self-hosted, subset latin + latin-ext. woff2 estratti dal bundle
   originale: nessuna chiamata a fonts.googleapis.com, nessun cookie di terze
   parti, nessun blocco di rendering. */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins-latin-400.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: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins-latin-ext-400.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: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins-latin-500.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: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins-latin-ext-500.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: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-latin-600.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: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-latin-ext-600.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: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-latin-700.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: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-latin-ext-700.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;
}

/* ---------- 2. Base e reset --------------------------------------------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: #F7F6F1;
    color: #16352A;
    -webkit-font-smoothing: antialiased;
}

a { color: #12833F; text-decoration: none; }
a:hover { color: #0B5A2E; }

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

h1, h2, h3, h4 { font-family: inherit; }

[id] { scroll-margin-top: 90px; }

input, select, textarea, button { font-family: 'Poppins', sans-serif; }
input::placeholder, textarea::placeholder { color: #A6B0A8; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #12833F !important;
    box-shadow: 0 0 0 3px rgba(18, 131, 63, .12);
}

/* Reveal allo scroll (gestito da site.js) */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Link "salta al contenuto" per tastiera e screen reader */
.esgi-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 12px 18px;
    border-radius: 0 0 10px 0;
    font-weight: 600;
}
.esgi-skip:focus { left: 0; }

/* ---------- 3. Responsive delle griglie ---------------------------------- */
/* Gli attributi data-* sono agganci del design originale: le colonne sono
   inline, qui si riducono alle soglie previste. */

@media (max-width: 940px) {
    [data-hero-grid],
    [data-2col],
    [data-main],
    [data-rel],
    [data-sgrid],
    [data-cgrid],
    [data-hero2],
    [data-2] { grid-template-columns: 1fr !important; }
    [data-steps] { grid-template-columns: 1fr 1fr !important; }
    [data-rgrid] { grid-template-columns: 1fr 1fr !important; }
    [data-feat] { grid-template-columns: 1fr !important; }
    [data-h1] { font-size: 42px !important; }
    [data-hl] { font-size: 38px !important; }
}

@media (max-width: 880px) {
    [data-tgrid], [data-flow] { grid-template-columns: 1fr !important; }
}

@media (max-width: 620px) {
    [data-feat],
    [data-steps],
    [data-3col],
    [data-rgrid],
    [data-sgrid] { grid-template-columns: 1fr !important; }
    [data-stats], [data-4col] { grid-template-columns: 1fr 1fr !important; }
    [data-h1] { font-size: 34px !important; }
    [data-hl] { font-size: 32px !important; }
}

/* ---------- 4. Stati hover ----------------------------------------------- */
/* Generate dalla conversione: nel design originale erano attributi
   style-hover, qui sono classi vere. */

.hv1:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(127, 194, 65, .42); }
.hv2:hover { background: rgba(255, 255, 255, .16); }
.hv3:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(11, 90, 46, .1); border-color: #DCE7D6; }
.hv4:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(11, 90, 46, .1); }
.hv5:hover { transform: translateY(-2px); }
.hv6:hover { transform: translateY(-6px); box-shadow: 0 26px 54px rgba(11, 90, 46, .12); }
.hv7:hover { background: rgba(255, 255, 255, .22); }
.hv8:hover { box-shadow: 0 22px 48px rgba(11, 90, 46, .1); border-color: #DCE7D6; }
.hv9:hover { transform: translateY(-5px); box-shadow: 0 22px 46px rgba(11, 90, 46, .1); }
.hv10:hover { box-shadow: 0 16px 36px rgba(11, 90, 46, .09); }
.hv11:hover { background: #F4F8F0; }
.hv12:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(18, 131, 63, .34); }
.hv13:hover { color: #7FC241; }
.hv14:hover { color: #C7D6CC; }
.hv15:hover { background: #12833F; }

/* ---------- 5. Header ---------------------------------------------------- */

.esgi-header {
    position: sticky;
    top: 0;
    z-index: 50;
}
.esgi-header a { color: inherit; }

.esgi-bar {
    background: #fff;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #F0F2EE;
    transition: box-shadow .2s, border-color .2s, background .2s;
}
.esgi-header.is-scrolled .esgi-bar {
    background: rgba(255, 255, 255, .92);
    border-bottom-color: rgba(18, 131, 63, .1);
    box-shadow: 0 8px 28px rgba(11, 90, 46, .08);
}

.esgi-bar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.esgi-logo { display: flex; align-items: center; flex-shrink: 0; }
.esgi-logo img[data-logo-full] { height: 34px; width: auto; display: block; }
.esgi-logo img[data-logo-mark] { height: 40px; width: 40px; border-radius: 10px; display: none; }

.esgi-nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.esgi-navitem { position: relative; }

.esgi-navlink {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 500;
    color: #3A4A41;
    transition: color .15s, background .15s;
}
.esgi-navlink:hover { background: rgba(18, 131, 63, .06); color: #12833F; }
.esgi-navlink.is-active {
    font-weight: 600;
    color: #12833F;
    background: rgba(18, 131, 63, .08);
}

.esgi-caret { color: #8A968D; transition: transform .2s; }
.esgi-navitem:hover .esgi-caret,
.esgi-navitem:focus-within .esgi-caret { transform: rotate(180deg); }

/* Tendina in CSS puro: il padding-top fa da ponte tra link e pannello,
   così il mouse non "cade" nel vuoto passando sopra. */
.esgi-drop {
    position: absolute;
    top: 100%;
    left: -12px;
    padding-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s, transform .16s, visibility .16s;
}
.esgi-navitem:hover .esgi-drop,
.esgi-navitem:focus-within .esgi-drop {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.esgi-drop-inner {
    background: #fff;
    border: 1px solid #EAEDE7;
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(11, 90, 46, .14);
    padding: 10px;
    min-width: 288px;
    display: grid;
    gap: 2px;
}
.esgi-drop-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 11px;
    transition: background .15s;
}
.esgi-drop-link:hover { background: #F4F8F0; }
.esgi-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.esgi-drop-txt { display: grid; gap: 1px; }
.esgi-drop-label { font-size: 14px; font-weight: 600; color: #16352A; }
.esgi-drop-desc { font-size: 12px; color: #7A887F; }

.esgi-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.esgi-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #fff !important;
    background: linear-gradient(120deg, #12833F, #4FAE38 60%, #8FCB3F);
    box-shadow: 0 6px 16px rgba(18, 131, 63, .28);
    transition: transform .15s, box-shadow .15s;
}
.esgi-cta-block {
    display: block;
    text-align: center;
    margin-top: 18px;
    padding: 13px 20px;
    font-size: 15px;
}

.esgi-burger {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.esgi-mobile {
    background: #fff;
    border-top: 1px solid #EEF1EC;
    box-shadow: 0 22px 40px rgba(11, 90, 46, .12);
    padding: 14px 24px 26px;
}
.esgi-mobile-link {
    display: block;
    padding: 14px 4px;
    font-size: 16px;
    font-weight: 600;
    color: #16352A;
    border-bottom: 1px solid #F1F3EF;
}
.esgi-mobile-link.is-sub {
    padding-left: 18px;
    font-size: 14.5px;
    font-weight: 500;
    color: #5B6B62;
}

@media (max-width: 980px) {
    .esgi-nav, .esgi-actions { display: none; }
    .esgi-burger { display: inline-flex; }
}
@media (max-width: 560px) {
    .esgi-logo img[data-logo-full] { display: none; }
    .esgi-logo img[data-logo-mark] { display: block; }
}

/* ---------- 6. Footer ---------------------------------------------------- */

.esgi-footer {
    background: #0B3320;
    color: #C7D6CC;
    position: relative;
    overflow: hidden;
}
.esgi-footer a { color: inherit; }
.esgi-footer-rule {
    height: 5px;
    background: linear-gradient(90deg, #0B5A2E, #12833F 40%, #7FC241 70%, #E8862B);
}
.esgi-footer-inner { max-width: 1240px; margin: 0 auto; padding: 64px 24px 30px; }

.esgi-fcols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.esgi-flogo { display: inline-flex; margin-bottom: 18px; }
.esgi-flogo img { height: 38px; width: auto; display: block; }
.esgi-fclaim { font-size: 14px; line-height: 1.65; color: #9FB4A6; max-width: 300px; margin: 0 0 20px; }
.esgi-fbadge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(127, 194, 65, .12);
    border: 1px solid rgba(127, 194, 65, .28);
    font-size: 12.5px;
    font-weight: 600;
    color: #C9E3B0;
}
.esgi-fbadge-dot { width: 7px; height: 7px; border-radius: 50%; background: #7FC241; }

.esgi-fcol-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6E8578;
    margin-bottom: 16px;
}
.esgi-fcol-links { display: grid; gap: 11px; }
.esgi-fcol-links a { font-size: 14px; color: #B8CABE; transition: color .15s; }
.esgi-fcol-links a:hover { color: #7FC241; }

.esgi-fbottom {
    margin-top: 52px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}
.esgi-fmeta { font-size: 12.5px; color: #7E9488; line-height: 1.7; }
.esgi-fright { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.esgi-flegal { display: flex; gap: 18px; }
.esgi-flegal a, .esgi-flegal li { font-size: 12.5px; color: #7E9488; list-style: none; }
.esgi-flegal ul { display: flex; gap: 18px; margin: 0; padding: 0; }
.esgi-fsocial { display: flex; gap: 9px; }
.esgi-fsocial a {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.esgi-fsocial a:hover { background: #12833F; }

@media (max-width: 860px) {
    .esgi-fcols { grid-template-columns: 1fr 1fr !important; gap: 34px !important; }
}
@media (max-width: 520px) {
    .esgi-fcols { grid-template-columns: 1fr !important; }
}

/* ---------- 7. Risorse: chip e filtro ------------------------------------ */

.esgi-chip {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid #DDE4DA;
    background: #fff;
    color: #5B6B62;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.esgi-chip:hover { border-color: #B9CDB2; color: #12833F; }
.esgi-chip.is-active {
    border-color: #12833F;
    background: #12833F;
    color: #fff;
    font-weight: 600;
}

/* ---------- 8. Contact Form 7 -------------------------------------------- */
/* Ricostruisce lo stile del modulo del design originale sull'HTML generato
   dal plugin, senza doverlo modificare. */

.wpcf7 { font-size: 14px; }
.wpcf7-form p { margin: 0 0 16px; }
.wpcf7-form label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #3A4A41;
    margin-bottom: 7px;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 11px;
    border: 1px solid #DDE4DA;
    background: #FBFCFA;
    font-size: 14px;
    color: #16352A;
    transition: border-color .15s, box-shadow .15s;
}
.wpcf7-form textarea { resize: vertical; }

/* Griglia a due colonne: assegna la classe "esgi-2" alle <p> nel form CF7
   (vedi README, sezione modulo contatti). */
.esgi-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 940px) { .esgi-2 { grid-template-columns: 1fr; } }

.wpcf7-form .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
    color: #7A887F;
    cursor: pointer;
}
.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #12833F;
    width: 16px;
    height: 16px;
}

.wpcf7-form input[type="submit"],
.wpcf7-form button[type="submit"] {
    width: 100%;
    margin-top: 6px;
    padding: 15px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(120deg, #12833F, #4FAE38 60%, #8FCB3F);
    box-shadow: 0 10px 24px rgba(18, 131, 63, .26);
    transition: transform .16s;
}
.wpcf7-form input[type="submit"]:hover { transform: translateY(-2px); }

.wpcf7-response-output {
    margin: 18px 0 0 !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    border-width: 1px !important;
    font-size: 13.5px;
}
.wpcf7 form.sent .wpcf7-response-output {
    border-color: #12833F !important;
    background: #EAF4E4;
    color: #0B5A2E;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    border-color: #D23A2E !important;
    background: #FCEAE8;
    color: #8E241B;
}
.wpcf7-not-valid-tip { font-size: 12px; color: #D23A2E; margin-top: 5px; }
.wpcf7-spinner { margin: 0 auto; display: block; }

/* ---------- 9. Testo lungo (pagine generiche e articoli) ----------------- */

.esgi-prose h2 { font-size: 26px; line-height: 1.2; font-weight: 700; color: #16352A; margin: 34px 0 12px; }
.esgi-prose h3 { font-size: 20px; line-height: 1.3; font-weight: 600; color: #16352A; margin: 28px 0 10px; }
.esgi-prose p { margin: 0 0 18px; }
.esgi-prose ul, .esgi-prose ol { margin: 0 0 18px; padding-left: 22px; }
.esgi-prose li { margin-bottom: 8px; }
.esgi-prose img { border-radius: 14px; margin: 10px 0; }
.esgi-prose blockquote {
    margin: 24px 0;
    padding: 18px 22px;
    border-left: 3px solid #7FC241;
    background: #F4F8F0;
    border-radius: 0 12px 12px 0;
    font-size: 17px;
    color: #26443A;
}
.esgi-prose > *:first-child { margin-top: 0; }
.esgi-prose > *:last-child { margin-bottom: 0; }
