/*
Theme Name: Cristian Iacob Portfolio
Theme URI: https://cristianiacob.com
Author: Cristian Iacob
Description: Tema personalizado para el portfolio de Cristian Iacob.
Version: 4.6
*/

/* =============================================
   1. VARIABLES Y RESET
============================================= */
:root {
    --color-bg: #E7E7E7;
    --color-text: #181818;
    --color-text-dim: #888888;
}

@font-face {
    font-family: 'Switzer';
    src: url('font/Switzer-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Switzer-Medium';
    src: url('font/Switzer-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    font-family: 'Switzer', sans-serif;
}

html, body {
    height: auto;
    overscroll-behavior-x: none;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
    height: 100dvh;
    position: fixed;
    width: 100%;
}

a { color: inherit; }

/* =============================================
   2. HEADER
============================================= */
header nav a sup {
    font-family: 'Switzer-Medium', sans-serif !important;
    font-size: 0.6em;
    vertical-align: top;
    position: relative;
    top: 2px;
}

.site-header {
    color: var(--color-text);
    padding: 0 24px;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    position: relative;
    z-index: 9999;
    background-color: transparent;
}

/* Header fijo (queda pegado arriba al hacer scroll) en la home,
   en las páginas de listado (Work, Exhibitions) y en la página
   de proyecto individual (single-post) */
body.home .site-header,
body.page-template-page-projects-php .site-header,
body.page-template-page-exhibitions-php .site-header,
body.single-post .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.header-logo, .header-center-img, .header-nav { flex: 1; }

.logo-wrapper { display: inline-flex; align-items: baseline; cursor: pointer; }
.logo-changing-part { display: grid; overflow: hidden; }
.logo-changing-part span {
    grid-area: 1 / 1;
    transition: all 0.5s cubic-bezier(0.6, 0.01, 0.05, 0.95);
    white-space: nowrap;
    color: var(--color-text);
}
.text-full { transform: translateY(-100%); opacity: 0; }
.logo-wrapper:hover .text-short { transform: translateY(100%); opacity: 0; }
.logo-wrapper:hover .text-full { transform: translateY(0); opacity: 1; }

.header-center-img { display: flex; justify-content: center; align-items: center; }
.header-center-img svg { height: 14px; width: auto; display: block; }
.header-center-img svg path { fill: var(--color-text); }

.header-nav { display: flex; justify-content: flex-end; align-items: center; gap: 34px; }
.header-nav a {
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.header-nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-text);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}
.header-nav a:hover::after { transform: scaleX(1); transform-origin: bottom left; }

.language-switcher { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.language-switcher li a {
    text-decoration: none;
    color: var(--color-text);
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}
.language-switcher li.current-lang a {
    opacity: 1;
    pointer-events: none;
    font-family: 'Switzer-Medium', sans-serif;
}
.language-switcher li:not(.current-lang) a { opacity: 0.5; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 16px;
    cursor: pointer;
    z-index: 10001;
}
.menu-toggle span { display: block; width: 100%; height: 3px; background-color: var(--color-text); transition: 0.3s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100dvh;
    background-color: var(--color-bg);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 100px 0 0 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
}
.mobile-overlay.is-active { opacity: 1; visibility: visible; }

.overlay-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    flex-grow: 1;
    justify-content: center;
    white-space: nowrap;
}
.overlay-nav a { font-size: 42px; text-decoration: none; color: var(--color-text); text-align: center; white-space: nowrap; }

.mobile-language-switcher {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid var(--color-text);
    padding: 40px 0;
}

@media (max-width: 768px) {
    .header-center-img, .header-nav { display: none !important; }
    .menu-toggle { display: flex; }
    .site-header { padding: 0 16px; }
}

/* =============================================
   3. FOOTER
   El bloque de cookies vive dentro del footer pero está diseñado
   como una capa clarita translúcida con blur, consistente en TODA
   la web (no depende de ningún efecto de mezcla del footer).
============================================= */
.site-footer {
    padding: 20px 24px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-sizing: border-box;
}
.site-footer * { box-sizing: border-box; }

.footer-container { display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 0 auto; }
.footer-row { display: flex; width: 100%; justify-content: space-between; align-items: baseline; }
.f-col { flex: 1; display: flex; }
.f-col-left { justify-content: flex-start; text-align: left; }
.f-col-center { justify-content: center; text-align: center; }
.f-col-right { justify-content: flex-end; text-align: right; }

.f-white, .f-white a, .f-white p,
.f-grey, .f-grey a, .f-grey p {
    font-size: 16px !important;
    font-weight: 400 !important;
    margin: 0;
    text-decoration: none !important;
    line-height: 1.4;
    list-style: none;
}
.f-white, .f-white a { color: #181818 !important; }
.f-grey, .f-grey p { color: #888888 !important; }

.site-footer a { position: relative; display: inline-block; color: inherit !important; }
.site-footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}
.site-footer a:hover::after { transform: scaleX(1); transform-origin: bottom left; }

.social-links-container { display: flex; gap: 20px; }

@media (max-width: 768px) {
    .site-footer { padding: 20px 16px; }
    .footer-container { display: flex; flex-direction: column; }
    .footer-row { display: contents; }
    .f-col { display: flex; width: 100%; justify-content: flex-start !important; text-align: left !important; }
    .footer-row:first-child .f-col-left { order: 1; margin-bottom: 5px; }
    .footer-row:last-child .f-col-left { order: 2; margin-bottom: 30px; }
    .footer-row:first-child .f-col-right { order: 3; margin-bottom: 10px; }
    .footer-row:last-child .f-col-right { order: 4; margin-bottom: 30px; }
    .footer-row:last-child .f-col-center { order: 5; }
}

/* --- Cookie bar & modal: capa clarita translúcida con blur,
   consistente en toda la web --- */
#custom-cookie-bar {
    position: fixed;
    bottom: 48px;
    width: 320px;
    max-width: 90vw;
    background: rgba(231, 231, 231, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 4px;
    z-index: 999999;
    display: flex;
    align-items: center;
    transition: opacity 0.5s ease;
    right: 0; left: 0;
    margin: 0 auto;
    opacity: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.cookie-hidden { display: none !important; }
.cookie-text-container { flex: 1; overflow: hidden; white-space: nowrap; }
.cookie-text {
    display: block;
    color: rgba(24, 24, 24, 0.85);
    font-size: 13px;
    text-align: center;
    padding-left: 8px;
}
.cookie-policy-inner p, .cookie-ga4-inner p {
    color: rgba(24, 24, 24, 0.85) !important;
    font-size: 13px !important;
    margin: 0 !important;
}
.cookie-buttons { display: flex; gap: 4px; margin-left: 6px; }
.cookie-buttons button {
    background: rgba(24, 24, 24, 0.06);
    color: var(--color-text);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    width: 38px;
    height: 38px;
    padding: 0;
}
.cookie-buttons button:hover { background: rgba(24, 24, 24, 0.12); }

#cookie-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
#cookie-modal-overlay.active { opacity: 1; pointer-events: auto; }

.cookie-modal {
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 0px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 16px;
    background: rgba(231, 231, 231, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.modal-body { flex: 1; padding: 0px 16px 16px 16px; overflow-y: auto; color: var(--color-text); font-size: 16px; line-height: 1.6; }
.modal-body h3, .modal-body h4 { color: var(--color-text-dim); font-size: 16px; font-weight: 600; margin: 0 0 8px 0; }
.modal-body p { margin-bottom: 24px; color: var(--color-text); }
.modal-body ul { padding-left: 20px; margin-bottom: 24px; color: var(--color-text); }
.modal-body hr { border: 0; height: 1px; background: rgba(0, 0, 0, 0.1); margin: 10px 0 30px 0; }

.modal-footer { padding: 24px 16px 16px 16px; display: flex; justify-content: flex-start; gap: 12px; }
.modal-btn {
    background: #4F4F4F;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}
.modal-btn:hover { opacity: 0.7; }

.icon-settings, .icon-check, .icon-reject {
    width: 16px;
    height: 16px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.icon-settings { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23181818" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line></svg>'); }
.icon-check { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23181818" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>'); }
.icon-reject { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23181818" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>'); }

/* =============================================
   4. FRONT PAGE — ANIMACIÓN DE ENTRADA
============================================= */
.intro-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.intro-header {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-text { position: relative; padding: 0 4px; }

.intro-text p {
    font-size: 16px;
    color: var(--color-text);
    margin: 0;
    opacity: 0;
    will-change: transform, opacity;
}

.intro-name-left p { transform: translateY(-20px); }
.intro-name-right p { transform: translateY(20px); }

.intro-svg-divider {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    width: 140px;
    height: auto;
    z-index: 10;
    will-change: opacity;
}
.intro-svg-divider svg path { fill: var(--color-text) !important; }

@media (max-width: 768px) {
    .intro-overlay { display: none; }
}

/* =============================================
   5. FRONT PAGE — CARRUSEL DE PROYECTOS
============================================= */
.gallery {
    visibility: hidden;
    opacity: 0;
    position: relative;
    width: 100%;
    padding-top: 50px;
    padding-bottom: 24px;
    overflow: hidden;
    background: transparent;
    cursor: grab !important;
    user-select: none;
    overscroll-behavior-x: none;
}
.gallery:active { cursor: grabbing !important; }

.cards {
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    height: calc(100vh - 74px);
    list-style: none;
    overscroll-behavior-x: none;
}

.card-item {
    position: relative;
    flex: 0 0 35vw;
    margin-right: 50vw;
    height: 100%;
}

.card-media {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 2px;
}

.card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #cfcfcf;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}
.card-item:hover .card-img { opacity: 1; }

.card-content {
    position: absolute;
    bottom: 24px;
    left: 100%;
    margin-left: 28px;
    width: max-content;
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 3;
}
.card-item:hover .card-content { opacity: 1; }

.project-info h2 { color: var(--color-text); font-weight: 400; font-size: 16px; margin: 0; }
.project-info p { color: var(--color-text-dim); font-weight: 400; font-size: 16px; margin: 4px 0 0 0; }

@media (max-width: 768px) {
    .gallery { padding-bottom: 0px; margin-bottom: 48px; }
    .cards { height: calc(100vh - 80px); min-height: 500px; margin-left: 24px; }
    .card-item { flex: 0 0 calc(100vw - 48px); margin-right: 60vw; }

    .card-img { opacity: 1 !important; }

    .card-content {
        position: absolute;
        bottom: 48px;
        left: 100%;
        margin-left: 20px;
        width: max-content;
        max-width: 200px;
        opacity: 1;
        pointer-events: none;
    }
    .project-info h2 { font-size: 16px; }
    .project-info p { font-size: 16px; }
}

/* =============================================
   6. PÁGINA "WORK" (listado de proyectos)
============================================= */
.work-main {
    padding: 0 24px;
    padding-top: 90px;
    padding-bottom: 100px;
    box-sizing: border-box;
}

.work-title {
    font-size: clamp(2rem, 8vw, 4rem);
    margin: 60px 0 50px 0;
    font-weight: 400;
    color: var(--color-text);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.work-card { display: flex; flex-direction: column; gap: 15px; }

.work-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: #cfcfcf;
}

.work-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s ease;
}

.work-img-hover-gif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    object-fit: cover;
}

.work-card-link:hover .work-img-hover-gif { opacity: 1; }
.work-card-link:hover .work-img-main { opacity: 0; transform: scale(1.03); }

.work-card-link { text-decoration: none; display: block; color: inherit; }

.work-info h3 {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0 0 0;
    color: var(--color-text);
}

.work-info p {
    font-size: 16px;
    font-weight: 400;
    margin: 4px 0 0 0;
    color: var(--color-text-dim);
    line-height: 1.5;
}

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

@media (max-width: 600px) {
    .work-main { padding: 0 16px; padding-top: 74px; padding-bottom: 60px; }
    .work-title { margin: 40px 0 30px 0; }
    .work-grid { grid-template-columns: 1fr; }

    .work-img-hover-gif { display: none !important; }
    .work-card-link:hover .work-img-main { opacity: 1 !important; transform: none !important; }
}

/* =============================================
   7. PÁGINA "EXHIBITIONS" (listado en formato tabla/lista)
============================================= */
.exhibitions-main {
    padding: 0 24px;
    padding-top: 90px;
    padding-bottom: 100px;
    box-sizing: border-box;
}

.exhibitions-title {
    font-size: clamp(2rem, 8vw, 4rem);
    margin: 60px 0 50px 0;
    font-weight: 400;
    color: var(--color-text);
}

.exhibitions-list {
    display: flex;
    flex-direction: column;
}

.exhibition-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-top: 32px;
    padding-bottom: 64px;
    border-top: 1px solid var(--color-text);
}

.exhibition-title-text {
    font-size: 54px;
    line-height: 1.1;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.exhibition-meta {
    display: flex;
    flex: 0 0 auto;
    gap: 60px;
}

.exhibition-meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 220px;
    flex: 0 0 220px;
}

.exhibition-meta-item .exhibition-label {
    font-size: 16px;
    color: var(--color-text-dim);
    margin: 0;
}

.exhibition-meta-item .exhibition-value {
    font-size: 16px;
    color: var(--color-text);
    margin: 0;
}

/* --- Thumbnail flotante que sigue al cursor en hover (proporción 3:2) --- */
.exhibition-hover-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    aspect-ratio: 3 / 2;
    pointer-events: none;
    z-index: 5000;
    opacity: 0;
    overflow: hidden;
    background-color: #cfcfcf;
    transition: opacity 0.25s ease;
    will-change: transform;
}
.exhibition-hover-preview.is-active { opacity: 1; }

.exhibition-hover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 900px) {
    .exhibition-meta { gap: 30px; }
    .exhibition-meta-item { width: 160px; flex: 0 0 160px; }
    .exhibition-title-text { font-size: 42px; }
    .exhibition-hover-preview { display: none; }
}

@media (max-width: 600px) {
    .exhibitions-main { padding: 0 16px; padding-top: 74px; padding-bottom: 60px; }
    .exhibitions-title { margin: 40px 0 30px 0; }

    .exhibition-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-top: 24px;
        padding-bottom: 40px;
    }
    .exhibition-title-text { font-size: 32px; }
    .exhibition-meta {
        flex-wrap: wrap;
        gap: 24px;
        width: 100%;
    }
    .exhibition-meta-item { width: 45%; flex: 0 0 45%; }
}

/* =============================================
   8. PÁGINA DE PROYECTO INDIVIDUAL (single.php)
============================================= */
.Single-Project { width: 100%; display: block; }

.Single-Container {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 25px 40px 25px;
    position: relative;
}

@keyframes criswp-reveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal-text {
    opacity: 0;
    animation: criswp-reveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* --- Hero: primera imagen del contenido, 100vh menos 48px arriba y
   48px abajo, sin recortar ni deformar (object-fit: contain) --- */
.Single-Hero-Wrapper {
    margin: 48px 0;
    height: calc(100vh - 96px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.Single-Hero-Wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* --- Título pequeño --- */
.Single-TopBar {
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 60px;
}

.Single-Project-Title-Mobile { display: none; }

/* --- Subtítulo grande + descripción/awards a la derecha.
   La columna derecha ocupa 25vw de ancho fijo (más ancha que
   antes), en cualquier tamaño de pantalla de escritorio. --- */
.Single-MainGrid {
    display: grid;
    grid-template-columns: 1fr 25vw;
    gap: 80px;
    align-items: start;
    margin-bottom: 100px;
}

.Single-Headline {
    font-size: 95px;
    line-height: 1.05;
    font-weight: 400;
    margin: 0;
    letter-spacing: -1px;
    color: var(--color-text);
}

.Single-RightSide {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    width: 100%;
    justify-self: end;
    text-align: left;
}

.Single-MetaLabel { color: var(--color-text-dim); font-size: 16px; display: block; margin-bottom: 8px; }
.Single-AwardsBlock { margin-top: 50px; }

/* --- Contenido dinámico del editor (Gutenberg) --- */
.Single-DynamicContent {
    display: flex;
    flex-direction: column;
    width: 100%;
    clear: both;
}

.Single-DynamicContent > img,
.Single-DynamicContent > figure,
.Single-DynamicContent > .wp-block-image,
.Single-DynamicContent > .wp-block-embed,
.Single-DynamicContent > .wp-block-video {
    width: calc(100vw - 48px) !important;
    max-width: calc(100vw - 48px) !important;
    margin-left: calc(50% - 50vw + 24px) !important;
    margin-right: calc(50% - 50vw + 24px) !important;
    height: auto;
    margin-bottom: 24px;
    display: block;
}

.Single-DynamicContent .wp-block-embed__wrapper iframe,
.Single-DynamicContent video,
.Single-DynamicContent .wp-block-video video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
}

.Single-DynamicContent img { width: 100%; height: auto; display: block; }

.Single-DynamicContent > p,
.Single-DynamicContent > .wp-block-paragraph {
    width: 50%;
    margin-left: calc(50% + 12px) !important;
    font-size: 31px;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 48px;
    margin-top: 24px;
    box-sizing: border-box;
}

.side-layout,
.side-layout.wp-block-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 24px !important;
    width: calc(100vw - 48px) !important;
    max-width: calc(100vw - 48px) !important;
    margin-left: calc(50% - 50vw + 24px) !important;
    margin-right: calc(50% - 50vw + 24px) !important;
    margin-bottom: 24px !important;
    clear: both !important;
}

.side-layout.is-top { align-items: flex-start !important; }
.side-layout.is-center { align-items: center !important; }
.side-layout.is-bottom { align-items: flex-end !important; }

.side-layout > figure,
.side-layout > .wp-block-image,
.side-layout > div,
.side-layout > .wp-block-group {
    flex: 0 0 calc(50% - 12px) !important;
    max-width: calc(50% - 12px) !important;
    display: block !important;
    margin-bottom: 0 !important;
}

.side-layout p {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    max-width: 480px !important;
    display: block;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 12px !important;
}

/* --- Obras del proyecto: grid "6 columnas iguales" (imagen y su
   título ocupan el mismo ancho). Al hacer hover sobre una obra, el
   resto de obras (imagen + texto) bajan a 60% de opacidad. --- */
.Artworks-Section { margin-top: 60px; }

.artworks-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    column-gap: 24px;
    row-gap: 48px;
    align-items: start;
}

.artwork-item { display: contents; }

.artwork-image-wrapper {
    width: 100%;
    aspect-ratio: 210 / 297; /* proporción A4 */
    overflow: hidden;
    background-color: #cfcfcf;
    cursor: pointer;
    align-self: start;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.artworks-grid:hover .artwork-item:not(:hover) .artwork-image-wrapper {
    opacity: 0.6;
}

.artwork-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artwork-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    align-self: end;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.artworks-grid:hover .artwork-item:not(:hover) .artwork-info {
    opacity: 0.6;
}

.artwork-info h4 { font-size: 16px; font-weight: 400; margin: 0; color: var(--color-text); }
.artwork-info p { font-size: 16px; font-weight: 400; margin: 0; color: var(--color-text-dim); }

@media (max-width: 900px) {
    .artworks-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
    .artworks-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
}

/* --- Galería / lightbox de obras --- */
.artwork-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 100000;
    justify-content: center;
    align-items: center;
}
.artwork-lightbox.is-active { display: flex; }

.artwork-lightbox-inner {
    display: flex;
    gap: 60px;
    width: 90%;
    max-width: 1100px;
    height: 80vh;
    align-items: stretch;
}

.artwork-lightbox-image-wrap {
    flex: 1.4;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.artwork-lightbox-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.artwork-lightbox-side {
    flex: 0.6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 0;
}

.artwork-lightbox-close {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    transition: 0.3s;
    padding: 0;
}
.artwork-lightbox-close:hover { opacity: 0.6; }

.artwork-lightbox-close-desktop { display: block; align-self: flex-start; }
.artwork-lightbox-close-mobile { display: none; }

.artwork-lightbox-nav { font-size: 16px; color: var(--color-text); opacity: 0.8; }
.artwork-lightbox-nav button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    color: var(--color-text);
    padding: 0;
    transition: opacity 0.3s;
}
.artwork-lightbox-nav button:hover { opacity: 0.5; }

.artwork-lightbox-title { font-size: 16px; font-weight: 400; margin: 0 0 24px 0; color: var(--color-text); }
.lightbox-meta-row { margin-bottom: 24px; }
.lightbox-label { font-size: 16px; opacity: 0.4; margin: 0 0 4px 0; color: var(--color-text); }
.lightbox-value { font-size: 16px; margin: 0; opacity: 0.9; color: var(--color-text); }

/* --- Siguiente proyecto: la imagen ocupa el 50% del ancho,
   alineada a la derecha --- */
.Single-NextSection {
    margin-top: 150px;
    padding-top: 24px;
    border-top: 0.5px solid var(--color-text);
}
.Single-NextLink { color: var(--color-text); text-decoration: none !important; display: block; }
.Single-NextTitle { font-size: clamp(2rem, 5vw, 4.5rem); margin-top: 48px; margin-bottom: 0px; font-weight: 400; opacity: 0.5; transition: all 0.4s ease; }
.Single-NextThumb {
    width: 50%;
    margin: 24px auto 0 auto;
    height: 400px;
    overflow: hidden;
    display: block;
    opacity: 0.5;
    transition: opacity 0.6s ease;
}
.Single-NextThumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: top;
}

.Single-NextLink:hover .Single-NextTitle,
.Single-NextLink:hover .Single-NextThumb { opacity: 1; }

.animated-link { color: var(--color-text); text-decoration: none; position: relative; display: inline-block; }
.animated-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -1px;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}
.animated-link:hover::after { transform: scaleX(1); transform-origin: bottom left; }

@media (max-width: 1024px) {
    .Single-Container { padding: 24px 16px 40px 16px !important; }
    .Single-TopBar { display: none !important; }
    .Single-Project-Title-Mobile { display: block !important; font-size: 16px; margin-bottom: 24px; }

    .Single-MainGrid { display: flex; flex-direction: column; gap: 40px; margin-bottom: 60px; }
    .Single-Headline { font-size: 42px; line-height: 1.05; margin-bottom: 0 !important; }
    .Single-RightSide { width: auto; justify-self: auto; }

    .Single-DynamicContent > p,
    .Single-DynamicContent > .wp-block-paragraph { width: 100% !important; margin-left: 0 !important; font-size: 24px; }

    .Single-DynamicContent > img,
    .Single-DynamicContent > figure,
    .Single-DynamicContent > .wp-block-image,
    .Single-DynamicContent > .wp-block-embed,
    .Single-DynamicContent > .wp-block-video,
    .side-layout,
    .side-layout.wp-block-group {
        width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important;
        flex-direction: column !important;
    }

    .side-layout > figure,
    .side-layout > .wp-block-image,
    .side-layout > div,
    .side-layout > .wp-block-group {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Lightbox en móvil */
@media (max-width: 768px) {
    .artwork-lightbox-inner {
        flex-direction: column;
        height: 100vh;
        width: 100%;
        padding: 0;
        overflow-y: auto;
        justify-content: flex-start;
        gap: 0;
    }

    .artwork-lightbox-image-wrap {
        flex: none;
        height: 60vh;
        width: 100%;
        padding: 110px 24px 24px 24px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .artwork-lightbox-image-wrap img { max-height: 100%; max-width: 100%; width: auto; display: block; }

    .artwork-lightbox-side {
        flex: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0 !important;
    }

    .artwork-lightbox-close-desktop { display: none; }
    .artwork-lightbox-close-mobile {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        text-align: center;
        z-index: 100;
    }

    .artwork-lightbox-nav {
        width: 100%;
        text-align: center;
        padding: 0 20px 20px 20px;
        box-sizing: border-box;
    }

    .artwork-lightbox-info { width: 100%; padding: 30px 16px; box-sizing: border-box; }
    .artwork-lightbox-title { font-size: 18px; margin-bottom: 38px; line-height: 1.3; text-align: center; }
    .lightbox-meta-row { text-align: center; }
}

/* =============================================
   9. PÁGINA "ABOUT"
   El header sigue con mix-blend-mode: difference porque siempre
   está sobre la foto de fondo. El footer, en cambio, ya NO lleva
   ningún blend mode especial: se ve exactamente igual que en el
   resto de páginas (texto oscuro normal), y el bloque de cookies
   dentro de él usa el mismo diseño translúcido de la sección 3.
============================================= */
body.page-template-page-about-php {
    background-color: var(--color-bg) !important;
    margin: 0;
    padding: 0;
}

@media (min-width: 769px) {
    body.page-template-page-about-php {
        height: 100%;
        overflow: hidden;
    }
    body.page-template-page-about-php .site-footer {
        position: fixed !important;
        bottom: 0;
        left: 0;
        width: 100%;
    }
}

body.page-template-page-about-php .site-header {
    background-color: transparent;
    color: white;
    padding: 0 24px;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    flex-shrink: 0;
    z-index: 1000;
    position: relative;
    mix-blend-mode: difference;
}

body.page-template-page-about-php .header-nav a,
body.page-template-page-about-php .language-switcher li a,
body.page-template-page-about-php .logo-changing-part span {
    color: white;
}
body.page-template-page-about-php .header-nav a::after {
    background-color: white;
}
body.page-template-page-about-php .menu-toggle span {
    background-color: white;
}
body.page-template-page-about-php .header-center-img svg path {
    fill: white;
}

body.page-template-page-about-php .site-footer {
    z-index: 100000;
    position: relative;
}

.bg-portrait {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 15;
    pointer-events: none;
}
.bg-portrait img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%) contrast(110%); opacity: 0.9;
}

.about-wrapper {
    position: relative;
    z-index: 10;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 50px);
    box-sizing: border-box;
}

.main-content-about {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.text-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1100px;
    position: relative;
    z-index: 50;
    overflow-y: auto;
    max-height: 60vh;
}

.section-block { margin-bottom: 40px; z-index: 50; }

h4.about-title {
    font-size: 16px;
    color: var(--color-text-dim);
    font-weight: 400;
    margin-bottom: 20px;
}

.section-block p, .section-block li, .section-block div {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: var(--color-text);
}

.section-block a {
    color: inherit;
    text-decoration: none;
    position: relative;
    display: inline-block;
}
.section-block a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-text);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}
.section-block a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.headline-desktop {
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    padding: 20px 24px 100px 24px;
    text-align: center;
    position: relative;
    z-index: 5;
    max-width: 1600px;
    width: 100%;
}
.main-headline {
    font-weight: 400;
    font-size: 95px;
    line-height: 1.1;
    color: var(--color-text);
    margin: 0;
}

.show-on-mobile { display: none; }
.mobile-divider { display: none; }

@media (max-width: 768px) {
    body.page-template-page-about-php { overflow: auto; height: auto; }

    body.page-template-page-about-php .site-header { padding: 0 16px; }

    .about-wrapper {
        display: block;
        height: auto;
        padding: 0 16px;
    }

    .main-content-about {
        display: block;
        margin-top: 20px;
        overflow: visible;
    }

    .headline-desktop { display: none !important; }
    .hide-on-desktop { display: block !important; }
    .hide-on-mobile { display: none !important; }

    .bg-portrait.show-on-mobile {
        position: relative;
        height: 50vh;
        width: 100%;
        margin-left: 0;
        z-index: 1;
        overflow: hidden;
    }
    .bg-portrait img {
        height: 120%;
        width: 100%;
        object-fit: cover;
        display: block;
    }

    .headline-mobile-container {
        position: absolute;
        bottom: 24px;
        left: 16px;
        width: calc(100% - 32px);
        z-index: 20;
    }
    .headline-mobile-container .main-headline {
        font-size: 34px;
        color: var(--color-text);
        text-align: left;
        padding-left: 0;
        line-height: 1.3;
    }

    .mobile-divider {
        display: block;
        width: auto;
        height: 1px;
        background-color: var(--color-text);
        margin-left: -16px;
        margin-right: -16px;
    }
    .divider-top {
        margin-top: -20px;
        margin-bottom: 40px;
    }
    .divider-bottom {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .text-columns {
        grid-template-columns: 1fr;
        gap: 0;
        z-index: auto;
        max-height: none;
        overflow: visible;
    }

    .section-block p, .section-block li, .section-block div, .section-block a { color: var(--color-text) !important; }
    h4.about-title { color: var(--color-text-dim); }

    body.page-template-page-about-php .site-footer { position: relative !important; }
}