/* Font Brockmann */
@font-face {
    font-family: 'brockmann';
    src: url('assets/fonts/brockmann-regular-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;

}

@font-face {
    font-family: 'brockmann semibold';
    src: url('assets/fonts/brockmann-semibold-webfont.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

b,
.bold {
    font-family: 'brockmann semibold';
}

a:link {
    color: black;
    text-decoration: non;
    font-weight: bold;
    font-family: 'brockmann semibold'
}

body,
html {
    margin: 0;
    padding: 0;
    /* background-color: #e5d3ce; */
    font-family: 'Courier New', monospace;
    overflow: hidden;
    transition: background-color 0.6s cubic-bezier(0.69, 0, 0.32, 1);
    background-color: hsla(13.043478260869517, 30%, 85%, 0.5);
}

body::before,
body::after {
    content: '';
    position: fixed;
    /* CAMBIO: era absolute, deve essere fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: opacity;
    transform: translateZ(0);
    animation-fill-mode: both;
    z-index: -1;
}

body::before {
    background:
        radial-gradient(ellipse 120vw 80vh at var(--cloud1-x, 20%) var(--cloud1-y, 30%), hsla(263, 46%, 72%, 0.8) 5%, transparent 85%),
        radial-gradient(ellipse 100vw 60vh at var(--cloud2-x, 80%) var(--cloud2-y, 70%), #e5d3ce 8%, transparent 75%);
    animation: cloudMovement1 60s ease-in-out infinite;
}

body::after {
    background:
        radial-gradient(ellipse 110vw 90vh at var(--cloud3-x, 70%) var(--cloud3-y, 20%), hsla(115, 28%, 73%, 0.7) 6%, transparent 80%),
        radial-gradient(ellipse 95vw 75vh at var(--cloud4-x, 30%) var(--cloud4-y, 80%), #e5d3ce 10%, transparent 70%);
    animation: cloudMovement2 45s ease-in-out infinite;
}

@keyframes cloudMovement1 {
    0% {
        --cloud1-x: 20%;
        --cloud1-y: 30%;
        --cloud2-x: 80%;
        --cloud2-y: 70%;
        opacity: 1;
    }

    25% {
        --cloud1-x: 50%;
        --cloud1-y: 10%;
        --cloud2-x: 30%;
        --cloud2-y: 50%;
        opacity: 0.7;
    }

    50% {
        --cloud1-x: 90%;
        --cloud1-y: 60%;
        --cloud2-x: 10%;
        --cloud2-y: 20%;
        opacity: 0;
    }

    75% {
        --cloud1-x: 60%;
        --cloud1-y: 90%;
        --cloud2-x: 70%;
        --cloud2-y: 40%;
        opacity: 0.5;
    }

    100% {
        --cloud1-x: 20%;
        --cloud1-y: 30%;
        --cloud2-x: 80%;
        --cloud2-y: 70%;
        opacity: 1;
    }
}

@keyframes cloudMovement2 {
    0% {
        --cloud3-x: 70%;
        --cloud3-y: 20%;
        --cloud4-x: 30%;
        --cloud4-y: 80%;
        opacity: 0;
    }

    25% {
        --cloud3-x: 40%;
        --cloud3-y: 70%;
        --cloud4-x: 80%;
        --cloud4-y: 30%;
        opacity: 0.6;
    }

    50% {
        --cloud3-x: 10%;
        --cloud3-y: 40%;
        --cloud4-x: 90%;
        --cloud4-y: 90%;
        opacity: 1;
    }

    75% {
        --cloud3-x: 85%;
        --cloud3-y: 85%;
        --cloud4-x: 15%;
        --cloud4-y: 15%;
        opacity: 0.4;
    }

    100% {
        --cloud3-x: 70%;
        --cloud3-y: 20%;
        --cloud4-x: 30%;
        --cloud4-y: 80%;
        opacity: 0;
    }
}

*/
/* SUPPORTO REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {

    body::before,
    body::after {
        animation: none !important;
    }

    body::before {
        opacity: 1;
        --pos1-x: 50%;
        --pos1-y: 50%;
        --pos2-x: 95%;
        --pos2-y: 23%;
    }

    body::after {
        opacity: 0;
        --pos3-x: 50%;
        --pos3-y: 50%;
        --pos4-x: 45%;
        --pos4-y: 93%;
    }
}


/* Allow scroll for diary page */
html.diary-scroll,
body.diary-scroll {
    overflow: auto !important;
}

body.diary-scroll #menu-and-images-container {
  height: auto;
  min-height: 100vh;
  overflow: visible; /* o auto, come preferisci */
}

/* Content wrapper principale */
#content-wrapper {
    height: 100vh;
    position: relative;
    overflow: hidden;
    transition: width 0.9s cubic-bezier(0.69, 0, 0.32, 1);
    z-index: 1;
    /* Establishes a stacking context */
}

#text-container,
#menu-container {
    contain: layout style;
    /* Isola il layout interno */
}



/* Allow scroll for diary page */
#content-wrapper.diary-scroll {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
}

/* Classi scalabili per larghezza content */
.content-full {
    width: 100%;
}

.content-twothirds {
    width: 67%;
}

