/*
 * Theme Name:  Studio Fedeli & Olivotto
 * Theme URI:   https://github.com/be-digital-it/fedeliolivotto-wp-theme
 * Author:      Be Digital IT
 * Author URI:  https://be-digital.it
 * Description: Tema custom per Studio Fedeli & Olivotto Associati. Basato su wp-classic-starter — nessun page builder, nessun build tool, PHP puro + CSS custom properties + vanilla JS.
 * Version:     0.2.2
 * Requires at least: 6.5
 * Requires PHP: 7.4
 * License:     GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: studiofedeliolivotto
 *
 * TABLE OF CONTENTS
 * -----------------
 * 01. Design Tokens (Custom Properties)
 * 02. Reset & Base
 * 03. Typography
 * 04. Layout & Grid
 * 05. Header
 * 06. Navigation
 * 07. Hero
 * 08. Components (bottoni, label)
 * 09. Sections (homepage)
 * 10. Template Parts (loop, single, archive, commenti)
 * 11. Sidebar & Widgets
 * 12. Footer
 * 13. Forms
 * 14. Utility & Helpers
 * 15. Responsive
 */


/* ==========================================================================
   01. DESIGN TOKENS (Custom Properties)
   ========================================================================== */

/* Khand e Hind self-hosted — vedi assets/fonts/ */
@font-face {
    font-family: 'Khand';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('assets/fonts/Khand-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Khand';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/Khand-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Khand';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/Khand-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Khand';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/Khand-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Khand';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/Khand-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Hind';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('assets/fonts/Hind-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Hind';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/Hind-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Hind';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/Hind-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Hind';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/Hind-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Hind';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/Hind-Bold.woff2') format('woff2');
}

:root {
    /* ---------- BRAND COLORS ---------- */
    --color-primary:        #E63D25; /* azioni primarie, accent, CTA */
    --color-primary-hover:  #C4341F;
    --color-secondary:      #263037; /* blu-grigio scuro — testo / superfici scure */
    --color-secondary-soft: #34414A;

    /* ---------- THIRD-PARTY BRAND COLORS ---------- */
    --color-linkedin: #0A66C2;
    --color-linkedin-hover: #004182;
    --color-roncalli: #2A5BA8; /* blu royal logo Roncalli */

    /* ---------- SURFACE / NEUTRALS ---------- */
    --color-surface:    #E5E5D2; /* beige carta — sfondo dominante */
    --color-surface-2:  #EFEFE3;
    --color-white:      #FFFFFF;
    --color-border:       #D7D7C4; /* hairline su beige */
    --color-border-cool:  #E5E7EB; /* hairline su bianco */

    /* ---------- TEXT ---------- */
    --color-text:        #263037;
    --color-text-muted:  #8A8F86;
    --color-text-invert: #F4F4E9;

    /* ---------- TYPOGRAPHY ---------- */
    --font-editorial: 'Khand', system-ui, sans-serif; /* heading + body */
    --font-display:   'Hind', system-ui, sans-serif;  /* hero, label, bottoni */
    --font-mono:      ui-monospace, 'Cascadia Code', Menlo, monospace;

    /* Scala tipografica strutturale (sezioni 02-15) */
    --text-sm:   0.875rem;
    --text-base: 1.0625rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;
    --text-5xl:  3rem;

    --leading-tight:  1.25;
    --leading-normal: 1.65;

    /* Scala tipografica editoriale (hero, sezioni brand) */
    --text-hero:    clamp(3rem, 6vw, 5.5rem);
    --text-h1:      clamp(2.5rem, 4vw, 3.5rem);
    --text-h2:      clamp(2rem, 3vw, 2.75rem);
    --text-h3:      1.75rem;
    --text-h4:      1.375rem;
    --text-body-lg: 1.25rem;
    --text-body:    1.0625rem;
    --text-small:   0.9375rem;
    --text-label:   0.8125rem;

    /* ---------- SPACING ---------- */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --space-5: 4rem;
    --space-6: 6rem;
    --space-7: 9rem;

    /* ---------- LAYOUT ---------- */
    --content-width: 760px;
    --sidebar-width: 300px;
    --maxw:   1200px;
    --gutter: clamp(1.5rem, 5vw, 6rem);
    --z-sticky: 100;

    /* ---------- RADII / SHADOWS / TRANSITIONS ---------- */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-pill: 9999px;
    --shadow-sm:  0 1px 2px rgb(0 0 0 / 0.05);
    --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.1);
    --transition: 200ms ease;
}


/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    font-family: var(--font-editorial);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.no-js .js-only { display: none; }

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

svg { overflow: hidden; }

ul, ol { padding-left: var(--space-3); }

dl, dd { margin: 0; }

table {
    width: 100%;
    border-collapse: collapse;
}

hr {
    border: 0;
    border-top: 1px solid var(--color-border-cool);
    margin: var(--space-4) 0;
}


/* ==========================================================================
   03. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-2);
    line-height: var(--leading-tight);
    font-weight: 700;
    color: var(--color-primary);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl),  3vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { margin: 0 0 var(--space-2); }

a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color var(--transition);
}

a:hover,
a:focus {
    color: var(--color-primary-hover);
}

strong, b { font-weight: 700; }
em, i     { font-style: italic; }

code,
kbd,
samp,
pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

pre {
    overflow-x: auto;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-cool);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    margin: 0 0 var(--space-2);
}

code { background: var(--color-surface-2); padding: 0.1em 0.3em; border-radius: var(--radius-sm); }
pre code { background: none; padding: 0; }

blockquote {
    margin: 0 0 var(--space-2);
    padding: var(--space-3);
    background: var(--color-surface-2);
    font-style: italic;
}

blockquote cite {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--color-text-muted);
}

figcaption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-1);
}


/* ==========================================================================
   04. LAYOUT & GRID
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow {
    max-width: var(--content-width);
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

/* Template senza page-hero (page.php generico: privacy, cookie, ecc.;
   single, archivi, ricerca): il contenuto parte sotto l'header fisso. */
.site-content > .container {
    padding-block: calc(var(--space-6) + var(--space-4)) var(--space-6);
}

/* Two-column layout with sidebar */
.content-area {
    width: 100%;
}

@media (min-width: 1024px) {
    .has-sidebar .content-sidebar-wrap {
        display: grid;
        grid-template-columns: 1fr var(--sidebar-width);
        gap: var(--space-5);
        align-items: start;
    }
}

/* Generic grid helpers */
.grid-2 { display: grid; gap: var(--space-4); }
.grid-3 { display: grid; gap: var(--space-4); }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}


/* ==========================================================================
   05. HEADER
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: rgb(38 48 55 / 0.96);
    backdrop-filter: saturate(1.1) blur(10px);
    -webkit-backdrop-filter: saturate(1.1) blur(10px);
    border-bottom: 1px solid rgb(244 244 233 / 0.08);
    transition: background 0.32s ease, border-color 0.32s ease, backdrop-filter 0.32s ease, box-shadow 0.32s ease;
}

.site-header.is-sticky {
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.22);
}

/* Sopra l'hero scuro della home: header trasparente finché non si scrolla */
.home .site-header:not(.is-sticky) {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}

/* Branding */
.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.site-branding img,
.custom-logo {
    height: 48px;
    width: auto;
    display: block;
}

.site-title {
    margin: 0;
    font-family: var(--font-editorial);
    font-size: var(--text-h4);
    font-weight: 500;
    line-height: 1;
    color: var(--color-text-invert);
}

.site-description {
    display: none;
}


/* ==========================================================================
   06. NAVIGATION
   ========================================================================== */

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li { position: relative; }

.main-navigation a {
    display: block;
    text-decoration: none;
}

