/* =========================================================
   DESIGN SYSTEM — Dott. Giacomo Ajmone
   Aesthetic: Soft, Editorial, Rounded, High Contrast
   Colors: Dusty Blue, Light Beige, Ivory White, Soft Dark Grey, Warm Earthy Brown
   ========================================================= */

:root {
    /* Palette */
    --blue: #5b7c99;
    /* Dusty blue */
    --blue-dark: #435c73;
    --blue-wash: rgba(91, 124, 153, 0.12);
    --beige: #f7f5f0;
    /* Light beige */
    --ivory: #fdfcfc;
    /* Ivory white */
    --grey-dark: #4a5568;
    /* Soft medium dark grey */
    --grey-light: #718096;
    --grey-faint: #e2e8f0;
    --brown: #a07855;
    /* Warm earthy brown */
    --brown-light: #d1bba5;
    --brown-faint: rgba(160, 120, 85, 0.08);

    /* Decorative glows (ambient blobs) */
    --glow-blue: rgba(91, 124, 153, 0.16);
    --glow-brown: rgba(160, 120, 85, 0.14);
    --glow-ivory: rgba(253, 252, 252, 0.16);

    --ink: var(--grey-dark);
    --ink-light: var(--grey-light);

    /* Typography */
    --ff-heading: 'Cormorant Garamond', 'Georgia', serif;
    --ff-body: 'Inter', -apple-system, sans-serif;

    /* Spacing — Airy and generous */
    --s-xs: 0.75rem;
    --s-sm: 1rem;
    --s-md: 1.5rem;
    --s-lg: 4rem;
    --s-xl: 6.4rem;
    --s-xxl: 10rem;

    /* Radii — Soft and rounded */
    --r-sm: 8px;
    --r-md: 24px;
    --r-lg: 32px;
    --r-pill: 50px;

    /* Shadows — Soft, floating */
    --shadow-soft: 0 4px 30px rgba(74, 85, 104, 0.06);
    --shadow-hover: 0 10px 40px rgba(74, 85, 104, 0.1);

    /* Ease */
    --ease: cubic-bezier(.25, .1, .25, 1);
    --ease-out: cubic-bezier(0, 0, .25, 1);
}

/* ---------------------------------------------------------
   RESET & BASE
   --------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body.one-page-custom {
    font-family: var(--ff-body);
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.8;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--ff-heading);
    font-weight: 500;
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-weight: 500;
}

h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 500;
}

h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

p {
    color: var(--ink-light);
    margin-bottom: 1.5em;
    font-size: 1.05rem;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color .4s var(--ease);
}

a:hover {
    color: var(--blue-dark);
}


/* ---------------------------------------------------------
   GUTENBERG RESETS
   --------------------------------------------------------- */

.one-page-custom .wp-block-columns {
    margin-bottom: 0;
}

.one-page-custom .wp-block-heading {
    margin-top: 0;
    margin-bottom: 0;
}

.one-page-custom .wp-block-image {
    margin: 0;
}

.one-page-custom .alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.one-page-custom .wp-block-list {
    margin: 0;
    padding: 0;
}

/* Fix admin bar offset */
.admin-bar .custom-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .custom-header {
        top: 46px;
    }
}

/* The header already offsets itself for the admin bar above;
   prevent WP from also pushing the whole page down (avoids a
   trailing gap, the height of the admin bar, at the page bottom) */
html.wp-toolbar {
    margin-top: 0 !important;
}


/* ---------------------------------------------------------
   LAYOUT
   --------------------------------------------------------- */
.container {
    max-width: 1160px;
    margin-inline: auto;
    padding-inline: var(--s-md);
}

.section-label {
    font-family: var(--ff-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brown);
    margin-top: 3rem;
    margin-bottom: var(--s-sm);
    display: block;
}

.section-header {
    max-width: 640px;
    margin-bottom: var(--s-xl);
}

.section-header .wp-block-heading {
    margin-bottom: var(--s-sm);
}


/* ---------------------------------------------------------
   BUTTONS — Rounded & Soft
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    border-radius: var(--r-pill);
    font-family: var(--ff-body);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all .4s var(--ease);
    text-decoration: none;
    line-height: 1;
}

/* Gutenberg button override */
.one-page-custom .wp-block-button__link {
    background: var(--blue) !important;
    color: var(--ivory) !important;
    border-radius: var(--r-pill) !important;
    padding: 18px 42px !important;
    font-family: var(--ff-body) !important;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all .4s var(--ease);
    border: none !important;
    box-shadow: 0 8px 24px rgba(91, 124, 153, 0.2);
}

.one-page-custom .wp-block-button__link:hover {
    background: var(--blue-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(91, 124, 153, 0.3);
}


/* ---------------------------------------------------------
   HEADER — Aligned & Harmonious
   --------------------------------------------------------- */
.custom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 150;
    background: rgba(253, 252, 252, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--grey-faint);
    transition: all .4s var(--ease);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Ensures vertical alignment */
    height: 90px;
}

.logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.logo a {
    font-family: var(--ff-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.65rem;
    color: var(--brown);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    /* Aligns all links vertically */
    gap: 2.5rem;
    list-style: none;
    margin: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    position: relative;
    color: var(--ink-light);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: color .3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--blue);
}

/* Scrollspy underline indicator */
.nav-links li > a:not(.btn-outline)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}

.nav-links li > a.active:not(.btn-outline)::after {
    transform: scaleX(1);
}

.nav-links a.btn-outline.active {
    border-color: var(--blue);
    color: var(--blue);
}

.nav-links .btn-outline {
    border: 1px solid var(--grey-faint);
    border-radius: var(--r-pill);
    padding: 10px 24px;
    color: var(--ink);
    transition: all .3s var(--ease);
}

.nav-links .btn-outline:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle:focus,
.mobile-menu-toggle:focus-visible {
    outline: none;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    margin-bottom: 6px;
    transition: all .4s var(--ease);
}

.mobile-menu-toggle span:last-child {
    margin-bottom: 0;
}

.mobile-menu-overlay {
    display: none;
}


/* ---------------------------------------------------------
   HERO — Airy, Rounded
   --------------------------------------------------------- */
.hero-section {
    padding: 104px 0 var(--s-lg);
    /* Gap superiore ridotto per far entrare CTA + barra numeri nel fold */
    background: var(--ivory);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 0;
}

/* Con la admin bar di WordPress loggati, sottraiamo la sua altezza
   così la hero resta contenuta nel viewport anche in anteprima. */