.content-half {
    width: 50%;
}

.content-half #text-container {
    left: 50%;
    width: 70%;
}

/* Contenitori principali */
#menu-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    font-family: 'brockmann';
}

/* Special layout for diary page */
#menu-container.diary-layout {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
}

#images-container {
    width: 0;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    background: transparent;
    overflow: hidden;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.69, 0, 0.32, 0.7);
}

/* Classi scalabili per larghezza images */
.images-hidden {
    width: 0;
    transform: translateX(100%);
}

/* Contenitore per le immagini con scroll */
#images-scroll-container {
    position: relative;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

#images-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px 20px;
    margin: 0;
    box-sizing: border-box;
    will-change: transform;
}

.media-item {
    width: 100%;
    overflow: hidden;
    position: relative;
    opacity: 0;
    display: none;
    margin: 0;
    padding: 0;
    border-radius: 8px;
}

.media-item.active {
    display: block;
}

.media-item.visible {
    opacity: 1;
}

.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 8px;
}

/* === Blog posts styling === */
#blog-ascii-title {
    height: 160px;
    /* Stessa altezza del vecchio titolo */
    width: 100%;
    display: flex;
    align-items: end;
    justify-content: center;
    font-family: monospace;
    font-size: 6px;
    /* Dimensione scalata per far stare l'ASCII */
    line-height: 1.1;
    color: #000000;
    white-space: pre;
    font-weight: bold;
    letter-spacing: 0;
    margin-top: 20px;
}

#blog-categories-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 60px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.category-filter-item {
    font-family: 'brockmann';
    font-size: 14px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter-item:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

.category-filter-item.active {
    background-color: #000;
    color: #fff;
    font-family: 'brockmann semibold';
    border-color: #000;
}

#blog-posts-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    font-family: 'brockmann';
}

.blog-post-row {
    display: flex;
    align-items: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 40px 94px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    /* FIX: Include padding in width calculation */
}

.blog-post-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateX(5px);
}

.blog-post-image {
    width: 320px;
    height: auto;
    /* Altezza proporzionale */
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 30px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.blog-post-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.blog-post-info {
    flex: 1;
}



.blog-post-title {
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.blog-post-excerpt {
    font-family: 'brockmann';
    font-size: 14px;
    color: #666666;
    margin: 0 0 8px 0;
    line-height: 1.4;
    max-width: 500px;
}

.blog-post-meta {
    font-family: 'brockmann';
    font-size: 12px;
    color: #000000;
    text-align: right;
    flex-shrink: 0;
    margin-left: 20px;
    min-width: 100px;
    align-self: flex-start;
    text-transform: lowercase;
    letter-spacing: normal;
    margin-right: 30px;
    margin-top: 20px;
}

.blog-loading {
    text-align: center;
    padding: 60px 20px;
    font-family: 'brockmann';
    font-size: 16px;
    color: #666666;
}

.blog-error {
    text-align: center;
    padding: 60px 20px;
    font-family: 'brockmann';
    font-size: 16px;
    color: #999999;
}

/* Corner lines */

/* Corner lines */
.corner-line {
    position: absolute;
    background-color: #000000;
    z-index: 1000;
    width: 50px;
    height: 1px;
    z-index: 10;
}

.corner-line.top-left {
    top: 20px;
    left: 20px;
    width: 50px;
    height: 1px;
    transform-origin: left;
    transform: scaleX(0);
}

.corner-line.top-right {
    top: 20px;
    right: 20px;
    width: 50px;
    height: 1px;
    transform-origin: right;
    transform: scaleX(0);
}

.corner-line.bottom-left {
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 1px;
    transform-origin: left;
    transform: scaleX(0);
}

.corner-line.bottom-right {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 1px;
    transform-origin: right;
    transform: scaleX(0);
}

/* Corner text */
.corner-text {
    position: absolute;
    font-family: 'brockmann';
    font-size: clamp(12px, 1vw, 18px);
    color: #000000;
    opacity: 0;
    z-index: 999;
    transition: all 0.3s ease;
    font-weight: 300;
    z-index: 10;
}

#ensoul-logo-wrapper {
    position: absolute;
    width: 90px;
    top: 20px;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 999;
    transition: opacity .8s ease-in-out;
    cursor: pointer;
}

body[data-current-page="home"] #ensoul-logo-wrapper {
    opacity: 0;
}


/* === SISTEMA VETTORIALE === */
/* === SISTEMA VETTORIALE AGGIORNATO === */
.vector-system {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    display: none;
}

.vector-rays {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: 0;
    animation: rotateRays 10s linear infinite;
}

.vector-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 150vh;
    background: linear-gradient(to bottom, transparent 0%, rgba(170, 170, 170, 1) 15%, rgba(170, 170, 170, 1) 50%, rgba(170, 170, 170, 1) 85%, transparent 100%);
    transform-origin: 50% 0%;
    transform: translate(-50%, 0%) rotate(var(--rotation));
    animation: rayPulse 24s ease-in-out infinite;
    animation-delay: calc(var(--ray-delay) * 2s);
}

