/* =============================================================================
   RFE Broadcast — Main Stylesheet
   Mobile-first · CSS custom properties · BEM + Bootstrap
   ============================================================================= */


/* ── Fonts ───────────────────────────────────────────────────────────────────── */
/* Simplon Norm (Lineto) — recuperato dal sito vecchio. woff2+woff (no eot/ttf legacy). */

@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-Light.woff2') format('woff2'),
         url('../fonts/SimplonNorm-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-LightItalic.woff2') format('woff2'),
         url('../fonts/SimplonNorm-LightItalic.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-Regular.woff2') format('woff2'),
         url('../fonts/SimplonNorm-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-RegularItalic.woff2') format('woff2'),
         url('../fonts/SimplonNorm-RegularItalic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-Medium.woff2') format('woff2'),
         url('../fonts/SimplonNorm-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-MediumItalic.woff2') format('woff2'),
         url('../fonts/SimplonNorm-MediumItalic.woff') format('woff');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-Bold.woff2') format('woff2'),
         url('../fonts/SimplonNorm-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Simplon Norm';
    src: url('../fonts/SimplonNorm-BoldItalic.woff2') format('woff2'),
         url('../fonts/SimplonNorm-BoldItalic.woff') format('woff');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}


/* ── Custom Properties ───────────────────────────────────────────────────────── */