.admin-bar .hero-section {
    min-height: calc(100vh - 32px);
    min-height: calc(100svh - 32px);
}

/* Ambient glow */
.hero-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -160px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, var(--glow-blue) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: -1;
    pointer-events: none;
}

/* ---------------------------------------------------------
   HERO — Staggered load-in
   --------------------------------------------------------- */
.hero-text > *,
.hero-visual {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}

.hero-loaded .hero-text > *,
.hero-loaded .hero-visual {
    opacity: 1;
    transform: translateY(0);
}

.hero-text > *:nth-child(1) { transition-delay: .05s; }
.hero-text > *:nth-child(2) { transition-delay: .15s; }
.hero-text > *:nth-child(3) { transition-delay: .28s; }
.hero-text > *:nth-child(4) { transition-delay: .4s; }
.hero-text > *:nth-child(5) { transition-delay: .5s; }
.hero-visual { transition-delay: .3s; }

.hero-columns {
    align-items: center;
    gap: 8rem !important;
    /* Più aria */
}

.badge {
    display: inline-block;
    padding: 0;
    background: transparent;
    color: var(--brown);
    border: none;
    /* Elimina cornice */
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: var(--s-sm);
}

.hero-text .wp-block-heading {
    margin-bottom: var(--s-md);
    line-height: 1.1;
}

.hero-text h1 em {
    font-style: italic;
    color: var(--blue);
}

.hero-subheadline {
    font-size: 1.15rem;
    color: var(--ink-light);
    max-width: 500px;
    line-height: 1.8;
    margin-bottom: var(--s-md);
}

.hero-ctas {
    margin-bottom: var(--s-sm);
}

.hero-email-link {
    margin-top: 0;
}

.hero-email-link a {
    color: var(--ink-light);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--grey-faint);
    padding-bottom: 2px;
}

.hero-email-link a:hover {
    color: var(--blue);
    border-color: var(--blue);
}

/* Hero visual */
.hero-visual {
    position: relative;
    /* For floating stats */
}

/* Gold outline frame, offset behind the photo */
.hero-visual::before {
    content: '';
    position: absolute;
    top: 15%;
    left: -15%;
    width: 100%;
    height: 87%;
    border: 1.5px solid rgba(201, 173, 116, 0.55);
    border-radius: var(--r-md);
    z-index: -1;
}

.hero-photo img {
    border-radius: var(--r-md);
    /* Forme arrotondate */
    width: 100%;
    aspect-ratio: 4 / 5;
    /* Ritratto più contenuto: hero meno alta (CTA nel fold) e meno crop laterale */
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.hero-photo img[src=""] {
    background: linear-gradient(170deg, var(--beige) 0%, var(--grey-faint) 100%);
    min-height: 500px;
}

/* Floating Stats */
.floating-stats {
    position: absolute;
    bottom: -30px;
    left: -50px;
    background: var(--ivory);
    border-radius: var(--r-md);
    padding: 2rem 2.5rem;
    box-shadow: 0 15px 40px rgba(74, 85, 104, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item strong {
    font-family: var(--ff-heading);
    font-size: 1.6rem;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-item span {
    font-size: 0.8rem;
    color: var(--ink-light);
}

.hero-visual {
    position: relative !important;
    /* Necessario per ancorare la banda absolute */
}

/* Nascondo la riga vuota creata nel footer della sezione */
.authority-bar {
    display: none !important;
}

/* Resetta eventuali wrapper aggiuntivi di WP */
.hero-visual>.container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Authority Band (The REAL white wrapper inside hero-visual) */
.authority-band {
    position: absolute !important;
    z-index: 10;
    right: -2rem !important;
    /* Leggermente spostata a destra rispetto al bordo della foto */
    bottom: 3rem !important;
    /* Spostato verso l'alto per sovrapporsi all'immagine e dare profondità */
    width: 180% !important;
    /* Si estende a sinistra superando la colonna della foto */
    max-width: 890px !important;

    background: rgba(253, 252, 252, 0.95) !important;
    border-radius: var(--r-md);
    padding: 1.1rem 2rem !important;
    box-shadow: var(--shadow-hover) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;

    margin: 0 !important;
    left: auto !important;
    transform: none !important;
    box-sizing: border-box !important;

    /* layout interno */
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem !important;
}

/* Authority Item (The individual stats inside the band) */
.authority-item,
.authority-band .wp-block-column {
    position: relative !important;
    text-align: center !important;
    padding: 0 !important;
    flex: 1 1 0% !important;
    /* Elimina l'overflow permettendo lo shrink */
    min-width: 0 !important;
    margin: 0 !important;
}

.authority-item *,
.authority-bar .wp-block-column * {
    margin: 0;
}

.authority-item h1,
.authority-bar .wp-block-column h1,
.authority-item h2,
.authority-bar .wp-block-column h2,
.authority-item h3,
.authority-bar .wp-block-column h3,
.authority-item strong,
.authority-bar .wp-block-column strong {
    font-family: var(--ff-heading) !important;
    font-size: 2.2rem !important;
    color: var(--ink) !important;
    line-height: 1.1 !important;
    margin-bottom: 0.5rem !important;
    font-weight: 500 !important;
}

.authority-item p,
.authority-bar .wp-block-column p,
.authority-item span,
.authority-bar .wp-block-column span {
    font-size: 0.95rem !important;
    color: var(--ink-light) !important;
    line-height: 1.5 !important;
}

/* Fix #2 — La banda "authority" (width:180%/max 890px) è calibrata per
   schermi molto larghi. Sui desktop stretti (laptop 1025–1400px) invadeva
   la foto: qui la rendiamo più compatta e la ancoriamo al bordo inferiore. */
@media (min-width: 1025px) and (max-width: 1400px) {
    .authority-band {
        width: 138% !important;
        max-width: 560px !important;
        right: -0.5rem !important;
        bottom: 0.5rem !important;
        padding: 0.9rem 1.4rem !important;
        gap: 0.9rem !important;
    }

    .authority-item h3,
    .authority-band .authority-number,
    .authority-band .wp-block-column h3 {
        font-size: 1.7rem !important;
    }

    .authority-item p,
    .authority-band .authority-label,
    .authority-band .wp-block-column p {
        font-size: 0.82rem !important;
        line-height: 1.35 !important;
    }
}

/* ---------------------------------------------------------
   SERVICES — Rounded Cards
   --------------------------------------------------------- */
.services-section {
    padding: var(--s-xl) 0;
    background: var(--beige);
}

.services-grid {
    gap: var(--s-md) !important;
}

.service-card {
    background: var(--ivory);
    padding: 3.5rem;
    padding-top: 8.5rem;
    border-radius: var(--r-md);
    /* Morbido */
    border: 1px solid transparent;
    /* No bordi taglienti */
    box-shadow: var(--shadow-soft);
    transition: all .5s var(--ease);
    position: relative;
}

.service-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.service-card:hover::before {
    transform: scale(1.08);
}

/* Service icons via CSS */
.service-card::before {
    content: '';
    position: absolute;
    top: 3.5rem;
    left: 3.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Icona arrotondata */
    background-color: var(--brown-faint);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 28px;
    transition: transform .5s var(--ease);
}

.service-card--anxiety::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23a07855' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}

.service-card--neurology::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23a07855' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-4l-3 9L9 3l-3 9H2'/%3E%3C/svg%3E");
}

.service-card .wp-block-heading {
    margin-bottom: var(--s-sm);
}

.service-list {
    list-style: none !important;
    padding: 0 !important;
    margin-top: var(--s-md) !important;
    border-top: 1px solid var(--grey-faint);
    padding-top: var(--s-md) !important;
}

.service-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--ink-light);
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

.service-list li::marker {
    content: none;
    display: none;
}


/* ---------------------------------------------------------
   IL PERCORSO — Step timeline
   --------------------------------------------------------- */
.percorso-section {
    padding: var(--s-xl) 0;
    background: var(--ivory);
    position: relative;
    z-index: 0;
}

.percorso-section::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    width: 640px;
    height: 360px;
    background: radial-gradient(ellipse, var(--brown-faint) 0%, transparent 70%);
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
}

.percorso-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-md);
    position: relative;
}