.vector-ray:nth-child(1) {
    --rotation: 0deg;
    --ray-delay: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(229, 211, 206, 1) 15%, rgba(229, 211, 206, 1) 50%, rgba(229, 211, 206, 1) 85%, transparent 100%);
}

.vector-ray:nth-child(2) {
    --rotation: 30deg;
    --ray-delay: 1;
}

.vector-ray:nth-child(3) {
    --rotation: 60deg;
    --ray-delay: 2;
}

.vector-ray:nth-child(4) {
    --rotation: 90deg;
    --ray-delay: 3;
}

.vector-ray:nth-child(5) {
    --rotation: 120deg;
    --ray-delay: 4;
}

.vector-ray:nth-child(6) {
    --rotation: 150deg;
    --ray-delay: 5;
}

.vector-ray:nth-child(7) {
    --rotation: 180deg;
    --ray-delay: 6;
}

.vector-ray:nth-child(8) {
    --rotation: 210deg;
    --ray-delay: 7;
}

.vector-ray:nth-child(9) {
    --rotation: 240deg;
    --ray-delay: 8;
}

.vector-ray:nth-child(10) {
    --rotation: 270deg;
    --ray-delay: 9;
}

.vector-ray:nth-child(11) {
    --rotation: 300deg;
    --ray-delay: 10;
}

.vector-ray:nth-child(12) {
    --rotation: 330deg;
    --ray-delay: 11;
}

.vector-circle {
    position: fixed;
    border: 3px solid #aaa;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.vector-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    background: #e5d3ce;
    border: 3px solid #aaa;
    animation: pulse1 12.8s ease-in-out infinite;
}

.vector-circle:nth-child(2) {
    width: 500px;
    height: 500px;
    animation: pulse2 16.4s ease-in-out infinite;
}

.vector-circle:nth-child(3) {
    width: 700px;
    height: 700px;
    animation: pulse3 11.2s ease-in-out infinite;
}

.vector-circle:nth-child(4) {
    width: 900px;
    height: 900px;
    animation: pulse4 14.8s ease-in-out infinite;
}

.vector-circle:nth-child(5) {
    width: 1100px;
    height: 1100px;
    animation: pulse5 20.8s ease-in-out infinite;
}

.vector-circle:nth-child(6) {
    width: 1300px;
    height: 1300px;
    animation: pulse6 18.4s ease-in-out infinite;
}

/* Animazione di rotazione dei raggi */
@keyframes rotateRays {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    10% {
        transform: translate(-50%, -50%) rotate(15deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(15deg);
    }
}

/* Animazioni pulsanti rallentate */
@keyframes pulse1 {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    25% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }

    75% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes pulse2 {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
    }

    30% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    60% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 1;
    }

    80% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
    }
}

@keyframes pulse3 {
    0% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }

    20% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }

    45% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 1;
    }

    70% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

@keyframes pulse4 {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }

    35% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    55% {
        transform: translate(-50%, -50%) scale(1.0);
        opacity: 1;
    }

    85% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
}

@keyframes pulse5 {
    0% {
        transform: translate(-50%, -50%) scale(1.0);
        opacity: 1;
    }

    40% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 1;
    }

    65% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    90% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.0);
        opacity: 1;
    }
}

@keyframes pulse6 {
    0% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    25% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }

    75% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

@keyframes rayPulse {
    0% {
        opacity: 1;
        height: 150vh;
    }

    25% {
        opacity: 1;
        height: 160vh;
    }

    50% {
        opacity: 1;
        height: 140vh;
    }

    75% {
        opacity: 1;
        height: 155vh;
    }

    100% {
        opacity: 1;
        height: 150vh;
    }
}

/* Responsive */
@media (max-width: 768px) {

    .hover-info {
        border: 1px solid white;
        border-radius: 9px;
    }



    .vector-circle:nth-child(1) {
        width: 250px;
        height: 250px;
    }

    .vector-circle:nth-child(2) {
        width: 400px;
        height: 400px;
    }

    .vector-circle:nth-child(3) {
        width: 550px;
        height: 550px;
    }

    .vector-circle:nth-child(4) {
        width: 700px;
        height: 700px;
    }

    .vector-circle:nth-child(5) {
        width: 850px;
        height: 850px;
    }

    .vector-circle:nth-child(6) {
        width: 1000px;
        height: 1000px;
    }
}

/* Supporto accessibilità */
@media (prefers-reduced-motion: reduce) {

    body::before,
    body::after {
        animation: none;
    }

    body::before {
        opacity: 1;
    }

    body::after {
        opacity: 0;
    }
}

/* Stili per il nuovo contenitore del secondo paragrafo */
#mobile-second-paragraph {
    display: none;
    /* Nascosto di default, gestito da JS */
    padding: 0 20px 40px 20px;
    /* Spaziatura come il testo principale */
    font-family: 'brockmann';
    font-size: 22px;
    line-height: 1.4;
    color: #32223F;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
}


#ensoul-logo-wrapper img {
    max-width: 100%;
    height: auto;
    transition: transform .25s ease-in-out;
}

#ensoul-logo-wrapper img:hover {
    transform: scale(.95);
}

.corner-text.active {
    color: #ff4848;
    font-weight: bold;
}

.corner-text.top-left {
    top: 30px;
    left: 20px;
}