/* Hamburger button */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    gap: 5px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text-invert);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle .icon-menu,
.menu-toggle .icon-close {
    display: none;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 1024px) {

    .menu-toggle { display: none; }

    #site-navigation {
        display: flex;
        align-items: center;
    }

    .main-navigation a {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 0.875rem;
        letter-spacing: 0.03em;
        position: relative;
        padding-bottom: 2px;
        color: rgb(244 244 233 / 0.75);
        transition: color 0.2s ease;
    }

    .main-navigation a::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--color-primary);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.22s ease;
    }

    .main-navigation a:hover,
    .main-navigation .current-menu-item > a {
        color: var(--color-text-invert);
    }

    .main-navigation a:hover::after,
    .main-navigation .current-menu-item > a::after {
        transform: scaleX(1);
    }

    .header-cta {
        flex-shrink: 0;
    }
}

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.lang-switcher__link {
    display: block;
    padding: 0.25rem 0.4rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: rgb(244 244 233 / 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.lang-switcher__link:hover {
    color: var(--color-text-invert);
}

.lang-switcher__link--active {
    color: var(--color-text-invert);
}

@media (max-width: 1023px) {

    .header-cta { display: none; }

    /* Branding a sinistra, selettore lingua + icona menu raggruppati
       a destra (icona menu dopo i selettori di lingua). */
    .site-header__inner {
        justify-content: flex-start;
    }

    .site-branding {
        margin-right: auto;
    }

    .menu-toggle {
        order: 2;
    }

    .main-navigation {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgb(38 48 55 / 0.98);
        border-top: 1px solid rgb(244 244 233 / 0.15);
        padding: var(--space-2) var(--gutter) var(--space-3);
        backdrop-filter: blur(10px);
    }

    .main-navigation.is-open { display: flex; }

    .main-navigation ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .main-navigation a {
        font-family: var(--font-editorial);
        font-size: var(--text-h4);
        font-weight: 400;
        padding: var(--space-2) 0;
        color: var(--color-text-invert);
        border-bottom: 1px solid rgb(244 244 233 / 0.12);
    }

    .main-navigation li:last-child a {
        border-bottom: none;
    }

    .sub-menu {
        list-style: none;
        margin: 0;
        padding: 0 0 var(--space-1) var(--space-2);
    }

    .sub-menu a {
        font-size: var(--text-body);
        font-weight: 400;
        padding: var(--space-1) 0;
        border-bottom: 1px solid rgb(244 244 233 / 0.08);
        color: rgb(244 244 233 / 0.75);
    }

    .sub-menu li:last-child a {
        border-bottom: 1px solid rgb(244 244 233 / 0.08);
    }
}

/* Dropdown groups ("Servizi", "Studio") */
@media (min-width: 1024px) {

    .main-navigation .sub-menu {
        display: none;
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        min-width: 190px;
        padding: var(--space-1) 0;
        margin: 0;
        background: var(--color-secondary-soft);
        border: 1px solid rgb(244 244 233 / 0.1);
        border-radius: var(--radius-md);
        list-style: none;
        z-index: 100;
    }

    /* Ponte invisibile che mantiene l'hover tra la voce e il sottomenu */
    .main-navigation .sub-menu::before {
        content: '';
        position: absolute;
        top: -0.75rem;
        left: 0;
        right: 0;
        height: 0.75rem;
    }

    .menu-item-has-children.is-open > .sub-menu,
    .menu-item-has-children:hover > .sub-menu,
    .menu-item-has-children:focus-within > .sub-menu {
        display: block;
    }

    .sub-menu li {
        width: 100%;
    }

    .sub-menu a {
        display: block;
        padding: 0.55rem var(--space-3);
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 0.8125rem;
        letter-spacing: 0.03em;
        text-transform: none;
        color: rgb(244 244 233 / 0.65);
        transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    }

    .sub-menu a::after {
        content: none;
    }

    .sub-menu a:hover {
        color: var(--color-text-invert);
        background: rgb(244 244 233 / 0.06);
        transform: translateX(0.25rem);
    }

    .sub-menu .current-menu-item > a {
        color: var(--color-primary);
    }
}


/* ==========================================================================
   07. HERO
   ========================================================================== */

.hero {
    background: var(--color-secondary);
    min-height: 100svh;
    padding-top: 5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero__video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgb(38 48 55 / 0.72) 0%,
        rgb(38 48 55 / 0.58) 35%,
        rgb(38 48 55 / 0.58) 65%,
        rgb(38 48 55 / 0.88) 100%
    );
}

.hero__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter) 2rem;
    position: relative;
    z-index: 2;
}

.hero__mark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-label);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgb(244 244 233 / 0.55);
    display: block;
    margin-bottom: 1.75rem;
}

.hero__heading {
    font-family: var(--font-editorial);
    font-weight: 400;
    font-size: var(--text-hero);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--color-text-invert);
    text-wrap: balance;
}

.hero__heading-accent {
    color: var(--color-primary);
}

/* word-split (homepage.js) */
.hero__word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.hero__word-inner {
    display: inline-block;
}

.hero__lead {
    font-family: var(--font-editorial);
    font-size: var(--text-body-lg);
    line-height: 1.55;
    color: rgb(244 244 233 / 0.72);
    max-width: 50ch;
    margin: 1.625rem auto 0;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.875rem;
    margin-top: 2.25rem;
}

.hero__stats {
    border-top: 1px solid rgb(244 244 233 / 0.12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: relative;
    z-index: 2;
    background: rgb(38 48 55 / 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero__stat {
    padding: 1.375rem 0;
    border-right: 1px solid rgb(244 244 233 / 0.08);
    text-align: center;
}

.hero__stat:last-child { border-right: none; }

.hero__stat-number {
    font-family: var(--font-editorial);
    font-weight: 500;
    font-size: 1.75rem;
    color: var(--color-text-invert);
    line-height: 1;
}

.hero__stat-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(244 244 233 / 0.4);
    margin-top: 0.35rem;
}


/* ==========================================================================
   08. COMPONENTS (bottoni, label)
   ========================================================================== */

.fo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-body);
    line-height: 1;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.fo-btn svg { transition: transform 0.22s ease; flex-shrink: 0; }
.fo-btn:hover svg { transform: translateX(4px); }

.fo-btn--primary { background: var(--color-primary); color: var(--color-text-invert); }
.fo-btn--primary:hover { background: var(--color-text-invert); color: var(--color-primary); border-color: var(--color-primary); }

.fo-btn--secondary { background: var(--color-secondary); color: var(--color-text-invert); }
.fo-btn--secondary:hover { background: #1B232A; }

.fo-btn--outline {
    background: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}
.fo-btn--outline:hover { background: var(--color-secondary); color: var(--color-text-invert); }

.fo-btn--outline-invert {
    background: transparent;
    color: var(--color-text-invert);
    border-color: rgb(244 244 233 / 0.4);
}
.fo-btn--outline-invert:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-invert);
}

.fo-btn--invert { background: var(--color-text-invert); color: var(--color-secondary); }
.fo-btn--invert:hover { background: #D8D8C6; }

.fo-btn--outline-red {
    background: transparent;
    color: var(--color-text-invert);
    border-color: rgb(244 244 233 / 0.5);
}
.fo-btn--outline-red:hover { background: var(--color-text-invert); color: var(--color-primary); }

.fo-btn--sm {
    font-size: 0.75rem;
    padding: 0.55rem 1.1rem;
    letter-spacing: 0.04em;
}

/* Etichette eyebrow (Hind, uppercase, letter-spacing largo) */
.fo-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-label);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}


/* ==========================================================================
   09. SECTIONS (homepage)
   ========================================================================== */

/* ---- Servizi (carousel) ---- */
.services {
    background: var(--color-secondary);
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem);
    overflow: hidden;
}

.services__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.services__heading {
    font-family: var(--font-editorial);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-text-invert);
    max-width: 22ch;
    margin: 0;
}

.services__header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
}

.services__intro {
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    line-height: 1.6;
    color: rgb(244 244 233 / 0.5);
    max-width: 36ch;
    text-align: right;
    margin: 0;
}

.services__nav { display: flex; gap: 0.5rem; }

.services__nav-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgb(244 244 233 / 0.2);
    border-radius: 50%;
    background: transparent;
    color: rgb(244 244 233 / 0.65);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.services__nav-btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-text-invert); }
.services__nav-btn:disabled { opacity: 0.25; cursor: default; pointer-events: none; }

