/*
Effebi — foglio di stile (portato dal tema WordPress)
Author: Ariel Michelin
Description: WordPress theme for Effebi di Barbara Gnutti.
Version: 1.1
*/


:root {
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --c-accent: #E62B1E;
    --c-dark: #111111;
    --c-light: #f4f4f4;
    --header-h: 70px;
}

*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: var(--font-montserrat), 'Montserrat', sans-serif;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #000;
    background: #fff;
    cursor: default;
}

/* Homepage: impedisci scroll nativo fuori dal main-container per consentire lo snap-scroll */
body:has(.main-container) {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
a {
    margin: 0;
    padding: 0;
}

button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: inherit;
}

/* Visually hidden — accessible to screen readers and search crawlers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes elegant-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-x {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.5;
    }

    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}

/* ===========================
   LAYOUT
   =========================== */
.main-container {
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Fix for WordPress Admin Bar */
body.admin-bar .main-container {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-container {
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

.main-container::-webkit-scrollbar {
    display: none;
}

.main-container.overflow-y-hidden {
    overflow-y: hidden;
}

/* ===========================
   HEADER & MENU
   =========================== */
.site-header {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: padding 0.3s ease, background-color 0.3s ease;
    height: var(--header-h);
}

body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.header-logo {
    display: flex;
    align-items: center;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 121;
}

.header-logo .header-dot {
    display: inline-block;
    width: clamp(0.35rem, 1vw, 0.5rem);
    aspect-ratio: 1/1;
    border-radius: 50%;
    margin: 0 clamp(0.3rem, 1vw, 0.5rem);
    background-color: var(--c-accent);
}

/* Footer logo overrides */
#footer .header-logo {
    z-index: 1;
}

#footer .header-dot {
    background-color: transparent;
}

.site-header.dark {
    color: white;
}

.site-header.light {
    color: black;
}

/* HAMBURGER COLORS – fix visibilità su sfondi dark/light */
.site-header.dark .menu-icon span {
    background-color: white;
}

.site-header.light .menu-icon span {
    background-color: black;
}

.menu-icon {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 121;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    transition: transform 300ms ease-in-out, opacity 300ms ease-in-out;
    transform-origin: center;
}

.menu-icon.open span:nth-of-type(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-icon.open span:nth-of-type(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-icon.open span:nth-of-type(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* MENU OVERLAY */
.menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.96);
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out-expo), visibility 0.4s;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.menu-overlay::-webkit-scrollbar {
    display: none;
}

body.menu-is-active .menu-overlay,
body.menu-is-active .menu-overlay a {
    cursor: none !important;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.menu-overlay ul {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(1rem, 3vh, 2.5rem);
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6rem 0;
}

.menu-overlay ul::-webkit-scrollbar {
    display: none;
}

.menu-overlay li {
    opacity: 0;
    flex-shrink: 0;
}

.menu-overlay a {
    font-weight: 800;
    color: white;
    transition: color 300ms;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    line-height: 1.2;
    display: block;
    padding: 0.25vh 0;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    hyphens: auto;
}

.menu-overlay a:hover {
    color: #a1a1aa;
}

@media (max-height: 800px) and (min-width: 1024px) {
    .menu-overlay ul {
        gap: 1rem;
        padding: 5rem 0;
    }

    .menu-overlay a {
        font-size: 2.2rem;
    }
}

/* FLOATING DOT */
.floating-dot {
    position: fixed;
    width: 12px;
    height: 12px;
    background-color: var(--c-accent);
    border-radius: 50%;
    z-index: 101;
    pointer-events: none;
    top: 0;
    left: 0;
    transition: transform 100ms linear, opacity 300ms ease-out;
    will-change: transform;
}

/* CUSTOM MENU CURSOR */
.custom-menu-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: var(--c-accent);
    border-radius: 50%;
    z-index: 200;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .custom-menu-cursor {
        display: block;
    }
}

body.menu-is-active .custom-menu-cursor {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

body:not(.menu-is-active) .custom-menu-cursor {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate(-50%, -50%) scale(0) !important;
}

/* ===========================
   SECTIONS
   =========================== */
.slide {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
}

#home,
#about-new,
#collaborations,
#connections-mobile,
#connections-desktop,
#services,
#publications {
    padding-top: max(5rem, 12vh);
    padding-bottom: max(2rem, 6vh);
}

.section-title {
    font-size: clamp(1.7rem, 6vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    color: black;
    display: flex;
    justify-content: center;
    align-items: baseline;
    text-align: center;
    word-break: break-word;
    line-height: 0.9;
}

.section-title-dot {
    color: transparent !important;
    margin-left: 0.25rem;
}

/* ===========================
   HOME SECTION
   =========================== */
#home.slide {
    padding: 0;
    background-color: #222222;
}

#home .home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #EFEFEF;
    z-index: 10;
    padding: 0 2rem;
}

#home .home-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#home .home-title {
    display: flex;
    align-items: center;
    font-size: clamp(2.5rem, 10vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    justify-content: center;
    line-height: 1;
}

#home .home-title>div {
    overflow: hidden;
}

