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


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

:root {
    /* Colors */
    --color-primary:       #0a0a0a;
    --color-primary-rgb:   10, 10, 10;
    --color-secondary:     #444444;
    --color-accent:        #2271b1;
    --color-accent-rgb:    34, 113, 177;
    --color-bg:            #ffffff;
    --color-bg-alt:        #f5f5f5;
    --color-white:         #ffffff;   /* bianco assoluto: testo su fondi scuri, non lo sfondo pagina */
    --color-white-rgb:     255, 255, 255;
    --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:    'Inter', 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.
       Il min tiene fino a 992px (sotto lg le col-md-* sono già affiancate e
       più strette del full-width mobile), poi cresce lineare fino a 1920px. */
    --fs-12:  0.75rem;    /* etichette, tag — fisso */
    --fs-13:  0.8125rem;  /* microcopy — fisso */
    --fs-14:  0.875rem;
    --fs-15:  0.9375rem;  /* voci menu, testi secondari — fisso */
    --fs-16:  1rem;
    --fs-22:  clamp(1.125rem, 0.431vw + 0.858rem, 1.375rem);  /* 18→22px */
    --fs-28:  clamp(1.25rem,  0.862vw + 0.716rem, 1.75rem);   /* 20→28px */
    --fs-40:  clamp(1.5rem,   1.724vw + 0.431rem, 2.5rem);    /* 24→40px */
    --fs-56:  clamp(2rem,     2.586vw + 0.397rem, 3.5rem);    /* 32→56px */
    --fs-80:  clamp(2.5rem,   4.310vw - 0.172rem, 5rem);      /* 40→80px */

    /* 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, 3.6458vw);   /* padding laterale esterno (~70px @ 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.
       Un nome solo: il valore cambia nel media query qui sotto, così chi scrive
       var(--header-height) prende sempre quello giusto al breakpoint corrente. */
    --header-height: 72px;
}

@media (min-width: 992px) {
    :root { --header-height: 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);
}

/* Bootstrap Reboot dà margin-bottom a p e figure: lo spacing lo decidono
   i componenti, non il reboot. */
p,
figure {
    margin-block: 0;
}

html {
    scroll-behavior: smooth;
    /* L'header è sticky: senza questo gli anchor finiscono sotto la barra. */
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

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;
}

.img-cover,
.img-contain,
.img-scale,
.media-bg,
.media-bg::after {
    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: rgba(var(--color-accent-rgb), 0.15);
    color: var(--color-primary);
}


/* ── 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: var(--color-white);
    font-weight: 600;
    border-radius: 4px;
}

/* Classe WP core (search form, commenti + plugin come Complianz/Gravity Forms
   la emettono). Bootstrap non la fornisce → definirla. Focusabile: torna
   visibile con tastiera. */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    position: absolute !important;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.5rem 1rem;
    z-index: 9999;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    border-radius: 4px;
}

/* Rispetta "riduci movimento": nessuna animazione, ma gli stati restano funzionanti. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ── 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.is-top — aggiunta da initSmartHeader quando la pagina è in cima.
 * Da qui si costruiscono gli stati di progetto (barra trasparente sull'hero,
 * padding più generoso, logo chiaro…).
 *
 * MAI `min-height: var(--header-height)` su .header: il JS scrive quella
 * variabile misurando l'header, quindi si innesca un loop del ResizeObserver.
 * La variabile serve a chi sta fuori — scroll-padding, spacer, sticky sotto la barra.
 */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    transition: transform var(--transition-base);
}

.header .container-fluid { padding-block: 1rem; }
.header__brand           { display: inline-block; font-weight: 700; text-decoration: none; }
.header__actions         { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; }

/* ── Menu desktop ── */

.header__menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.5rem 1rem;
    background: none;
    border: 0;
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--fs-16);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-base);
}

.header__link:hover,
.header__link[aria-expanded="true"],
.header__link[aria-current="page"] { color: var(--color-accent); }

.header__link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

.header__caret {
    width: 0.4em;
    height: 0.4em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-0.1em);
    transition: transform var(--transition-base);
}
.header__link--toggle[aria-expanded="true"] .header__caret {
    transform: rotate(-135deg) translateY(-0.04em);
}