.percorso-step {
    position: relative;
    padding: var(--s-md);
    background: var(--ivory);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-soft);
}

.percorso-number {
    position: absolute;
    top: 0.5rem;
    right: 1.25rem;
    font-family: var(--ff-heading);
    font-size: 3rem;
    font-weight: 600;
    color: var(--grey-faint);
    line-height: 1;
    z-index: 0;
    -webkit-user-select: none;
    user-select: none;
}

.percorso-icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue-wash);
    color: var(--blue);
    margin-bottom: var(--s-md);
}

.percorso-step h3 {
    position: relative;
    z-index: 1;
    margin-bottom: 0.75rem;
}

.percorso-step p {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.percorso-grid .percorso-step.animate-on-scroll:nth-child(2) {
    transition-delay: .1s;
}

.percorso-grid .percorso-step.animate-on-scroll:nth-child(3) {
    transition-delay: .2s;
}

.percorso-grid .percorso-step.animate-on-scroll:nth-child(4) {
    transition-delay: .3s;
}


/* ---------------------------------------------------------
   MANIFESTO — Soft Dark Grey
   --------------------------------------------------------- */
.manifesto-section {
    padding: var(--s-xl) 0;
    background: var(--ink);
    /* Percorso relativo al foglio di stile: indipendente dal dominio
       (funziona sia su ajmone.local sia in produzione, no mixed-content). */
    background-image: url('../../../../uploads/2026/06/neurologia-psicoterapia-milano-lodi-benessere.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.manifesto-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(74, 85, 104, 0.82);
    z-index: 0;
    pointer-events: none;
}

.manifesto-layout {
    position: relative;
    z-index: 1;
}

.manifesto-layout {
    align-items: flex-start;
    gap: 8rem !important;
}

/* Quote column */
.manifesto-quote {
    position: relative;
    padding-top: 3rem;
}

.manifesto-quote::before {
    content: '\201C';
    font-family: var(--ff-heading);
    font-size: clamp(6rem, 18vw, 12rem);
    color: var(--blue);
    opacity: .2;
    position: absolute;
    top: -4rem;
    left: -1rem;
    line-height: 1;
    pointer-events: none;
}

.manifesto-blockquote {
    font-family: var(--ff-heading) !important;
    font-size: clamp(1.5rem, 2.5vw, 1.8rem) !important;
    font-style: italic !important;
    font-weight: 400 !important;
    color: var(--ivory) !important;
    line-height: 1.5 !important;
    margin-bottom: var(--s-md) !important;
}

.manifesto-cite {
    font-size: 0.85rem !important;
    color: var(--brown-light) !important;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Body column */
.manifesto-body p {
    color: rgba(253, 252, 252, 0.7);
    font-size: 1.05rem;
    line-height: 1.9;
}

.manifesto-lead {
    font-size: 1.15rem !important;
    color: var(--ivory) !important;
    font-weight: 400;
}

.manifesto-emphasis {
    color: var(--ivory) !important;
    font-weight: 500;
    font-size: 1.1rem !important;
}

/* iOS Safari ignora/gestisce male background-attachment:fixed (jank, zoom
   del background): su tablet/mobile passiamo a scroll per un rendering stabile. */
@media (max-width: 1024px) {
    .manifesto-section {
        background-attachment: scroll;
    }
}


/* ---------------------------------------------------------
   PROFILE
   --------------------------------------------------------- */
.profile-section {
    padding: var(--s-xl) 0;
    background: var(--ivory);
    position: relative;
    z-index: 0;
}

.profile-section::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -180px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--glow-blue) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: -1;
    pointer-events: none;
}

.profile-layout {
    align-items: flex-start;
    gap: 6rem !important;
}

/* Photo */
.profile-photo img {
    border-radius: var(--r-md);
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
    transition: transform .6s var(--ease);
}

.profile-photo:hover img {
    transform: scale(1.03);
}

/* Credentials */
.profile-credentials {
    margin-top: var(--s-md);
}

.credential {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem !important;
    color: var(--ink-light) !important;
    margin-bottom: 0.8rem !important;
    line-height: 1.5 !important;
}

.credential::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--brown);
    border-radius: 50%;
}

.profile-text .wp-block-heading {
    margin-bottom: var(--s-lg);
}


/* ---------------------------------------------------------
   FAQ — Elegant, smooth hover
   --------------------------------------------------------- */
.faq-section {
    padding: var(--s-xl) 0;
    background: var(--beige);
}

.faq-accordion {
    max-width: 800px;
}

.faq-item {
    border-bottom: 1px solid var(--grey-faint);
    background: transparent !important;
    /* Force no WP background */
}