#home-target-dot {
    display: inline-block;
    width: clamp(0.8rem, 2.5vw, 1.2rem);
    aspect-ratio: 1/1;
    background-color: transparent;
    border-radius: 50%;
    margin: 0 clamp(0.5rem, 1.5vw, 1rem);
}

#home .divider {
    width: 60px;
    height: 2px;
    background-color: var(--c-accent);
    margin: 2rem 0;
    transform-origin: center;
    transition: transform 1000ms var(--ease-out-expo) 600ms, opacity 1000ms var(--ease-out-expo) 600ms;
    transform: scaleY(0);
    opacity: 0;
}

#home .subtitle {
    overflow: hidden;
    font-size: clamp(0.9rem, 2.5vw, 1.4rem);
    font-weight: 400;
    color: #EFEFEF;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

#home .tagline {
    overflow: hidden;
    margin-top: clamp(2rem, 5vh, 3rem);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #e5e5e5;
    opacity: 0.9;
}

#home.is-loaded .divider {
    transform: scaleY(1);
    opacity: 1;
}

@media (min-width: 768px) {
    #home .home-title-wrapper {
        flex-direction: row;
    }

    #home .divider {
        width: 2px;
        height: 80px;
        margin: 0 2rem;
    }
}

/* ===========================
   ABOUT SECTION
   =========================== */
#about-new.slide {
    background-color: #1a1a1a;
    height: auto;
    min-height: 100vh;
    padding-top: 6rem;
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#about-new .content-wrapper {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-editorial-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

.about-ed-img {
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 45vh;
    overflow: hidden;
    border-radius: 0.75rem;
    position: relative;
    opacity: 0;
}

.about-ed-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

#about-new-target-dot {
    position: absolute;
    width: clamp(60px, 15vw, 100px);
    aspect-ratio: 1/1;
    background-color: transparent;
    border-radius: 50%;
    bottom: 1.5rem;
    left: 1.5rem;
    pointer-events: none;
}

.about-ed-text {
    opacity: 0;
    padding: 0 1rem;
    text-align: left;
}

.about-ed-text h3,
.about-ed-text .about-ed-label {
    font-size: 0.85rem;
    color: var(--c-accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 700;
}

.about-ed-text h2 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 900;
    color: white;
    line-height: 0.95;
    margin-bottom: 2rem;
}

.about-ed-text p {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    font-weight: 300;
    color: #d1d5db;
    line-height: 1.7;
    max-width: 50ch;
}