:root {
    /* Base palette — Figma "Selection colors" */
    --color-black:           #000000;
    --color-black-rgb:       0, 0, 0;
    --color-white:           #ffffff;
    --color-white-rgb:       255, 255, 255;
    --color-accent:          #00EF00;   /* RFE — brand green */
    --color-accent-rgb:      0, 239, 0;
    --color-accent-dark:     #02D402;   /* verde scuro — contrasto migliore (EAA) */
    --color-accent-dark-rgb: 2, 212, 2;
    --color-grey:            #EDEDED;
    --gradient-accent:       linear-gradient(180deg, #00ED1A 0%, #00C700 100%);

    /* Alias semantici */
    --color-primary:       var(--color-black);
    --color-primary-rgb:   var(--color-black-rgb);
    --color-secondary:     #444444;
    --color-bg:            var(--color-white);
    --color-bg-alt:        var(--color-grey);
    --color-text:          #1a1a1a;
    --color-text-muted:    #6c757d;
    --color-border:        #e0e0e0;

    /* Bootstrap overrides */
    --bs-primary:          var(--color-accent);
    --bs-primary-rgb:      var(--color-accent-rgb);

    /* Typography */
    --font-family-base:    'Simplon Norm', system-ui, -apple-system, sans-serif;
    --font-family-heading: var(--font-family-base);
    --line-height-base:    1.6;

    /* Type scale — il nome riflette il valore px a 1920px */
    --fs-14:  0.875rem;
    --fs-15:  0.9375rem;
    --fs-16:  1rem;
    /* Ramp coerente: fluido tra 390px e 1920px, ceiling (max) a 1920px per tutte. */
    --fs-17:  clamp(1rem,     0.07vw + 0.98rem,  1.0625rem); /* 16→17px */
    --fs-18:  clamp(1rem,     0.13vw + 0.97rem,  1.125rem);  /* 16→18px */
    --fs-20:  clamp(1rem,     0.26vw + 0.94rem,  1.25rem);   /* 16→20px */
    --fs-21:  clamp(1rem,     0.33vw + 0.92rem,  1.3125rem); /* 16→21px */
    --fs-22:  clamp(1rem,     0.39vw + 0.90rem,  1.375rem);  /* 16→22px */
    --fs-24:  clamp(1.125rem, 0.39vw + 1.03rem,  1.5rem);    /* 18→24px */
    --fs-28:  clamp(1.125rem, 0.65vw + 0.97rem,  1.75rem);   /* 18→28px */
    --fs-30:  clamp(1.25rem,  0.65vw + 1.09rem,  1.875rem);  /* 20→30px */
    --fs-36:  clamp(1.375rem, 0.92vw + 1.15rem,  2.25rem);   /* 22→36px */
    --fs-40:  clamp(1.5rem,   1.05vw + 1.25rem,  2.5rem);    /* 24→40px */
    --fs-42:  clamp(1.625rem, 1.05vw + 1.37rem,  2.625rem);  /* 26→42px */
    --fs-50:  clamp(1.875rem, 1.31vw + 1.56rem,  3.125rem);  /* 30→50px */
    --fs-56:  clamp(2rem,     1.57vw + 1.62rem,  3.5rem);    /* 32→56px */
    --fs-60:  clamp(2.125rem, 1.70vw + 1.71rem,  3.75rem);   /* 34→60px */
    --fs-80:  clamp(2.5rem,   2.61vw + 1.86rem,  5rem);      /* 40→80px */
    --fs-102: clamp(2.75rem,  3.79vw + 1.83rem,  6.375rem);  /* 44→102px */

    /* Spacing — il nome riflette il valore px a 1920px */
    --p-60:   clamp(20px, 3.125vw, 60px);
    --p-90:   clamp(30px, 4.69vw,  90px);
    --p-120:  clamp(60px, 6.25vw,  120px);
    --p-160:  clamp(90px, 8.33vw,  160px);

    /* Gutter container */
    --gutter-off:   max(1.25rem, 6.25vw);   /* 120px @ 1920px */
    --gutter-half:  calc(var(--gutter-off) / 2);
    --gutter-in:    max(0.9375rem, 0.8125vw); /* gap interno colonne row */

    /* Focus */
    --focus-rgba: rgba(var(--color-accent-rgb), 0.35);
    --focus-ring: 0 0 0 3px var(--focus-rgba);

    /* Transitions */
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:   0.25s var(--transition-timing);

    /* Header — solo per scroll-padding e spacer, mai min-height su .header */
    --header-height:    72px;
    --header-height-lg: 80px;
}


/* ── Reset minimale ──────────────────────────────────────────────────────────── */
/* Bootstrap reboot copre il grosso. Qui solo ciò che non gestisce. */

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

p {
    margin-block: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:             var(--font-family-base);
    font-size:               var(--fs-16);
    line-height:             var(--line-height-base);
    color:                   var(--color-text);
    background:              var(--color-bg);
    -webkit-font-smoothing:  antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Nasconde il bordo su img senza src o con src vuoto */
img:not([src]),
img[src=""] {
    visibility: hidden;
}


/* ── Media utilities ─────────────────────────────────────────────────────────── */
/*
 * Pattern: wrapper posizionato + immagine assoluta che riempie il container.
 * Usare un <div class="media"> lascia <figure> libero per la semantica HTML:
 *
 *   Semplice:
 *   <div class="media" style="aspect-ratio: 16/9">
 *       <img class="img-cover" src="..." alt="..." loading="lazy">
 *   </div>
 *
 *   Con caption (semantica corretta):
 *   <figure>
 *       <div class="media" style="aspect-ratio: 16/9">
 *           <img class="img-cover" src="..." alt="..." loading="lazy">
 *       </div>
 *       <figcaption>Didascalia</figcaption>
 *   </figure>
 *
 * .media       — wrapper (position: relative, display: block)
 * .media-bg    — wrapper decorativo: no pointer-events, no select.
 *                Supporta ::after per overlay (solo su <div>, non su <img>)
 * .img-cover   — riempie il wrapper, object-fit: cover   (foto, hero, card)
 * .img-contain — riempie il wrapper, object-fit: contain (loghi, illustrazioni)
 * .img-scale   — riempie il wrapper, object-fit: scale-down (icone, asset misti)
 *
 * NB: Bootstrap ha .object-fit-cover ecc. ma senza il posizionamento assoluto —
 * queste classi coprono il pattern "fill container" completo.
 */

.media {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
}

.media-bg::after {
    user-select: none;
    pointer-events: none;
}

.img-cover,
.img-contain,
.img-scale,
.media-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.img-contain { object-fit: contain; }
.img-scale   { object-fit: scale-down; }

::selection {
    background: var(--color-accent);
    color: var(--color-white);
}


/* ── Link base ───────────────────────────────────────────────────────────────── */
/* Neutri di default — colore e stile aggiunto nel contesto (header, footer, .text…) */

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

/* Rimuove l'outline al click/tap ma lo preserva per navigazione da tastiera — EAA */
a:focus:not(:focus-visible) {
    outline: none;
}


/* ── Accessibility ───────────────────────────────────────────────────────────── */

/* Focus ring — EAA / WCAG 2.4.7 */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Skip link — usa .visually-hidden-focusable di Bootstrap per show-on-focus */
.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    border-radius: 4px;
}


/* ── Loader ──────────────────────────────────────────────────────────────────── */

.site-loader {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.site-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.site-loader__bars {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 16px;
}

.site-loader__bars span {
    display: inline-block;
    width: 1px;
    height: 100%;
    background: var(--color-primary);
    animation: stretchdelay 1.2s ease-in-out infinite;
}

.site-loader__bars span:nth-child(2) { animation-delay: -1.1s; }
.site-loader__bars span:nth-child(3) { animation-delay: -1.0s; }
.site-loader__bars span:nth-child(4) { animation-delay: -0.9s; }
.site-loader__bars span:nth-child(5) { animation-delay: -0.8s; }

@keyframes stretchdelay {
    0%, 40%, 100% { transform: scaleY(0.4); }
    20%           { transform: scaleY(1); }
}


/* ── Header ──────────────────────────────────────────────────────────────────── */

/*
 * Header a 2 fasce (pre + main) + megamenu. 3 stati:
 *  - header--dark  : trasparente, testi bianchi (home, hero scuro)
 *  - header--light : trasparente, testi neri (pagine interne)
 *  - :not(.is-top) : scrolled → bg bianco, testi neri, pre nascosto (sticky)
 * Il logo .brand__text usa fill:currentColor → si ricolora con `color`.
 */
.header {
    --pre-h: 49px; /* altezza pre-header (inner 48 + border 1) */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    color: var(--color-white);
    transition: background-color 0.3s var(--transition-timing),
                color 0.3s var(--transition-timing),
                transform 0.4s var(--transition-timing);
}

.header--light { color: var(--color-black); }

.brand { display: block; }

/* ── Pre-header ──────────────────────────────────────────────────────────── */
/* Banda chiara translucida (glassmorfismo) su entrambe le varianti → testo nero. */
.header__pre {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--color-black);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header__pre-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 48px;
}

.header__secondary-menu {
    display: flex;
    gap: clamp(1.25rem, 2vw, 2.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.header__secondary-menu a {
    color: inherit;
    text-decoration: none;
    font-size: var(--fs-14);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

.header__secondary-menu a:hover { color: var(--color-accent); }

/* ── Lang switcher ───────────────────────────────────────────────────────── */
.lang-switcher { position: relative; }

.lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font-size: var(--fs-14);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lang-switcher__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
}

.lang-switcher.is-open .lang-switcher__caret { transform: rotate(180deg); }

.lang-switcher__list {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 140px;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    background: var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 5;
}

.lang-switcher.is-open .lang-switcher__list {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.lang-switcher__link {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--color-black);
    text-decoration: none;
    font-size: var(--fs-14);
    text-transform: uppercase;
}

.lang-switcher__link:hover { background: var(--color-grey); }

/* ── Main bar (row: col brand | col-auto nav centrato | col azioni) ───────── */
.header__main-inner {
    min-height: 88px;
}

.header__brand {
    display: inline-flex;
    color: inherit;
}

.header__brand .brand { height: 48px; width: auto; }

.header__actions {
    display: flex;
    justify-content: flex-end;
}

.header__menu {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0.25rem 0;
    cursor: pointer;
    color: inherit;
    font-size: var(--fs-18);
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Underline verde su hover/aperto */
.header__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.25s var(--transition-timing);
}

.header__link:hover::after,
.header__link[aria-expanded="true"]::after { width: 100%; }

/* ── Burger (mobile) ─────────────────────────────────────────────────────── */
.header__burger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    flex-shrink: 0;
}

.header__burger-box,
.header__burger-box::before,
.header__burger-box::after {
    display: block;
    width: 26px;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.header__burger-box {
    position: relative;
    margin: 0 auto;
}

.header__burger-box::before,
.header__burger-box::after {
    content: '';
    position: absolute;
    left: 0;
}

.header__burger-box::before { top: -8px; }
.header__burger-box::after  { top: 8px; }

/* ── Stato scrolled (sticky bianco) ──────────────────────────────────────── */
.header:not(.is-top),
.header.mega-open {
    background: var(--color-white);
    color: var(--color-black);
}

/* Scroll: l'header scorre su della sua fascia pre → la main bar arriva in cima,
   il pre-header esce dallo schermo (più pulito di un collasso d'altezza). */
.header:not(.is-top) {
    transform: translateY(calc(-1 * var(--pre-h)));
}

/* ── Megamenu desktop ────────────────────────────────────────────────────── */
.header__mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--color-white);
    color: var(--color-black);
}

.header__mega-panel {
    position: relative;
    padding-block: clamp(2rem, 4vw, 3.5rem);
    border-top: 1px solid var(--color-border);
}

.header__mega-grid {
    display: grid;
    grid-template-columns: repeat(var(--mega-cols, 4), 1fr);
    gap: clamp(1rem, 2vw, 2rem);
}

/* Media colonna: .media (relative) + img.img-cover (fill). Ratio ~267x147. */
.mega-col__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-grey);
    margin-bottom: 1.25rem;
}