.faq-item:first-child {
    border-top: 1px solid var(--grey-faint);
}

.faq-accordion .faq-item.animate-on-scroll:nth-child(2) {
    transition-delay: .08s;
}

.faq-accordion .faq-item.animate-on-scroll:nth-child(3) {
    transition-delay: .16s;
}

.faq-accordion .faq-item.animate-on-scroll:nth-child(4) {
    transition-delay: .24s;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 2.5rem 0;
    background: transparent !important;
    /* Prevent WP default */
    border: none !important;
    font-family: var(--ff-heading);
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-md);
    line-height: 1.4;
    transition: color .4s var(--ease), padding-left .4s var(--ease);
}

.faq-question:hover {
    color: var(--blue);
    padding-left: 1rem;
    /* Smooth elegant shift */
}

.faq-chevron {
    color: var(--brown);
    transition: transform .5s var(--ease);
    flex-shrink: 0;
}

.faq-question.active {
    color: var(--blue);
    padding-left: 1rem;
}

.faq-question.active .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .6s var(--ease);
    background: transparent !important;
}

.faq-answer p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink-light);
    margin: 0;
    max-width: 680px;
    padding: 0 0 2.5rem 1rem;
}


/* ---------------------------------------------------------
   CONTACT
   --------------------------------------------------------- */
.contact-section {
    padding: var(--s-lg) 0;
    background: var(--ivory);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--s-lg);
    align-items: start;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: var(--s-sm);
}

.contact-card {
    position: relative;
    padding: var(--s-md);
    padding-left: calc(48px + var(--s-md) + 1rem);
    background: var(--ivory);
    border-radius: var(--r-md);
    border: 1px solid var(--grey-faint);
    transition: all .4s var(--ease);
}

.contact-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-soft);
}

.contact-card-icon {
    position: absolute;
    top: var(--s-md);
    left: var(--s-md);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue-wash);
    color: var(--blue);
    flex-shrink: 0;
    transition: background .4s var(--ease), color .4s var(--ease);
}

.contact-card:hover .contact-card-icon {
    background: var(--blue);
    color: var(--ivory);
}

.contact-cards .contact-card.animate-on-scroll:nth-child(2) {
    transition-delay: .1s;
}

.contact-cards .contact-card.animate-on-scroll:nth-child(3) {
    transition-delay: .2s;
}

.contact-card h4 {
    font-family: var(--ff-body);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0;
}

.contact-address,
.contact-link {
    font-size: 0.95rem;
    color: var(--ink-light);
}

.contact-link {
    display: block;
    margin-bottom: 2px;
    transition: color .3s var(--ease);
}

.contact-link:hover {
    color: var(--blue);
}

.contact-maps {
    display: flex;
    flex-direction: column;
    gap: var(--s-sm);
    height: 100%;
}

.contact-map {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    min-height: 230px;
    box-shadow: var(--shadow-soft);
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 230px;
}

.contact-map-label {
    position: absolute;
    z-index: 1;
    top: var(--s-sm);
    left: var(--s-sm);
    margin: 0;
    padding: 4px 12px;
    background: var(--ivory);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--r-sm, 6px);
    box-shadow: var(--shadow-soft);
    pointer-events: none;
}

/* Link "Apri in Google Maps": pill su desktop (mappa interattiva),
   intera area toccabile su mobile/tablet (apre l'app Google Maps
   e evita che lo swipe resti intrappolato nell'embed). */
.contact-map-open {
    position: absolute;
    z-index: 5;
    right: var(--s-sm);
    bottom: var(--s-sm);
}

.contact-map-open span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: var(--ivory);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-soft);
    transition: color .3s var(--ease), box-shadow .3s var(--ease);
}

.contact-map-open:hover span {
    color: var(--blue);
    box-shadow: var(--shadow-hover);
}

@media (max-width: 1024px) {
    .contact-map-open {
        inset: 0;
    }

    .contact-map-open span {
        position: absolute;
        right: 12px;
        bottom: 12px;
    }
}


/* ---------------------------------------------------------
   CTA FINALE — Closing band
   --------------------------------------------------------- */
.cta-section {
    padding: var(--s-xl) var(--s-md);
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    position: relative;
    z-index: 0;
    overflow: hidden;
    text-align: center;
    margin-bottom: var(--s-lg);
}

/* Rounded "panel" treatment — matches .manifesto-section */
.one-page-custom .cta-section.alignfull {
    width: calc(100% - 2 * var(--s-md)) !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-radius: var(--r-lg);
    margin-top: var(--s-xl);
    height: auto !important;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -140px;
    left: -120px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--glow-ivory) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -160px;
    right: -120px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--glow-ivory) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.cta-container {
    max-width: 720px;
    margin-inline: auto;
}

.cta-heading.wp-block-heading {
    color: var(--ivory);
    margin-bottom: var(--s-sm);
}

.cta-subheadline {
    color: rgba(253, 252, 252, 0.75) !important;
    font-size: 1.1rem;
    max-width: 560px;
    margin-inline: auto;
    margin-bottom: var(--s-md) !important;
}

.cta-buttons {
    justify-content: center;
    gap: 1rem;
}

.cta-section .wp-block-button.is-style-outline .wp-block-button__link {
    background: transparent !important;
    border: 1px solid rgba(253, 252, 252, 0.4) !important;
    color: var(--ivory) !important;
    box-shadow: none !important;
}

.cta-section .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: rgba(253, 252, 252, 0.1) !important;
    border-color: var(--ivory) !important;
    box-shadow: none !important;
}


/* ---------------------------------------------------------
   BOOKING FORM (Fluent Forms) — Dusty blue panel
   --------------------------------------------------------- */
.booking-section {
    background: var(--blue);
    padding: var(--s-xl) var(--s-md);
  
}

/* Form a tutta larghezza edge-to-edge, niente padding/boxing */
.booking-section {
    padding: var(--s-xl) 0 !important;
}

.booking-section .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-inline: 0 !important;
}

.booking-section .wp-block-group > div {
    padding-inline: var(--s-md);
}

.booking-section .frm-fluent-form,
.booking-section .fluentform {
    max-width: 100% !important;
    margin-inline: auto;
}

.booking-section .ff-el-group {
    margin-bottom: var(--s-md);
}

.booking-section .ff-t-container {
    gap: var(--s-md);
}

.booking-section .ff-el-input--label label {
    font-family: var(--ff-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--ivory);
}