@media (min-width: 1024px) {
    #about-new.slide {
        height: 100vh;
        justify-content: center;
        padding: 0;
    }

    .about-editorial-grid {
        display: grid;
        grid-template-columns: 0.8fr 1.5fr;
        gap: 5rem;
        max-width: 1400px;
        margin: 0 auto;
    }

    .about-ed-img {
        aspect-ratio: 3/4;
        max-height: 70vh;
        width: 100%;
    }

    .about-ed-text {
        padding: 0;
    }

    .about-ed-text h2 {
        font-size: clamp(4rem, 6vw, 6.5rem);
        margin-bottom: 2.5rem;
    }

    .about-ed-text p {
        font-size: 1.15rem;
        max-width: 65ch;
        line-height: 1.8;
    }
}

/* ===========================
   COLLABORATIONS
   =========================== */
#collaborations.slide {
    background-color: #fff;
}

#collaborations .content-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.partners-grid-wrapper {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem 3rem;
    padding: 0 1rem;
    max-height: 75vh;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.partners-grid-wrapper::-webkit-scrollbar {
    display: none;
}

.partner-item {
    width: 140px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    overflow: visible;
}

.partner-item img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.partner-item:hover {
    transform: translateY(-2px);
    z-index: 10;
}

.partner-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.15);
}

@media (max-width: 768px) {
    .partners-grid-wrapper {
        gap: 1.5rem 1rem;
        padding: 0 2rem;
    }

    .partner-item {
        width: 110px;
        height: 60px;
    }
}

/* ===========================
   CONNECTIONS – MOBILE CAROUSEL
   =========================== */
#connections-mobile.slide {
    padding: 0;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

#connections-mobile .content-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: max(4.5rem, 12vh) 0.75rem max(2rem, 6vh);
}

.connections-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    display: block;
    background: #000;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 500ms var(--ease-out-quart);
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    padding-bottom: 5rem;
    color: white;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 60%);
    z-index: 1;
}

.carousel-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.carousel-slide .slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.carousel-slide h3 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.carousel-slide p {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.carousel-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 0.75rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transition: background-color 300ms, transform 300ms;
    cursor: pointer;
}

.carousel-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.9);
}

.carousel-arrow.prev {
    left: 12px;
}

.carousel-arrow.next {
    right: 12px;
}

.carousel-arrow.hidden {
    display: none;
}

/* ===========================
   CONNECTIONS – DESKTOP PANORAMA
   =========================== */
#connections-desktop.slide {
    padding: 0;
    background-color: #1a1a1a;
    display: none;
    flex-direction: column;
}

#connections-desktop .content-wrapper {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: max(4.5rem, 12vh) 0 max(2rem, 6vh);
}

.alt-header {
    padding: 0 1.5rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.alt-header h2 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 900;
    color: white;
    line-height: 0.9;
}

.alt-header p {
    color: #999;
    font-size: 0.85rem;
    max-width: 250px;
    text-align: right;
    display: block;
    line-height: 1.4;
}

/* Panorama Container - MUST be flex for horizontal layout */
.panorama-container {
    flex-grow: 1;
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    overflow: hidden;
}

.pano-item {
    height: 100%;
    flex: 1;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: flex 0.8s var(--ease-smooth);
    cursor: pointer;
    background-color: transparent;
    overflow: hidden;
}

.pano-item:last-child {
    border-right: none;
}

.pano-item:hover {
    flex: 3.5;
    background-color: #111;
}

.pano-item .label-container {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, transform 0.8s var(--ease-smooth);
}

.pano-main-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: clamp(1.8rem, 3.5vh, 3.2rem);
    font-weight: 800;
    color: #4a4a4a;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.pano-item:hover .label-container {
    opacity: 0.05;
    transform: scale(0.9);
}

.pano-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s var(--ease-smooth) 0.2s;
    pointer-events: none;
    text-align: right;
}

.pano-item:hover .pano-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.pano-content h3 {
    font-size: 1rem;
    color: var(--c-accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    font-weight: 700;
}

.pano-content h4 {
    font-size: 3.5rem;
    color: white;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
}

.pano-content p {
    font-size: 0.95rem;
    color: #a1a1aa;
    line-height: 1.6;
    max-width: 500px;
}

@media (min-width: 1024px) {
    #connections-mobile {
        display: none !important;
    }

    #connections-desktop {
        display: flex !important;
    }

    .alt-header {
        padding: 0 3rem 1.5rem;
    }
}