.mega-col__title {
    display: block;
    font-size: var(--fs-20);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-black);
    text-transform: uppercase;
    text-decoration: none;
    /* 2 righe minime → divisori e liste allineati tra colonne.
       border-box globale: min-height include padding+border → li sommo nel calc
       così il content-box resta esattamente 2lh (2 righe di testo). */
    min-height: calc(2lh + 1rem + 1px);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

a.mega-col__title:hover { color: var(--color-accent); }

.mega-col__links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-col__links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--fs-16);
    transition: color 0.2s ease;
}

.mega-col__links a:hover { color: var(--color-accent); }

.header__mega-close {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    width: 92px;
    height: 36px;
    border: none;
    background: var(--color-accent);
    color: var(--color-black);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.header__mega-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.4);
}

/* ── Responsive: desktop nav ≥lg, burger+overlay <lg ─────────────────────── */
@media (max-width: 991.98px) {
    /* Pre-header nascosto: lang + secondario stanno già nel drawer. */
    .header { --pre-h: 0px; }
    .header__pre,
    .header__nav,
    .header__mega { display: none; }
    .header__burger { display: block; }
    .header__main-inner { min-height: 64px; }
    .header__brand .brand { height: 40px; }
}


/* ── Nav overlay (mobile, fullscreen) ────────────────────────────────────── */
.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--color-black);
    color: var(--color-white);
    opacity: 0;
    visibility: hidden;
    overflow-y: auto;
    transition: opacity 0.3s var(--transition-timing), visibility 0.3s;
}

.nav-overlay.is-open { opacity: 1; visibility: visible; }

.nav-overlay__inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 5vw, 3rem);
}

.nav-overlay__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

/* Glyph allineato a destra (no box fisso); ::after espande l'area cliccabile
   a ~44px (target touch EAA) senza spostare la X. */
.nav-overlay__close {
    position: relative;
    padding: 0;
    background: none;
    border: none;
    color: inherit;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.nav-overlay__close::after {
    content: '';
    position: absolute;
    inset: -12px;
}

.nav-overlay__menu {
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-overlay__item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-overlay__link,
.nav-overlay__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-size: var(--fs-28);
    font-weight: 400;
}

.nav-overlay__caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
}

.nav-overlay__item.is-open .nav-overlay__caret { transform: rotate(180deg); }

.nav-overlay__sub {
    display: none;
    padding: 0 0 1.25rem;
}

.nav-overlay__item.is-open .nav-overlay__sub { display: block; }

.nav-overlay__group { margin-bottom: 1.25rem; }

.nav-overlay__group-title {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
    text-decoration: none;
    text-transform: uppercase;
    font-size: var(--fs-15);
    letter-spacing: 0.04em;
}

.nav-overlay__sub-link {
    display: block;
    padding: 0.35rem 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--fs-18);
}

.nav-overlay__sub-link:hover { color: var(--color-white); }

.nav-overlay__foot { margin-top: 2rem; }

.nav-overlay__secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-overlay__secondary a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    text-transform: uppercase;
    font-size: var(--fs-14);
    letter-spacing: 0.04em;
}


/* ── Pre-footer (newsletter) ──────────────────────────────────────────────── */

.prefooter {
    position: relative;
    overflow: hidden;
    background-color: var(--color-accent);
    background-image: url('../img/prefooter-waves.jpg');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    color: var(--color-black);
    padding-block: var(--p-60);
}

.prefooter__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.prefooter__title {
    font-size: var(--fs-36);
    font-weight: 400;
    line-height: 1.12;
    margin: 0;
    color: inherit;
}

.prefooter__btn {
    flex: none;
}


/* ── Footer ──────────────────────────────────────────────────────────────────── */

.footer {
    background: var(--color-primary);
    color: #fff;
}

/* Menu colonne */
.footer__menus {
    padding-block: var(--p-90);
}

.footer__col-title {
    font-size: var(--fs-24);
    font-weight: 400;
    line-height: 1.333;
    margin-bottom: 1.333em;
    color: #fff;
}

.footer__nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__nav li a {
    font-size: var(--fs-16);
    color: rgba(255,255,255,0.7);
}

.footer__nav li a:hover,
.footer__nav li a:focus-visible {
    color: var(--color-accent);
}

/* Main — brand + contatti + social */
.footer__main {
    padding-block: var(--p-60);
    border-top: 1px solid rgba(255,255,255,0.12);
}

.footer__logo        { display: inline-block; }
.footer__logo .brand { width: clamp(180px, 12.5vw, 240px); height: auto; color: #fff; }

.footer__tagline {
    font-size: var(--fs-16);
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255,255,255,0.55);
    max-width: 62ch;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.footer__contacts-line {
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.footer__contacts-line a:hover,
.footer__contacts-line a:focus-visible {
    color: var(--color-accent);
}

.footer__social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__social li a {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: rgba(255,255,255,0.7);
}

.footer__social li a:hover,
.footer__social li a:focus-visible {
    color: var(--color-accent);
}

.footer__social-icon {
    display: inline-flex;
    color: var(--color-accent);
}

/* Colophon — legal bar */
.footer__legal {
    padding-block: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: var(--fs-14);
}

.footer__copy {
    color: rgba(255,255,255,0.5);
    margin-bottom: 0;
}

.footer__legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
}

.footer__legal-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
}

.footer__legal-menu li a,
.footer__credits {
    color: rgba(255,255,255,0.5);
}

.footer__legal-menu li a:hover,
.footer__legal-menu li a:focus-visible,
.footer__credits:hover,
.footer__credits:focus-visible {
    color: #fff;
}

/* Language switcher */
.footer__lang-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    text-transform: uppercase;
}

