/* Tipografía utilizadas */
@font-face {
    font-family: Editorial Old-Regular;
    src: url(../fonts/PPEditorialOld-Regular.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: Editorial Old-Italic;
    src: url(../fonts/PPEditorialOld-Italic.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: Grafier-Regular;
    src: url(../fonts/PPGrafier-Regular.otf) format('opentype');
    font-display: swap;
}

@font-face {
    font-family: Grafier-Black;
    src: url(../fonts/PPGrafier-Black.otf) format('opentype');
    font-display: swap;
}

:root {
    /* Colores */
    --col-red: #F9064B;
    --col-darkgrey: #0C0C0C;
    --col-lightgrey: #EBE8E3;

    /* Tipo de letra ---------------------------------------------------------------------------------*/
    --font-f-base: Grafier-Regular;
    --font-s-base: 16px;
    --font-color-base: #000000;
}

a {
    color: var(--font-color-base);
    text-decoration: none;
    transition: all .5s ease;
}

a:hover {
    color: var(--col-red);
    cursor: none;
}

h1 {
    line-height: 1.2em;
    font-size: 4.5em;
    font-family: Editorial Old-Regular, serif;
}

h2 {
    line-height: 1.2em;
    font-size: 30px;
    font-family: Editorial Old-Regular;
}

header {
    position: fixed;
    width: 100%;
    z-index: 7777;
}

body {
    font-family: var(--font-f-base);
    font-size: var(--font-s-base);
    color: var(--font-color-base);
    background-color: var(--col-lightgrey);
    cursor: none;
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Desplazamiento suave */
    -webkit-overflow-scrolling: touch;
    /* Desactiva gestos táctiles */
    margin: 0;
    padding: 0;
}

.index-wrapper {
    overflow-x: hidden !important;
    width: 100%;
    box-sizing: border-box;
    overflow-y: hidden;
}

html,
body {
    max-width: 100vw;
    height: auto !important;
    min-height: 100vh;
    touch-action: pan-y;
    -ms-overflow-style: none;
    /* IE y Edge */
}

.horizontal {
    width: 100%;
    padding-left: 2em;
    padding-right: 2em;
    padding-top: 0.3vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 11;
    pointer-events: none;
}

.style-link {
    color: var(--col-red);
}

.style-link:hover {
    font-style: italic;
}

.left-items {
    font-size: clamp(15px, 1vw, 18px);
    font-family: Grafier-Regular;
    display: flex;
    align-items: center;
    padding-right: 6em;
    transition: all .5s ease-in-out;
    z-index: 12;
    pointer-events: all;
        padding-top: 1em;

}

.left-items:hover {
    color: var(--col-red);
}

.right-items {
    font-family: Grafier-Regular;
    font-size: clamp(15px, 1vw, 18px);
    color: var(--col-red);
    text-align: right;
    transition: all .5s ease-in-out;
    z-index: 12;
    pointer-events: all;
    padding-top: 1em;
}

.right-items:hover {
    color: var(--font-color-base);
}

.logo {
    margin-top: 16px;
    width: 3vw;
    min-width: 50px;
    max-width: 75px;
    height: 3vw;
    min-height: 50px;
    max-height: 75px;
    transform-origin: 50% 42%;
    /* limitar propiedades a transicionar: evitar transition: all (evita interpolación de filtros) */
    transition: transform .4s ease-in-out;
    position: relative;
    display: inline-block;
    align-items: center;
    z-index: 12;
    pointer-events: all;
    margin-right: 8vw;
    margin-left: 8vw;
}

.logo:hover {
    transform: rotate(-180deg);
}

.home-logo:hover {
    transform: rotate(-180deg);
}


/* capa blanca del logo para crossfade (base) */
.logo::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* reemplaza por la ruta de tu logo blanco */
    background-image: url("../img/Logo_white.svg");
    opacity: 0;
    transition: opacity 300ms ease;
}

/* asegurar también transición para logos inline SVG */
.logo svg {
    transition: opacity 280ms ease;
    will-change: opacity;
}

/* Al entrar en miscellany desvanecemos la capa blanca hacia 1 (transición suave por opacidad) */
header.miscellany-over .logo::after {
    opacity: 1;
}

/* Hacer que el logo "original" se desvanezca cuando aparece la capa blanca */
header.miscellany-over .logo img,
header.miscellany-over .logo svg {
    opacity: 0;
}

del {
    text-decoration-thickness: 3px;
    /* Ajusta el grosor a tu gusto */
}

/* .strikethrough {
    position: relative;
}

.strikethrough:before {
    position: absolute;
    content: "";
    left: 0;
    top: 50%;
    right: 0;
    border-top: 3px solid;
    border-color: inherit;

    -webkit-transform: rotate(-5deg);
    -moz-transform: rotate(-5deg);
    -ms-transform: rotate(-5deg);
    -o-transform: rotate(-5deg);
    transform: rotate(-5deg);
} */

.title {
    padding-top: clamp(7em, 7vw, 12em);
    pointer-events: none;
}

.title-text {
    display: flex;
    justify-self: center;
    font-size: clamp(1.2rem, 1.5vw, 2.3rem);
    color: var(--col-red);
    margin-top: 4vw;
    margin-bottom: 4vw;
}

.text-black {
    font-family: Grafier-Black;
}

.text-italic {
    font-family: Editorial Old-Italic;
}

.underlined {
    text-decoration: underline;
}

.miscellany-underlined {
    text-decoration: underline;
    color: var(--col-red);
}

.miscellany-underlined:hover {
    color: var(--col-darkgrey);
}

/* loader ------------------------------------------------------------------------------------------*/

#loader {
    background-color: var(--col-red);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 1s ease;
    /* duración del desvanecimiento */
    align-items: center;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

#bm {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    width: 80px;
    height: 80px;
    animation: rotate-pause 2s linear infinite;
    margin-bottom: 20px;
    display: block;
}