.corner-text.top-right {
    top: 30px;
    right: 20px;
}

.corner-text.bottom-left {
    bottom: 30px;
    left: 20px;
}

.corner-text.bottom-right {
    bottom: 30px;
    right: 20px;
}

.media-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

#ascii-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    line-height: 1.2;
    color: #000000;
    white-space: pre;
    user-select: text;
    font-family: monospace;
    letter-spacing: 0px;
    cursor: pointer;
}

#tagline {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
    opacity: 0;
    margin-top: 120px;
    font-weight: 300;
    letter-spacing: 0.5px;
    max-width: 90%;
    white-space: nowrap;
}

.tagline-char {
    display: inline-block;
    position: relative;
    transform-origin: center;
}

/* #page-title {
    margin: 0;
    padding: 56px 20px 0px;
    font-size: 24px;
    text-align: left;
    letter-spacing: 0px;
} */

#page-title {
    margin: 0;
    padding: 7px 20px 0px;
    font-size: 3vw;
    text-align: left;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 900;
    font-family: 'brockmann semibold';
}

h2.page-title-subtitle {
    padding-left: 18px;
    font-size: 10vw;
    margin: 12px 0px 0px;
}

/* New Classes for Mobile Page Title */
.mobile-page-title {
    /* Inherits styles from #page-title, which is what we want. */
}

.mobile-page-subtitle {
    display: block;
    /* Puts it on the next line */
    font-family: 'brockmann';
    font-weight: 400;
    font-size: 5vw;
    text-transform: lowercase;
    margin-top: 4px;
    line-height: 1.1;
}

#text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(19px, 1.3vw, 24px);
    line-height: 1.4;
    color: #32223F;
    user-select: text;
    font-family: 'brockmann';
    max-width: 80%;
    text-align: left;
    display: none;
    overflow: visible;
}

.content-twothirds #text-container {
    position: absolute;
    top: 50%;
    left: 33%;
    transform: translate(-23%, -50%);
    font-size: 22px;
    line-height: 1.4;
    color: #32223F;
    user-select: text;
    font-family: 'brockmann';
    max-width: 80%;
    text-align: left;
    display: none;
    overflow: visible;
}


/* Special layout for diary page */
#text-container.diary-layout {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
}

#text-container.slide-2 {
    max-width: 50%;
}

#text-container.slide-3 {
    max-width: 80%;
}

#text-container.slide-4 {
    max-width: 80%;
}

.text-char {
    display: inline;
    position: relative;
    opacity: 0;
}

.text-char.animating {
    display: inline-block;
    transform-origin: center;
}

#text-container .word-container {
    display: inline;
    white-space: nowrap !important;
}

#text-container b,
#text-container .bold {
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Stili per liste */
#text-container ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

#text-container li:after {
    padding: 15px 0 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    content: '';
    position: static;
    width: var(--after-width, 100%);
    left: 0;
    display: block;
    margin-bottom: 15px;
}

#text-container li:last-child {
    border-bottom: none;
}

/* Stili per link esterni */
#text-container a[target="_blank"] {
    text-decoration: none;
    font-family: 'brockmann semibold';
    color: inherit;
    cursor: none;
    position: relative;
}

/* Portfolio grid */
.portfolio-grid {
    display: flex;
    margin-top: 20px;
    padding: 10px 0;
    cursor: none;
    position: relative;
    /* Nasconde scrollbar ma permette scroll */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    opacity: 0;
}

.portfolio-grid-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 30px;
    z-index: 1;
    transition-property: transform;
    transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
    box-sizing: content-box;
}

/* Nasconde scrollbar WebKit */
.portfolio-grid::-webkit-scrollbar {
    display: none;
}


.portfolio-item {
    text-align: center;
    flex: 0 0 auto;
    /* Larghezza automatica in base al contenuto */
    min-width: auto;
    /* Rimuove larghezza minima fissa */
    user-select: none;
    pointer-events: auto;
    cursor: none;
    transform-origin: center;
    /* Per l'effetto scala hover */
}

.portfolio-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: none;
}

.portfolio-video {
    position: relative;
    width: 100%;
    aspect-ratio: 607/1080;
    /* Proporzione corretta 607x1080 */
    background: #f0f0f0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    pointer-events: auto;
    cursor: none;
    height: 60vh;
    /* Altezza 60% della viewport su desktop */
    transform-origin: center;
    /* Per l'effetto scala hover */
}

.portfolio-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: auto;
    cursor: none;
}

.portfolio-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.portfolio-name {
    font-size: clamp(14px, 1.02vw, 18px);
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #000000;
    pointer-events: none;
}

/* Custom drag cursor */
.drag-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #000000;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    /* Solo transizione per size e opacity, NON per posizione */
    transition: width 0.2s ease-out, height 0.2s ease-out, opacity 0.2s ease-out, font-size 0.2s ease-out;
}

.drag-cursor.active {
    width: 60px;
    height: 60px;
    opacity: 1;
    font-size: 10px;
}

/* Custom view cursor per portfolio */
.view-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    transition: width 0.2s ease-out, height 0.2s ease-out, opacity 0.2s ease-out, font-size 0.2s ease-out;
}