/* ===========================
   SERVICES
   =========================== */
#services.slide {
    background-color: #fff;
}

#services .content-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0 1.5rem;
}

/* Mobile: Swipe Cards */
.services-mobile-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
}

.service-mobile-intro {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    text-align: center;
    max-width: 30ch;
    margin-left: auto;
    margin-right: auto;
}

.services-swipe-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 2rem;
    scrollbar-width: none;
}

.services-swipe-wrapper::-webkit-scrollbar {
    display: none;
}

.service-swipe-card {
    min-width: 85vw;
    scroll-snap-align: center;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    height: 380px;
}

.service-swipe-card .service-num {
    font-size: 4rem;
    color: var(--c-accent);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

.service-swipe-card .service-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #111;
}

.service-swipe-card .service-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    font-weight: 400;
}

.service-swipe-card .service-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    font-weight: 400;
}

/* Swipe Dots */
.swipe-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: -1rem;
}

.swipe-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e5e5;
    transition: background-color 0.3s, width 0.3s, border-radius 0.3s;
}

.swipe-dot.active {
    background: var(--c-accent);
    width: 24px;
    border-radius: 4px;
}

/* Service Card Grid Fix */
.services-grid {
    display: none;
}

@media (min-width: 1024px) {
    .services-mobile-container {
        display: none;
    }

    .services-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4rem;
        margin-top: 2rem;
        height: auto;
    }

    .service-card {
        border-top: 2px solid #f0f0f0;
        padding-top: 2.5rem;
        display: flex;
        flex-direction: column;
        transition: border-top-color 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        cursor: default;
    }

    .service-card:hover {
        border-top-color: var(--c-accent);
        transform: translateY(-10px);
    }

    .service-num {
        font-size: 5rem;
        font-weight: 900;
        color: #f0f0f0;
        line-height: 1;
        margin-bottom: 2rem;
        transition: color 0.4s;
    }

    .service-card:hover .service-num {
        color: var(--c-accent);
    }

    .service-title {
        font-size: 2rem;
        font-weight: 800;
        text-transform: uppercase;
        color: black;
        margin-bottom: 1.5rem;
        letter-spacing: -0.02em;
    }

    .service-desc {
        font-size: 1rem;
        color: #666;
        line-height: 1.7;
        max-width: 32ch;
    }
}

/* ===========================
   PUBLICATIONS / NEWS
   =========================== */
#publications.slide {
    background-color: #f4f4f4;
}

#publications .content-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.pub-mobile-intro {
    font-size: 0.95rem;
    font-weight: 500;
    color: #52525b;
    margin-top: 0.75rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
    text-align: center;
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.publication-grid {
    display: block;
    padding: 0;
    width: 100%;
}

.publication-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left;
    text-decoration: none;
    width: 100%;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 400ms var(--ease-out-quart), transform 400ms var(--ease-out-quart), box-shadow 400ms var(--ease-out-quart);
}

/* Mobile: mostra solo la prima card */
.publication-card:nth-child(n+2) {
    display: none;
}

.publication-card:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.publication-card .img-wrapper {
    overflow: hidden;
    height: 12rem;
    flex-shrink: 0;
}

.publication-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.publication-card:hover img {
    transform: scale(1.08);
}

.publication-card .text-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.publication-card .category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    margin-bottom: 0.5rem;
}

.publication-card .title {
    font-size: 1.1rem;
    font-weight: 700;
    color: black;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.publication-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.publication-card .date {
    font-size: 0.75rem;
    color: #6b7282;
}

.publication-card .read-more-cta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--c-accent);
    transition: color 300ms;
}