.services__track-outer {
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.services__track-outer:active { cursor: grabbing; }

.services__track {
    display: flex;
    gap: 1rem;
    padding-left: max(1.5rem, calc((100vw - 1180px) / 2 + 1.5rem));
    padding-right: max(1.5rem, calc((100vw - 1180px) / 2 + 1.5rem));
    will-change: transform;
}

.service-card {
    flex-shrink: 0;
    width: clamp(260px, 28vw, 360px);
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
}

.service-card__photo {
    position: absolute;
    inset: 0;
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card__photo { transform: scale(1.07); }

.service-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.service-card__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgb(26 34 40 / 0.1) 0%, rgb(26 34 40 / 0.35) 50%, rgb(26 34 40 / 0.9) 100%);
    transition: background 0.45s ease;
    z-index: 1;
}

.service-card:hover .service-card__scrim {
    background: linear-gradient(to bottom, rgb(160 40 40 / 0.12) 0%, rgb(160 40 40 / 0.28) 50%, rgb(26 34 40 / 0.94) 100%);
}

.service-card__num {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-family: var(--font-editorial);
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1;
    color: rgb(244 244 233 / 0.12);
    z-index: 2;
    transition: color 0.35s ease;
}

.service-card:hover .service-card__num { color: rgb(244 244 233 / 0.3); }

.service-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.375rem 1.75rem;
    z-index: 2;
}

.service-card__title {
    font-family: var(--font-editorial);
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--color-text-invert);
    margin: 0;
}

.service-card__reveal {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card__reveal {
    grid-template-rows: 1fr;
}

.service-card__reveal-inner {
    overflow: hidden;
    min-height: 0;
}

.service-card__desc {
    font-family: var(--font-editorial);
    font-size: var(--text-small);
    color: rgb(244 244 233 / 0.68);
    line-height: 1.55;
    margin: 0.625rem 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-card__desc { opacity: 1; }

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.875rem;
    opacity: 0;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.3s ease 0.1s, gap 0.2s ease;
}

.service-card:hover .service-card__link { opacity: 1; }
.service-card__link:hover { gap: 0.625rem; }

.services__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 2rem;
}

.services__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(244 244 233 / 0.2);
    cursor: pointer;
    transition: background 0.25s ease;
    border: none;
    padding: 0;
}

.services__dot.is-active { background: var(--color-primary); width: 20px; border-radius: 3px; }


/* ---- Studio (about magazine) ---- */
.about {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    min-height: 75vh;
}

.about__panel--text {
    background: var(--color-surface);
    padding: clamp(3.5rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 7vw, 6rem) calc(var(--gutter) + ((100vw - var(--maxw)) / 2));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.75rem;
}

.about__panel--text .fo-btn {
    align-self: flex-start;
}

@media (max-width: 1200px) {
    .about__panel--text { padding-left: var(--gutter); }
}

.about__eyebrow {
    color: var(--color-text-muted);
}

.about__pull {
    font-family: var(--font-editorial);
    font-size: clamp(1.625rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: 0.01em;
    color: var(--color-secondary);
    text-wrap: balance;
    margin: 0;
}

.about__pull-accent { color: var(--color-primary); font-style: normal; }

.about__body {
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 48ch;
    margin: 0;
}

.about__panel--photo {
    position: relative;
    overflow: hidden;
    background: #2E3C44;
}

.about__panel--photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 40, 55, 0.45);
    pointer-events: none;
    z-index: 1;
}

.about__photo {
    position: absolute;
    inset: -8%;
    max-width: none;
    width: 116%;
    height: 116%;
    object-fit: cover;
    object-position: center 25%;
    will-change: transform;
}


/* ---- Statistiche ---- */
.stats {
    background: var(--color-surface);
    padding: clamp(3rem, 6vw, 5rem) 0;
    border-top: 1px solid var(--color-border);
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.stat {
    padding: 2rem 1.75rem;
    border-right: 1px solid var(--color-border);
    text-align: center;
}

.stat:last-child { border-right: none; text-align: right; }
.stat:first-child { text-align: left; }

.stat__number {
    font-family: var(--font-editorial);
    font-weight: 500;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
    color: var(--color-secondary);
}

.stat__label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}


/* ---- Testimonianze ---- */
.testimonials {
    background: var(--color-surface-2);
    padding: clamp(3rem, 6vw, 5rem) 0 0;
}

.testimonials--no-clients {
    padding-bottom: clamp(3rem, 6vw, 5rem);
}

.testimonials__intro {
    margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.testimonials__intro h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h1);
    font-weight: 400;
    line-height: 1.05;
    color: var(--color-secondary);
    text-wrap: balance;
    margin: 0;
}

.testimonials__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: auto auto;
    gap: 1px;
    background: var(--color-border);
}

.testimonial {
    background: var(--color-surface-2);
    padding: 1.75rem 1.875rem;
    transition: background 0.22s ease;
}

.testimonial:hover { background: var(--color-white); }

.testimonial--large {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial__quote-mark {
    font-family: var(--font-editorial);
    font-size: 3rem;
    line-height: 0.7;
    color: var(--color-primary);
    opacity: 0.3;
    margin-bottom: 0.625rem;
    display: block;
    user-select: none;
    transition: opacity 0.22s ease;
}

.testimonial:hover .testimonial__quote-mark { opacity: 1; }

.testimonial__text {
    font-family: var(--font-editorial);
    font-size: clamp(1rem, 1.6vw, 1.375rem);
    font-weight: 400;
    line-height: 1.45;
    color: var(--color-secondary);
    text-wrap: pretty;
    margin: 0;
}

.testimonial:not(.testimonial--large) .testimonial__text { font-size: 1.0625rem; }

.testimonial__author {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.testimonial__author-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-secondary);
}

.testimonial__author-role {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

.testimonial__logo {
    display: block;
    height: 20px;
    width: auto;
    margin-top: 0.875rem;
    opacity: 0.32;
    color: var(--color-secondary);
    transition: opacity 0.22s ease, color 0.22s ease;
}

.testimonials__grid > :nth-child(1):hover .testimonial__logo { opacity: 1; color: #1B4F8C; }
.testimonials__grid > :nth-child(2):hover .testimonial__logo { opacity: 1; color: #3D7A5A; }
.testimonials__grid > :nth-child(3):hover .testimonial__logo { opacity: 1; color: #7B3FA0; }

/* ---- Carosello clienti ---- */
.clients {
    overflow: hidden;
    padding: clamp(1.75rem, 3vw, 2.5rem) 0;
    border-top: 1px solid var(--color-border);
    margin-top: clamp(2rem, 4vw, 3rem);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.clients__track {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    width: max-content;
    animation: clients-scroll 32s linear infinite;
}

.clients__track:hover { animation-play-state: paused; }

@keyframes clients-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.client-logo {
    height: 22px;
    width: auto;
    flex-shrink: 0;
    opacity: 0.28;
    color: var(--color-secondary);
    transition: opacity 0.25s ease;
    cursor: default;
}

.clients__track:hover .client-logo { opacity: 0.18; }
.clients__track .client-logo:hover { opacity: 0.65; }

@media (prefers-reduced-motion: reduce) {
    .clients__track { animation: none; }
}


/* ---- Team ---- */
.team {
    background: var(--color-secondary);
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.team__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.team__header h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h1);
    font-weight: 400;
    color: var(--color-text-invert);
    text-wrap: balance;
    margin: 0;
}

.team__note {
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    color: rgb(244 244 233 / 0.45);
    max-width: 28ch;
    text-align: right;
    flex-shrink: 0;
    margin: 0;
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--color-secondary);
}

.team-member {
    background: var(--color-secondary);
    overflow: hidden;
    position: relative;
}

.team-member__photo {
    aspect-ratio: 3 / 4;
    background: #3A4A55;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-member:hover .team-member__photo { transform: scale(1.03); }

.team-member__photo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.team-member__photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(38 48 55 / 0.52);
    transition: opacity 0.45s ease;
    z-index: 1;
    pointer-events: none;
}

.team-member:hover .team-member__photo::after { opacity: 0; }

.team-member__accent,
.team-member__label {
    z-index: 2;
}

.team-member__accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgb(38 48 55 / 0.85), transparent);
    pointer-events: none;
}

.team-member__label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: var(--font-display);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgb(244 244 233 / 0.3);
    transition: color 0.3s ease;
}