/* ── Megamenu — pannello full-width sotto la barra ──────────────────────────── */

/* Fuori da <header> nel markup: deve dimmare la pagina, non la barra. */
.header__mega-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(var(--color-primary-rgb), 0.5);
}

.header__mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 95;
    padding-block: var(--p-60);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 24px 40px rgba(var(--color-primary-rgb), 0.12);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition-base), transform var(--transition-base);
}
.header__mega-panel.is-open { opacity: 1; transform: translateY(0); }

/* max-height calcolata in JS sullo spazio disponibile sotto la barra */
.header__mega-panel > .container-fluid {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
.header__mega-panel > .container-fluid::-webkit-scrollbar { width: 0; height: 0; }

body.mega-open { overflow: hidden; }

.header__mega-close {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 100px;
    background: var(--color-accent);
    color: var(--color-bg);
    cursor: pointer;
}
.header__mega-close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.mega-col { display: flex; flex-direction: column; gap: 0.75rem; }

.mega-col__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.mega-col__title {
    color: var(--color-text);
    font-size: var(--fs-22);
    font-weight: 600;
    text-decoration: none;
}
.mega-col__title:hover { color: var(--color-accent); }

.mega-col__text { color: var(--color-text-muted); font-size: var(--fs-16); }

.mega-col__links { list-style: none; margin: 0; padding: 0; }
.mega-col__links li { border-top: 1px solid var(--color-border); }
.mega-col__links a {
    display: block;
    padding-block: 0.6rem;
    color: var(--color-text);
    font-size: var(--fs-16);
    text-decoration: none;
}
.mega-col__links a:hover { color: var(--color-accent); }


/* ── Burger ─────────────────────────────────────────────────────────────────── */

.header__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--color-text);
    cursor: pointer;
}
.header__menu-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }

.header__burger,
.header__burger::before,
.header__burger::after {
    display: block;
    width: 26px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.header__burger { position: relative; }
.header__burger::before,
.header__burger::after {
    content: '';
    position: absolute;
    left: 0;
    transition: transform 0.3s var(--transition-timing), top 0.3s, bottom 0.3s;
}
.header__burger::before { top: -8px; }
.header__burger::after  { bottom: -8px; }

body.menu-open .header__burger            { background: transparent; }
body.menu-open .header__burger::before    { top: 0; transform: rotate(45deg); }
body.menu-open .header__burger::after     { bottom: 0; transform: rotate(-45deg); }

body.menu-open { overflow: hidden; }


/* ── Nav drawer — slide-in da destra ────────────────────────────────────────── */

.nav-drawer__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(var(--color-primary-rgb), 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--transition-timing), visibility 0s linear 0.3s;
}
body.menu-open .nav-drawer__backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s var(--transition-timing), visibility 0s linear 0s;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1100;
    width: min(360px, 86vw);
    height: 100dvh;
    background: var(--color-bg);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s var(--transition-timing), visibility 0s linear 0.35s;
}
body.menu-open .nav-drawer {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.35s var(--transition-timing), visibility 0s linear 0s;
}

.nav-drawer__panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nav-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.nav-drawer__brand { text-decoration: none; font-weight: 700; }

.nav-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 8px;
    color: var(--color-text);
    cursor: pointer;
}
.nav-drawer__close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.nav-drawer__menu { list-style: none; margin: 0; padding: 0.5rem 0; flex: 1 1 auto; }
.nav-drawer__item { border-bottom: 1px solid var(--color-border); }

.nav-drawer__link,
.nav-drawer__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: none;
    border: 0;
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--fs-22);
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.nav-drawer__link:hover,
.nav-drawer__link[aria-current="page"],
.nav-drawer__toggle:hover { color: var(--color-accent); }

.nav-drawer__link:focus-visible,
.nav-drawer__toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.nav-drawer__caret {
    flex: 0 0 auto;
    width: 0.5em;
    height: 0.5em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-0.1em);
    transition: transform var(--transition-base);
}
.nav-drawer__item--has-children.is-expanded > .nav-drawer__toggle .nav-drawer__caret {
    transform: rotate(-135deg) translateY(-0.04em);
}