@keyframes rotate-pause {
    0% {
        transform: rotate(0deg);
    }

    40% {
        transform: rotate(180deg);
    }

    60% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* cursor ------------------------------------------------------------------------------------------*/
/* Cursor personalizado morph */
.custom-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 64px;
    height: 64px;
    pointer-events: none;
    z-index: 88888;
    transition: transform 0.15s cubic-bezier(.4, 2, .6, 1), opacity 0.2s;
    opacity: 1;
    will-change: transform;
}

.cursor-shape {
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    display: block;
}

.cursor-circle {
    fill: var(--col-red);
    /* o #000 para invertir a blanco */
    transition: r 0.3s cubic-bezier(.4, 2, .6, 1), fill 0.3s;
}

.cursor-logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 32px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(.4, 2, .6, 1), transform 0.3s cubic-bezier(.4, 2, .6, 1);
    transform: scale(0.7) rotate(-15deg);
    pointer-events: none;
}

.logo-red,
.logo-white {
    opacity: 0;
}

/* Mostrar solo el logo rojo cuando está en morph y NO está sobre fondo rojo */
.custom-cursor.morph .logo-red {
    opacity: 1;
    transform: scale(1) rotate(50deg);
}

.custom-cursor.morph .logo-white {
    opacity: 0;
}

/* Mostrar solo el logo blanco cuando está en morph y sobre fondo rojo */
.custom-cursor.morph.cursor-on-red .logo-red {
    opacity: 0;
}

.custom-cursor.morph.cursor-on-red .logo-white {
    opacity: 1;
    transform: scale(1) rotate(50deg);
}

/* Morph a logo: círculo se encoge y logo aparece */
.custom-cursor.morph .cursor-circle {
    r: 0;
    fill: transparent;
}

.custom-cursor.morph .cursor-logo {
    transform: scale(1) rotate(50deg);
}

/* Cambia el color del círculo a blanco cuando el cursor está sobre .miscellany */
.custom-cursor.cursor-on-red .cursor-circle {
    fill: var(--col-lightgrey);
}

.cursor-logo.logo-close {
    display: none;
}

body.cursor-close .custom-cursor .cursor-logo {
    display: none !important;
}

body.cursor-close .custom-cursor .logo-close {
    display: block !important;
}

body.cursor-close .custom-cursor .cursor-circle {
    display: none !important;
}



/* Imágenes que van a hacer FADE-IN -----------------------------------------------------------------*/

.image-fadein {
    opacity: 0;
    transform: translateY(50%);
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.image-fadein.fade {
    opacity: 1;
    transform: translateY(0);
}

/* Neutraliza la transición de aparición cuando el reveal es instantáneo */
.image-fadein.no-anim {
  transition: none !important;
}

/*----------------------------------REEL------------------------------------------------------------*/
/* ---------------------------------MARQUEE--------------------------------------------------------------*/

.video-marquee-wrapper {
    position: relative;
    width: 100vw;
    height: 100%;
    pointer-events: auto;
    /* Asegúrate de que permite eventos */
    overflow: hidden;
}

.video-position {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 28.1vw;
    z-index: 2;
    /* Encima del marquee */
    pointer-events: auto;
    /* Asegúrate de que permite eventos */
    margin-right: 1em;
}

.demoreel {
    width: 50vw;
    height: 28.1vw;
    z-index: 2;
    position: relative;
    pointer-events: auto;
    /* Asegúrate de que permite eventos */
}


.marquee-viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    z-index: 1;
    /* Detrás del video */
    pointer-events: auto;
    /* Asegúrate de que permite eventos */
    overflow: hidden;
}

.marquee-track {
    margin-top: 1.8vw;
    position: relative;
    width: 100vw;
    height: 9vw;
}

.marquee-item {
    position: absolute;
    font-size: clamp(1.7em, 2vw, 3em);
    font-family: Editorial Old-Italic, serif;
    color: var(--col-red);
    white-space: nowrap;
    user-select: none;
    will-change: transform;
}

/*thumbnails-----------------------------------------------------------------------------------------*/

.home-container-left {
    pointer-events: all;
    display: flex;
    align-items: self-end;
    justify-content: left;
    margin-bottom: 1.2vw;
}

.home-container-right {
    pointer-events: all;
    display: flex;
    align-items: self-end;
    justify-content: right;
    margin-bottom: 1.2vw;
}

.home-image {
    width: 100%;
    height: 100%;
}

.home-scale-image {
    position: relative;
    /* necesario para que .home-description se posicione sobre la imagen */
    overflow: hidden;
    display: block;
    width: 75%;
}