.view-cursor.active {
    width: 200px;
    height: 200px;
    opacity: 1;
    font-size: 8px;
    width: 200px;
    height: 200px;
}

/* Quando il view-cursor è attivo su link speciali */
.view-cursor.special-link {
    background-color: #e5d3ce !important;
    color: #000000 !important;
}

.view-cursor.special-link .cursor-hold-text {
    display: none !important;
}

.view-cursor.for-link {
    background: #000;
}

.view-cursor.for-info {
    background: #e5d3ce;

    transition: width 0.2s ease-out, height 0.2s ease-out, opacity 0.2s ease-out, font-size 0.2s ease-out;
}


.view-cursor.for-info .cursor-marquee-container {
    width: 170px;
    height: 24px;
    overflow: hidden;
    position: relative;
    border-radius: 3px;

}

.view-cursor.for-info .cursor-marquee-text {
    color: #000;
}

.view-cursor.for-info .cursor-hold-text {
    display: none;
}

.cursor-text {
    position: absolute;
    z-index: 2;
    text-align: center;
    width: 100%;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cursor-marquee-container {
    width: 170px;
    height: 24px;
    overflow: hidden;
    position: relative;
    border-radius: 3px;

}

.cursor-marquee-text {
    position: absolute;
    white-space: nowrap;
    font-size: 16px;
    line-height: 24px;
    color: white;
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    animation: marqueeScroll var(--marquee-duration, 16s) linear infinite;
    padding-right: 15px;
    min-width: 145px;
}

.cursor-marquee-text-2 {
    transform: translateX(100%);
    animation: marqueeScroll var(--marquee-duration, 16s) linear infinite var(--marquee-delay, 8s);
}

.cursor-hold-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    white-space: nowrap;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.cursor-ring {
    position: absolute;
    top: -14px;
    /* Offset aggiustato per centratura */
    left: -14px;
    width: 228px;
    /* 1px di distanza aggiuntiva */
    height: 228px;
    z-index: 1;
    opacity: 0;
}

.cursor-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    /* Inizia dall'alto */
}

.progress-circle {
    fill: none;
    stroke: black;
    stroke-width: 5px;
    stroke-linecap: butt;
    stroke-dasharray: 0 377;
    /* Circonferenza 2π×60 ≈ 377 */
}

.view-cursor.active .cursor-ring {
    opacity: 1;
}

.ascii-line {
    display: block;
    margin: 0;
    padding: 0;
    height: 12px;
}

.ascii-char {
    display: inline-block;
    position: relative;
    transform-origin: center;
    opacity: 0;
    font-weight: bold;
    text-align: center;
    width: 8px;
}

.ascii-char.animating {
    color: #666;
}

/* Righe di progresso */
#progress-container {
    position: fixed;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
}

#progress-line-base {
    width: 1px;
    background-color: #000000;
    height: 400px;
    /* Circa l'altezza del text-container */
    position: relative;
}

#progress-line-indicator {
    width: 1px;
    background-color: #666666;
    height: 0%;
    position: absolute;
    left: 0px;
    /* Sovrapposta alla riga nera */
    top: 0;
    transform-origin: top;
}

/* Aree cliccabili per navigazione */
.progress-clickable-area {
    position: absolute;
    width: 20px;
    height: 133.33px;
    /* 400px / 3 */
    left: -10px;
    /* Centrato sulla riga */
    cursor: pointer;
    background: transparent;
}

.progress-clickable-area:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Indicatori di slide nel menu-container */
#slide-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 8px;
    z-index: 1002;
}

#slide-indicators.visible {
    display: flex !important;
}

#ensoul-logo-wrapper {
    position: absolute;
    width: 70px;
    top: 14px;
    left: 14px;
    transform: translate(0%, 0);
    z-index: 999;
    transition: opacity .8s ease-in-out;
}



.mobile-slide-indicators {
    position: fixed;
    top: 4px;
    left: 67px;
    right: 0;
    width: 100%;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 1003;
    padding: 0 20px;
    box-sizing: border-box;
}

.mobile-header-shade {
    /* background-color: #e5d3ce; */
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 101;
}



body[data-current-page="home"] .mobile-header-shade {
    display: none;
}

.mobile-slide-indicators.visible {
    display: flex;
}

@media (min-width: 768px) {
    #mobile-slide-indicators {
        display: none;
    }

    .mobile-header-shade {
        display: none;
    }

    h2.page-title-subtitle {
        display: none;
    }


    #ensoul-logo-wrapper {
        position: absolute;
        width: 100px;
        top: 20px;
        left: 14px;
        transform: translate(-50%, 0);
        z-index: 999;
        transition: opacity .8s ease-in-out;
        left: 50%;
    }



}





.slide-indicator {
    width: 35px;
    height: 1px;
    background-color: #666666;
    transition: background-color 0.3s ease, height 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Indicatori mobile più grandi */
.mobile-slide-indicators .slide-indicator {
    width: 30px;
    height: 2px;
    background-color: #999999;
    border-radius: 1px;
}

.mobile-slide-indicators .slide-indicator.active {
    background-color: #000000;
    height: 3px;
}

/* Area cliccabile e hoverable più grande */
.slide-indicator::before {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -5px;
    right: -5px;
    background: transparent;
}

.slide-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: var(--slide-completion-perc, 0);
    background: #ff4848;
    transition: width .1s ease-in-out;
}