.team-member:hover .team-member__label { color: var(--color-primary); }

.team-member__info {
    padding: 1.25rem 1.25rem 2.75rem;
    background: var(--color-secondary);
    transform: translateY(0);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.35s ease;
}

.team-member:hover .team-member__info {
    background: var(--color-primary);
    transform: translateY(-2rem);
}

.team-member__name {
    font-family: var(--font-editorial);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-invert);
    line-height: 1.2;
}

.team-member__role {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(244 244 233 / 0.4);
    margin-top: 0.35rem;
    transition: color 0.3s ease;
}

.team-member:hover .team-member__role { color: rgb(255 255 255 / 0.75); }

.team-member__contacts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.625rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease 0.15s, transform 0.3s ease 0.15s;
}

.team-member:hover .team-member__contacts { opacity: 1; transform: none; }

.team-member__email {
    display: block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgb(255 255 255 / 0.9);
    text-decoration: none;
}

.team-member__email:hover { color: var(--color-text-invert); text-decoration: underline; }

.team-member__linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgb(255 255 255 / 0.6);
    transition: color 0.18s ease;
}

.team-member__linkedin:hover { color: var(--color-text-invert); }

.team__footer {
    margin-top: 2.5rem;
    text-align: right;
}

.team__all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.team__all-link:hover { gap: 0.625rem; }


/* ---- CTA strip ---- */
.cta {
    background-color: var(--color-primary);
    background-size: cover;
    background-position: center 40%;
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    position: relative;
    overflow: hidden;
}

.cta--photo {
    background-image: var(--cta-bg-image, none);
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(230 61 37 / 0.91);
    z-index: 0;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.cta__text h2 {
    font-family: var(--font-editorial);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 400;
    line-height: 1.12;
    color: var(--color-text-invert);
    text-wrap: balance;
    margin: 0;
}

.cta__text p {
    font-family: var(--font-editorial);
    font-size: var(--text-body-lg);
    color: rgb(244 244 233 / 0.7);
    margin: 0.875rem auto 0;
    max-width: 44ch;
    text-align: center;
}

.cta__actions {
    display: flex;
    justify-content: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}


/* ---- Contatti ---- */
.contact {
    background: var(--color-surface);
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
}

.contact__info h3 {
    font-family: var(--font-editorial);
    font-size: var(--text-h3);
    font-weight: 500;
    color: var(--color-secondary);
    margin: 0 0 1.5rem;
}

.contact__detail {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    color: var(--color-secondary);
}

.contact__detail:first-of-type { border-top: 1px solid var(--color-border); }
.contact__detail svg { margin-top: 2px; flex-shrink: 0; color: var(--color-primary); }

.contact__detail-inner {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.contact__detail strong { font-weight: 600; }

.contact__form-wrap {
    background: var(--color-surface-2);
    padding: 2.25rem 2rem;
    border: 1px solid var(--color-border);
}

/* ---- Contatti: sezione "solo form" (pagina Contatti) ---- */

.contact--form-only {
    background: var(--color-secondary);
}

/* Pagina Lavora con noi e Contatti: form su sfondo chiaro */
.page-template-page-lavora-con-noi-php .contact--form-only,
.page-template-page-contatti-php .contact--form-only {
    background: var(--color-surface);
}

.page-template-page-contatti-php .contact__form-header .fo-label {
    color: var(--color-text-muted);
}

.page-template-page-contatti-php .contact__form-header h2 {
    color: var(--color-secondary);
}

.page-template-page-contatti-php .contact__form-header p {
    color: var(--color-text-muted);
}

.page-template-page-lavora-con-noi-php .contact__form-header .fo-label {
    color: var(--color-text-muted);
}

.page-template-page-lavora-con-noi-php .contact__form-header h2 {
    color: var(--color-secondary);
}

.page-template-page-lavora-con-noi-php .contact__form-header p {
    color: var(--color-text-muted);
}

.contact__form-header .fo-label {
    display: block;
    color: rgb(244 244 233 / 0.55);
    margin-bottom: var(--space-2);
}

.contact__form-header h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h3);
    font-weight: 500;
    color: var(--color-text-invert);
    margin: 0 0 var(--space-2);
}

.contact__form-header p {
    color: rgb(244 244 233 / 0.7);
    margin: 0;
}

/* ---- Page hero (editorial header — pagine interne) ---- */

.page-hero {
    background: var(--color-surface);
    padding: clamp(8rem, 16vw, 11rem) 0 clamp(3rem, 6vw, 5rem);
    min-height: clamp(26rem, 42vw, 34rem);
    display: flex;
    align-items: center;
    position: relative;
}

.page-hero__eyebrow {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.page-hero__title {
    font-family: var(--font-editorial);
    font-size: var(--text-h1);
    font-weight: 400;
    line-height: var(--leading-tight);
    color: var(--color-secondary);
    max-width: 24ch;
    margin: 0;
}

.page-hero__title-accent {
    color: var(--color-primary);
    font-style: normal;
}

.page-hero__intro {
    margin-top: var(--space-3);
    max-width: 60ch;
    font-size: var(--text-body-lg);
    color: var(--color-text-muted);
}

/* ---- Page hero — variante con foto e overlay scuro ---- */

.page-hero--photo {
    overflow: hidden;
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Pagina Partner, Chi siamo, Team, Metodo e Contatti: con foto di persone
   il centraggio verticale di default taglia i volti — ancora in alto. */
.page-template-page-partner-php .page-hero__bg-img,
.page-template-page-chi-siamo-php .page-hero__bg-img,
.page-template-page-team-php .page-hero__bg-img,
.page-template-page-metodo-php .page-hero__bg-img,
.page-template-page-contatti-php .page-hero__bg-img {
    object-position: center top;
}

/* Pagina Servizi (Aree di competenza): "top" secco lascia troppo spazio
   vuoto sopra la testa — si sposta leggermente l'ancoraggio verso il
   centro per tagliare quel margine e portare la testa piu' in alto
   nell'inquadratura. */
.page-template-page-servizi-php .page-hero__bg-img {
    object-position: center 15%;
}

.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgb(38 48 55 / 0.78) 0%,
        rgb(38 48 55 / 0.58) 50%,
        rgb(38 48 55 / 0.85) 100%
    );
}

.page-hero--photo .container {
    position: relative;
    z-index: 1;
}

.page-hero--photo .page-hero__eyebrow {
    color: rgb(244 244 233 / 0.65);
}

.page-hero--photo .page-hero__title {
    color: var(--color-text-invert);
}

.page-hero--photo .page-hero__intro {
    color: rgb(244 244 233 / 0.80);
}

/* ---- Timeline (pagina Chi siamo) ---- */

.timeline-section {
    background: var(--color-secondary);
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.timeline-section__header {
    max-width: 60ch;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.timeline-section__header h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h2);
    font-weight: 400;
    color: var(--color-text-invert);
    margin: 0 0 var(--space-2);
}

.timeline-section__header p {
    color: rgb(244 244 233 / 0.65);
    max-width: 50ch;
    margin: 0;
}

/* Layout 2 colonne: griglia sinistra, header destra */
@media (min-width: 768px) {
    .timeline-section__layout {
        display: grid;
        grid-template-columns: 1.35fr 1fr;
        gap: clamp(2.5rem, 6vw, 5rem);
        align-items: start;
    }

    .timeline-section__layout .timeline-wrap {
        order: -1;
    }

    .timeline-section__layout .timeline-section__header {
        margin-bottom: 0;
        text-align: right;
    }

    .timeline-section__layout .timeline-section__header p {
        margin-left: auto;
    }
}

.timeline-wrap {
    position: relative;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgb(244 244 233 / 0.1);
}

.timeline__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3);
    background: var(--color-secondary);
    position: relative;
    overflow: hidden;
}

/* Linea rossa animata in cima a ogni card */
.timeline__item-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    transform-origin: left center;
    transform: scaleX(0);
}