/* imagen/video dentro */
.home-scale-image .home-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

/* overlay: usa únicamente .home-description (sin tocar .home-description-left) */
.home-scale-image .home-description-overlay {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    margin: 0;
    /* eliminar comportamiento por defecto de ul */
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(235, 232, 227, 0.80);
    /* fondo semi-transparente */
    color: var(--col-darkgrey);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    z-index: 10;
}

/* Mostrar overlay sólo cuando el cursor esté sobre la imagen (home-scale-image) */
/* y permitir mantener visible si el propio overlay recibe hover */
.home-scale-image:hover .home-description-overlay,
.home-scale-image .home-description-overlay:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* pequeño zoom de la imagen sólo cuando se hace hover sobre la imagen */
.home-scale-image:hover .home-image {
    transform: scale(1.1);
}

.home-description {
    margin-top: 1vw;
}

.home-description-left {
    color: var(--col-red);
    transition: all .5s ease-in-out;
    padding-left: 1.5vw;
    padding-right: 1.5vw;
    line-height: 2em;
    text-align: left;

}

.home-description-right {
    color: var(--col-red);
    transition: all .5s ease-in-out;
    padding-left: 1.5vw;
    padding-right: 1.5vw;
    line-height: 2em;
    text-align: right;
}

.home-description-right:hover {
    color: var(--col-darkgrey);
}

.home-description-title {
    font-family: Editorial Old-Regular;
    font-size: 40px;
}

.home-description-subtitle {
    font-size: 18px;
    line-height: 1.5em;
}

.home-description:hover {
    color: var(--col-red);
}

.home-description-number {
    color: var(--col-red);
    font-family: Editorial Old-Italic;
    font-size: clamp(24px, 6vw, 75px);
    margin-bottom: clamp(0em, 0.5vw, 1em);
}

.home-description-mobile {
    display: none;
}

/*MISCELLANY----------------------------------------------------------------------------------*/

.paddle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    padding: 0;
    width: 50px;
    /* igual o mayor que el ancho de la imagen */
    height: 50px;
    /* igual o mayor que el alto de la imagen */
    z-index: 10;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.5s ease-in-out;
}

.paddle:hover {
    opacity: 1;
    cursor: pointer;
}

.paddle img {
    width: 64px;
    height: 32px;
    display: block;
    pointer-events: none;
}

.paddle,
.paddle * {
    cursor: none !important;
}

.left-paddle {
    left: clamp(20px, 2vw, 25px);
}

.right-paddle {
    right: clamp(20px, 2vw, 25px);
}

.miscellany {
    position: relative;
    background-color: var(--col-red);
    padding-bottom: 0.5em;
}

.miscellany-container {
    position: relative;
    overflow: auto;
    white-space: nowrap;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2em;
    padding-left: clamp(5.5em, 9vw, 6.5em);
    padding-right: clamp(5.5em, 9vw, 6.5em);
    padding-bottom: 2em;
    scroll-behavior: auto !important;
    -webkit-overflow-scrolling: touch;
    /* Habilita el desplazamiento táctil en iOS */
}

.miscellany-container.dragging {
    user-select: none;
}

/* Mostrar overlay de miscellany al hacer hover sobre la imagen
   Sin cambiar tamaño ni comportamiento de la imagen (overlay posicionado absolutamente). */
.miscellany-scale-image {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;

    /* <-- clave para evitar desplazamiento vertical */
}

.miscellany-scale-image>a {
    display: block;
    /* asegurar que el enlace cubra la imagen */
}

/* overlay: fuera del flujo, invisible por defecto */
.miscellany-description-overlay-vertical {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(235, 232, 227, 0.80);
    /* fondo semi-transparente */
    color: var(--col-darkgrey);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    z-index: 5;

}

.miscellany-description-overlay-horizontal {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(235, 232, 227, 0.80);
    /* fondo semi-transparente */
    color: var(--col-darkgrey);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    z-index: 5;
}

/* Mostrar overlay únicamente cuando se pasa el cursor sobre la imagen/enlace,
   o si se interactúa con el propio overlay */
.miscellany-scale-image>a:hover .miscellany-description-overlay-vertical,
.miscellany-description-overlay-vertical:hover,
.miscellany-scale-image>a:hover .miscellany-description-overlay-horizontal,
.miscellany-description-overlay-horizontal:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


.miscellany-container-individual {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.miscellany-image-vertical {
    text-align: center;
    aspect-ratio: 9 / 16;
    height: 55vw;
    min-height: 25em;
    max-height: 55em;
}

.miscellany-image-horizontal {
    text-align: center;
    aspect-ratio: 16 / 9;
    width: 55vw;
    min-width: 25em;
    max-width: 55em;
}

.miscellany-image-vertical,
.miscellany-image-horizontal {
    margin: 0;
    padding: 0;
    display: block;
    /* NO cambies width/height si ya están bien */
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}


.miscellany-scale-image:hover .miscellany-image-vertical,
.miscellany-scale-image:hover .miscellany-image-horizontal {
    transform: scale(1.2);
}

.miscellany-description {
    color: var(--col-darkgrey);
    transition: all .5s ease-in-out;
    line-height: 1.75em;
}

.miscellany-description:hover {
    color: var(--col-red);
}

.miscellany-description-title {
    font-family: Editorial Old-Regular;
    font-size: clamp(22px, 2.5vw, 32px);
    line-height: 1.2em;
}

.miscellany-description-subtitle {
    font-family: 'Grafier-Regular', serif;
    font-size: clamp(12px, 1.6vw, 18px);
    line-height: clamp(1.5em, 1.8vw, 1.5em);

}

.miscellany-container::-webkit-scrollbar {
    width: 12px;
    height: 10px;
}

.miscellany-container::-webkit-scrollbar-track {
    background: var(--col-red);
    /* color of the tracking area */
}

.miscellany-container::-webkit-scrollbar-thumb {
    background-color: rgba(235, 232, 227, 0.5);
    /* color claro con opacidad baja */
    border-radius: 20px;
    /* roundness of the scroll thumb */
}

.miscellany-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(235, 232, 227, 0.75);
}