.booking-section .ff-el-input--label.ff-el-is-required.asterisk-right label::after {
    color: var(--brown-light);
}

.booking-section .ff-el-form-control {
    background: var(--ivory);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    padding: 14px 18px;
    font-family: var(--ff-body);
    font-size: 0.95rem;
    color: var(--ink);
    transition: all .3s var(--ease);
}

.booking-section .ff-el-form-control::placeholder {
    color: var(--ink-light);
    opacity: 1;
}

.booking-section .ff-el-form-control:focus {
    background: var(--ivory);
    border-color: var(--ivory);
    box-shadow: 0 0 0 4px rgba(253, 252, 252, 0.25);
}

.booking-section textarea.ff-el-form-control {
    min-height: 140px;
    resize: vertical;
}

.booking-section .ff_submit_btn_wrapper {
    text-align: center;
    margin-top: var(--s-sm);
}

.booking-section .ff-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 48px;
    border-radius: var(--r-pill);
    background: var(--ivory);
    color: var(--blue-dark);
    font-family: var(--ff-body);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all .4s var(--ease);
    box-shadow: 0 8px 24px rgba(67, 92, 115, 0.25);
}

.booking-section .ff-btn-submit:hover {
    background: var(--brown-light);
    color: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(67, 92, 115, 0.3);
}

.booking-section .wp-block-heading {
    color: var(--ivory) !important;
    margin-bottom: var(--s-md) !important;
}

/* Disclaimer sotto il titolo del form: appuntamento, non consulenza online */
.booking-disclaimer {
    color: rgba(253, 252, 252, 0.82) !important;
    max-width: 640px;
    margin: 0 auto var(--s-lg) !important;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Campo radio "Studio di interesse" e checkbox sul pannello blu */
.booking-section .ff-el-form-check,
.booking-section .ff-el-form-check label,
.booking-section .ff-el-form-check-label,
.booking-section .ff_list_inline label {
    color: var(--ivory) !important;
    font-family: var(--ff-body);
    font-size: 0.95rem;
    font-weight: 400;
}

.booking-section input[type="radio"],
.booking-section input[type="checkbox"] {
    accent-color: var(--brown-light);
    width: 16px;
    height: 16px;
}

.booking-section .ff-el-group.ff_list_inline .ff-el-form-check,
.booking-section .ff-el-form-check.ff-el-form-check-inline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-right: 1.75rem;
    margin-bottom: 0.4rem;
}

/* Icona "info" (tooltip) accanto alle etichette: oro, non azzurro —
   l'azzurro di default di Fluent Forms sparisce sul pannello blu */
.booking-section .ff-el-tooltip,
.booking-section .ff-el-tooltip svg,
.booking-section .ff-el-tooltip svg path {
    fill: var(--brown-light) !important;
    color: var(--brown-light) !important;
}

.booking-section .ff-el-tooltip:hover,
.booking-section .ff-el-tooltip:hover svg,
.booking-section .ff-el-tooltip:hover svg path {
    fill: var(--ivory) !important;
    color: var(--ivory) !important;
}

/* Messaggio di conferma post-invio: il default di Fluent Forms è grigio
   scuro su blu (illeggibile) e in font di sistema */
.booking-section .ff-message-success {
    background: rgba(253, 252, 252, 0.10);
    border: 1px solid rgba(209, 187, 165, 0.45);
    border-radius: var(--r-sm);
    padding: var(--s-md) var(--s-md);
    max-width: 640px;
    margin: var(--s-md) auto 0;
    box-shadow: none;
    font-family: var(--ff-body);
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--ivory) !important;
    text-align: center;
}

.booking-section .ff-message-success p {
    color: var(--ivory) !important;
    margin-bottom: 0.6em;
}

.booking-section .ff-message-success p:last-child {
    margin-bottom: 0;
}

.booking-section .ff-message-success strong,
.booking-section .ff-message-success b {
    color: var(--brown-light);
    font-weight: 600;
}


/* ---------------------------------------------------------
   PROFILE INLINE CTA — guides the reader to book after the bio
   --------------------------------------------------------- */
.profile-text .profile-cta {
    margin-top: var(--s-md);
}


/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
.custom-footer {
    background: var(--blue-dark);
    padding: var(--s-xl) 0 var(--s-lg);
    border-top: 1px solid rgba(209, 187, 165, 0.25);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s-md);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-name {
    font-family: var(--ff-heading);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--ivory);
}