.publication-card .read-more-cta svg {
    width: 1rem;
    height: 1rem;
    transition: transform 300ms var(--ease-out-quart);
}

.publication-card:hover .read-more-cta svg {
    transform: translateX(4px);
}

.publication-card:hover .read-more-cta {
    color: black;
}

.publications-cta-container {
    margin-top: clamp(2rem, 5vh, 3rem);
    text-align: center;
}

.btn-outline {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 2px solid black;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: black;
    background-color: transparent;
    transition: background-color 300ms var(--ease-out-quart), color 300ms var(--ease-out-quart), transform 300ms var(--ease-out-quart);
    cursor: pointer;
}

.btn-outline:hover {
    background-color: black;
    color: white;
    transform: scale(1.05);
}

@media (min-width: 1024px) {
    .pub-mobile-intro {
        display: none;
    }

    .publication-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .publication-card {
        transform: translateY(0);
        opacity: 0;
    }

    .publication-card:nth-child(n+2) {
        display: flex;
    }
}

/* ===========================
   FOOTER
   =========================== */
#footer.slide {
    height: auto;
    min-height: auto;
    padding: 4rem 1.5rem;
    background-color: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    scroll-snap-align: start;
}

#footer .footer-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    height: auto;
    color: white;
}

.desktop-only-footer {
    display: none !important;
}

/* Let the Links Utili show on mobile */
@media (max-width: 768px) {
    #footer .footer-content {
        align-items: center;
        text-align: center;
    }

    .footer-col.links-col {
        display: block !important;
        margin-top: 1rem;
    }

    .footer-links-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    .footer-links-list a {
        color: #a1a1aa;
        text-decoration: none;
        font-size: 1rem;
        transition: color 0.3s;
    }

    .footer-links-list a:hover {
        color: #fff;
    }

    .footer-heading {
        display: block;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: #fff;
    }
}

.footer-heading {
    display: none;
}

.footer-tagline {
    display: none;
}

.footer-text {
    font-size: 1rem;
    color: #a1a1aa;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
}

.footer-text span {
    display: block;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.footer-text a {
    color: #a1a1aa;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.footer-text a:hover {
    color: white;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-socials a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-socials a::before {
    display: none;
}

.footer-socials a:hover {
    color: white;
}

.copyright {
    font-size: 0.7rem;
    color: #3f3f46;
    margin-top: 1rem;
    line-height: 1.5;
    text-align: center;
}

@media (min-width: 1024px) {
    .desktop-only-footer {
        display: block !important;
    }

    .footer-heading {
        display: block;
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: var(--c-accent);
        margin-bottom: 1.5rem;
    }

    .footer-tagline {
        display: block;
        font-size: 0.85rem;
        color: #52525b;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        max-width: 20rem;
        line-height: 1.5;
    }

    #footer.slide {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    #footer .footer-content {
        display: grid;
        grid-template-columns: 1.5fr 1.2fr 1fr 1fr;
        gap: 2rem;
        padding: 0 4rem;
    }

    .footer-text {
        text-align: left;
        font-size: 0.9rem;
    }

    .footer-brand {
        align-items: flex-start;
    }

    .footer-col-center {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-links-list a {
        font-size: 0.9rem;
        color: #d1d5db;
        text-decoration: none;
        transition: color 0.3s, transform 0.3s;
        position: relative;
        width: fit-content;
    }

    .footer-links-list a:hover {
        color: white;
        transform: translateX(5px);
    }

    .footer-socials {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        margin-bottom: 0;
    }

    .footer-socials a {
        font-size: 0.9rem;
        width: fit-content;
    }

    .footer-socials a::before {
        content: '';
        display: inline-block;
        width: 6px;
        height: 6px;
        background-color: var(--c-accent);
        border-radius: 50%;
        opacity: 0;
        transform: scale(0);
        transition: opacity 0.3s, transform 0.3s;
    }

    .footer-socials a:hover::before {
        opacity: 1;
        transform: scale(1);
    }

    .copyright {
        margin-top: 2rem;
        text-align: left;
    }
}

/* Credits */
.credits {
    font-size: 0.65rem;
    color: #52525b;
    margin-top: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: default;
}

@media (max-width: 1023px) {
    .credits {
        margin-top: 2rem;
        display: block;
        opacity: 0.8;
    }
}

/* ===========================
   UTILS
   =========================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center {
    text-align: center;
}

.w-full {
    width: 100%;
}

.overflow-hidden {
    overflow: hidden;
}

/* ===========================
   WORDPRESS SPECIFIC
   =========================== */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* CSS fail-safe: hide only when JS is active and ready to animate */
html.js .animate-item {
    opacity: 0;
}

html.js .animate-item.is-visible {
    opacity: 1;
}

body.js-loaded .animate-item {
    transition: opacity 0.8s var(--ease-out-expo);
}

/* ─── Archive Page ──────────────────────────────────────────────────── */

.archive-hero {
    padding-top: calc(var(--header-h) + 4rem);
    padding-bottom: 3rem;
    text-align: center;
}

.archive-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.archive-title span {
    color: var(--c-accent);
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    border: 1px solid #e5e5e5;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.3s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    color: #666;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: black;
    color: black;
}

.filter-btn.active {
    background-color: black;
    color: white;
    border-color: black;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 6rem;
    min-height: 50vh;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (min-width: 640px) {
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem 2rem;
    }
}

.publication-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.publication-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.publication-card:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px) !important;
    border-color: transparent;
}