.miscellany-container::-webkit-scrollbar-button {
    width: 1vw;
}

/* modal--------------------------------------------------------------------------------------------------------------------------------------------------- */

.custom-modal {
    position: fixed;
    z-index: 9888;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Fijo, no animado */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.5s ease-in-out,
        backdrop-filter 0.5s,
        -webkit-backdrop-filter 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1em;
    padding-right: 1em;
}

.custom-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    /* Asegura que el fondo esté detrás del contenido */
}

.custom-modal.active,
.custom-modal.closing {
    pointer-events: auto;
}

.custom-modal.active {
    opacity: 1;
    pointer-events: auto;
    /* ... */
}

.custom-modal.closing {
    opacity: 0;
    pointer-events: auto;
    /* <-- importante: sigue recibiendo eventos hasta que termine la animación */
}

.custom-modal-content-horizontal {
    height: auto;
    width: 80vw;
    max-width: 1100px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    background: var(--col-lightgrey);
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transform: scale(0.96);
    transition:
        opacity .5s cubic-bezier(.4, 2, .6, 1),
        transform .5s cubic-bezier(.4, 2, .6, 1);
}

.custom-modal.active .custom-modal-content-horizontal {
    opacity: 1;
    transform: scale(1);
}

.custom-modal.closing .custom-modal-content-horizontal {
    opacity: 0;
    transform: scale(0.96);
}

.custom-modal-content-vertical {
    height: 80vw;
    width: 80vw;
    max-width: 1100px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    background: var(--col-lightgrey);
    box-sizing: content-box;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transform: scale(0.96);
    transition:
        opacity .5s cubic-bezier(.4, 2, .6, 1),
        transform .5s cubic-bezier(.4, 2, .6, 1);
}

.custom-modal-content-vertical iframe {
    height: 80vw;
}

.custom-modal.active .custom-modal-content-vertical {
    opacity: 1;
    transform: scale(1);
}

.custom-modal.closing .custom-modal-content-vertical {
    opacity: 0;
    transform: scale(0.96);
}

.custom-modal-content-vertical::-webkit-scrollbar {
    background-color: #EBE8E3;
    width: 5px;
}

.custom-modal-content-vertical::-webkit-scrollbar-thumb {
    background-color: #F9064B;
    /* color claro con opacidad baja */
    border-radius: 20px;
    /* roundness of the scroll thumb */
}

.custom-modal-content-horizontal::-webkit-scrollbar {
    background-color: #EBE8E3;
    width: 5px;
}

.custom-modal-content-horizontal::-webkit-scrollbar-thumb {
    background-color: #F9064B;
    /* color claro con opacidad baja */
    border-radius: 20px;
    /* roundness of the scroll thumb */
}


/* Evitar overscroll del documento cuando haya modal (refuerzo general) */
html.modal-open,
body.modal-open {
  overscroll-behavior: contain;
}

/* Solo el contenido del modal debe scrollear */
.custom-modal-content-horizontal,
.custom-modal-content-vertical {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
}

/* El overlay no debe provocar scroll “elástico” */
.custom-modal {
  overscroll-behavior: none;
}

.video-modal-horizontal {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 100%;
    border: none;
    display: block;
    margin: 0;
    padding: 0;
    object-fit: cover;
    box-sizing: border-box;
}

.video-modal-vertical {
    width: auto;
    aspect-ratio: 9 / 16;
    height: 100%;
    max-height: 100%;
    border: none;
    display: block;
    margin: 0;
    padding: 0;
    object-fit: cover;
    box-sizing: border-box;
}

.modal-description-horizontal {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 3em;
    padding-left: 2em;
    padding-right: 2em;
    padding-bottom: 1.5em;
    object-fit: fill;
}

.modal-description-vertical {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 3em;
    padding-left: 2em;
    padding-right: 2em;
    padding-bottom: 1.5em;
    object-fit: fill;
}

.modal-description-text {
    display: flex;
    flex-direction: column;
    color: var(--col-red);
}

.modal-description-vertical-title {
    font-family: Editorial Old-Regular, serif;
    font-size: 36px;
}

.modal-description-horizontal-paragraph {
    font-family: 'Grafier-Regular', serif;
    padding-top: 1em;
    line-height: 1.5em;
    max-width: 40em;
        font-size: clamp(14px, 2vw, 16px);
}