.timeline__year {
    font-family: var(--font-display);
    font-size: var(--text-h3);
    font-weight: 700;
    color: var(--color-primary);
    margin-top: var(--space-1);
}

/* Stato iniziale per animazione GSAP — solo dentro .timeline-wrap */
.timeline-wrap .timeline__year {
    opacity: 0;
    transform: translateY(8px);
}

.timeline__title {
    font-family: var(--font-editorial);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-invert);
    margin: 0;
}

.timeline__text {
    color: rgb(244 244 233 / 0.65);
    margin: 0;
    font-size: var(--text-small);
    line-height: 1.6;
}

/* Mobile: stack a colonna, stile semplificato */
@media (max-width: 767px) {
    .timeline {
        grid-template-columns: 1fr;
        background: none;
        gap: var(--space-2);
    }

    .timeline__item {
        border-left: 2px solid var(--color-primary);
        padding-left: var(--space-3);
        background: none;
    }

    .timeline__item-line { display: none; }

    .timeline__year {
        opacity: 1;
        transform: none;
    }
}

/* ---- Value cards (pagina Chi siamo / Valori) ---- */

.values-section.values-section--alt {
    background: var(--color-surface-2);
}

.values-section.values-section--alt .values-section__split-text {
  background: var(--color-surface-2);
}

.values-section.values-section--dark {
    background: var(--color-secondary);
}

.values-section--dark .values-section__header {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: none;
}

.values-section--dark .values-section__header h2 {
    color: var(--color-text-invert);
}

.page-template-page-valori-php .values-section--dark .values-section__header h2 {
    white-space: nowrap;
}

.values-section--dark .values-section__header p {
    max-width: 78ch;
    margin: 0 auto;
}

.values-section--dark .values-section__header p,
.values-section--dark .values-section__header .fo-label {
    color: rgb(244 244 233 / 0.6);
}

.values-section--dark .value-grid {
    background: rgb(244 244 233 / 0.12);
}

@media (min-width: 768px) {
    .values-section--dark .value-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.values-section--dark .value-card {
    background: var(--color-secondary-soft);
}

.values-section--dark .value-card__icon {
    background: var(--color-secondary);
}

.values-section--dark .value-card h3 {
    color: var(--color-text-invert);
}

.values-section--dark .value-card p {
    color: rgb(244 244 233 / 0.65);
}

.values-section {
    background: var(--color-surface);
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.values-section__header {
    max-width: 60ch;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.values-section__header h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h2);
    font-weight: 400;
    color: var(--color-secondary);
    margin: 0 0 var(--space-2);
}

.values-section__header p {
    color: var(--color-text-muted);
    max-width: 50ch;
    margin: 0;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--color-border);
}

.value-card {
    background: var(--color-surface-2);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.value-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-primary);
}

.value-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 5rem;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.25rem;
    margin-bottom: var(--space-2);
}

.value-card__logo img {
    height: 100%;
    width: auto;
    max-width: 85%;
    object-fit: contain;
    border: none;
}

.partner-logo--bordered,
.partner-logo--bordered-blue {
    border: none;
    height: auto;
    max-height: 100%;
    display: block;
}
    object-position: left center;
}

.value-card h3 {
    font-family: var(--font-editorial);
    font-size: var(--text-h4);
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0;
}

.value-card p {
    color: var(--color-text-muted);
    margin: 0;
}

.value-card--link {
    text-decoration: none;
    transition: background 0.18s ease;
}

.value-card--link:hover {
    background: var(--color-surface);
}

.value-card--link:hover .value-card__icon {
    background: var(--color-primary);
    color: var(--color-text-invert);
}

.value-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    margin-top: auto;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.values-section__footer {
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

/* ---- Layout split: testo/CTA a sinistra, immagine a destra ---- */

.values-section.values-section--split {
  padding: 0;
}

.values-section__split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 60vh;
}

.values-section__split-text {
  background: var(--color-surface);
  padding: clamp(3.5rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 7vw, 6rem) calc(var(--gutter) + max(0px, (100vw - var(--maxw)) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.75rem;
}

@media (max-width: 1200px) {
  .values-section__split-text { padding-left: var(--gutter); }
}

.values-section--split .values-section__header {
  margin-bottom: 0;
  max-width: 48ch;
}

.values-section__split-text .fo-btn {
  align-self: flex-start;
}

.values-section--split .values-section__header p {
  max-width: 44ch;
}

.values-section__split-media {
  position: relative;
  overflow: hidden;
  background: var(--color-secondary);
}

.values-section__split-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30, 40, 55, 0.45);
  pointer-events: none;
}

.values-section__split-media--empty {
  background: var(--color-surface);
}

.values-section__split-media--empty::after {
  content: none;
}

.values-section__split-media img {
  position: absolute;
  inset: -8%;
  max-width: none;
  width: 116%;
  height: 116%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

@media (max-width: 767px) {
  .values-section__split {
    grid-template-columns: 1fr;
  }
  .values-section__split-text {
    padding: clamp(3rem, 6vw, 5rem) var(--gutter);
  }
  .values-section__split-media {
    min-height: 50vw;
  }
}

/* Lavora con noi: 4 card in griglia 2×2 */
@media (min-width: 768px) {
    .page-template-page-lavora-con-noi-php .values-section--dark .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Team — variante scura (pagine Team / Partner) ---- */

.team-section {
    background: var(--color-secondary);
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.team-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.team-section__header h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h2);
    font-weight: 400;
    color: var(--color-text-invert);
    margin: 0;
}

.team-section--compact {
    padding-top: 0;
}

.team__grid--compact {
    grid-template-columns: repeat(6, 1fr);
}

.team__grid--medium {
    grid-template-columns: repeat(5, 1fr);
}

.team-group {
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.team-group:last-of-type {
    margin-bottom: 0;
}

.team-group__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-label);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 1.25rem;
}

.team-section__note {
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    color: rgb(244 244 233 / 0.45);
    max-width: 28ch;
    text-align: right;
    flex-shrink: 0;
    margin: 0;
}

.team-member__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-secondary-soft);
    color: rgb(244 244 233 / 0.35);
}

.team-member__photo--placeholder::after { background: transparent; }

.team-member__photo--placeholder svg {
    width: 2.5rem;
    height: 2.5rem;
}

/* ---- Partner block (pagina Partner) ---- */

.partner-block {
    background: var(--color-secondary);
    padding: clamp(3rem, 6vw, 5rem) 0;
    border-bottom: 1px solid rgb(244 244 233 / 0.12);
}

.partner-block:last-of-type {
    border-bottom: none;
}

.partner-block__header {
    max-width: 70ch;
    margin-bottom: var(--space-4);
}

.partner-block__eyebrow {
    display: block;
    color: rgb(244 244 233 / 0.55);
    margin-bottom: var(--space-2);
}

.partner-block__header h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h2);
    font-weight: 400;
    color: var(--color-text-invert);
    margin: 0 0 var(--space-2);
}

.partner-block__header p {
    color: rgb(244 244 233 / 0.7);
    margin: 0;
}

.partner-block__details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 var(--space-4);
    margin-bottom: var(--space-4);
}

@media (max-width: 767px) {
    .partner-block__details {
        grid-template-columns: 1fr;
    }
}

.partner-block__logo {
    display: inline-block;
    background: var(--color-white);
    padding: 0.625rem 1.125rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
}

.partner-block__logo img {
    display: block;
    height: 2.75rem;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.partner-block__cta {
    margin-bottom: var(--space-4);
}

.partner-block__logo .partner-logo--bordered,
.partner-block__logo .partner-logo--bordered-blue {
    border: none;
}

/* Homepage partner: 4 colonne desktop, 2×2 tablet */
.values-section--partners .value-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .values-section--partners .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.partner-block__team-label {
    font-family: var(--font-editorial);
    font-size: var(--text-h4);
    font-weight: 600;
    color: var(--color-text-invert);
    margin: 0 0 var(--space-3);
}

.partner-block .contact__detail {
    color: var(--color-text-invert);
    border-top: 1px solid rgb(244 244 233 / 0.12);
    border-bottom: 1px solid rgb(244 244 233 / 0.12);
}

.partner-block .contact__detail span {
    color: rgb(244 244 233 / 0.7);
}

/* ---- Sedi / location cards (pagina Contatti) ---- */

.location-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4) 1px;
    background: var(--color-secondary);
}