@media(max-width: 768px) {
    .slide-indicator::after {
        height: 3px;
        transition: none;
    }
}

.slide-indicator:not(.active)::after {
    display: none;
}

.slide-indicator:hover {
    background-color: #999999;
    height: 2px;
}

.slide-indicator.active {
    background-color: #000000;
    height: 2px;
    transform: translateY(-1px);
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
    font-size: 14px;
}

.skip-link:focus {
    top: 8px;
}

.slide-indicator:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Titolo sezione indicatori */
#slide-section-title {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(12px, 0.7vw, 15px);
    color: #000000;
    opacity: 0;
    z-index: 1001;
    text-align: center;
    font-weight: 300;
    letter-spacing: 0.5px;
}

#slide-section-title.visible {
    opacity: 1;
}

/* Screen reader only content */
.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;
}

/* Menu mobile */
.mobile-menu {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: #000000;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'brockmann semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 10px;
    color: white;
    z-index: 2001;
    /* Sopra tutto */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.69, 0, 0.32, 1);
    user-select: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#mobile-menu-close-shade.show {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.mobile-menu-text {
    text-align: center;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-transform: uppercase;
}

.mobile-menu.dragging {
    transition: none !important;
}

.mobile-menu.expanded {
    width: calc(100vw - 40px);
    height: 230px;
    border-radius: 20px;
    font-size: 0;
}

.mobile-menu-content {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease;
    display: flex;
    gap: 5px;
    align-items: center;
    flex-direction: column-reverse;
}

.mobile-menu-settings {
    width: 100%;
    padding: 0px 20px;
    box-sizing: border-box;
}

.mobile-menu-settings-container {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    font-size: 10px;
    font-weight: 400;
    width: 100%;
    padding: 10px 0px;
    box-sizing: border-box;
    border-bottom: 1px solid;
}

.mobile-menu-setting {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
}

.mobile-menu-setting:not(.active) .mms-icon-off {
    display: none;
}

.mobile-menu-setting.active .mms-icon-on {
    display: none;
}

a.mobile-menu-setting {
    color: #fff;
    text-decoration: none;
}

.mms-value {
    font-weight: 400;
    font-style: italic;
}

.mobile-menu-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px 9px;
    width: 100%;
    transition: opacity 0.2s ease;
}

.mobile-menu.expanded .mobile-menu-text {
    display: none;
}

.mobile-menu.expanded .mobile-menu-content {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease 0.2s;
}

.mobile-menu.expanded {
    transform: translateX(-50%) !important;
}

.mobile-menu-item {
    font-family: 'brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: white;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-item:nth-child(even) {
    text-align: right;
}

.mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

#mobile-menu-close-controcontainer {
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

#mobile-menu-close-container {
    display: flex;
    justify-content: center;
    width: 100%;
    border-top: 1px solid #fff;
}

.mobile-menu-close {
    font-family: 'brockmann', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Sfondo rotante per ultima slide to ensoul */
.leo-mandi-friul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    display: none;
}

.distorted-image {
    width: 500px;
    max-width: 86%;
    height: 100%;
    object-fit: contain;
    filter: url(#waterEffect);
    display: block;
    animation: waterFlow 8s ease-in-out infinite;
    opacity: 0.3;
}

/* Keyframes per movimento fluido */
@keyframes waterFlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(4px, 6px) scale(1.02);
    }

    50% {
        transform: translate(2px, -4px) scale(0.98);
    }

    75% {
        transform: translate(-4px, 2px) scale(1.02);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.leo-mandi-friul svg {
    position: absolute;
    width: 0;
    height: 0;
    visibility: hidden;
}

#menu-and-images-container {
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

#page-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 10px;
    z-index: 1005;
    opacity: 0;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: none;
}

#udine-time-container {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-family: brockmann;
    color: #32223F;
    z-index: 1001;
    opacity: 0;
}

#udine-weather-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-family: brockmann;
    color: #32223F;
    z-index: 1001;
    opacity: 0;
}

#ascii-cursor-ball {
    position: fixed;
    width: 30px;
    height: 30px;
    background-color: black;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ascii-cursor-ball span {
    color: white;
    font-family: 'brockmann', sans-serif;
    font-size: 8px;
    font-weight: 300;
}

@keyframes rotate3d {
    0% {
        transform: scale(4) rotateZ(0deg);
    }

    100% {
        transform: scale(4) rotateZ(360deg);
    }
}