.footer-role {
    font-size: 0.7rem;
    color: var(--brown-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: var(--beige);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color .3s var(--ease);
}

.footer-nav a:hover {
    color: var(--brown-light);
}

.footer-right {
    text-align: right;
}

.footer-right p {
    color: var(--beige);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.8;
}

/* Link nel footer (es. Privacy Policy): oro del sito, leggibile sul blu scuro */
.footer-right p a {
    color: var(--brown-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .3s var(--ease);
}

.footer-right p a:hover {
    color: var(--ivory);
}

.footer-copy {
    margin-top: var(--s-sm) !important;
    font-size: 0.75rem !important;
}


/* ---------------------------------------------------------
   SCROLL ANIMATIONS
   --------------------------------------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.services-grid .service-card.animate-on-scroll:nth-child(2) {
    transition-delay: .15s;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 1024px) {
    :root {
        --s-xl: 6rem;
        --s-xxl: 8rem;
    }

    .hero-columns,
    .manifesto-layout,
    .profile-layout {
        flex-direction: column !important;
        gap: 3rem !important;
    }

    /* Tablet menu: show burger menu */
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
    }

    /* Tablet profile layout: proper ordering */
    .profile-layout {
        display: flex !important;
        flex-direction: column;
        gap: 2rem !important;
    }

    .profile-layout > .profile-sidebar,
    .profile-layout > .profile-text {
        display: contents;
    }

    /* Reorder all profile elements */
    .profile-section .section-label {
        order: 1;
    }

    .profile-section .wp-block-heading {
        order: 2;
    }

    .profile-section .profile-photo {
        order: 3;
        max-width: 400px;
        margin: 0 auto;
    }

    .profile-section .profile-photo img {
        aspect-ratio: 1 / 1.2;
        width: 100%;
    }

    .profile-section .profile-credentials {
        order: 4;
    }

    .profile-section .wp-block-paragraph:not(.section-label) {
        order: 5;
    }

    .profile-section .profile-cta {
        order: 6;
    }

    /* -----------------------------------------------------
       TABLET & MOBILE HERO — "Cinematic Portrait"
       La foto diventa sfondo a tutta pagina; testo e pulsanti
       sovrapposti in basso a sinistra; authority bar come
       striscia hairline lungo la base. Premium, calmo, d'impatto.
       ----------------------------------------------------- */
    .hero-section {
        padding: 0 !important;
        min-height: 100svh;
        display: block;
    }

    .hero-section::before {
        display: none;            /* Niente glow: sopra la foto non serve */
    }

    /* Full-bleed: annulla padding/max-width del container interno */
    .hero-section .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Grid-stack: foto e testo nella STESSA cella → sovrapposti */
    .hero-columns {
        display: grid !important;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        min-height: 100svh;
        gap: 0 !important;
        text-align: left;
    }

    .hero-columns>.hero-text,
    .hero-columns>.hero-visual {
        grid-area: 1 / 1;            /* stessa cella */
        margin: 0 !important;
        flex-basis: auto !important;
    }

    /* La foto riempie la cella, come sfondo */
    .hero-columns>.hero-visual {
        position: relative !important;
        z-index: 0;
        width: 100% !important;
        max-width: 100% !important;
        align-self: stretch;
        justify-self: stretch;
        order: 0 !important;
        transform: none !important;  /* niente shift dall'animazione di load */
    }

    .hero-photo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
    }

    .hero-photo img {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
        object-position: 50% 50%;
        border-radius: 0;
        box-shadow: none;
    }

    /* Niente cornice oro in modalità overlay */
    .hero-visual::before {
        display: none;
    }

    /* Scrim: chiaro in alto (volto), scuro in basso (testo leggibile) */
    .hero-visual::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background:
            linear-gradient(to top,
                rgba(38, 48, 60, 0.96) 0%,
                rgba(38, 48, 60, 0.88) 22%,
                rgba(38, 48, 60, 0.55) 46%,
                rgba(38, 48, 60, 0.22) 68%,
                rgba(38, 48, 60, 0.12) 85%,
                rgba(38, 48, 60, 0.28) 100%);
    }

    /* Testo + pulsanti sovrapposti, in basso a sinistra */
    .hero-columns>.hero-text {
        position: relative;
        z-index: 2;
        align-self: end;            /* ancorato in basso */
        justify-self: start;        /* allineato a sinistra */
        width: 100%;
        max-width: 640px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 var(--s-md) calc(var(--s-lg) + 64px);  /* spazio per la stat-strip */
        color: var(--ivory);
    }

    .hero-text .badge {
        margin-top: 0;
        color: var(--brown-light);
    }

    .hero-text .wp-block-heading,
    .hero-text h1 {
        color: var(--ivory) !important;
        text-shadow: 0 1px 28px rgba(20, 26, 33, 0.4);
    }

    .hero-text h1 em {
        color: #bcd2e4;          /* Azzurro chiaro: accento leggibile su scuro */
    }

    .hero-subheadline {
        color: rgba(253, 252, 252, 0.86);
        max-width: 460px;
        margin-bottom: var(--s-md);
    }

    .hero-ctas {
        justify-content: flex-start !important;
        margin-bottom: var(--s-xs);
    }

    .hero-email-link a {
        color: rgba(253, 252, 252, 0.9);
        border-color: rgba(253, 252, 252, 0.4);
    }

    .hero-email-link a:hover {
        color: var(--ivory);
        border-color: var(--ivory);
    }

    /* Authority → striscia hairline in vetro lungo la base */
    .authority-band {
        position: absolute !important;
        inset: auto 0 0 0 !important;
        right: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 2 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        background: rgba(26, 34, 44, 0.34) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: none !important;
        border-top: 1px solid rgba(253, 252, 252, 0.16) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0.85rem var(--s-md) calc(0.85rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .authority-band .authority-item {
        padding: 0 0.65rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .authority-band .authority-item:not(:first-child) {
        border-left: 1px solid rgba(253, 252, 252, 0.16) !important;
    }

    .authority-band .authority-item h3,
    .authority-band .authority-item .authority-number {
        color: var(--ivory) !important;
        font-size: 1.35rem !important;
        margin-bottom: 2px !important;
    }

    .authority-band .authority-item p,
    .authority-band .authority-item .authority-label {
        color: rgba(253, 252, 252, 0.74) !important;
        font-size: 0.64rem !important;
        line-height: 1.25 !important;
        letter-spacing: 0.2px;
        /* Strip uniforme: max 2 righe per etichetta */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .floating-stats {
        bottom: -20px;
        left: -20px;
        right: -20px;
        flex-direction: row;
        justify-content: space-between;
        padding: 1.5rem;
    }

    .hero-columns>.hero-text,
    .hero-columns>.hero-visual,
    .manifesto-layout>.manifesto-quote,
    .manifesto-layout>.manifesto-body,
    .profile-layout>.profile-sidebar,
    .profile-layout>.profile-text {
        flex-basis: 100% !important;
    }

    .profile-layout>.profile-text {
        order: -1 !important; /* Porta il testo descrittivo sopra l'elenco puntato su mobile */
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .percorso-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--s-lg) var(--s-md);
    }

    .percorso-section::before {
        width: 380px;
        height: 260px;
    }
}

/* Laptop bassi (1366×768, o 1080p con scaling display 125–150%): il viewport
   utile scende a ~650–800px. Comprimiamo la hero così CTA e barra numeri
   restano nel fold, senza ricorrere allo scroll per il primo invito all'azione.
   Solo desktop (≥1025px): sotto usa il layout "cinematic" a tutta foto. */
@media (min-width: 1025px) and (max-height: 800px) {
    .hero-section {
        padding-top: 92px;
        padding-bottom: var(--s-md);
    }

    .hero-text h1 {
        font-size: clamp(2rem, 3.2vw, 2.6rem);
    }

    .hero-subheadline {
        margin-bottom: var(--s-sm);
    }

    .hero-photo img {
        aspect-ratio: 3 / 3.4;
    }

    /* Foto più bassa = la barra numeri coprirebbe il busto del Dottore:
       la abbassiamo e rimpiccioliamo così sfiora solo il bordo/scrivania,
       restando comunque dentro il fold anche sui laptop più bassi. */
    .authority-band {
        bottom: -2rem !important;
        padding: 0.7rem 1.3rem !important;
        gap: 0.8rem !important;
    }

    .authority-band .authority-number,
    .authority-band .wp-block-column h3,
    .authority-item h3 {
        font-size: 1.5rem !important;
    }

    .authority-band .authority-label,
    .authority-band .wp-block-column p,
    .authority-item p {
        font-size: 0.76rem !important;
        line-height: 1.3 !important;
    }
}

@media (max-width: 768px) {
    :root {
        --s-xl: 5rem;
        --s-xxl: 6rem;
    }

    .services-grid {
        flex-direction: column !important;
    }

    .services-grid>.service-card {
        flex-basis: 100% !important;
    }

    /* Mobile profile layout adjustments */
    .profile-layout {
        display: flex !important;
        flex-direction: column;
        gap: 2rem !important;
    }

    .profile-layout > .profile-sidebar,
    .profile-layout > .profile-text {
        display: contents;
    }

    /* Reorder all profile elements */
    .profile-section .section-label {
        order: 1;
    }

    .profile-section .wp-block-heading {
        order: 2;
    }

    .profile-section .profile-photo {
        order: 3;
    }

    .profile-photo img {
        aspect-ratio: 1 / 1.2;
        width: 100%;
    }

    /* More visibility for credentials */
    .profile-section .profile-credentials {
        order: 4;
        margin-top: var(--s-lg);
        padding-top: var(--s-md);
        border-top: 2px solid var(--blue-wash);
    }

    .credential {
        font-size: 0.95rem !important;
        color: var(--ink) !important;
        font-weight: 500;
        margin-bottom: 1rem !important;
    }

    .credential::before {
        background: var(--blue);
        width: 8px;
        height: 8px;
    }

    .profile-section .wp-block-paragraph:not(.section-label) {
        order: 5;
    }

    .profile-section .profile-cta {
        order: 6;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Full-screen mobile menu */
    .mobile-menu-overlay {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: fixed;
        inset: 0;
        z-index: 140;
        background: var(--ivory);
        padding: calc(90px + var(--s-md)) var(--s-md) var(--s-lg);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-16px);
        transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s var(--ease);
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-menu-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--s-lg);
        width: 100%;
    }

    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.75rem;
        list-style: none;
        width: 100%;
        margin: 0 auto;
    }

    .mobile-menu-links a {
        font-family: var(--ff-heading);
        font-size: 1.6rem;
        font-weight: 500;
        color: var(--ink);
        transition: color .3s var(--ease);
    }

    .mobile-menu-links a:hover,
    .mobile-menu-links a.active {
        color: var(--blue);
    }

    .mobile-menu-contacts {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
        padding-top: var(--s-lg);
        border-top: 1px solid var(--grey-faint);
        width: 100%;
        max-width: 320px;
    }

    .mobile-menu-contacts a:not(.btn) {
        font-size: 0.9rem;
        color: var(--ink-light);
    }

    .mobile-menu-cta {
        margin-top: 0.5rem;
        background: var(--blue);
        color: var(--ivory);
        box-shadow: 0 8px 24px rgba(91, 124, 153, 0.2);
    }

    .mobile-menu-legal {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .mobile-menu-legal p,
    .mobile-menu-legal a {
        font-size: 0.7rem;
        color: var(--ink-light);
        margin-bottom: 0;
    }

    .hero-section {
        min-height: 100svh;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .hero-subheadline {
        font-size: 1rem;
        max-width: 440px;
    }

    .hero-columns>.hero-text {
        padding-bottom: calc(var(--s-md) + 56px);
    }

    .authority-band .authority-item h3,
    .authority-band .authority-item .authority-number {
        font-size: 1.2rem !important;
    }

    .authority-band .authority-item p,
    .authority-band .authority-item .authority-label {
        font-size: 0.6rem !important;
    }

    .floating-stats {
        flex-direction: column;
        position: static;
        margin-top: 1rem;
        box-shadow: none;
        border: 1px solid var(--grey-faint);
    }

    .footer-container {
        flex-direction: column;
        gap: var(--s-md);
    }

    .footer-right {
        text-align: left;
    }

    .contact-map,
    .contact-map iframe {
        min-height: 220px;
    }

    .service-card {
        padding: 2rem;
        padding-top: 6.5rem;
    }

    .service-card::before {
        top: 2rem;
        left: 2rem;
    }

    .percorso-grid {
        grid-template-columns: 1fr;
        gap: var(--s-lg);
    }

    .percorso-section::before {
        width: 280px;
        height: 280px;
        top: 5%;
    }

    .hero-section::before {
        width: 320px;
        height: 320px;
        top: -60px;
        right: -100px;
    }

    .profile-section::before {
        width: 260px;
        height: 260px;
        left: -100px;
    }

    .faq-question {
        font-size: 1.15rem;
        padding: 1.75rem 0;
    }
}

@media (max-width: 480px) {
    :root {
        --s-md: 1.25rem;
        --s-lg: 2.5rem;
    }

    .authority-item h3 {
        font-size: 1.7rem !important;
    }

    .hero-text h1 {
        font-size: 1.95rem;
    }

    .hero-columns>.hero-text {
        padding-bottom: calc(var(--s-sm) + 54px);
    }

    .authority-band .authority-item p,
    .authority-band .authority-item .authority-label {
        font-size: 0.56rem !important;
    }

    .faq-question {
        font-size: 1.05rem;
        padding: 1.5rem 0;
        gap: 1rem;
    }

    .contact-map,
    .contact-map iframe {
        min-height: 180px;
    }

    .cta-section {
        padding: var(--s-lg) var(--s-md);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .wp-block-button .wp-block-button__link {
        width: 100%;
        justify-content: center;
    }

    .hero-section::before,
    .profile-section::before,
    .percorso-section::before {
        display: none;
    }
}


/* Fix #1 — Volto libero dal testo sui telefoni.
   La foto hero è landscape (16:9): con object-fit:cover su viewport
   verticali il volto resta a metà altezza e il blocco testo (ancorato in
   basso) lo raggiunge. Uno zoom ancorato in basso alza il volto in un
   ritaglio più ritratto, lasciando il testo sulla giacca (zona scura). */
@media (max-width: 600px) {
    .hero-photo {
        overflow: hidden;
    }

    .hero-photo img {
        transform: scale(1.16);
        transform-origin: 50% 100%;
    }
}


/* ---------------------------------------------------------
   STICKY MOBILE CTA — persistent gentle guide to booking
   Hidden on desktop; appears on tablet/mobile after the hero.
   --------------------------------------------------------- */
.sticky-cta {
    display: none;
}

@media (max-width: 1024px) {
    .sticky-cta {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 120;
        padding: 0.7rem var(--s-md) calc(0.7rem + env(safe-area-inset-bottom, 0px));
        background: rgba(253, 252, 252, 0.92);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--grey-faint);
        box-shadow: 0 -8px 30px rgba(74, 85, 104, 0.08);
        /* Stato di riposo: nascosto sotto il bordo, scivola su quando serve */
        transform: translateY(120%);
        opacity: 0;
        visibility: hidden;
        transition: transform .45s var(--ease), opacity .45s var(--ease), visibility .45s var(--ease);
    }

    .sticky-cta.is-visible {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Non coprire il menu mobile aperto */
    body.menu-open .sticky-cta {
        transform: translateY(120%);
        opacity: 0;
        visibility: hidden;
    }

    .sticky-cta-phone {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: 1px solid var(--grey-faint);
        background: var(--ivory);
        color: var(--blue);
        transition: all .3s var(--ease);
    }

    .sticky-cta-phone:hover,
    .sticky-cta-phone:active {
        background: var(--blue-wash);
        color: var(--blue-dark);
    }

    .sticky-cta-book {
        flex: 1 1 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 52px;
        border-radius: var(--r-pill);
        background: var(--blue);
        color: var(--ivory);
        font-family: var(--ff-body);
        font-weight: 500;
        font-size: 0.98rem;
        letter-spacing: 0.4px;
        box-shadow: 0 8px 24px rgba(91, 124, 153, 0.28);
        transition: all .3s var(--ease);
    }

    .sticky-cta-book:hover,
    .sticky-cta-book:active {
        background: var(--blue-dark);
        color: var(--ivory);
    }
}
/* fine @media (max-width: 1024px) — sticky CTA */

/* NB: lo styling del banner cookie e del badge "Gestisci consenso"
   è gestito nativamente nel campo Custom CSS di Complianz
   (Impostazioni → Look & Feel), non qui — così viene caricato
   dentro il foglio del plugin ed evita conflitti di specificità. */

/* ---------------------------------------------------------
   PAGINE LEGALI (Privacy Policy, Cookie Policy) — template page.php
   Header/footer del sito, niente sidebar, documento in colonna
   editoriale curata. Coerente con il design system della home.
   --------------------------------------------------------- */

/* Hero della pagina: eyebrow + titolo + data aggiornamento */
.legal-hero {
    background: var(--beige);
    border-bottom: 1px solid var(--grey-faint);
    padding: calc(90px + var(--s-lg)) 0 var(--s-lg);
    position: relative;
    z-index: 0;
    overflow: hidden;
}

/* Alone ambient come nelle sezioni della home */
.legal-hero::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -120px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--glow-blue) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: -1;
    pointer-events: none;
}

.admin-bar .legal-hero {
    padding-top: calc(122px + var(--s-lg));
}

.legal-hero .container,
.legal-container,
.legal-back {
    max-width: 768px;
    margin-inline: auto;
    padding-inline: var(--s-md);
}

.legal-hero .section-label {
    margin-top: 0;
}

.legal-hero h1 {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    color: var(--blue-dark);
    margin-bottom: var(--s-sm);
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--ink-light);
    margin: 0;
    letter-spacing: 0.2px;
}