.location-card:nth-child(3) {
    border-left: 1px solid rgb(244 244 233 / 0.08);
}

.location-card {
    background: var(--color-secondary);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.location-card--primary {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    padding: 0;
}

.location-card--primary .location-card__info {
    padding: var(--space-4);
    justify-content: center;
}

.location-card__map {
    position: relative;
    min-height: 320px;
}

.location-card__map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(1) sepia(15%) hue-rotate(180deg) saturate(0.7) brightness(0.9) contrast(1.05);
    transition: filter 0.4s ease;
}

.location-card__map:hover iframe {
    filter: none;
}

.location-card__map-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgb(38 48 55 / 0.75);
    color: var(--color-text-invert);
    font-family: var(--font-display);
    font-size: var(--text-label);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.location-card__map:hover .location-card__map-overlay {
    opacity: 0;
}

/* Mappa bloccata da Complianz finché manca il consenso marketing:
   niente overlay "Esplora la mappa", resta solo l'avviso di Complianz. */
.location-card__map:has(.cmplz-blocked-content-container) .location-card__map-overlay {
    display: none;
}

.location-card__map .cmplz-blocked-content-notice {
    max-width: calc(100% - var(--space-4));
    padding: var(--space-1) var(--space-3);
    background: var(--color-secondary);
    border: 1px solid rgb(244 244 233 / 0.2);
    border-radius: var(--radius-pill);
    color: var(--color-text-invert);
    font-family: var(--font-display);
    font-size: var(--text-small);
    font-weight: 600;
    line-height: var(--leading-tight);
    cursor: pointer;
    transition: background var(--transition);
}

.location-card__map .cmplz-blocked-content-notice:hover,
.location-card__map .cmplz-blocked-content-notice:focus-visible {
    background: var(--color-primary);
}

.location-card__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.location-card__info .fo-label {
    color: var(--color-primary);
}

.location-card__info h3 {
    font-family: var(--font-editorial);
    font-size: var(--text-h3);
    font-weight: 500;
    color: var(--color-text-invert);
    margin: 0;
}

.location-card .contact__detail {
    color: var(--color-text-invert);
    border-top: 1px solid rgb(244 244 233 / 0.12);
    border-bottom: none;
}

.location-card .contact__detail span,
.location-card .contact__detail a {
    color: rgb(244 244 233 / 0.7);
}

.location-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: var(--space-1);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.location-card__link:hover { gap: 0.625rem; }

/* ---- Contatti email per area (pagina Contatti) ---- */

.email-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--color-border);
}

.email-group {
    background: var(--color-surface-2);
    padding: var(--space-3) var(--space-4);
}

.email-group--full {
    grid-column: 1 / -1;
}

.email-group h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: var(--text-label);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 var(--space-2);
}

.email-group h4 svg {
    flex-shrink: 0;
}

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

.email-group--full .email-group__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem var(--space-3);
}

.email-group__list a {
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    color: var(--color-secondary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.email-group__list a:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ---- Service blocks (pagina Servizi) ---- */

.service-block {
    background: var(--color-surface);
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.service-block--dark {
    background: var(--color-secondary);
}

.service-block__header {
    max-width: 70ch;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.service-block__header h2 {
    font-family: var(--font-editorial);
    font-size: var(--text-h2);
    font-weight: 400;
    color: var(--color-secondary);
    margin: 0 0 var(--space-2);
}

.service-block--dark .service-block__header h2 {
    color: var(--color-text-invert);
}

.service-block__header p {
    color: var(--color-text-muted);
    max-width: 60ch;
    margin: 0;
}

.service-block--dark .service-block__header p {
    color: rgb(244 244 233 / 0.7);
}

.service-block__body {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.service-block--alt .service-block__body {
    grid-template-columns: 1.4fr 1fr;
}

.service-block--alt .service-block__media {
    order: 2;
}

.service-block__media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
}

.service-block__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.service-item:first-child {
    border-top: 1px solid var(--color-border);
}

.service-block--dark .service-item {
    border-color: rgb(244 244 233 / 0.12);
}

.service-item svg {
    margin-top: 3px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.service-item__inner h3 {
    font-family: var(--font-editorial);
    font-size: var(--text-h4);
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0 0 0.25rem;
}

.service-block--dark .service-item__inner h3 {
    color: var(--color-text-invert);
}

.service-item__inner p {
    color: var(--color-text-muted);
    margin: 0;
}

.service-block--dark .service-item__inner p {
    color: rgb(244 244 233 / 0.65);
}


/* ==========================================================================
   10. TEMPLATE PARTS (loop, single, archive, commenti)
   ========================================================================== */

.posts-loop {
    display: grid;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .posts-loop--grid { grid-template-columns: repeat(2, 1fr); }
}

.post-card {
    border: 1px solid var(--color-border-cool);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.post-card:hover { box-shadow: var(--shadow-md); }

.post-card__thumbnail a { display: block; }
.post-card__thumbnail img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.post-card__body { padding: var(--space-3); }

.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
}

.post-card__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.post-card__title a { text-decoration: none; color: inherit; }
.post-card__title a:hover { color: var(--color-primary); }

.post-card__excerpt { color: var(--color-text-muted); margin-bottom: var(--space-2); }

.post-card__more {
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    color: var(--color-primary);
}

/* Pagination */
.posts-navigation,
.post-navigation,
.pagination {
    margin: var(--space-5) 0;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.nav-links a,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-2);
    border: 1px solid var(--color-border-cool);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--text-sm);
    color: var(--color-text);
    transition: background var(--transition), border-color var(--transition);
}

.nav-links a:hover { background: var(--color-surface-2); border-color: var(--color-primary); color: var(--color-primary); }
.nav-links .current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.post-navigation .nav-links { justify-content: space-between; }
.post-navigation .nav-previous,
.post-navigation .nav-next { max-width: 48%; }

/* Single / Page */
.entry-header { margin-bottom: var(--space-4); }

.entry-title { margin-bottom: var(--space-2); }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.entry-meta a { color: inherit; }

.entry-thumbnail {
    margin-bottom: var(--space-4);
}

.entry-thumbnail img {
    width: 100%;
    border-radius: var(--radius-md);
}

.entry-content {
    max-width: var(--content-width);
}

.entry-content > * + * { margin-top: var(--space-2); }

.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-top: var(--space-4); }

/* Tabelle nei testi (es. elenco cookie nella Cookie policy) */
.entry-content table {
    margin-block: var(--space-3);
    font-size: var(--text-small);
    border-top: 1px solid var(--color-border-cool);
}

.entry-content th,
.entry-content td {
    padding: var(--space-1) var(--space-2) var(--space-1) 0;
    border-bottom: 1px solid var(--color-border-cool);
    text-align: left;
    vertical-align: top;
}

.entry-content td:nth-child(2) { white-space: nowrap; }

.entry-content th {
    font-family: var(--font-display);
    font-size: var(--text-label);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.entry-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-cool);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.entry-footer a { color: inherit; }

/* None / Search */
.no-results {
    text-align: center;
    padding: var(--space-5) 0;
}

.no-results .page-title { margin-bottom: var(--space-2); }

/* 404 — sotto il page-hero: CTA home + link alle sezioni principali */
.error-404 {
    padding-block: var(--space-5) var(--space-6);
}

.error-404__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    align-items: start;
}

.error-404__heading {
    font-family: var(--font-editorial);
    font-size: var(--text-h3);
    font-weight: 500;
    color: var(--color-secondary);
    margin: 0 0 var(--space-3);
}

.error-404__links {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.error-404__links li { border-bottom: 1px solid var(--color-border); }

.error-404__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    font-family: var(--font-editorial);
    font-size: var(--text-h4);
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.error-404__link::after {
    content: '→';
    color: var(--color-primary);
    transition: transform var(--transition);
}

.error-404__link:hover,
.error-404__link:focus-visible { color: var(--color-primary); }

.error-404__link:hover::after,
.error-404__link:focus-visible::after { transform: translateX(4px); }

.search-results .entry-title { font-size: var(--text-xl); }

/* Comments */
.comments-area { margin-top: var(--space-5); }

.comments-title,
.comment-reply-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4);
}