/* Responsive */
@media (max-width: 767px) {


    /* =================================================================== */
    /* === INIZIO BLOCCO CORRETTO PER LAYOUT NON-FULL SU MOBILE === */
    /* =================================================================== */


    /* Ripristina la visibilità del testo originale che ora è solo il par_one */
    body.layout-half #text-container .par_one_wrapper,
    body.layout-twothirds #text-container .par_one_wrapper {
        display: block;
    }

    /* Nasconde .par_two_wrapper nel suo contenitore originale per prevenire flash */
    body.layout-half #text-container .par_two_wrapper,
    body.layout-twothirds #text-container .par_two_wrapper {
        display: none;
    }

    /* =================================================================== */
    /* === FINE BLOCCO CORRETTO === */
    /* =================================================================== */


    @keyframes rotate3d {
        0% {
            transform: scale(1) rotateZ(0deg);
        }

        100% {
            transform: scale(1) rotateZ(360deg);
        }
    }

    /* Layout mobile: sempre full width per content e immagini in alto */
    .content-twothirds,
    .content-half,
    .content-full {
        width: 100% !important;
    }

    .content-half #text-container {
        width: 100%;
        left: auto;
    }

    .images-hidden {
        height: 0 !important;
        overflow: hidden !important;
    }

    #ascii-cursor-ball {
        display: none;
    }

    /* Text container mobile: dimensioni adattive */
    #text-container {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 100% !important;
        font-family: 'brockmann';
        padding: 20px;
        box-sizing: border-box;
        margin-top: 0;
        height: auto;
        outline: none;
    }

    /* Nascondi corner menu su mobile */
    .corner-text {
        display: none !important;
    }

    .corner-line {
        display: none !important;
    }

    /* Images container mobile: orizzontale in cima */
    #images-container {
        width: 100%;
        position: sticky;
        height: auto;
        top: calc(50% - 50vw);
        transform: translateX(0);
        transition: none;
    }

    .portfolio-grid-container {
        width: 100%;
        position: sticky;
        height: auto;
        top: 50px;
        transform: translateX(0);
        transition: none;
    }

    #mobile-sticky-container {
        position: relative;
    }

    /* Menu container mobile */
    #menu-container {
        height: auto;
        padding-top: 70px;
        /* Spazio per menu mobile */
    }

    #content-wrapper.content-full #images-container {
        display: none;
    }

    #images-scroll-container {
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        height: 100%;
        -webkit-overflow-scrolling: touch;
        /* scroll-snap-type: x mandatory; */
        -ms-overflow-style: none;
        /* for Internet Explorer, Edge */
        scrollbar-width: none;
        /* for Firefox */
        overflow-y: scroll;
    }

    #images-content {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px;
        padding: 15px;
    }

    .media-item {
        flex: 0 0 auto;
        height: 100%;
        scroll-snap-align: center;
        border-radius: 8px;
    }

    .media-item video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #ascii-container {
        font-size: 7px;
        margin-bottom: 100px;
        /* Spazio per menu mobile */
    }

    .ascii-line {
        height: 2vw;
    }

    .ascii-char {
        width: 1.1vw;
    }

    #tagline {
        font-size: 12px;
        margin-top: 24vw;
        margin-bottom: 100px;
        /* Spazio per menu mobile */
        white-space: normal;
    }

    /* Blog responsive */
    #blog-ascii-title {
        font-size: 3px;
        /* Più piccolo su mobile */
        padding: 20px;
        height: auto;
    }

    #blog-categories-container {
        padding: 20px;
        gap: 10px;
    }

    .blog-post-row {
        padding: 20px 30px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .blog-post-image {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .blog-post-content {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .blog-post-meta {
        text-align: left;
        margin-left: 0;
        margin-top: 10px;
    }

    /* Portfolio grid mobile */
    .portfolio-grid {
        margin-top: 10px;
    }

    .portfolio-grid-track {
        gap: 20px;
        will-change: transform;
        transition: none;
    }

    .portfolio-grid::-webkit-scrollbar {
        display: none;
        /* Nascondi scrollbar WebKit */
    }

    .portfolio-item {
        flex: 0 0 94%;
        /* Dimensione fissa su mobile */
        scroll-snap-align: start;
        pointer-events: auto;
        cursor: auto;
    }

    .portfolio-item a {
        cursor: auto;
        pointer-events: auto;
    }

    .portfolio-video {
        aspect-ratio: 607/1080;
        /* Proporzione corretta 607x1080 */
        pointer-events: auto;
        cursor: auto;
        height: calc(100vh - 250px);
    }

    .portfolio-video video {
        pointer-events: auto;
        cursor: auto;
    }

    .portfolio-name {
        font-size: 12px;
        pointer-events: auto;
    }

    .portfolio-item a .portfolio-name:after {
        content: '';
        width: 20px;
        height: 20px;
        background: url('assets/images/external-link-icon.svg');
        background-size: contain;
        display: inline-block;
        transform: translate(0px, 6px);
        margin-left: 8px;
    }

    .mobile-menu {
        display: flex;
    }

    /* Mostra indicatori mobile */
    .mobile-slide-indicators {
        display: flex;
    }

    .diary-scroll .mobile-slide-indicators {
        display: none;
    }

    .diary-scroll #images-container {
        display: none;
    }

    /* Nascondi elementi desktop su mobile */
    #slide-indicators,
    #slide-section-title,
    .drag-cursor,
    .view-cursor {
        display: none !important;
    }

    #udine-time-container {
        left: 20px;
        bottom: 123px;
        top: auto;
    }

    #udine-weather-container {
        left: 20px;
        bottom: 125px;
        right: auto;
        top: auto;
        transform: translateY(calc(-50% + 19px));
    }

    body[data-current-slide="portfolio"] #content-wrapper #menu-container {
        height: auto;
        padding-top: 70px;
        overflow: visible;
    }

    body[data-current-slide="portfolio"] #content-wrapper #page-title {
        padding: 31px 20px 0;
    }

    body[data-current-page="home"] #content-wrapper.content-full #menu-container {
        padding-top: 0;
    }

    body[data-current-page="home"] #menu-and-images-container {
        overflow: hidden;
    }

    body[data-current-page="home"] #content-wrapper #menu-container,
    body[data-current-page="toensoul"][data-current-slide="vision, mission"] #content-wrapper #menu-container {
        height: calc(100% - 20px);
        padding-top: 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    body[data-current-page="toensoul"][data-current-slide="politics"] #mobile-sticky-container {
        min-height: 50vh;
    }

    body[data-current-page="toensoul"][data-current-slide="mandi, friûl!"] #content-wrapper #menu-container {
        height: calc(100% - 20px);
        padding-top: 140px;
        display: flex;
        flex-direction: column;
        justify-content: start;
    }

    body[data-current-page="toensoul"][data-current-slide="mandi, friûl!"] #menu-container {
        max-height: calc(100vh - 101px);
    }

}