/* Colonna del documento */
.legal-container {
    padding-top: var(--s-lg);
    padding-bottom: var(--s-lg);
}

.legal-content {
    font-family: var(--ff-body);
    color: var(--ink);
    line-height: 1.85;
    font-size: 1.02rem;
}

.legal-content > *:first-child {
    margin-top: 0;
}

/* Intestazioni di sezione: divisore hairline per ritmo da documento */
.legal-content h2 {
    font-family: var(--ff-heading);
    font-size: clamp(1.55rem, 2.6vw, 1.95rem);
    color: var(--blue-dark);
    font-weight: 500;
    line-height: 1.25;
    margin-top: var(--s-lg);
    margin-bottom: var(--s-sm);
    padding-top: var(--s-lg);
    border-top: 1px solid var(--grey-faint);
}

.legal-content h3 {
    font-family: var(--ff-heading);
    font-size: 1.3rem;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.3;
    margin-top: var(--s-md);
    margin-bottom: 0.5rem;
}

.legal-content h2:first-child,
.legal-content h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-content p {
    margin: 0 0 var(--s-sm);
    color: var(--ink);
}

.legal-content a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    -webkit-text-decoration-color: var(--brown-light);
    text-decoration-color: var(--brown-light);
    transition: color .3s var(--ease);
}