.footer__lang-list li a {
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.footer__lang-list li.is-active a,
.footer__lang-list li a:hover,
.footer__lang-list li a:focus-visible {
    color: var(--color-accent);
}

@media (min-width: 992px) {
    .footer__legal-links { justify-content: center; }
    .footer__lang        { text-align: right; }
}


/* ── Layout — Bootstrap overrides ───────────────────────────────────────────── */

.container-fluid {
    --bs-gutter-x: var(--gutter-off);
}

.row {
    --bs-gutter-x: var(--gutter-in);
}


/* ── Sections ────────────────────────────────────────────────────────────────── */

.section,
[class^="section-"] {
    padding-block: var(--p-90);
}


/* ── Bootstrap .btn — override globali ──────────────────────────────────────── */
/*
 * Mai ricreare bottoni da zero — usare sempre classi Bootstrap native (.btn-primary, .btn-light…).
 * Le varianti progetto si definiscono sovrascrivendo --bs-btn-* sulla classe specifica.
 */

.btn {
    --bs-btn-font-family:      var(--font-family-base);
    --bs-btn-font-size:        var(--fs-15);   /* 15px (Figma) */
    --bs-btn-font-weight:      400;
    --bs-btn-line-height:      1.6;            /* 24px su 15px */
    --bs-btn-padding-x:        1.875rem;
    --bs-btn-padding-y:        0.765rem;
    --bs-btn-border-radius:    100px;
    --bs-btn-focus-box-shadow: var(--focus-ring);
    letter-spacing: -0.01em;
}


/* ── .text — Prosa ───────────────────────────────────────────────────────────── */
/*
 * Classe riutilizzabile per qualsiasi box testuale (moduli, descrizioni, body...).
 * Usare class="text" sul wrapper del contenuto.
 * Per contenuto editoriale full (page.php) combinare: class="page-content__body text"
 */

.text {
    font-weight: 400;
    font-size: var(--fs-16);
    line-height: 1.6;
}

/* Gerarchia heading relativa al font-size del contesto (.text)
   em è corretto qui: scala automaticamente se .text cambia dimensione */
.text :is(h1, h2)     { font-size: 1.5em; }
.text :is(h3, h4)     { font-size: 1.25em; }
.text :is(h5, h6)     { font-size: 1.1em; }

.text :is(h1, h2, h3, h4, h5, h6) {
    font-weight: 500;
    line-height: 1.3;
}

.text :is(h1, h2, h3, h4, h5, h6):not(:first-child) {
    padding-top: 2em;
    margin: 0;
}

.text :is(p, ul, ol):not(:first-child) {
    padding-top: 1.2em;
}

.text :is(ul, ol) {
    padding-left: 1em;
}

.text strong {
    font-weight: 600;
}

.text a:not(.btn) {
    color: var(--color-accent);
    text-decoration: underline;
}

.text a:not(.btn):hover {
    text-decoration: none;
}


/* ── Eyebrow & Title — tipografia modulare ───────────────────────────────────── */
/*
 * Classi standalone riutilizzabili nei moduli flessibili e ovunque serva
 * un blocco titolo strutturato. Non BEM — si usano da sole o in combinazione.
 *
 *   <p class="eyebrow">I nostri servizi</p>
 *   <h2 class="title">Cosa facciamo per te</h2>
 */

.eyebrow {
    display: block;
    margin: 0 0 0.8em;
    font-weight: 400;
    font-size: var(--fs-17);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-black);
}

.title {
    font-size: var(--fs-40);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}


/* ── Page wrap — pagine semplici (legal, 404…) ───────────────────────────────── */
/*
 * .page-wrap    — padding verticale di sezione, max-width leggibile, centrato
 * .page-title   — h1 standalone, usabile in page.php, 404.php e simili
 *
 * page.php:  class="page-wrap"  +  class="page-title"  +  class="text"
 * 404.php:   class="page-wrap"  +  class="page-title"
 */

.page-wrap {
    padding-top: calc(var(--p-160) * 2);
    padding-bottom: var(--p-160);
}

.page-title {
    font-size: var(--fs-80);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 0.75em;
    color: var(--color-black);
}

/* .page-content__body mantiene line-height editoriale per testi lunghi */
.page-content__body {
    font-size: var(--fs-18);
    line-height: 1.8;
}


/* ── Module: Hero ────────────────────────────────────────────────────────────── */

.module-hero {
    position: relative;
    min-height: clamp(60vh, 80vh, 90vh);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-primary);
    color: #fff;
}

.module-hero__media {
    position: absolute;
    inset: 0;
    margin: 0;
}

.module-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.module-hero__overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-block: var(--p-90);
}

.module-hero__title {
    font-size: var(--fs-80);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: inherit;
}

.module-hero__subtitle {
    font-size: var(--fs-22);
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.85);
}

.module-hero__cta {
    padding: 0.75rem 2rem;
    font-weight: 600;
}


/* ── Card Post ───────────────────────────────────────────────────────────────── */

.card-post {
    margin-bottom: 2rem;
}

.card-post__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 1rem;
}

.card-post__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-post__title a:hover,
.card-post__title a:focus-visible {
    color: var(--color-accent);
}

.card-post__excerpt p {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}


/* ── 404 ─────────────────────────────────────────────────────────────────────── */
/* Nessuna regola specifica: usa il body text di default + .page-wrap + .page-title */


/* ── Edit Post Link ──────────────────────────────────────────────────────────── */
/* Link rapido all'editor, visibile solo a utenti loggati (fisso in basso a destra). */

.post-edit-link {
    position: fixed;
    z-index: 9999;
    bottom: 0;
    right: 0;
    padding: 10px 18px;
    background-color: #3c3c3c;
    color: var(--color-white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-top-left-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.post-edit-link:hover,
.post-edit-link:focus-visible {
    color: var(--color-white);
    background-color: #222;
}


/* ── Products — Transmitters listing ─────────────────────────────────────────── */

/* Hero centrato */
.products-transmitters__head {
    padding: clamp(48px, 8vw, 110px) 0 clamp(40px, 6vw, 80px);
}
.products-transmitters__eyebrow {
    margin: 0 0 1.25rem;
    font-weight: 400;
    font-size: var(--fs-17);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-black);
}
.products-transmitters__title {
    margin: 0;
    font-family: var(--font-family-heading);
    font-weight: 400;
    font-size: var(--fs-80);
    line-height: 1.05;
    color: var(--color-black);
}
.products-transmitters__intro {
    margin: 1.5rem auto 0;
    font-weight: 300;
    font-size: var(--fs-20);
    line-height: 1.5;
    color: var(--color-black);
}

/* Fasce alternate grigio/bianco (full-bleed) */
.products-transmitters__section {
    padding: 120px 0;
}
.products-transmitters__section:nth-of-type(even) {
    background: var(--color-grey);
}
.products-transmitters__section-title {
    margin: 0 0 1.333em;   /* 56px @ 42px */
    font-weight: 400;
    font-size: var(--fs-42);
    line-height: 1.2;
    color: var(--color-accent-dark);
}
.products-transmitters__group-label {
    margin: 0 0 2.545em;   /* 56px @ 22px */
    font-weight: 500;
    font-size: var(--fs-22);
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--color-black);
}
.products-transmitters__cards + .products-transmitters__group-label {
    margin-top: 5em;
}