.comment-list .children {
    list-style: none;
    padding-left: var(--space-4);
}

.comment {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-cool);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.comment-author .avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.comment-author .fn { font-weight: 700; }

.comment-metadata {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.comment-metadata a { color: inherit; }

.reply { margin-top: var(--space-2); }
.reply a { font-size: var(--text-sm); font-weight: 600; }

.bypostauthor > .comment-body .comment-author .fn::after {
    content: ' (Author)';
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-text-muted);
}

/* WordPress core / block classes */
.alignleft  { float: left; margin: 0 var(--space-3) var(--space-2) 0; }
.alignright { float: right; margin: 0 0 var(--space-2) var(--space-3); }
.aligncenter { display: block; margin-inline: auto; }
.alignnone  { display: block; }

.alignwide  { max-width: 1100px; margin-inline: auto; }
.alignfull  { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; }

.gallery { display: grid; gap: var(--space-2); margin: 0 0 var(--space-2); }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item img  { width: 100%; height: 100%; object-fit: cover; }

.sticky .post-card { border-color: var(--color-primary); }

.page-links { margin-top: var(--space-2); font-size: var(--text-sm); }

.wp-block-image { margin: 0 0 var(--space-2); }
.wp-block-quote { margin: 0 0 var(--space-2); }


/* ==========================================================================
   11. SIDEBAR & WIDGETS
   ========================================================================== */

.widget-area { font-size: var(--text-sm); }

.widget {
    margin-bottom: var(--space-4);
}

.widget-title {
    font-size: var(--text-base);
    font-weight: 700;
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-1);
    border-bottom: 2px solid var(--color-primary);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--color-border-cool);
}

.widget ul li:last-child { border-bottom: none; }

.widget ul a { text-decoration: none; color: var(--color-text); }
.widget ul a:hover { color: var(--color-primary); }

.widget_search .search-form { display: flex; gap: var(--space-1); }
.widget_search .search-field { flex: 1; }


/* ==========================================================================
   12. FOOTER
   ========================================================================== */

.site-footer {
    background: var(--color-secondary);
    padding: clamp(4rem, 8vw, 7rem) 0 0;
    position: relative;
    overflow: hidden;
}

.site-footer__watermark {
    position: absolute;
    bottom: -0.58em;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-editorial);
    font-weight: 700;
    font-size: clamp(9rem, 20vw, 18rem);
    white-space: nowrap;
    color: rgb(244 244 233 / 0.055);
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.01em;
    line-height: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.5fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgb(244 244 233 / 0.1);
    position: relative;
    z-index: 1;
}

.footer-logo img { height: 34px; width: auto; opacity: 0.9; }
.footer-logo svg { width: 210px; height: auto; opacity: 0.9; display: block; }

.footer-tagline {
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    color: rgb(244 244 233 / 0.45);
    margin-top: 1rem;
    max-width: 28ch;
    line-height: 1.55;
}

.footer-col-title {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgb(244 244 233 / 0.35);
    margin-bottom: 1.25rem;
}

.footer-col-title--social {
    margin-top: 2rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    color: rgb(244 244 233 / 0.6);
    text-decoration: none;
    transition: color 0.18s ease;
}

.footer-nav a:hover { color: var(--color-text-invert); }

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-contact-item span,
.footer-contact-item a {
    font-family: var(--font-editorial);
    font-size: var(--text-small);
    color: rgb(244 244 233 / 0.55);
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.18s ease;
}

.footer-contact-item a:hover { color: var(--color-text-invert); }

.footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-newsletter__label {
    font-family: var(--font-editorial);
    font-size: var(--text-small);
    color: rgb(244 244 233 / 0.55);
    line-height: 1.55;
    margin: 0;
}

.footer-newsletter__form {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-newsletter__row {
    display: flex;
    gap: 0.5rem;
}

.footer-newsletter__row input[type="email"] {
    flex: 1;
    background: rgb(244 244 233 / 0.06);
    border: 1px solid rgb(244 244 233 / 0.12);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    font-family: var(--font-editorial);
    font-size: var(--text-small);
    color: var(--color-text-invert);
    outline: none;
    transition: border-color 0.18s ease;
}

.footer-newsletter__row input[type="email"]::placeholder { color: rgb(244 244 233 / 0.3); }
.footer-newsletter__row input[type="email"]:focus { border-color: rgb(244 244 233 / 0.35); }

.footer-newsletter__row button {
    background: var(--color-primary);
    color: var(--color-text-invert);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.625rem 1.25rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.18s ease;
}

.footer-newsletter__row button:hover { opacity: 0.85; }

.footer-newsletter__privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.footer-newsletter__privacy input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.footer-newsletter__privacy span {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: rgb(244 244 233 / 0.3);
    line-height: 1.5;
}

.footer-newsletter__privacy a {
    color: rgb(244 244 233 / 0.45);
    text-decoration: underline;
    transition: color 0.18s ease;
}

.footer-newsletter__privacy a:hover { color: rgb(244 244 233 / 0.75); }

.footer-newsletter__message {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.7rem;
    line-height: 1.5;
}

.footer-newsletter__message:empty {
    display: none;
}

.footer-newsletter__message--success {
    color: rgb(244 244 233 / 0.75);
}

.footer-newsletter__message--error {
    color: var(--color-primary);
}

.footer-social {
    display: flex;
    gap: 0.875rem;
    position: relative;
    z-index: 1;
}

.footer-social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(244 244 233 / 0.5);
    transition: color 0.18s ease;
}

.footer-social__link:hover {
    color: var(--color-text-invert);
}


.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1.75rem;
    padding-bottom: clamp(6rem, 14vw, 12rem);
    position: relative;
    z-index: 1;
}

.footer-copy {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: rgb(244 244 233 / 0.3);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-bottom-links a {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: rgb(244 244 233 / 0.3);
    text-decoration: none;
    transition: color 0.18s ease;
}

.footer-bottom-links a:hover { color: rgb(244 244 233 / 0.65); }

/* "Preferenze cookie": pulsante (riapre il pannello di Complianz) con l'aspetto dei link vicini */
.footer-bottom-links .footer-bottom-links__button {
    display: inline;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: inherit;
    color: rgb(244 244 233 / 0.3);
    cursor: pointer;
    transition: color 0.18s ease;
}

/* Annulla l'hover/focus dei bottoni generici (Section 13): solo cambio colore, come i link */
.footer-bottom-links .footer-bottom-links__button:hover,
.footer-bottom-links .footer-bottom-links__button:focus-visible {
    color: rgb(244 244 233 / 0.65);
    background: none;
}

/* Linguetta flottante "Gestisci consenso" di Complianz: sostituita dal link nel footer */
#cmplz-manage-consent { display: none !important; }


/* ==========================================================================
   13. FORMS
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
    display: block;
    width: 100%;
    padding: var(--space-2) var(--space-2);
    font-family: var(--font-editorial);
    font-size: var(--text-body);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), outline-color var(--transition);
    outline: 2px solid transparent;
    outline-offset: 1px;
    appearance: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-secondary);
    outline-color: rgb(38 48 55 / 0.15);
}

input::placeholder,
textarea::placeholder { color: #B0AFA6; }

textarea { resize: vertical; min-height: 120px; }

label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.form-row { margin-bottom: 1.25rem; }

.form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-display);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.form-privacy input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

.form-privacy label {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.form-privacy a { color: var(--color-primary); }

.cf-turnstile {
    margin-bottom: var(--space-2);
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-gdpr {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.required-mark {
    color: var(--color-primary);
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form__message {
    margin: 1rem 0 0;
    font-family: var(--font-display);
    font-size: var(--text-small);
}

.contact-form__message:empty {
    display: none;
}

.contact-form__message--success {
    color: var(--color-text-muted);
}

.contact-form__message--error {
    color: var(--color-primary);
}

/* Bottoni generici WordPress (commenti, ricerca) */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1;
    color: var(--color-text-invert);
    background: var(--color-primary);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition);
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    background: var(--color-primary-hover);
}