.publication-card:hover .img-wrapper img {
    transform: scale(1.05);
}

.publication-card .img-wrapper {
    overflow: hidden;
    height: 14rem;
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
    background-color: #f0f0f0;
}

.publication-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-quart);
}

.text-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-accent);
    margin-bottom: 0.75rem;
}

.title {
    font-size: 1.15rem;
    font-weight: 700;
    color: black;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.meta-info {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
    width: 100%;
}

.meta-info span {
    display: flex;
    align-items: center;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    color: black;
    transition: color 0.2s;
}

.publication-card:hover .read-more {
    color: var(--c-accent);
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html.js .animate-item {
        opacity: 1 !important;
    }
    .main-container {
        scroll-behavior: auto;
    }
}
/* ===========================
   AGGIUNTE VERSIONE NEXT.JS
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Pagina singolo post */
/* Valori identici al vecchio single.php di WordPress */
.post-page {
    padding-top: 120px;
    padding-bottom: 80px;
}

.post-page .post-header {
    margin-bottom: 2rem;
}

.post-category {
    color: var(--c-accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.post-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
}

.post-date {
    color: #666;
    margin-top: 1rem;
}

.post-image {
    margin: 0 0 2rem;
    border-radius: 1rem;
    overflow: hidden;
}

.post-image img {
    display: block;
    width: 100%;
    height: auto;
}

.post-body {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.post-body p {
    margin: 0 0 1.2rem;
}

.post-body--legacy p {
    margin: 0;
}

.post-cta {
    margin: 2.5rem 0 0;
}


/* Pagine legali */
.legal-page {
    max-width: 860px;
    padding-top: calc(var(--header-h) + 4rem);
    padding-bottom: 5rem;
    color: #333;
    line-height: 1.8;
}

.legal-page h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    color: #111;
    margin: 0 0 2rem;
}

.legal-page h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111;
    margin: 2rem 0 0.5rem;
}

.legal-page a {
    color: var(--c-accent);
}


/* h1 della home: stesso aspetto del vecchio <div> (gli span interni si comportano da blocchi) */
h1.home-title-wrapper {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

#home .home-title > span {
    overflow: hidden;
}

h1.home-title-wrapper .divider,
h1.home-title-wrapper .subtitle,
h1.home-title-wrapper .animate-item {
    display: block;
}

.archive-intro {
    max-width: 60ch;
    margin: 1.5rem auto 0;
    color: #666;
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: center;
}