/* ── Product card ────────────────────────────────────────────────────────────── */

.product-card {
    --product-card-padding: 1.875rem;   /* padding interno elementi (≈ 8% Figma) */
    height: 100%;
    background: var(--color-white);
    box-shadow: 0 2px 16px rgba(var(--color-black-rgb), 0.06);
}
.product-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.product-card__title {
    margin: 0;
    padding: var(--product-card-padding) var(--product-card-padding) 0;
    font-weight: 400;
    font-size: var(--fs-30);
    line-height: 1.2;
    color: var(--color-black);
    /* max 2 righe + ellissi, altezza fissa per card uniformi */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    height: calc(2lh + var(--product-card-padding));
}
.product-card__media {
    aspect-ratio: 4 / 3;
    max-width: 90%;
    margin: var(--product-card-padding) auto;
}
.product-card__img {
    transition: opacity 0.25s ease;
}
/* Hover front/rear */
.product-card--has-rear .product-card__img--rear {
    opacity: 0;
}
.product-card--has-rear:hover .product-card__img--front,
.product-card--has-rear:focus-within .product-card__img--front {
    opacity: 0;
}
.product-card--has-rear:hover .product-card__img--rear,
.product-card--has-rear:focus-within .product-card__img--rear {
    opacity: 1;
}
/* Barra CTA: nera → verde su hover */
.product-card__cta {
    display: block;
    margin-top: auto;
    padding: 0.875rem var(--product-card-padding);
    background: var(--color-black);
    color: var(--color-white);
    font-weight: 400;
    font-size: var(--fs-21);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.product-card__link:hover .product-card__cta,
.product-card__link:focus-visible .product-card__cta {
    background: var(--color-accent);
    color: var(--color-black);
}


/* ── Products — Antennas table ───────────────────────────────────────────────── */

.products-antennas__table-wrap {
    overflow-x: auto;
}
.products-antennas__table {
    width: 100%;
    border-collapse: collapse;
}
.products-antennas__table th,
.products-antennas__table td {
    padding: 1.25rem 1rem;
    text-align: center;
    vertical-align: middle;
    font-weight: 400;
    font-size: var(--fs-15);
    line-height: 1.5;
    color: #727272;
}
.products-antennas__table thead th {
    font-weight: 500;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-border);
}
.products-antennas__table tbody tr {
    border-bottom: 1px solid var(--color-border);
}
/* Model cell — pannello grigio con immagine + nome + bottone */
.products-antennas__model {
    width: 220px;
    min-width: 200px;
    background: #f1f1f1;
}
.products-antennas__thumb-wrap {
    display: block;
    aspect-ratio: 1 / 1;
    max-width: 135px;
    margin: 0 auto 1.25rem;
}
.products-antennas__model-name {
    display: block;
    margin-bottom: 1.25rem;
    font-weight: 500;
    font-size: var(--fs-21);
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--color-black);
}
.products-antennas__more {
    display: inline-block;
    padding: 10px 26px;
    border: 1px solid var(--color-black);
    border-radius: 50px;
    font-size: var(--fs-15);
    color: var(--color-black);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.products-antennas__more:hover,
.products-antennas__more:focus-visible {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-black);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   Home — sezioni
   Hero · Products · Save banner · Launches · Insights · Contacts banner
   ═══════════════════════════════════════════════════════════════════════════════ */


/* ── Reveal scroll — stato base hidden; l'animazione la fa GSAP (initReveals) ── */

/* Lo stato nascosto vale SOLO con JS attivo (html.js): senza JS o se lo script
   fallisce, il contenuto resta visibile. Evita contenuto perso.
   GSAP legge questo stato e tweena opacity/transform → effetto visibile anche
   above-the-fold (la transition CSS non avrebbe frame di partenza). */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

/* Rispetta preferenze sistema — disabilita animazioni */
@media (prefers-reduced-motion: reduce) {
    html.js [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ── 1. Hero — full-bleed, video/immagine in background ─────────────────────── */

.hp-hero {
    position: relative;
    min-height: 100vh;    /* fallback */
    min-height: 100svh;   /* svh: esclude la barra mobile */
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-black);
    padding-block: var(--p-120);
}

/* Overlay gradiente — segnale che si irradia da basso-sinistra verso trasparente */
.hp-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.80) 0%,
        rgba(0, 0, 0, 0.45) 45%,
        rgba(0, 0, 0, 0.00) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hp-hero__content {
    position: relative;
    z-index: 2;
}

.hp-hero__title {
    font-size: var(--fs-102);
    font-weight: 400;
    line-height: 0.8;
    color: var(--color-white);
    text-wrap: balance;
    max-width: 18ch;
    margin-bottom: 0.353em; /* 36px su 102px */
}

.hp-hero__text {
    font-size: var(--fs-20);
    font-weight: 400;
    line-height: 1.6; /* 32px su 20px */
    color: var(--color-white);
    max-width: 48ch;
    text-wrap: pretty;
    margin-bottom: 1.8em; /* 36px su 20px */
}

/* CTA row — gap tra bottoni */
.hp-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    align-items: center;
}

/* Varianti bottone hero — sovrascrittura variabili Bootstrap native */
.btn-light {
    --bs-btn-bg:           var(--color-white);
    --bs-btn-border-color: var(--color-white);
    --bs-btn-color:        var(--color-black);
    --bs-btn-hover-bg:     rgba(255, 255, 255, 0.85);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-hover-color:  var(--color-black);
}

.btn-outline-light {
    --bs-btn-bg:           transparent;
    --bs-btn-border-color: var(--color-white);
    --bs-btn-color:        var(--color-white);
    --bs-btn-hover-bg:     var(--color-white);
    --bs-btn-hover-border-color: var(--color-white);
    --bs-btn-hover-color:  var(--color-black);
}

.btn-dark {
    --bs-btn-bg:           var(--color-black);
    --bs-btn-border-color: var(--color-black);
    --bs-btn-color:        var(--color-white);
    --bs-btn-hover-bg:     var(--color-accent);
    --bs-btn-hover-border-color: var(--color-accent);
    --bs-btn-hover-color:  var(--color-black);
}