.modal-description-vertical-paragraph {
    font-family: 'Grafier-Regular', serif;
    padding-top: 1em;
    line-height: 1.5em;
        font-size: clamp(14px, 2vw, 16px);

}

.modal-description-logo-horizontal {
    margin-left: 3em;
}


/* .modal-arrow {
    transition: opacity .3s;
} 
.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    padding-right: 2em;
    padding-left: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.5s ease-in-out;
    cursor: none !important;
}

.modal-arrow-left {
    left: 15px;
}

.modal-arrow-right {
    right: 15px;
}

.modal-arrow:hover {
    opacity: 1;
    cursor: pointer;
} 

 .close-modal-miscellany {
    top: 2em;
    right: 2.5em;
    position: absolute;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--col-lightgrey);
    z-index: 2;
    transition: color .4s;
    transition: opacity .3s;
} */

/*MORE----------------------------------------------------------------------------------*/

.more {
    padding-left: clamp(3em, 5vw, 7em);
    padding-right: clamp(3em, 5vw, 7em);
    padding-top: clamp(3em, 7vw, 8em);
    padding-bottom: clamp(2.5em, 6vw, 7em);
}

.more-text {
    font-family: 'Editorial Old-Italic', serif;
    font-size: clamp(3em, 8vw, 10em);
    color: var(--col-red);
    padding-bottom: clamp(0px, 2vw, 100px);
}

.socials {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.socials-image {
    font-size: clamp(18px, 1.5vw, 28px);
    font-family: Grafier-Regular;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all .5s ease-in-out;
    color: var(--col-red);
}

.socials-image-svg {
    width: clamp(20px, 2vw, 30px);
}

.socials-image:hover {
    color: var(--col-darkgrey);
}

.image-fadein.fade {
    opacity: 1;
    transform: translateY(0);
}

/*footer----------------------------------------------------------------------------------*/

.footer {
    padding-bottom: clamp(0.5em, 1.5vw, 2em);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-text {
    font-size: clamp(8px, 1.2vw, 12px);
    line-height: clamp(12px, 1.5vw, 16px);
    color: var(--font-color-base);
    text-align: center;
}

.footer-text-bold {
    font-size: clamp(8px, 1.2vw, 12px);
    color: var(--font-color-base);
    font-family: 'Grafier-Black', serif;
}

/*otras cosas----------------------------------------------------------------------------------*/

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    font-family: Editorial Old-regular;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    padding: 2em;
    margin-bottom: 3vw;
    margin-top: 3vw;
    color: var(--col-red);
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 2px var(--col-red) solid;
    margin-bottom: 5px;
}

.separator:not(:empty)::before {
    margin-right: 1em;
}

.separator:not(:empty)::after {
    margin-left: 1em;
}

.separator-white {
    display: flex;
    align-items: center;
    text-align: center;
    font-family: Editorial Old-regular;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    padding-top: 2em;
    padding-bottom: 2em;
    padding-left: 2em;
    padding-right: 2em;
    margin-top: 3em;
    color: var(--col-lightgrey);
}

.separator-white::before,
.separator-white::after {
    content: '';
    flex: 1;
    border-bottom: 2px var(--col-lightgrey) solid;
    margin-bottom: 5px;
}

.separator-white:not(:empty)::before {
    margin-right: 1em;
}

.separator-white:not(:empty)::after {
    margin-left: 1em;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
    background-color: var(--col-red);
}

.overlay:hover {
    opacity: 1;
}

.content {
    font-size: 1.1vw;
    width: auto;
    height: auto;
    color: var(--font-color-base);
    position: absolute;
    bottom: 2vw;
    left: 2vw;
    justify-content: left;
    text-align: left;
    align-items: left;
}

.content:hover {
    transition: all .2s ease-in-out;
    font-style: italic;
}

.subtitle {
    font-style: italic;
    font-weight: 700;
}

.click-down {
    font-size: 0.9vw;
    line-height: 1.1vw;
    margin-bottom: 0.3vw;
}

.definition {
    margin-bottom: 1em;
}

.point-down {
    margin-bottom: 1em;
}

.drag-icon {
    width: 6vw;
}

.drag-icon-vertical {
    display: flex;
    justify-content: center;
    padding-top: 22%;
}

.drag-icon-horizontal {
    display: flex;
    justify-content: center;
    padding-top: 8%;
}

/****************** ABOUT *****************--------------------------------------------------------------*/

.right-items-about {
    font-family: Grafier-black;
    color: var(--col-red);
    text-align: left;
    transition: all .5s ease-in-out;
}

.about-container {
    width: 100vw;
    height: 100vh;
    /* Ajusta 96px a la altura real de tu header */
    padding-top: clamp(6em, 5.5vw, 7.5em);
    /* Empuja el contenido debajo del header */
    display: flex;
    flex-direction: row;
    overflow: hidden;
    padding-right: 6px;
}

.about-video-container {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow-y: hidden;
    width: 50vw;
    gap: 12px;
    pointer-events: none;
    position: a;
}

.logo-video-tipography {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    /* Oculta lo que sobresale por los lados */
    transition: opacity .5s cubic-bezier(.4, 0, .2, 1);
}

.logo-video {
    align-self: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    padding: 0;
}

.about-info {
    position: relative;
    width: 50vw;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    /* Reserva espacio para el footer */
}

.about-title {
    text-align: start;
    padding-left: 48px;
    padding-right: 52px;
    padding-top: 1vh;
    padding-bottom: 0.75em;
    font-size: 36px;
    line-height: 1.5em;
}

.nowrap {
    white-space: nowrap;
}

.about-description {
    text-align: start;
    font-family: Grafier-Regular;
    padding-left: 48px;
    padding-right: 52px;
    line-height: 1.5em;
    padding-bottom: 1em;
    max-width: 60em;
}

.CV-about {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 13vw;
    padding-bottom: 2em;
    padding-top: 1.5em;
}

.CV-text {
    font-family: Grafier-Regular;
    font-size: 18px;
    color: var(--col-red);
    text-align: left;
    transition: all .5s ease-in-out;
    text-decoration: underline;
}

.CV-text:hover {
    color: var(--col-darkgrey);
}


/* separator about------------ */
.separator-about {
    display: flex;
    align-items: center;
    font-family: Editorial Old-regular;
    font-size: 24px;
    padding-right: 42px;
    padding-left: 48px;
    margin-bottom: 2em;
    margin-top: 2em;
    color: var(--col-red);
    width: 100%;
    /* Asegura que ocupe todo el ancho disponible */
    min-width: 0;
}

.separator-about::after {
    content: '';
    flex: 1 1 0%;
    border-bottom: 2px var(--col-red) solid;
    margin-bottom: 6px;
    margin-left: 1em;
    /* Espacio entre el texto y la línea */
    min-width: 40px;
    /* Fuerza que la línea tenga un ancho mínimo */
    height: 0;
    display: block;
}

.about-socials {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 48px;
    padding-bottom: 2em;
    gap: 1vw;
}

.about-socials-image {
    font-size: clamp(16px, 1.7vw, 20px);
    padding-left: 5px;
    font-family: Grafier-Regular;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all .5s ease-in-out;
    color: var(--col-darkgrey);
}

.about-socials-image:hover {
    color: var(--col-red);
}

/* footer about ----------------*/

.about-info-footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 2em;
    overflow-y: auto;
    overflow-x: hidden;
}