/* nascondi images-scroll-spacer immagini per slide senza immagini */
body[data-current-page="toensoul"][data-current-slide="vision"] #mobile-pinned-scroll-spacer {
    display: none;
}


@media (min-width: 768px) {

    #page-title {
        display: none;
    }

    #images-container.images-onethird {
        width: 33%;
        transform: translateX(0%);
    }

    #images-container.images-half {
        width: 50%;
        transform: translateX(0%);
    }

    #images-scroll-spacer {
        display: none;
    }

    #mobile-pinned-scroll-spacer,
    #mobile-prev-next-probe,
    #mobile-patch-spacer {
        display: none;
    }
}

body.reduced-motion * {
    transition: none !important;
    animation: none !important;
}

body.reduced-motion .cursor-marquee-container {
    overflow: initial;
}

body.reduced-motion .cursor-marquee-text {
    position: relative;
    white-space: inherit;
    animation: none;
}

/* Titoli video solo per mobile */
@media (max-width: 768px) {
    .media-item-title {
        display: block;
        text-align: center;
        font-family: brockmann, sans-serif;
        font-weight: bold;
        margin-top: 5px;
        font-size: 14px;
        line-height: 1.3;
        color: #000;
        position: relative;
        z-index: 1;
    }
    
    .media-item a {
        text-decoration: none;
    }

    .media-item a .media-item-title:after {
        content: '';
        width: 20px;
        height: 20px;
        background: url('assets/images/external-link-icon.svg');
        background-size: contain;
        display: inline-block;
        transform: translate(0px, 6px);
        margin-left: 8px;
    }
}

/* Nascondi i titoli su desktop */
@media (min-width: 769px) {
    .media-item-title {
        display: none;
    }
}

#desktop-prev-next-probe {
    height: 50px;
}

#mobile-prev-next-probe {
    height: 10px;
}

#mobile-patch-spacer {
    height: 100px;
}

body[data-current-page="home"] #desktop-prev-next-probe {
    display: none !important;
}

/* #desktop-prev-next-scroll-more-message {
    position: absolute;
    width: 100%;
    text-align: center;
    padding: 30px 0;
    bottom: 0;
    background: black;
    color: white;
    right: 0;
    display: none;
} */

/* Responsive per mobile */
@media (max-width: 767px) {
    #tagline {
        white-space: normal;
        line-height: 1.3;
        word-break: keep-all;
        overflow-wrap: normal;
        hyphens: none;
    }
}

body[data-current-page="home"] .mobile-slide-indicators {
    opacity: 0;
    visibility: hidden;
}



/*! mobile-pinning.css */
@media (max-width: 768px) {
    #mobile-pin-anchor {
        width: 100%;
        height: 1px;
    }

    #images-container .pin-stage {
        position: relative;
        height: 100dvh;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    #images-content.mobile-horizontal-track {
        display: flex;
        flex-wrap: nowrap;
        height: 100%;
        will-change: transform;
        gap: 0;
        align-items: center;
    }

    #images-content.mobile-horizontal-track .media-item {
        flex: 0 0 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #images-container video,
    #images-container img {
        max-width: 100%;
        max-height: 100%;
        display: block;
    }
}


/* === Mobile rollback fix (2025-08-30) ===
   Ripristina il comportamento precedente su mobile:
   - lascia il track immagini/pinning invariato (overflow-y: hidden sul track)
   - sblocca SOLO lo scroller root (#menu-and-images-container)
   - NON tocca display/opacity dei media
*/
@media (max-width: 768px) {
  /* Sblocca lo scroller principale, ma non cambiare altezze/layout */
  body:not(.diary-scroll) #menu-and-images-container {
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Mantieni il track come era (niente scroll verticale interno) */
  body:not(.diary-scroll) #images-scroll-container {
    overflow-y: hidden !important;    /* come nelle versioni che funzionavano */
    overflow-x: hidden;
  }
}