/* Mobile: titolo hero ridotto al minimo del clamp (~40px) — già gestito dalla formula */
@media (max-width: 575.98px) {
    .hp-hero {
        align-items: flex-end;
        padding-bottom: var(--p-90);
    }
}


/* ── 2. Products — griglia prodotti in evidenza ──────────────────────────────── */

.hp-products {
    background: var(--color-white);
    padding-block: var(--p-160);
}

/* Testata sezione — testo introduttivo */
.hp-products__head {
    margin-bottom: var(--p-90);
}


.hp-products__title {
    font-size: var(--fs-60);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-black);
    max-width: 28ch;
    text-wrap: balance;
    margin-bottom: 1rem;
}

.hp-products__text {
    font-size: var(--fs-18);
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 60ch;
    margin: 0;
}

/* Card prodotto in evidenza */
.product-launch {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 3.625rem); /* 58px max */
    background: #f1f1f1;
    overflow: hidden;
}

/* Onda verde decorativa di sfondo (PNG su trasparente), assoluta a tutta altezza.
   z-index:-1 → sta sotto ai contenuti statici senza doverli posizionare (così lo
   stretched-link si ancora alla card, non a un figlio posizionato). */
.product-launch::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    top: 0;
    height: 100%;
    background: url('../img/waves.png') no-repeat center / auto 100%;
    pointer-events: none;
}

/* Card alternate: flip verticale dell'onda */
.hp-products__grid > div:nth-child(even) .product-launch::before {
    transform: scaleY(-1);
}

/* Link solo sul titolo (.stretched-link): nome accessibile = titolo, ::after copre
   l'intera card (contenuti statici, nessun figlio posizionato a intercettarlo). */
.product-launch__link {
    color: inherit;
    text-decoration: none;
}

.product-launch__media {
    aspect-ratio: 10 / 5;
    overflow: hidden;
    transition: transform 0.4s var(--transition-timing);
}

/* Hover sulla card → il media sale leggermente. */
.product-launch:hover .product-launch__media {
    transform: translateY(-8px);
}

@media (prefers-reduced-motion: reduce) {
    .product-launch:hover .product-launch__media {
        transform: none;
    }
}

.product-launch__title {
    font-size: var(--fs-50);
    font-weight: 400;
    line-height: 1.29;
    color: var(--color-black);
    margin: 0;
    /* max 2 righe, altezza fissa per card uniformi */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    height: 2lh;
}

.product-launch__text {
    font-size: var(--fs-20);
    font-weight: 400;
    line-height: 1.42;
    color: var(--color-black);
    max-width: 50ch;
    padding-top: 1em;
    margin: 0;
}


/* ── Banner condiviso (save + contacts): dark + waveform bg + overlay ────────── */

.banner {
    position: relative;
    background: var(--color-black);
    padding-block: calc(var(--p-160) * 1.2);
    overflow: hidden;
    min-height: max(300px, 34vw);
    display: flex;
    align-items: center;
    flex-direction: column;
}

/* Overscan del bg: il parallasse (translateY) non scopre i bordi mid-page. */
.banner .media-bg {
    top: -10%;
    bottom: auto;
    height: 120%;
}

/* Overlay scuro sul bg, via media-bg::after (pattern boilerplate) */
.banner .media-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90.13deg, #000000 18.14%, rgba(0, 0, 0, 0) 100.41%);
}

/* Titolo + testo condivisi tra i banner */
.banner__title {
    font-size: var(--fs-50);
    font-weight: 400;
    line-height: 1.29;
    color: var(--color-white);
    text-wrap: balance;
    margin: 0 0 0.48em; /* 24px su 50px */
    max-width: 28ch;
}

.banner__text {
    font-size: var(--fs-20);
    font-weight: 300;
    line-height: 1.5;
    color: var(--color-white);
    max-width: 48ch;
    margin: 0;
}


/* ── 3. Save banner ─────────────────────────────────────────────────────────── */

/* Contenuti uno sotto l'altro (no flex). */
.hp-save__content {
    position: relative;
    z-index: 2;
}


/* ── 4. Launches — card immagine con overlay ──────────────────────────────────── */

.hp-launches {
    background: var(--color-grey);
    padding-block: var(--p-160);
}

/* Testata riusa la stessa struttura di .hp-products */
.hp-launches__head {
    margin-bottom: var(--p-120);
}


.hp-launches__title {
    font-size: var(--fs-60);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-black);
    max-width: 28ch;
    text-wrap: balance;
    margin-bottom: 1rem;
}

.hp-launches__text {
    font-size: var(--fs-18);
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 60ch;
    margin: 0;
}

/* Card lancio prodotto — immagine con overlay testo in basso */
/*
 * Card lancio = foto a tutta card + overlay. Titolo in alto, testo in basso
 * (space-between). Stesso padding delle altre card home. Ratio ~5/4 (da 832×668).
 * Il titolo è il link: a.stretched-link rende cliccabile l'intera card.
 */
.launch-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 100%;
    aspect-ratio: 5 / 4;
    min-height: 420px;
    padding: clamp(1.5rem, 3vw, 3.625rem); /* 58px max, come .product-launch */
    overflow: hidden;
    background: var(--color-black);
}

/*
 * Foto sotto ai contenuti via z-index negativo: i testi restano statici (niente
 * position:relative), così lo ::after dello stretched-link copre tutta la card.
 */
.launch-card__media {
    z-index: -1;
}

/* Overlay leggibilità — scuro sopra (titolo) e in basso (testo). */
.launch-card__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.15) 45%,
        rgba(0, 0, 0, 0.45) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Zoom immagine su hover */
.launch-card__media .img-cover {
    transition: transform 0.5s var(--transition-timing);
}

.launch-card:hover .launch-card__media .img-cover {
    transform: scale(1.04);
}

.launch-card__title {
    font-size: var(--fs-50);
    font-weight: 400;
    line-height: 1.29;
    color: var(--color-white);
    margin: 0;
}

.launch-card__link {
    color: inherit;
    text-decoration: none;
}

.launch-card__text {
    font-size: var(--fs-20);
    font-weight: 400;
    line-height: 1.42;
    color: var(--color-white);
    max-width: 50ch;
    margin: 0;
    padding-top: 1em;
}


/* ── 5. Latest Insights — carousel news (riusabile) ──────────────────────────── */
/*
 * Layout: head su una riga sopra; sotto, riga con frecce (sx) + slider (dx).
 * Trucco overflow (martondivision): sezione clip, .swiper overflow visibile,
 * ::after maschera col bg sezione a sinistra → le slide passano "sotto" le frecce.
 */