button:focus-visible,
input[type="submit"]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ---- Login WordPress (wp-login.php: login, password dimenticata, reimpostazione) ----
   style.css viene caricato anche su wp-login.php da inc/login.php: queste regole
   valgono solo lì (body.login) e correggono le regole base del tema. */

body.login {
    background: var(--color-secondary);
    font-family: var(--font-display);
    color: var(--color-text);
}

.login #login {
    width: min(360px, calc(100% - 2 * var(--space-2)));
    padding: clamp(var(--space-4), 10vh, var(--space-7)) 0 var(--space-4);
}

.login h1 a {
    width: 240px;
    height: 60px;
    margin: 0 auto var(--space-4);
    background-image: url('assets/images/logo-light.png');
    background-size: contain;
    background-position: center;
}

.login form {
    margin-top: 0;
    padding: var(--space-4) var(--space-3);
    background: var(--color-white);
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: none;
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    min-height: 48px;
    margin: 0 0 var(--space-2);
    font-family: var(--font-editorial);
    font-size: var(--text-base);
    box-shadow: none;
}

.login input:focus,
.login select:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 1px var(--color-secondary);
    outline: 0;
}

.login .user-pass-wrap { position: relative; }

/* Pulsante "mostra password": icona discreta, non bottone rosso */
.login .button.wp-hide-pw,
.login .button.wp-hide-pw:hover {
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    color: var(--color-text-muted);
    background: transparent;
    border: 0;
}

.login .button.wp-hide-pw:focus-visible { outline: 2px solid var(--color-secondary); }

.login .forgetmenot {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

.login .forgetmenot label {
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    font-size: var(--text-sm);
    color: var(--color-text);
}

.login .submit { clear: both; }

.wp-core-ui.login .button-primary {
    width: 100%;
    min-height: 48px;
    padding: 0 var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-invert);
    background: var(--color-primary);
    border: 0;
    border-radius: var(--radius-pill);
    box-shadow: none;
    text-shadow: none;
}

.wp-core-ui.login .button-primary:hover,
.wp-core-ui.login .button-primary:focus {
    background: var(--color-primary-hover);
    box-shadow: none;
}

.login #nav,
.login #backtoblog,
.login .privacy-policy-page-link {
    margin: var(--space-2) 0 0;
    padding: 0;
    text-align: center;
    font-size: var(--text-sm);
}

.login #nav a,
.login #backtoblog a,
.login .privacy-policy-page-link a {
    color: var(--color-text-invert);
    text-decoration: underline;
}

.login #nav a:hover,
.login #backtoblog a:hover,
.login .privacy-policy-page-link a:hover { color: var(--color-white); }

/* Messaggi (errore, conferme): niente bordo laterale colorato, riquadro pulito */
.login .message,
.login .notice,
.login #login_error,
.login .success {
    margin: 0 0 var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text);
    background: var(--color-surface-2);
    border: 0;
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.login #login_error { color: var(--color-primary-hover); background: var(--color-white); }

/* Selettore lingua sotto il form */
.login .language-switcher { margin-top: var(--space-3); }

.login .language-switcher label { color: var(--color-text-invert); }

.login .language-switcher select { display: inline-block; width: auto; min-height: 40px; padding: 0 var(--space-4) 0 var(--space-2); }

.login .language-switcher .button {
    min-height: 40px;
    padding: 0 var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-secondary);
    background: var(--color-text-invert);
    border: 0;
    border-radius: var(--radius-sm);
    box-shadow: none;
}


/* ==========================================================================
   14. UTILITY & HELPERS
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background: var(--color-white);
    clip: auto !important;
    clip-path: none;
    color: var(--color-text);
    display: block;
    font-size: var(--text-base);
    font-weight: 700;
    height: auto;
    left: var(--space-2);
    padding: var(--space-2) var(--space-3);
    text-decoration: none;
    top: var(--space-2);
    width: auto;
    z-index: 999;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-2);
    z-index: 999;
    padding: var(--space-2) var(--space-3);
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: top var(--transition);
}

.skip-link:focus { top: var(--space-2); }

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


/* ==========================================================================
   15. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {

    .services__header { flex-direction: column; align-items: flex-start; }
    .services__header-right { align-items: flex-start; }
    .services__intro { text-align: left; }
    .service-card { width: min(72vw, 300px); }

    .about { grid-template-columns: 1fr; min-height: auto; }
    .about__panel--text { padding: clamp(3rem, 6vw, 5rem) var(--gutter); }
    .about__panel--photo { min-height: 50vw; }
    .about__photo { position: relative; height: 100%; }

    .team__header { flex-direction: column; align-items: flex-start; }
    .team__note { text-align: left; }
    .team__grid { grid-template-columns: repeat(2, 1fr); }
    .team__grid--compact { grid-template-columns: repeat(2, 1fr); }
    .team__grid--medium { grid-template-columns: repeat(2, 1fr); }

    .cta__inner { align-items: center; }

    .contact__grid { grid-template-columns: 1fr; }
    .contact__grid > * { min-width: 0; }

    .location-card--primary { grid-template-columns: 1fr; }
    .location-card__map { min-height: 260px; }
    .email-grid { grid-template-columns: repeat(2, 1fr); }

    .service-block__body,
    .service-block--alt .service-block__body { grid-template-columns: 1fr; }
    .service-block--alt .service-block__media { order: 0; }
    .service-block__media img { aspect-ratio: 16 / 9; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > *:first-child { grid-column: 1 / -1; }
    .footer-newsletter { grid-column: 1 / -1; }
}

@media (max-width: 640px) {

    .location-grid { grid-template-columns: 1fr; }
    .location-card:nth-child(3) { border-left: 0; }
    .email-grid { grid-template-columns: 1fr; }

    .hero__stats { grid-template-columns: repeat(2, 1fr); }
    .hero__stat:last-child {
        grid-column: 1 / -1;
        text-align: center;
        border-right: none;
        border-top: 1px solid rgb(244 244 233 / 0.08);
        border-bottom: 1px solid rgb(244 244 233 / 0.08);
    }

    .about__panel--text { overflow: visible; }

    .testimonials__grid { grid-template-columns: 1fr; }
    .testimonial--large { grid-row: auto; }

    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .stat {
        text-align: center !important;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 1.5rem 0.5rem;
    }
    .stat:last-child { border-bottom: 1px solid var(--color-border); }

    .site-footer__watermark { display: none; }
    .footer-bottom { padding-bottom: 3rem; }

    .form-row-split { grid-template-columns: 1fr; }

    /* Il widget Turnstile ha larghezza fissa 300px: con il padding della card
       la colonna supera lo schermo. Su mobile la card va a tutta larghezza. */
    .contact__form-wrap {
        margin-inline: calc(var(--gutter) * -1);
        padding: var(--space-4) var(--gutter);
        border-inline: 0;
    }

    .error-404__inner { grid-template-columns: 1fr; gap: var(--space-4); }

    /* Tabelle con nomi tecnici lunghi (Cookie policy): scorrono in orizzontale */
    .entry-content table {
        display: block;
        overflow-x: auto;
    }

    .entry-content td:first-child { min-width: 11rem; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-grid > *:first-child { grid-column: auto; }

    /* Foto header Chi siamo, Partner e Unisciti a noi: sul ritaglio stretto
       da mobile il soggetto finisce troppo a sinistra — ancora a destra. */
    .page-template-page-chi-siamo-php .page-hero__bg-img,
    .page-template-page-partner-php .page-hero__bg-img {
        object-position: 65% top;
    }

    .page-template-page-lavora-con-noi-php .page-hero__bg-img {
        object-position: 65% center;
    }
}

@media print {
    .site-header,
    .site-footer,
    .widget-area,
    .navigation,
    .post-navigation,
    .comments-area,
    .menu-toggle { display: none !important; }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a { color: #000; text-decoration: underline; }
    a[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
    a[href^="#"]::after { content: ''; }

    h1, h2, h3 { page-break-after: avoid; }
    img { max-width: 100% !important; }
}