.about-footer {
    position: static;
    margin-top: 2em;
    /* opcional: espacio entre contenido y footer */
}


.about-footer-mobile {
    display: none;
}

/* scrollbar about ---------------------------------------- */

.about-info-footer::-webkit-scrollbar {
    width: 9px;
    height: 10px;
}

.about-info-footer::-webkit-scrollbar-track {
    background-color: rgba(235, 232, 227, 0);
    /* color of the tracking area */
}

.about-info-footer::-webkit-scrollbar-thumb {
    background-color: rgba(51, 51, 51, 0.5);
    /* color claro con opacidad baja */
    border-radius: 20px;
    /* roundness of the scroll thumb */
}

.about-info-footer::-webkit-scrollbar-thumb:hover {
    background-color: rgba(51, 51, 51, 0.75);
}

.about-info-footer::-webkit-scrollbar-button {
    width: 1vw;
}

/****************** Proyectos *****************----------------------------------------------------------*/

.separator-projects {
    display: flex;
    align-items: center;
    text-align: center;
    font-family: Editorial Old-regular;
    font-size: 20px;
    padding-left: 2em;
    padding-right: 2em;
    padding-top: clamp(0.5em, 0.75vw, 1.5em);
    color: var(--col-red);
}

.separator-projects::before,
.separator-projects::after {
    content: '';
    flex: 1;
    border-bottom: 2px var(--col-red) solid;
    margin-bottom: 5px;
}

.separator-projects:not(:empty)::before {
    margin-right: 1em;
}

.separator-projects:not(:empty)::after {
    margin-left: 1em;
}

.project-structure {
    display: flex;
    gap: 3em;
    padding-top: clamp(8em, 7vw, 12em);
    padding-left: clamp(2em, 3vw, 3em);
}

.project-structure-info {
    width: 30vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
}

.project-structure-info-top {
    position: fixed;
    width: inherit;
    /* o usa el mismo ancho que el padre */
    line-height: 1.5em;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    color: var(--col-red);
    padding-right: clamp(1em, 1.5vw, 2.5em);
}

.project-structure-info-top-first {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    pointer-events: none;
}

.softwares {
    text-align: right;
}

.project-structure-info-bottom {
    position: sticky;
    bottom: clamp(2em, 2.5vw, 3em);
    z-index: 10;
}

.project-structure-info-bottom-title {
    font-family: Editorial Old-Italic, serif;
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1.2em;
    padding-bottom: 0.2em;
}

.project-structure-info-bottom-description {
    font-family: 'Grafier-Regular', serif;
    line-height: 1.5em;
    font-size: clamp(14px, 1vw, 16px);
    text-align: justify;
}

.project-structure-images {
    /* Máxima altura de trabajo para la fila (ajustable si lo necesitas) */
    --sos-row-max-h: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 70vw;
    object-fit: cover;
}

.footnote {
    font-size: 16px;
    font-family: 'Grafier-Regular', serif;
    color: var(--col-red);
    padding-top: 0.5em;
    padding-left: 0.2em;
    padding-bottom: 0.75em;
}

/* Neutraliza la transición cuando el reveal es instantáneo */
.image-fadein.no-anim {
  transition: none !important;
}