.latest-insights {
    position: relative;
    background: var(--color-white);
    padding-block: var(--p-160);
    overflow: hidden;
}

.latest-insights__head {
    margin-bottom: var(--p-90);
}

.latest-insights__title {
    font-size: var(--fs-60);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-black);
    max-width: 20ch;
    text-wrap: balance;
    margin: 0;
}

.latest-insights__text {
    font-size: var(--fs-20);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 60ch;
    margin-top: 1.5em;
}

/* Colonna frecce: sopra la maschera. */
.latest-insights__nav-col {
    position: relative;
    z-index: 3;
}

.latest-insights__nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.latest-insights__nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent no-repeat center / 17px 8px;
    /* freccia ← (next ruotata 180°) */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='17' height='8' fill='none' viewBox='0 0 17 8'%3e%3cpath fill='%23222' fill-rule='evenodd' d='M3.328 7.218.146 4.036a.5.5 0 0 1 0-.708L3.328.146a.5.5 0 1 1 .708.708L1.707 3.182H16.5v1H1.707L4.036 6.51a.5.5 0 0 1-.708.708Z' clip-rule='evenodd'/%3e%3c/svg%3e");
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.latest-insights__nav-next {
    transform: rotate(180deg);
}

.latest-insights__nav-btn:hover,
.latest-insights__nav-btn:focus-visible {
    border-color: var(--color-black);
}

.latest-insights__nav-btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.latest-insights__nav-btn.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Swiper: overflow VISIBILE — le slide debordano a destra e sinistra. */
.latest-insights__carousel {
    position: relative;
    overflow: visible;
}

/* Maschera: copre lo spazio a sinistra dello swiper col bg sezione. */
.latest-insights__carousel::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    right: 100%;
    width: 100vw;
    height: 100%;
    background: var(--color-white);
    pointer-events: none;
}

.latest-insights__carousel .swiper-slide {
    height: auto;
}

/* Card news — titolo in alto, meta+CTA in basso, divisore a sinistra.
 * Link solo sul titolo (.stretched-link): nome accessibile = titolo, e ::after
 * rende cliccabile l'intera card (.insight-card è il contenitore posizionato). */
.insight-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(1.5rem, 2.5vw, 3rem);
    border-left: 1px solid var(--color-border);
}

.insight-card__link {
    text-decoration: none;
    color: inherit;
}

.insight-card__title {
    font-size: var(--fs-24); /* Figma 25px — top scala 24 */
    font-weight: 400;
    line-height: 1.28;
    color: var(--color-black);
    /* spinge meta + CTA in basso */
    margin: 0 0 auto;
    transition: color 0.2s ease;
}

.insight-card:hover .insight-card__title,
.insight-card:focus-within .insight-card__title {
    color: var(--color-accent-dark);
}

.insight-card__date {
    display: block;
    font-size: var(--fs-17);
    font-weight: 300;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--color-black);
    margin: 2.5em 0 1.25em;
}

.insight-card__excerpt {
    font-size: var(--fs-18);
    font-weight: 300;
    color: var(--color-black);
    line-height: 1.42;
    margin: 0;
    /* Max ~3 righe */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* CTA card — .btn .btn-dark del tema; qui solo posizione (in basso a destra). */
.insight-card__more {
    align-self: end;
    margin-top: 10vh;
}

/* Hover sulla card → applica lo stato hover del bottone. */
.insight-card:hover .insight-card__more,
.insight-card:focus-within .insight-card__more {
    --bs-btn-bg:           var(--color-accent);
    --bs-btn-border-color: var(--color-accent);
    --bs-btn-color:        var(--color-black);
}


/* ── 6. Contacts banner (usa .banner per dark+overlay+padding) ──────────────── */

.contacts-banner__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

.contacts-banner__body {
    position: relative;
    z-index: 2;
    flex: 1 1 320px;
}

@media (max-width: 767.98px) {
    .contacts-banner__content {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ── Shared: Banner CTA — duale touch / mouse ────────────────────────────────── */
/*
 * Un solo controllo accessibile (.banner__cta = btn btn-light, link o button).
 *   - Touch / pointer coarse: bottone statico sotto al testo (default Bootstrap).
 *   - Mouse / pointer fine: il btn diventa sr-only (resta focusabile da tastiera)
 *     e compare .banner__circle, un cerchio che insegue il cursore (JS lerp).
 *     Il click sul banner inoltra al .banner__cta (vedi initFloatingCta).
 * Il cerchio è decorativo (aria-hidden): nessun ruolo, solo flourish del mouse.
 */

/* Stacco dal testo (visibile su touch; su mouse il btn è sr-only). */
.banner__cta {
    margin-top: 1.5rem;
}

/* Cerchio flottante: nascosto di default, attivato solo su pointer fine. */
.banner__circle {
    display: none;
}

@media (hover: hover) and (pointer: fine) {

    /* Il controllo reale resta nel DOM e focusabile, ma visivamente nascosto. */
    .banner.has-floating-cta .banner__cta {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Tastiera: al focus il bottone torna visibile (no trappola per chi naviga TAB). */
    .banner.has-floating-cta .banner__cta:focus-visible {
        position: static;
        z-index: 4;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    /*
     * Posizione (x,y) e scala sono guidate interamente da GSAP (initFloatingCta):
     * un'unica sorgente di transform → niente conflitto CSS scale / gsap translate.
     * scale(0) iniziale evita il flash a pieno-size prima che parta il JS.
     */
    .banner__circle {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 120px;
        height: 120px;
        /* gsap setta translate(x,y) = cursore nel banner; questi margini centrano. */
        margin-left: -60px;
        margin-top: -60px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(3px);
        color: var(--color-black);
        pointer-events: none;
        transform: scale(0);
        transform-origin: center;
        will-change: transform;
    }

    .banner__circle-label {
        max-width: 87%;
        margin: 0 auto;
        font-size: var(--fs-14);
        font-weight: 400;
        line-height: 1.21;
        letter-spacing: 1px;
        text-transform: uppercase;
        text-align: center;
        color: var(--color-black);
    }
}


/* ── Save Popup — modale risparmio energetico ────────────────────────────────── */

.save-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2.5rem);
    opacity: 0;
    transition: opacity 0.3s var(--transition-timing);
}

.save-modal[hidden] {
    display: none;
}

.save-modal.is-open {
    opacity: 1;
}

.save-modal__backdrop {
    position: absolute;
    inset: 0;
    background: #111411f7;
}

.save-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1114px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    background: var(--color-black);
    color: var(--color-white);
    transform: translateY(20px);
    transition: transform 0.3s var(--transition-timing);
}

.save-modal.is-open .save-modal__dialog {
    transform: none;
}

.save-modal__close {
    position: absolute;
    top: clamp(1rem, 2vw, 1.5rem);
    right: clamp(1rem, 2vw, 1.5rem);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-black);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s var(--transition-timing);
}

.save-modal__close:hover {
    transform: scale(1.08);
}

/* Cover — onda verde puntinata (decorativa) come background, ancorata in alto a dx. */
.save-modal__cover {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
    background: var(--color-black) url('../img/save-cover.jpg') no-repeat top right / cover;
}

.save-modal__title {
    position: relative;
    font-size: var(--fs-50);
    font-weight: 400;
    line-height: 1.29;
    color: var(--color-white);
    max-width: 24ch;
    text-wrap: balance;
    margin: 0;
}

.save-modal__subtitle {
    position: relative;
    font-size: var(--fs-20);
    font-weight: 300;
    line-height: 1.5;
    color: var(--color-white);
    margin-top: 1.2em;
}

/* Fascia grigia: radio potenza + titolo consumo */
.save-modal__strip {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 2vw, 1.25rem) clamp(1.5rem, 4vw, 4rem);
    background: #1d1d1d;
}