.nav-drawer__sub {
    max-height: 0;
    overflow: hidden;
    background: var(--color-bg-alt);
    transition: max-height 0.35s var(--transition-timing);
}
.nav-drawer__item--has-children.is-expanded > .nav-drawer__sub { max-height: 200vh; }

.nav-drawer__group { padding-block: 0.5rem; }
.nav-drawer__group + .nav-drawer__group { border-top: 1px solid var(--color-border); }

.nav-drawer__group-title {
    display: block;
    padding: 0.65rem 1.25rem 0.35rem 1.75rem;
    color: var(--color-text);
    font-size: var(--fs-16);
    font-weight: 600;
    text-decoration: none;
}
.nav-drawer__group-title:hover { color: var(--color-accent); }

.nav-drawer__sub-link {
    display: block;
    padding: 0.5rem 1.25rem 0.5rem 1.75rem;
    color: var(--color-text-muted);
    font-size: var(--fs-16);
    text-decoration: none;
}
.nav-drawer__sub-link:hover { color: var(--color-accent); }

.nav-drawer__foot:not(:empty) {
    padding: 1.25rem;
    margin-top: auto;
    border-top: 1px solid var(--color-border);
}


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

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

.footer__main {
    padding-block: clamp(3rem, 6vw, 5rem);
    border-bottom: 1px solid rgba(var(--color-white-rgb), 0.1);
}

.footer__logo        { display: inline-block; }
.footer__logo .brand { height: 36px; width: auto; color: var(--color-white); }

.footer__tagline {
    font-size: var(--fs-14);
    color: rgba(var(--color-white-rgb), 0.6);
    margin-bottom: 0;
    margin-top: 0.75rem;
}

.footer__col-title {
    font-size: var(--fs-12);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(var(--color-white-rgb), 0.4);
    margin-bottom: 1rem;
}

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

.footer__nav li a {
    font-size: var(--fs-15);
    color: rgba(var(--color-white-rgb), 0.7);
}

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

/* Footer Legal */

.footer__legal {
    padding-block: 1.25rem;
    background: rgba(0,0,0,0.2);
    font-size: var(--fs-13);
}

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

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

@media (min-width: 768px) {
    .footer__legal-links { justify-content: flex-end; }
}

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

.footer__legal-menu li a { color: rgba(var(--color-white-rgb), 0.5); }
.footer__legal-menu li a:hover,
.footer__legal-menu li a:focus-visible { color: var(--color-white); }

.footer__credits {
    color: rgba(var(--color-white-rgb), 0.4);
    margin-bottom: 0;
    white-space: nowrap;
}

.footer__credits a       { color: rgba(var(--color-white-rgb), 0.6); }
.footer__credits a:hover,
.footer__credits a:focus-visible { color: var(--color-white); }


/* ── 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-16);
    --bs-btn-font-weight:      600;
    --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;
}


/* ── Gravity Forms ───────────────────────────────────────────────────────────── */
/*
 * Vestire i form rimappando i token --gf-* su .gform-theme, mai di specificità:
 * il tema orbital porta le sue custom properties e vince sull'ordine di caricamento.
 * Servono !important — GF le stampa inline sul form.
 * Famiglie: --gf-radius, --gf-color-primary-*, --gf-ctrl-*, --gf-ctrl-btn-*.
 */


/* ── .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: 600;
    line-height: 1.3;
}

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

.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;
    font-size: var(--fs-14);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.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-block: var(--p-90);
}

.page-title {
    font-size: var(--fs-56);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

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


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

.module-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-primary);
    color: var(--color-white);
}

.module-hero__content {
    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(var(--color-white-rgb), 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;
    border-radius: 4px;
}

.card-post__title {
    font-size: var(--fs-22);
    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: var(--fs-15);
}


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


/* ── Edit post link (admin, solo loggati) ────────────────────────────────────── */

.post-edit-link {
    position: fixed;
    z-index: 9999;
    bottom: 0;
    right: 0;
    padding: 10px 18px;
    background-color: #3c3c3c;
    color: var(--color-white);
    font-size: var(--fs-14);
    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;
}

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