/* ---GALLERY------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */

.project-gallery-SOS {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(0.5em, 0.75vw, 1em);
}
.project-gallery-SOS-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: none !important;
}
.project-gallery-SOS-item:nth-child(1) {
    grid-column: span 4;
    grid-row: span 2;
}
.project-gallery-SOS-item:nth-child(2) {
    grid-row: span 4;
    grid-column: span 2;
}
.project-gallery-SOS-item:nth-child(3) {
    grid-column: span 4;
    grid-row: span 2;
}
.project-gallery-SOS-item:nth-child(4) {
    grid-column: span 6;
    grid-row: span 2;
}
.project-gallery-SOS-item:nth-child(5) {
    grid-row: span 4;
    grid-column: span 2;
}
.project-gallery-SOS-item:nth-child(6) {
    grid-column: span 4;
    grid-row: span 2;
}
.project-gallery-SOS-item:nth-child(7) {
    grid-column: span 4;
    grid-row: span 2;
}
.project-gallery-SOS-item:nth-child(8) {
    grid-column: span 6;
    grid-row: span 2;
}
.project-gallery-SOS-item:nth-child(9) {
    grid-column: span 3;
}
.project-gallery-SOS-item:nth-child(10) {
    grid-column: span 3;
}
.project-gallery-SOS-item:nth-child(11) {
    grid-column: span 6;
    grid-row: span 2;
}

/* -------------------------------------------------------------------------------------------------------- */

.project-gallery-TMB {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.5em, 0.75vw, 1em);
}
.project-gallery-TMB-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: none !important;
}
.project-gallery-TMB-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(5) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(6) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(7) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(8) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(9) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(10) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(11) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(12) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(13) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(14) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-TMB-item:nth-child(15) {
    grid-column: span 2;
    grid-row: span 1;
}

/* -------------------------------------------------------------------------------------------------------- */

.project-gallery-RTVE {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.5em, 0.75vw, 1em);
}
.project-gallery-RTVE-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: none !important;
}
.project-gallery-RTVE-item:nth-child(1) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(2) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(3) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(7) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(8) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(9) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(10) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(11) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-RTVE-item:nth-child(12) {
    grid-column: span 1;
    grid-row: span 1;
}

/* ------------------------------------------------------------------------------------------------------------- */

.project-gallery-DLV {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.5em, 0.75vw, 1em);
}
.project-gallery-DLV-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: none !important;
}
.project-gallery-DLV-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(5) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(7) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(8) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(9) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(10) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(11) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(12) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(13) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(14) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-DLV-item:nth-child(15) {
    grid-column: span 2;
    grid-row: span 1;
}

/* --------------------------------------------------------------------------------------------------------------- */

.project-gallery-FN {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.5em, 0.75vw, 1em);
}
.project-gallery-FN-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: none !important;
}
.project-gallery-FN-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(2) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(4) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(7) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(8) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(9) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(10) {
    grid-column: span 2;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(11) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(12) {
    grid-column: span 1;
    grid-row: span 1;
}
.project-gallery-FN-item:nth-child(13) {
    grid-column: span 2;
    grid-row: span 1;
}

/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------ */



.iframe-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border: none;
    display: block;
}