.save-modal__powers {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.save-power {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.save-power__input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.save-power__box {
    width: 20px;
    height: 20px;
    border: 1px solid #6a6a6a;
    background: transparent;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.save-power__input:checked + .save-power__box {
    background: var(--color-accent) no-repeat center / 12px;
    border-color: var(--color-accent);
    /* check mark */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10' fill='none'%3e%3cpath d='M1 5l3.5 3.5L11 1' stroke='%23000' stroke-width='1.6'/%3e%3c/svg%3e");
}

.save-power__input:focus-visible + .save-power__box {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.save-power__label {
    font-size: var(--fs-18);
    color: var(--color-white);
}

.save-modal__consumption {
    font-size: var(--fs-15);
    font-weight: 300;
    line-height: 1.23;
    text-transform: uppercase;
    color: var(--color-white);
    letter-spacing: 0.02em;
}

/* Pannelli grafico */
.save-modal__panels {
    padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 4rem) clamp(2rem, 4vw, 4rem);
}

.save-graph {
    display: none;
}

.save-graph.is-active {
    display: block;
}

.save-graph__row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 2.2fr minmax(160px, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding-block: clamp(1.5rem, 3vw, 2.75rem);
}

.save-graph__row + .save-graph__row {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.save-graph__name {
    font-size: var(--fs-17);
    font-weight: 300;
    line-height: 1.23;
    color: var(--color-white);
}

.save-graph__plot {
    min-width: 0;
}

.save-graph__track {
    position: relative;
    height: 26px;
    width: 100%;
}

.save-graph__bar {
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.9s var(--transition-timing);
}

.save-graph__bar--green {
    background: linear-gradient(90deg, #00c700 0%, #00ed18 100%);
}

.save-graph__bar--black {
    background: linear-gradient(90deg, #494948 0%, #9d9d9c 100%);
}

/* Asse x: tick assoluti a 0 / 1/3 / 2/3 / 100% + linea continua (come originale).
   Così i valori corrispondono alla scala, non distribuiti dal flex. */
.save-graph__xaxis {
    position: relative;
    height: 40px;
    margin-top: 0.5rem;
}

.save-graph__xaxis::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.save-graph__step {
    position: absolute;
    top: 0;
    left: 0;
}

.save-graph__step:nth-child(2) { left: calc(100% / 3); }
.save-graph__step:nth-child(3) { left: calc(100% / 3 * 2); }
.save-graph__step:nth-child(4) { left: 100%; }

.save-graph__tick {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 9px;
    background: rgba(255, 255, 255, 0.4);
}

/* Valore centrato sotto la sua tic (gli estremi sforano simmetrici, ok). */
.save-graph__step-value {
    position: absolute;
    top: 16px;
    left: 0;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.75rem; /* 12px (no token) */
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.save-graph__saving-label {
    font-size: var(--fs-14);
    font-weight: 300;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    margin-bottom: 0.4em;
}

.save-graph__saving-value {
    font-size: var(--fs-30);
    font-weight: 400;
    line-height: 1.1;
}

.save-graph__saving-value--green {
    color: var(--color-accent);
}

@media (max-width: 1199.98px) {
    .save-graph__row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Tieni solo primo e ultimo step (estremi asse); nascondi gli intermedi. */
    .save-graph__step:not(:first-child):not(:last-child) {
        display: none;
    }

    /* Estremi allineati dentro al binario (no centrato) per non farsi tagliare. */
    .save-graph__step:first-child .save-graph__step-value {
        transform: none;
        text-align: left;
    }

    .save-graph__step:last-child .save-graph__step-value {
        left: auto;
        right: 0;
        transform: none;
        text-align: right;
    }
}


/* ── Contacts page ───────────────────────────────────────────────────────── */
/* Header fixed trasparente → padding-top per liberare la barra. */
.contacts {
    background: var(--color-grey);
    padding-top: calc(var(--p-160) * 2); /* extra spazio per header fixed */
    padding-bottom: var(--p-160);
}

.contacts__title {
    font-size: var(--fs-60);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-black);
    text-wrap: balance;
    max-width: 14ch;
    margin: 0 0 0.8em;
}

.contacts__text {
    max-width: 48ch;
    color: var(--color-text-muted);
}

.contacts__hq {
    margin-top: 2.5rem;
}

.contacts__hq-title {
    font-size: var(--fs-17);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.contacts__hq-text {
    color: var(--color-text-muted);
    max-width: 40ch;
}

.contacts__form {
    margin-top: clamp(2rem, 4vw, 0);
}

/* Gravity Forms — stile base (raffinabile a form creato). */
.contacts__form .gfield_label {
    font-size: var(--fs-15);
    font-weight: 400;
    margin-bottom: 0.4rem;
}

.contacts__form input[type="text"],
.contacts__form input[type="email"],
.contacts__form input[type="tel"],
.contacts__form select,
.contacts__form textarea {
    width: 100%;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-size: var(--fs-16);
}

.contacts__form textarea { min-height: 140px; }

/* ── Branch offices ──────────────────────────────────────────────────────── */
.branch {
    background: var(--color-white);
    padding-block: var(--p-160);
}

.branch__title {
    font-size: var(--fs-60);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-black);
    margin: 0 0 clamp(2rem, 4vw, 3.5rem);
}

.branch__img {
    display: block;
    width: 100%;
    height: auto;
}