.legal-content a:hover {
    color: var(--blue-dark);
    -webkit-text-decoration-color: var(--blue);
    text-decoration-color: var(--blue);
}

.legal-content strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 var(--s-sm);
    padding-left: 1.4rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.legal-content ul li::marker {
    color: var(--brown);
}

/* Tabelle cookie (Complianz): pulite, arrotondate */
.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--s-sm) 0 var(--s-md);
    font-size: 0.9rem;
    border: 1px solid var(--grey-faint);
    border-radius: var(--r-sm);
    overflow: hidden;
}

.legal-content th,
.legal-content td {
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--grey-faint);
    vertical-align: top;
}

.legal-content thead th,
.legal-content tr:first-child th {
    background: var(--beige);
    font-family: var(--ff-body);
    font-weight: 600;
    color: var(--ink);
}

.legal-content tr:last-child td {
    border-bottom: none;
}

/* Link di ritorno alla home in coda al documento */
.legal-back {
    margin-top: var(--s-lg);
    margin-bottom: 0;
}

.legal-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-light);
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid var(--grey-faint);
    padding-bottom: 3px;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}

.legal-back a:hover {
    color: var(--blue);
    border-color: var(--blue);
}

/* Fallback: eventuali pagine ancora sul template di default GeneratePress */
body.page .entry-content {
    font-family: var(--ff-body);
    color: var(--ink);
    max-width: 760px;
    margin-inline: auto;
    padding: var(--s-lg) var(--s-md);
    line-height: 1.8;
}

body.page .entry-content h1,
body.page .entry-content h2,
body.page .entry-content h3 {
    font-family: var(--ff-heading);
    color: var(--blue-dark);
    font-weight: 500;
    line-height: 1.2;
    margin-top: var(--s-lg);
    margin-bottom: var(--s-sm);
}

body.page .entry-content p {
    margin-bottom: var(--s-sm);
    color: var(--ink);
}

body.page .entry-content a {
    color: var(--blue);
    text-decoration: underline;
}