.horizontal-project {
    width: 100%;
    padding-left: 3em;
    padding-right: 3em;
    padding-top: 3em;
    padding-bottom: 2.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.previous-next-project {
    font-size: clamp(20px, 2vw, 36px);
    font-family: Editorial Old-Regular, serif;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    transition: all .5s ease-in-out;
}


.previous-next-project>* {
    display: inline-flex;
    /* Elimina width: 100% si lo tienes en los hijos */
}

.previous-next-project-text-left {
    margin-top: 0.35em;
    color: var(--col-red);
    transition: color .5s ease-in-out;
    /* Mueve la transición aquí */
    text-align: end;
}

.previous-next-project-text-right {
    margin-top: 0.35em;
    color: var(--col-red);
    transition: color .5s ease-in-out;
    /* Mueve la transición aquí */
    text-align: start;
}


.previous-next-project-text-right:hover,
.previous-next-project-text-left:hover {
    color: var(--font-color-base);
}

.previous-next-logo-mobile {
    display: none;
}

.previous-next-mobile {
    display: none;
}

.arrow-project-left {
    margin-right: 18px;
}

.arrow-project-right {
    margin-left: 18px;
}

.previous-next-logo-container {
    margin-left: 6em;
    margin-right: 6em;
}

.home-logo-container {
    display: none;
}
.home-logo {
    width: 50px;
    height: 50px;
    margin-top: 0.2em;
    margin-right: 4.5em;
    transition: all .5s ease-in-out;
    transform-origin: 50% 42%;
}

.previous-next-logo {
    width: 50px;
    height: 50px;
    margin-top: 0.2em;
    margin-right: 4.5em;
    transition: all .5s ease-in-out;
    transform-origin: 50% 42%;
}

.previous-next-logo:hover {
    transform: rotate(-180deg);
}

/* Modal de video para proyectos */
.project-modal {
    width: 100%;
    height: 100%;
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-content: center;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: rgba(223, 221, 218, 0.3);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity .5s ease-in-out,
        backdrop-filter .5s ease-in-out,
        -webkit-backdrop-filter .5s ease-in-out;
    will-change: opacity, backdrop-filter;
    overflow: hidden;
    gap: 2em;
}

.project-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.project-modal.closing {
    opacity: 0;
    pointer-events: none;
}

.project-modal-video-container-vertical {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2em;
    margin-right: 2em;
    width: 100%;
    height: auto;
    /* el alto real lo marca el flex del modal (entre close y arrows) */
    box-sizing: border-box;
}

/* El medio dentro (video o imagen) ocupa siempre el alto disponible del contenedor */
.project-modal-video-container-vertical>* {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    padding-right: 5vw;
    padding-left: 5vw;
}

/* Horizontal (por coherencia), usa todo el ancho pero limita por alto del contenedor */
.project-modal-video-container-horizontal {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 5vw;
    padding-left: 5vw;
    width: 100%;
    height: auto;
    /* el alto real lo marca el flex del modal (entre close y arrows) */
    box-sizing: border-box;
}

/* El medio dentro (video o imagen) ocupa siempre el alto disponible del contenedor */
.project-modal-video-container-horizontal>* {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    
}

/* Video: única escala animada */
.project-modal video{
    opacity: 0;
    transform: scale(.95);
    transition:
        opacity .5s cubic-bezier(.4, 2, .6, 1),
        transform .5s cubic-bezier(.4, 2, .6, 1);
    will-change: opacity, transform;
}

/* Imagen en modal: misma animación que el video, scoped al contenedor de media */
.project-modal-video-container-vertical img,
.project-modal-video-container-horizontal img {
    opacity: 0;
    transform: scale(.95);
    transition:
        opacity .5s cubic-bezier(.4, 2, .6, 1),
        transform .5s cubic-bezier(.4, 2, .6, 1);
    will-change: opacity, transform;
}

/* Activa animación en imágenes cuando el modal está activo */
.project-modal.active .project-modal-video-container-vertical img,
.project-modal.active .project-modal-video-container-horizontal img {
    opacity: 1;
    transform: scale(1);
}

/* Estado de cierre */
.project-modal.closing .project-modal-video-container-vertical img,
.project-modal.closing .project-modal-video-container-horizontal img {
    opacity: 0;
    transform: scale(.94);
}

.horizontal-modal-arrows {
    padding-left: 3em;
    padding-right: 3em;
    padding-bottom: 3em;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* background: linear-gradient(rgba(226, 226, 226, 0), rgba(226, 226, 226, 0.5)); */
}

.horizontal-modal-arrows-miscellany {
    padding-left: 3em;
    padding-right: 3em;
    padding-bottom: 3em;
    width: 100%;
    max-width: 1225px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* background: linear-gradient(rgba(226, 226, 226, 0), rgba(226, 226, 226, 0.5)); */
}

.modal-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-arrow-text {
    color: var(--col-red);
    font-family: Editorial Old-Regular, serif;
    font-size: clamp(28px, 2.5vw, 32px);
    margin-top: 10px;
}

.modal-arrow-text-miscellany {
    color: var(--col-red);
    font-family: Editorial Old-Regular, serif;
    font-size: clamp(28px, 2.5vw, 32px);
    margin-top: 10px;
}

.modal-arrow-text:hover {
    color: var(--col-darkgrey);
}

.modal-arrow-text-miscellany:hover {
    color: var(--col-lightgrey);
}

.project-modal.active video {
    opacity: 1;
    transform: scale(1);

}

.project-modal.closing video {
    opacity: 0;
    transform: scale(.94);
}

/* Flechas y cierre: no afectados por escala */
.close-modal {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-top: 2em;
    padding-right: 2em;
    padding-left: 2em;
    font-size: 1.5em;
    font-weight: bold;
}

.close-modal-x {
    padding: 0.2em;
    color: var(--col-red);
}

.close-modal-x:hover {
    color: var(--col-darkgrey);
}

.close-modal-x-miscellany {
    padding: 0.2em;
    color: var(--col-red);
}

.close-modal-x-miscellany:hover {
    color: var(--col-lightgrey);
}

body,
.custom-cursor {
    cursor: none !important;
    -webkit-overflow-scrolling: touch;
}

.project-structure-images-individual video {
    cursor: none !important;
}

.project-modal video {
    cursor: auto !important;
}

/* Cuando el header está sobre una sección .miscellany, hacer blanco solo el texto de .right-items */
header.miscellany-over .right-items p {
    color: var(--col-lightgrey);
}

header.miscellany-over .right-items p:hover {
    color: var(--col-darkgrey);
}

/* Logo blanco cuando el header está sobre miscellany */
header.miscellany-over .logo,
header.miscellany-over .site-logo,
header.miscellany-over .brand {
    color: #fff;
    /* por si el logo usa color CSS */
}

/* inline SVG */
header.miscellany-over .logo svg,
header.miscellany-over .site-logo svg,
header.miscellany-over .brand svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* logo como <img> (raster o SVG externo): invertir/ajustar brillo para verse blanco */
header.miscellany-over .logo img,
header.miscellany-over .site-logo img,
header.miscellany-over .brand img {
    /* No animar filtros sobre la imagen: usamos sólo el ::after blanco (crossfade). */
    filter: none !important;
}

@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
}