/* lo principall */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
}

body {
    background-color: #111;
    color: white;
}

.navbar {
    background-color: #1a1a1a;
    padding: 15px 40px;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.detalle-nav {
    padding-bottom: 20px;
}

.menu {
    list-style: none;
    display: flex;
    gap: 30px;
    white-space: nowrap;
}

.menu a {
    text-decoration: none;
    color: #ccc;
    font-size: 16px;
}

.menu a:hover {
    color: #fff;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    max-width: 180px;
    display: block;
    border: none;
    object-fit: contain;
}

.hamburger {
    display: none;
    font-size: 26px;
    cursor: pointer;
}

main {
    padding: 60px 40px;
}

.seccion {
    display: none;
}

.seccion.activa {
    display: block;
}


/* pag principal co logo giratoio */
#bienvenida {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background-color: #111;
    display: none;
}

#bienvenida.activa {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contenedor-bienvenida {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
}

/* Contenedor del logo en PC (Computador) */
.logo-orbita-container {
    perspective: 1000px;
    padding-top: 50px;
    margin-bottom: 140px;
    width: 90%;     
    max-width: 550px;   
    height: 160px;
    position: relative;
    margin-left: auto;   
    margin-right: auto;
}

/* Responsive para Tablets */
@media (max-width: 768px) {
    .logo-orbita-container {
        height: 100px;
        margin-bottom: 100px;
    }
}

/* Responsive para Celular (Evita que el logo aplaste los botones) */
@media (max-width: 480px) {
    .logo-orbita-container {
        height: 80px;
        margin-bottom: 120px;
    }
}

/* Apila y separa los botones ES / EN en el celular */
@media (max-width: 600px) {
    .bienvenida-botones {
        flex-direction: column;
        gap: 40px; 
        margin-top: 20px;
    }
}

.logo-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: orbitY 8s linear infinite;
}

.logo-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateZ(var(--z));
}

@keyframes orbitY {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.contenedor-bienvenida h1 {
    font-size: 1rem;
    letter-spacing: 2px;
    padding-top: 80px;
    padding-bottom: 20px;
    font-weight: lighter;
    font-style: italic;
    color: #ccc;
    opacity: 0;
    animation: aparecerSuave 1s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes aparecerSuave {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-entrar {
    font-size: 0.7rem;
    background-color: transparent;
    color: white;
    border: 1px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 70px;
    padding: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: aparecerSuave 1s ease-out forwards;
    animation-delay: 1s;
}

.btn-entrar:hover {
    transform: scale(1.05);
}


/* ESTILOS DEL VISOR DE IMÁGENES GLOBAL Y FLECHAS */
.visor-imagen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.visor-imagen.activo {
    display: flex;
}

.visor-imagen img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    object-fit: contain; 
    cursor: auto;
}

.cerrar-visor {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    font-weight: bold;
    z-index: 10001;
}

.prev-visor, .next-visor {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px;
    user-select: none;
    transition: color 0.3s ease;
    z-index: 10000;
}

.prev-visor:hover, .next-visor:hover {
    color: #888;
}

.prev-visor { left: 10px; }
.next-visor { right: 10px; }

@media (max-width: 600px) {
    .prev-visor, .next-visor {
        font-size: 30px;
        padding: 10px;
    }
    .cerrar-visor {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}


/* seccion de mi */
.contenedor-acerca {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80%;
    padding: 40px 5%;
    gap: 40px;
}

.acerca-sup {
    text-align: center;
    width: 100%;
}

.acerca-sup h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.subtitulo-acerca {
    font-size: 1.2rem;
    color: #888;
    font-weight: normal;
}

.acerca-medio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    width: 100%;
    margin-top: 30px;
}

.texto-acerca {
    flex: 1;
    text-align: center;
}

.texto-acerca p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
}

.imagen-yo {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.imagen-yo img {
    width: 350px;
    height: 350px;
    object-fit: cover;
}

.acerca-abajo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

.redes-sociales {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.btn-social i {
    font-size: 18px;
    color: black;
}

.btn-social:hover {
    transform: translateY(-5px);
    background-color: #ddd;
}

/* LA ANIMACIÓN DE INTERSECTION OBSERVER */
.animado {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.animado.mostrar {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .acerca-medio {
        flex-direction: column-reverse;
        gap: 30px;
    }
    .imagen-yo img {
        width: 250px;
        height: 250px;
    }
}


/* cv */
.titulo-perfil {
    text-align: center;
    padding: 30px 0;
    font-size: 1.5rem;
}

.contenedor-cv {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5%;
    gap: 50px;
    align-items: flex-start;
    color: #ddd;
    text-align: left;
}

.columna-izq {
    flex: 1;
    max-width: 350px;
    border-right: 1px solid #333;
    padding-right: 30px;
}

.columna-der {
    flex: 2;
}

.bloque-cv h3 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 15px;
    border-bottom: 2px solid #555;
    padding-bottom: 5px;
    display: inline-block;
}

.columna-izq ul {
    list-style: none;
    padding: 0;
}

.columna-izq li {
    margin-bottom: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.columna-izq li:hover {
    transform: translateX(10px);
    color: #fff;
}

.cv {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
}

.cv:hover {
    border-left-color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 20px;
}

@media (max-width: 900px) {
    .contenedor-cv {
        flex-direction: column;
    }
    .columna-izq {
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #333;
        padding-right: 0;
        padding-bottom: 30px;
    }
}


/* seccion de proyectos */
html {
    scroll-behavior: smooth;
}

.portada-proyectos {
    padding-top: 60px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.portada-proyectos h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.portada-proyectos p {
    font-size: 1.2rem;
    color: #888;
}

.flecha-bajar {
    display: block;
    width: 25px;
    height: 25px;
    border-bottom: 3px solid white;
    border-right: 3px solid white;
    transform: rotate(45deg);
    margin-top: 40px;
    animation: flotar 2s infinite;
}

@keyframes flotar {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(5px, 5px); }
}

/* =========================================
   GALERÍA DE PROYECTOS (GRID LIMPIO 2x2)
   ========================================= */
.contenedor-galeria {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Cuadrícula exacta de 2 columnas */
    gap: 30px;
    padding: 50px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.proyecto {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/10; /* Proporción apaisada y elegante para todas las tarjetas */
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px; 
    text-decoration: none !important; 
}

.proyecto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.2, 1);
}

/* Overlay limpio con texto fijo al pasar el ratón */
.info-overlay {
    position: absolute;
    bottom: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    align-items: flex-start;
    padding: 35px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.info-overlay h3 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #ffffff !important; 
    transform: translateY(15px);
    transition: transform 0.4s ease;
}

.info-overlay p {
    font-size: 0.9rem;
    color: #dddddd !important; 
    font-weight: 300;
    transform: translateY(15px);
    transition: transform 0.4s ease 0.05s; 
}

.proyecto:hover .info-overlay { opacity: 1; }
.proyecto:hover .info-overlay h3, 
.proyecto:hover .info-overlay p { transform: translateY(0); }
.proyecto:hover img { transform: scale(1.05); }

/* RESPONSIVE MÓVIL: Una sola columna */
@media (max-width: 768px) {
    .contenedor-galeria {
        grid-template-columns: 1fr; /* Todo a una columna en teléfonos */
        gap: 20px;
    }
    .proyecto {
        aspect-ratio: 4/3;
    }
    .info-overlay { padding: 25px; }
    .info-overlay h3 { font-size: 1.4rem; }
}

/* =========================================
   FOOTER PREMIUM
   ========================================= */
.footer-premium {
    background-color: #050505; /* Un negro un poco más profundo que el fondo */
    border-top: 1px solid #222;
    padding: 40px 5%;
    margin-top: 60px;
}

.footer-contenido {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-izq p {
    color: #8a8a8a;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 300;
}

.footer-centro {
    display: flex;
    gap: 25px;
}

.footer-centro a {
    color: #8a8a8a;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-centro a:hover {
    color: #fff;
    transform: translateY(-3px);
}

.footer-der .btn-arriba {
    color: #888;
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.footer-der .btn-arriba:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .footer-contenido {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}
/* -----------------------------------
   NEMYX (DISEÑO INTERCALADO MODULAR)
----------------------------------- */
#nemyx { padding-bottom: 30px; }
.titulo-nemyx { text-align: center; margin-bottom: 40px; padding: 0 5%; }
.titulo-nemyx h1 { font-size: 1.5rem; letter-spacing: 2px; margin-bottom: 10px; }
.titulo-nemyx .subtitulo { font-size: 1.2rem; color: #888; font-weight: normal; }
.nemyx-contenido { padding: 0 5%; }

/* Estructura base de PC: Flexbox al 60/40 */
.nemyx-seccion-intercalada {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    width: 100%;
}

/* Invierte el orden en el bloque del medio para que se vea dinámico en PC */
.nemyx-seccion-intercalada.invertido {
    flex-direction: row-reverse;
}

.nemyx-galeria-cuadricula {
    flex: 1.5; /* Ocupa más espacio que el texto */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.nemyx-galeria-cuadricula img, 
.nemyx-galeria-cuadricula video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1; /* Cuadros perfectos siempre */
    display: block;
}

.nemyx-texto-bloque {
    flex: 1; /* Ocupa menos espacio */
    text-align: center;
    padding: 0 20px;
}

.nemyx-texto-bloque p {
    color: #ccc;
    line-height: 1.6;
    font-size: 1rem;
}

.nemyx-video-final-container {
    width: 100%;
    margin-bottom: 40px;
}

.nemyx-video-final-container video {
    width: 100%;
    aspect-ratio: 16/9; /* Apaisado para PC */
    object-fit: cover;
    display: block;
}

.video-zoom, .img-zoom {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-zoom:hover, .img-zoom:hover {
    transform: scale(1.02);
}

/* RESPONSIVE MÓVIL: FORZADO AL ORDEN EXACTO */
@media (max-width: 768px) {
    .nemyx-seccion-intercalada, 
    .nemyx-seccion-intercalada.invertido {
        flex-direction: column !important; /* Rompe el intercalado de PC y apila todo */
        gap: 20px;
        margin-bottom: 50px;
    }
    
    .nemyx-galeria-cuadricula {
        width: 100%;
        order: -1 !important; /* Magia negra: Fuerza siempre la galería arriba del texto */
    }
    
    .nemyx-texto-bloque {
        width: 100%;
        padding: 0;
        order: 0 !important; /* Texto abajo */
    }
}

@media (max-width: 480px) {
    .nemyx-galeria-cuadricula { gap: 10px; }
}


/* FICHA DE PROYECTO (reto / rol / materiales) — reutilizable en todos los proyectos */
.proyecto-ficha {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 60px auto;
    padding: 25px 5%;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
}
.ficha-item h4 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
}
.ficha-item p {
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* NEMYX: galería técnica (imágenes alargadas sin recortar) */
.nemyx-galeria-tecnica {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.nemyx-galeria-tecnica img {
    width: 100%;
    height: auto;
    display: block;
    background-color: #1a1a1a;
}

/* NEMYX: botón de sonido sobre el vídeo final */
.nemyx-video-marco { position: relative; }
.btn-sonido {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: auto;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    transition: background-color 0.3s ease;
    z-index: 2;
}
.btn-sonido:hover { background-color: rgba(255, 255, 255, 0.15); }
.nemyx-video-nota {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 15px;
    letter-spacing: 1px;
}
.nemyx-video-credito {
    text-align: center;
    color: #8a8a8a;
    font-size: 0.75rem;
    line-height: 1.5;
    max-width: 700px;
    margin: 8px auto 0 auto;
}

@media (max-width: 768px) {
    .proyecto-ficha {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
        margin-bottom: 40px;
    }
    .nemyx-galeria-tecnica { width: 100%; order: -1 !important; }
    .btn-sonido { right: 10px; bottom: 10px; padding: 8px 14px; font-size: 0.7rem; }
}

/* -----------------------------------
   AMMA (DISEÑO INTERCALADO MODULAR)
----------------------------------- */
#amma { padding-bottom: 30px; }
.titulo-amma { text-align: center; margin-bottom: 40px; padding: 0 5%; }
.titulo-amma h1 { font-size: 1.5rem; letter-spacing: 2px; margin-bottom: 10px; }
.titulo-amma .subtitulo { font-size: 1.2rem; color: #888; font-weight: normal; }
.amma-contenido { padding: 0 5%; }

/* Estructura base de PC: Flexbox al 60/40 */
.amma-seccion-intercalada {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    width: 100%;
}

/* Invierte el orden en el bloque del medio en PC */
.amma-seccion-intercalada.invertido {
    flex-direction: row-reverse;
}

/* Contenedor de 4 fotos (Bloque 1) */
.amma-galeria-cuadricula {
    flex: 1.5;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.amma-galeria-cuadricula img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
    display: block;
}

/* Contenedor de imagen única central (Bloque 2) */
.amma-imagen-destacada {
    flex: 1.5;
}
.amma-imagen-destacada img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Contenedor de 6 fotos (Bloque 3) */
.amma-galeria-seis {
    flex: 1.5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.amma-galeria-seis img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    display: block;
}

/* Texto para los tres bloques */
.amma-texto-bloque {
    flex: 1;
    text-align: center;
    padding: 0 20px;
}
.amma-texto-bloque p {
    color: #ccc;
    line-height: 1.6;
    font-size: 1rem;
}

.amma-footer {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* RESPONSIVE MÓVIL: FORZADO AL ORDEN EXACTO (FOTOS ARRIBA, TEXTO ABAJO) */
@media (max-width: 768px) {
    .amma-seccion-intercalada, 
    .amma-seccion-intercalada.invertido {
        flex-direction: column !important;
        gap: 20px;
        margin-bottom: 50px;
    }
    
    /* Obligamos a todas las fotos a ir arriba del texto correspondiente */
    .amma-galeria-cuadricula,
    .amma-imagen-destacada,
    .amma-galeria-seis {
        width: 100%;
        order: -1 !important; 
    }
    
    .amma-galeria-seis {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil queda mejor para 6 fotos */
    }
    
    .amma-texto-bloque {
        width: 100%;
        padding: 0;
        order: 0 !important; 
    }
}

@media (max-width: 480px) {
    .amma-galeria-cuadricula,
    .amma-galeria-seis { 
        gap: 10px; 
    }
}



/* AMMA: del boceto a la visualización */
.amma-proceso {
    max-width: 1100px;
    margin: 0 auto 40px auto;
    text-align: center;
}
.amma-proceso-titulo {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 25px;
}
.amma-proceso-imgs {
    display: grid;
    grid-template-columns: 1236fr 1600fr; /* proporción de cada imagen: misma altura, sin recortes */
    gap: 15px;
}
.amma-proceso-imgs img {
    width: 100%;
    height: auto;
    display: block;
}
.amma-proceso-nota {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 20px;
}
@media (max-width: 768px) {
    .amma-proceso-imgs { grid-template-columns: 1fr; }
}


/* AMMA: cómo funciona (3 funciones) */
.amma-funciones-titulo { text-align: center; margin-top: 20px; }
.amma-funcion { max-width: 1100px; margin: 0 auto 60px auto; }
.amma-funcion-cabecera {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}
.amma-funcion-num {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    color: #7a7a7a;
}
.amma-funcion-cabecera h4 { font-size: 1.1rem; font-weight: 500; margin-bottom: 6px; }
.amma-funcion-cabecera p { color: #aaa; font-size: 0.95rem; line-height: 1.5; }
.amma-funcion-imgs {
    display: grid;
    grid-template-columns: repeat(var(--n), 1fr);
    gap: 12px;
}
.amma-funcion-imgs figure { margin: 0; }
.amma-funcion-imgs img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}
.amma-funcion-imgs figcaption {
    color: #999;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 8px;
}
@media (max-width: 768px) {
    .amma-funcion-imgs { grid-template-columns: repeat(2, 1fr); }
    .amma-funcion-num { font-size: 2rem; }
}


/* =========================================
   BLOQUES REUTILIZABLES DE PROYECTO (imagen + texto)
   ========================================= */
.p-bloque {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}
.p-bloque.invertido { flex-direction: row-reverse; }
.p-galeria { flex: 1.5; display: grid; gap: 15px; }
.p-galeria-2 { grid-template-columns: repeat(2, 1fr); }
.p-galeria-3 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p-galeria img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3/4; }
.p-galeria.p-panoramica img { aspect-ratio: 16/9; }
.p-galeria.p-vertical img { aspect-ratio: 4/5; }
.p-texto { flex: 1; text-align: center; padding: 0 20px; }
.p-texto p { color: #ccc; line-height: 1.6; font-size: 1rem; }

.p-etiqueta {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
}
.p-pasos-bloque { max-width: 1100px; margin: 0 auto 70px auto; text-align: center; }
.p-pasos-intro { color: #ccc; margin-bottom: 25px; }
.p-pasos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.p-pasos figure { margin: 0; }
.p-pasos img { width: 100%; aspect-ratio: 9/10; object-fit: cover; display: block; }
.p-pasos figcaption { color: #999; font-size: 0.85rem; margin-top: 8px; }

.p-ancho { margin-bottom: 50px; }
.p-ancho img, .p-ancho video { width: 100%; height: auto; display: block; }
.p-plano { max-width: 900px; margin-left: auto; margin-right: auto; }
.p-nota { text-align: center; color: #888; font-size: 0.85rem; margin-top: 12px; letter-spacing: 1px; }

@media (max-width: 768px) {
    .p-bloque, .p-bloque.invertido { flex-direction: column; gap: 20px; margin-bottom: 50px; }
    .p-galeria { width: 100%; order: -1; }
    .p-texto { width: 100%; padding: 0; order: 0; }
    .p-pasos { grid-template-columns: repeat(3, 1fr); }
}


/* =========================================
   CASO DE ESTUDIO EDITORIAL (común a todos los proyectos)
   ========================================= */
.cs-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 21/9;
    overflow: hidden;
    margin-bottom: 80px;
    background: #000;
}
.cs-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 50%;
    display: block;
}
.cs-hero-texto {
    position: absolute;
    left: 5%;
    bottom: 10%;
}
.cs-hero h1 {
    /* Mismo tamaño en todos los proyectos (cabe incluso "Dior's Embrace") */
    font-size: clamp(2.8rem, 8vw, 7rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 0.9;
    margin: 0;
}
.cs-hero p {
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    font-weight: 300;
    color: #bbb;
    margin-top: 14px;
}

.cs { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

.cs-frase {
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    font-weight: 300;
    line-height: 1.3;
    max-width: 22em;
    margin-bottom: 60px;
}

.cs-datos {
    display: grid;
    grid-template-columns: 2fr 1.4fr 1fr 1.2fr;
    gap: 30px;
    padding: 28px 0;
    border-top: 1px solid #2c2c2c;
    border-bottom: 1px solid #2c2c2c;
    margin-bottom: 110px;
}
.cs-datos dt { color: #949494; font-size: 0.85rem; margin-bottom: 8px; }
.cs-datos dd { margin: 0; color: #ddd; font-size: 0.95rem; line-height: 1.5; }

.cs-fila {
    display: grid;
    gap: 70px;
    align-items: center;
    margin-bottom: 120px;
}
.cs-fila-concepto { grid-template-columns: 5fr 6fr; }   /* texto | foto grande */
.cs-fila-proceso  { grid-template-columns: 7fr 5fr; }   /* imágenes | texto */
.cs-fila-luz      { grid-template-columns: 6fr 4fr; }   /* texto | foto media */

.cs-texto h2, .cs-montaje h2, .cs-banda-titulo {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 22px;
}
.cs-texto p {
    color: #bbb;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 34em;
    margin-bottom: 14px;
}

.cs-foto-alta, .cs-foto-media, .cs-video { margin: 0; }
.cs-foto-alta img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.cs-foto-media img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }

.cs-mosaico {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cs-mosaico img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.cs-mosaico .cs-mosaico-grande { grid-column: 1 / -1; }

.cs-montaje { margin-bottom: 120px; }
.cs-pasos {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    counter-reset: paso;
    padding: 0;
}
.cs-pasos li { counter-increment: paso; color: #ccc; font-size: 0.95rem; }
.cs-pasos img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; margin-bottom: 12px; }
.cs-pasos li::before {
    content: counter(paso);
    display: block;
    font-size: 2rem;
    font-weight: 300;
    color: #7a7a7a;
    margin-bottom: 8px;
}

.cs-banda { margin-bottom: 120px; }
.cs-banda-titulo { padding: 0 5%; max-width: 1200px; margin-left: auto; margin-right: auto; }
.cs-banda-fotos {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}
.cs-banda-fotos img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.cs-banda-fotos .img-zoom:hover { transform: none; filter: brightness(1.15); }

.cs-video { margin-bottom: 40px; }
.cs-video video { width: 100%; display: block; }
.cs-video figcaption { color: #949494; font-size: 0.9rem; margin-top: 12px; }

@media (max-width: 900px) {
    .cs-hero { aspect-ratio: 4/5; margin-bottom: 50px; }
    .cs-hero img { object-position: 75% 50%; }
    .cs-datos { grid-template-columns: 1fr 1fr; margin-bottom: 70px; }
    .cs-fila, .cs-fila-concepto, .cs-fila-proceso, .cs-fila-luz { grid-template-columns: 1fr; gap: 30px; margin-bottom: 80px; }
    .cs-fila-proceso .cs-mosaico { order: 2; }
    .cs-pasos {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 42%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 10px;
    }
    .cs-pasos li { scroll-snap-align: start; }
    .cs-banda-fotos { grid-template-columns: repeat(3, 1fr); }
    .cs-montaje, .cs-banda { margin-bottom: 80px; }
}
@media (max-width: 480px) {
    .cs-datos { grid-template-columns: 1fr; gap: 18px; }
}


/* Portada: degradado para que el título se lea sobre fotos claras, y soporte de vídeo */
.cs-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 45%, transparent 70%);
    pointer-events: none;
}
.cs-hero-texto { z-index: 1; }
.cs-hero video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-hero .video-zoom:hover { transform: none; }
.cs-hero .btn-sonido { right: 5%; bottom: 10%; }
.cs-credito { max-width: 1200px; margin: -60px auto 70px auto; padding: 0 5%; color: #8a8a8a; font-size: 0.75rem; line-height: 1.5; }

/* Pareja de fotos verticales */
.cs-par { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.cs-par img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }

/* Mosaico con imágenes en su proporción natural (bocetos, planos) */
.cs-natural { display: grid; gap: 12px; align-items: start; }
.cs-natural img { width: 100%; height: auto; display: block; background: #fff; }

/* Pasos: admite vídeo además de imagen */
.cs-pasos video { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; margin-bottom: 12px; }

/* Banda a todo ancho con número de columnas variable */
.cs-banda-fotos { grid-template-columns: repeat(var(--n, 6), 1fr); }
.cs-banda-fotos.cs-banda-cuadrada img { aspect-ratio: 1/1; }
.cs-banda-fotos.cs-banda-apaisada img { aspect-ratio: 4/3; }

/* Cifras de la investigación */
.cs-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 10px 0 28px 0; }
.cs-cifras strong { display: block; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 300; line-height: 1; margin-bottom: 8px; }
.cs-cifras small { font-size: 0.45em; color: #888; margin-left: 2px; }
.cs-cifras span { color: #999; font-size: 0.85rem; line-height: 1.4; display: block; }

.cs-montaje .amma-funcion { max-width: none; margin: 0 0 50px 0; }
.cs-montaje .amma-funcion:last-child { margin-bottom: 0; }
.cs-bocetos { margin-bottom: 100px; }
.cs-cifras-col { grid-template-columns: 1fr; gap: 34px; margin: 0; }
.cs-cifras-col strong { font-size: clamp(2.4rem, 5vw, 4rem); }
.cs-cifras-col div { border-top: 1px solid #2c2c2c; padding-top: 18px; }
.cs-diagrama { margin: 0 0 60px 0; }
.cs-bocetos .cs-texto { margin-bottom: 30px; }
.cs-bocetos-laminas { gap: 16px; }
.cs-bocetos-laminas img { background: #fff; }
.cs-bocetos .cs-nota-ia { margin-top: 18px; }
.cs-nota-ia, .cs-texto .cs-nota-ia { color: #888; font-size: 0.85rem; border-left: 2px solid #444; padding-left: 12px; }

@media (max-width: 900px) {
    .cs-bocetos-laminas { grid-template-columns: 1fr !important; }
    .cs-credito { margin-top: -30px; margin-bottom: 50px; }
    .cs-banda-fotos { grid-template-columns: repeat(var(--n-movil, 3), 1fr); }
    .cs-hero .btn-sonido { bottom: 6%; }
}


/* Portadas y bandas con el mismo margen que el resto del contenido (nunca de borde a borde).
   .cs usa max-width 1200px y padding lateral 5%, así que el ancho útil es min(1200px, 100%) - 10%. */
.cs-hero, .cs-banda {
    width: calc(min(1200px, 100%) - 10%);
    margin-left: auto;
    margin-right: auto;
}
.cs-banda-titulo { padding: 0; max-width: none; }
/* Portada con la imagen entera a la derecha y el título sobre el fondo negro (fotos con fondo negro) */
.cs-hero-derecha img { object-fit: contain; object-position: right center; }
.cs-hero-derecha::after { display: none; }
.cs-banda-fotos { gap: 12px; }


/* Portada con foto clara: título oscuro y sin degradado */
.cs-hero-claro { background: #eee; }
.cs-hero-claro::after { display: none; }
.cs-hero-claro h1 { color: #141414; }
.cs-hero-claro p { color: #7a7a7a; }

/* Proceso en lista: texto a la izquierda, tira de imágenes a la derecha */
.cs-proceso-lista { list-style: none; padding: 0; margin: 0; counter-reset: fase; }
.cs-proceso-lista li {
    counter-increment: fase;
    display: grid;
    grid-template-columns: 3fr 8fr;
    gap: 40px;
    align-items: center;
    padding: 28px 0;
    border-top: 1px solid #2c2c2c;
}
.cs-proceso-lista li:last-child { border-bottom: 1px solid #2c2c2c; }
.cs-proceso-lista h3 { font-size: 1.05rem; font-weight: 400; margin-bottom: 8px; }
.cs-proceso-lista h3::before { content: counter(fase); display: block; font-size: 2rem; font-weight: 300; color: #7a7a7a; margin-bottom: 6px; }
.cs-proceso-lista p { color: #aaa; font-size: 0.92rem; line-height: 1.6; }
.cs-proceso-lista img { width: 100%; height: auto; display: block; background: #fff; }

/* Fila con vídeo vertical */
.cs-fila-video { grid-template-columns: 4fr 7fr; }
.cs-video-vertical { margin: 0; }
.cs-video-vertical video { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; }

@media (max-width: 900px) {
    .cs-proceso-lista li { grid-template-columns: 1fr; gap: 16px; }
    .cs-fila-video { grid-template-columns: 1fr; }
    .cs-video-vertical { max-width: 360px; }
}


.cs-pasos-4 { grid-template-columns: repeat(4, 1fr); }
.cs-foto-apaisada img { aspect-ratio: 4/3; }
@media (max-width: 900px) { .cs-pasos-4 { grid-auto-columns: 60%; } }

.cs-video-cuadrado { margin: 0; }
.cs-video-cuadrado video { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

/* Antes y después: dos columnas iguales con etiqueta arriba */
.cs-antes-despues {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 110px;
}
.cs-antes-despues figure { margin: 0; }
.cs-antes-despues figcaption { font-size: 1.3rem; font-weight: 400; margin-bottom: 14px; }
.cs-antes-despues img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.cs-antes-despues p { color: #999; font-size: 0.9rem; line-height: 1.5; margin-top: 12px; }
@media (max-width: 600px) {
    .cs-antes-despues { gap: 12px; margin-bottom: 70px; }
    .cs-antes-despues figcaption { font-size: 1.05rem; }
}

.cs-lista { list-style: none; padding: 0; margin: 6px 0 0 0; max-width: 34em; }
.cs-lista li { color: #bbb; line-height: 1.6; padding: 10px 0; border-top: 1px solid #2c2c2c; }
.cs-lista li:last-child { border-bottom: 1px solid #2c2c2c; }

.cs-par-leyenda figure { margin: 0; }
.cs-par-leyenda figcaption { color: #999; font-size: 0.85rem; margin-top: 8px; }

/* Títulos de portada largos */
.cs-hero-texto h1, .cs-hero-texto p { text-shadow: 0 1px 12px rgba(0,0,0,0.35); }
.cs-hero-claro .cs-hero-texto h1, .cs-hero-claro .cs-hero-texto p { text-shadow: none; }

/* Resultado: texto arriba y mosaico con vídeo vertical + dos fotos apiladas */
.cs-resultado { margin-bottom: 100px; }
.cs-resultado .cs-texto { margin-bottom: 30px; }
.cs-mosaico-video {
    display: grid;
    grid-template-columns: 0.84fr 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
}
.cs-mosaico-video video {
    grid-row: 1 / 3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cs-mosaico-video img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
@media (max-width: 900px) {
    .cs-mosaico-video { grid-template-columns: 1fr; }
    .cs-mosaico-video video { grid-row: auto; aspect-ratio: 9/16; max-height: 80vh; }
}



/* SOLERIS: resplandor cálido de fondo, como el halo de la lámpara en la pared */
#soleris {
    background:
        radial-gradient(55% 32% at 78% 14%, rgba(255, 184, 108, 0.11), transparent 70%),
        radial-gradient(45% 30% at 22% 48%, rgba(255, 170, 92, 0.07), transparent 70%),
        radial-gradient(55% 28% at 70% 88%, rgba(255, 184, 108, 0.08), transparent 70%);
}


/* Proceso en blanco y negro (2x2) con números que enlazan con la lista */
.cs-proceso-bn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-proceso-bn figure { margin: 0; position: relative; }
.cs-proceso-bn img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.cs-proceso-bn figcaption {
    position: absolute; left: 8px; top: 8px;
    font-size: 0.85rem; color: #fff; line-height: 1;
    background: rgba(0,0,0,0.6); padding: 5px 8px;
}
.cs-lista-num { counter-reset: tec; }
.cs-lista-num li { counter-increment: tec; display: grid; grid-template-columns: 2em 1fr; }
.cs-lista-num li::before { content: counter(tec); color: #949494; }


/* Logo del cliente encima del título del bloque */
.cs-logo-cliente { width: 72px; height: auto; display: block; margin-bottom: 22px; }
/* Pareja de fotos cuadradas */
.cs-par-cuadrado img, .cs-par-cuadrado video { aspect-ratio: 1/1; }
.cs-par video { width: 100%; object-fit: cover; display: block; }


/* CIERRE de cada proyecto: la imagen más potente, en grande y con el mismo margen */
.cs-cierre {
    width: calc(min(1200px, 100%) - 10%);
    margin: 0 auto 40px auto;
}
.cs-cierre img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
/* Pareja vídeo vertical + foto (Dior) */
.cs-par-video video { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
@media (max-width: 900px) { .cs-cierre img { aspect-ratio: 4/5; } }

/* 1eer proyecto estilos ondara */
.ondara-titulo {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

.ondara-contenido {
    padding: 0 5%;
}

.ondara-titulo h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.ondara-titulo .subtitulo {
    font-size: 1.2rem;
    color: #888;
    font-weight: normal;
}

.ondara-sup {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 50px;
}

.ondara-img-principal {
    flex: 1;
}

.ondara-img-principal img {
    width: 100%;
    height: auto;
}

.ondara-descripcion {
    flex: 1;
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: center;
}

.ondara-galeria {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ondara-galeria img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.ondara-video {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.ondara-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 900px) {
    .ondara-sup {
        display: flex !important;
        flex-direction: column !important;
        text-align: center;
        gap: 20px;
    }
    .ondara-img-principal {
        width: 100% !important;
        order: -1 !important;
    }
    .ondara-descripcion {
        width: 100% !important;
        order: 0 !important;
    }
    .ondara-galeria {
        grid-template-columns: 1fr;
    }
}

/* 2do proyecto estilos naya */
.titulo-naya {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

.titulo-naya .subtitulo {
    font-size: 1.2rem;
    color: #888;
    font-weight: normal;
}

.cuadricula-proyecto {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0 5%;
}

.bloque-sup-naya {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.cuadricula-fotos-modelo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cuadricula-fotos-modelo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 3/4;
}

.texto-descripcion {
    padding: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ddd;
    text-align: center;
}

.bloque-medio {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.bloque-medio img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.bloque-inferior .img-full {
    width: 100%;
    height: auto;
    display: block;
    align-items: center;
}

@media (max-width: 768px) {
    .bloque-sup-naya {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
    }
    .cuadricula-fotos-modelo {
        width: 100% !important;
        order: -1 !important;
    }
    .texto-descripcion {
        width: 100% !important;
        text-align: center;
        padding: 0 !important;
        order: 0 !important;
    }
    .bloque-medio {
        grid-template-columns: 1fr 1fr;
    }
}

/* 3er proyecto estilos dior */
.dior-titulo {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

.dior-contenido {
    padding: 0 5%;
}

.dior-titulo h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.dior-titulo .subtitulo {
    font-size: 1.2rem;
    color: #888;
    font-weight: normal;
}

.dior-sup {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 50px;
}

.dior-img-principal {
    flex: 1;
}

.dior-img-principal img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1/1;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.dior-descripcion {
    flex: 1;
    color: #ccc;
    text-align: center;
    padding-left: 40px;
    font-size: 1rem;
    line-height: 1.8;
}

.dior-galeria {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dior-galeria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.dior-video {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 9 / 16; /* Forzamos formato vertical correcto */
    grid-column: span 1;  
}

.dior-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 900px) {
    .dior-sup {
        display: flex !important;
        flex-direction: column !important;
        text-align: center;
        gap: 20px;
    }
    .dior-img-principal {
        width: 100% !important;
        order: -1 !important;
    }
    .dior-descripcion {
        width: 100% !important;
        padding-left: 0 !important;
        order: 0 !important;
    }
    .dior-galeria {
        grid-template-columns: 1fr;
    }
}

/* proyecto 4 oj Napoli */
.titulo-napoli {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

.napoli-contenido {
    padding: 0 5%;
}

.titulo-napoli h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.titulo-napoli .subtitulo {
    font-size: 1.2rem;
    color: #888;
    font-weight: normal;
}

.napoli-sup {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
}

.napoli-descripcion {
    flex: 1;
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
    text-align: center;
}

.napoli-sup-imgs {
    flex: 1.5;
    display: flex;
    gap: 15px;
    padding-right: 1.5%;
}

.napoli-sup-imgs img {
    width: 50%;
    height: auto;
    object-fit: cover;
}

.napoli-galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.napoli-galeria img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.napoli-galeria-abajo {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.napoli-galeria-abajo img {
    width: 49%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 900px) {
    .napoli-sup {
        display: flex !important;
        flex-direction: column !important;
        text-align: center;
        gap: 20px;
    }
    .napoli-sup-imgs {
        width: 100% !important;
        padding-right: 0 !important;
        order: -1 !important;
    }
    .napoli-descripcion {
        width: 100% !important;
        order: 0 !important;
    }
    .napoli-galeria {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    .napoli-galeria-abajo img {
        width: 48%;
    }
}

/* 5to proyecto estilos soleris*/
.titulo-soleris {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

.titulo-soleris h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.titulo-soleris .subtitulo {
    color: #888;
    font-size: 1.2rem;
}

.cuadricula-soleris {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 0 5%;
}

.bloque-sup-soleris {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.texto-soleris {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: #ddd;
    padding: 0 20px;
}

.imagen-grande-soleris img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.soleris-galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.soleris-galeria img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

@media (max-width: 768px) {
    .bloque-sup-soleris {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
    }
    .imagen-grande-soleris {
        width: 100% !important;
        order: -1 !important;
    }
    .texto-soleris {
        width: 100% !important;
        text-align: center;
        padding: 0 !important;
        order: 0 !important;
    }
    .soleris-galeria {
        grid-template-columns: 1fr;
    }
}

/* 6to proyecto estilos giralia */
.titulo-giralia {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

.titulo-giralia h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.titulo-giralia .subtitulo {
    color: #888;
    font-size: 1.2rem;
}

.cuadricula-giralia {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 0 5%;
}

.bloque-sup-giralia {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.texto-giralia {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: #ddd;
    padding: 0 20px;
}

.imagen-grande-giralia img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.giralia-galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.giralia-galeria img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.giralia-video {
    width: 100%;
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
}

.giralia-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .bloque-sup-giralia {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px;
    }
    .imagen-grande-giralia {
        width: 100% !important;
        order: -1 !important;
    }
    .texto-giralia {
        width: 100% !important;
        text-align: center;
        padding: 0 !important;
        order: 0 !important;
    }
    .giralia-galeria {
        grid-template-columns: 1fr;
    }
}


/* -----------------------------------
   SINGULAR ESSENCE (DISEÑO EDITORIAL PREMIUM)
----------------------------------- */
#singular { padding-bottom: 50px; }
.titulo-singular { text-align: center; margin-bottom: 60px; padding: 0 5%; }
.titulo-singular h1 { font-size: 1.8rem; letter-spacing: 3px; margin-bottom: 10px; text-transform: uppercase; }
.titulo-singular .subtitulo { font-size: 1.1rem; color: #888; font-weight: 300; font-style: italic; }

.singular-contenido { padding: 0 5%; max-width: 1200px; margin: 0 auto; }

/* Banner con aire */
.singular-banner {
    width: 100%;
    margin-bottom: 70px;
}
.singular-banner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
    display: block;
    border-radius: 2px;
}

/* Textos elegantes y angostos */
.singular-texto-centrado {
    max-width: 800px;
    margin: 0 auto 70px auto;
    text-align: center;
    padding: 0 20px;
}
.singular-texto-centrado p {
    color: #ddd;
    line-height: 1.8;
    font-size: 1.05rem;
    font-weight: 300;
}
.singular-texto-centrado.final {
    margin-bottom: 30px;
}

/* Cuadrículas en fila (Premium Look) */
.singular-grid-premium {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 70px;
}
.singular-grid-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3/4; /* Formato vertical estilo revista */
    display: block;
    border-radius: 2px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.singular-grid-premium img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 2;
}

/* RESPONSIVE MÓVIL EXACTO */
@media (max-width: 900px) {
    .singular-grid-premium {
        grid-template-columns: repeat(2, 1fr); /* En móvil / tablet se hacen bloques de 2x2 */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .singular-banner { margin-bottom: 50px; }
    .singular-texto-centrado { margin-bottom: 50px; padding: 0; }
    .singular-grid-premium { margin-bottom: 50px; gap: 10px; }
    .singular-grid-premium img { aspect-ratio: 1/1; /* En celular muy pequeño se hacen cuadradas */ }
}


/* 8mo proyecto zentide */
.titulo-zentide {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

.titulo-zentide h1 {
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.titulo-zentide .subtitulo {
    color: #888;
    font-size: 1.2rem;
}

.cuadricula-zentide {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 0 5%;
}

.bloque-sup-zentide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.texto-zentide {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: #ddd;
    padding: 0 20px;
}

.imagen-banner-zentide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.zentide-galeria {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.zentide-galeria img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

@media (max-width: 768px) {
    .bloque-sup-zentide {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
    }
    .imagen-banner-zentide {
        width: 100% !important;
        order: -1 !important;
    }
    .texto-zentide {
        width: 100% !important;
        text-align: center;
        padding: 0 !important;
        order: 0 !important;
    }
    .zentide-galeria {
        grid-template-columns: 1fr;
    }
}

/* seccion contacto */
.titulo-contacto {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 5%;
}

form {
    max-width: 600px;
    margin: 0 auto;
    padding: 50px 20px;
    color: #ddd;
    text-align: left;
}

label {
    display: block;
    margin-top: 20px;
    margin-bottom: 10px;
}

input, textarea {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    color: white;
}

button {
    margin-top: 15px;
    cursor: pointer;
    width: 80px;
    background-color: #fff;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
}

#texto-enviar { color: #000; }

/* Padding extra al final de los proyectos */
#nemyx, #ondara, #amma, #naya, #dior, #napoli, #soleris, #giralia, #singular, #zentide {
    padding-bottom: 30px;
}

/* -----------------------------------
   SUB-INICIO (MENÚ FLOTANTE)
----------------------------------- */
#sub-inicio {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000; 
    background-color: #111;  
    display: none;
}

#sub-inicio.activa {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hub-container {
    width: 100%;
    text-align: center;
    padding: 0 20px;
}


/* ESTILOS DE BIENVENIDA BILINGÜE */
.bienvenida-botones {
    display: flex;
    gap: 50px;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    opacity: 0;
    animation: aparecerSuave 1s ease-out forwards;
    animation-delay: 0.5s;
}

.opcion-idioma {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.subtitulo-btn {
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    font-style: italic;
    color: #aaa;
    font-weight: 300;
}

/* Ajuste del botón para que encaje bien en este modo doble */
.bienvenida-botones .btn-entrar {
    opacity: 1;
    animation: none;
    margin-bottom: 0;
    width: 90px;
    padding: 10px 0;
}

@media (max-width: 600px) {
    .bienvenida-botones {
        flex-direction: column;
        gap: 30px;
        margin-top: 30px;
    }
}


/* =========================================
   SISTEMA BILINGÜE MAESTRO
   ========================================= */

/* Si el body tiene la clase español, oculta TODO lo que tenga la clase 'en' */
body.lang-es .en {
    display: none !important;
}

/* Si el body tiene la clase inglés, oculta TODO lo que tenga la clase 'es' */
body.lang-en .es {
    display: none !important;
}

/* Evitar que queden espacios en blanco extraños en los botones o enlaces */
.es, .en {
    transition: opacity 0.3s ease;
}

/* FIRMA SEO BIENVENIDA */
.firma-seo {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: #888;
    text-transform: uppercase;
    margin-top: -60px; /* Compensa el margen inferior del logo en PC */
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: aparecerSuave 1s ease-out forwards;
    animation-delay: 0.3s; /* Aparece justo después del logo y antes de los botones */
}

/* Ajustes Responsive para que siga centrado */
@media (max-width: 768px) {
    .firma-seo {
        margin-top: -40px; 
        margin-bottom: 10px;
        font-size: 0.8rem;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .firma-seo {
        margin-top: -60px; /* Compensa el margen de 120px que pusimos en el celular */
        font-size: 0.75rem;
        letter-spacing: 2.5px;
    }
}

/* =========================================
   CENTRAD0 PERFECTO BIENVENIDA (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    .logo-orbita-container {
        padding-top: 0;
        height: 100px;
        margin-bottom: 0 !important; /* Matamos el margen gigante */
    }
    .firma-seo {
        margin-top: 20px !important; /* Espaciado natural y limpio */
        margin-bottom: 40px !important;
        font-size: 0.8rem;
        letter-spacing: 3px;
    }
    .bienvenida-botones {
        margin-top: 0 !important;
    }
}

@media (max-width: 600px) {
    .bienvenida-botones {
        flex-direction: column;
        gap: 35px !important; 
    }
}

@media (max-width: 480px) {
    .logo-orbita-container {
        height: 70px;
    }
    .firma-seo {
        margin-top: 15px !important;
        margin-bottom: 35px !important;
        font-size: 0.7rem;
        letter-spacing: 2.5px;
    }
}

/* =========================================
   JERARQUÍA HUB MENU (SUB-INICIO)
   ========================================= */
.hub-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; 
}

.hub-menu .link-secundario {
    font-family: 'Space Grotesk', Arial, sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem); 
    font-weight: 300;
    color: #8a8a8a; 
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.4s ease;
}

.hub-menu .link-principal {
    font-family: 'Space Grotesk', Arial, sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem); 
    font-weight: 500;
    color: #fff; 
    text-decoration: none;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin: 15px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
}

.hub-menu a:hover {
    color: #fff;
    transform: scale(1.05);
}

.hub-menu .link-secundario:hover { letter-spacing: 4px; }
.hub-menu .link-principal:hover { letter-spacing: 10px; text-shadow: 0 0 30px rgba(255, 255, 255, 0.4); }

.hub-menu:hover a:not(:hover) { opacity: 0.3; }

/* =========================================
   SECCIÓN PORTAFOLIO Y LIBRO 3D
   ========================================= */
#portafolio {
    min-height: 80vh;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 50px;
    display: none;
}

#portafolio.activa {
    display: flex; 
}

.portafolio-interactivo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px;
    background-color: #1a1a1a;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.portafolio-texto-cta { flex: 1; }
.portafolio-texto-cta h2 { font-size: 1.8rem; margin-bottom: 15px; letter-spacing: 1px; }
.portafolio-texto-cta p { color: #aaa; line-height: 1.6; margin-bottom: 30px; font-size: 0.95rem; }

.portafolio-texto-cta .btn-leer, .btn-descarga-cv {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #fff;
    color: #fff;
    background-color: transparent;
    text-decoration: none;
    border-radius: 30px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.portafolio-texto-cta .btn-leer:hover, .btn-descarga-cv:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15);
}

.portafolio-libro-cta {
    flex: 1;
    display: flex;
    justify-content: center;
}

.portafolio-libro-cta a {
    display: block;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.portafolio-libro-cta img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 2px 8px 8px 2px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3), 15px 15px 30px rgba(0,0,0,0.5);
    display: block;
}

.portafolio-libro-cta a::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 12px; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.3), rgba(0,0,0,0.1) 50%, transparent);
    border-radius: 2px 0 0 2px;
    pointer-events: none;
}

.portafolio-libro-cta a:hover {
    transform: translateY(-10px) scale(1.02) perspective(1000px) rotateY(-5deg);
    box-shadow: -10px 10px 20px rgba(0,0,0,0.4);
}

.cv-descarga-container { text-align: center; margin-bottom: 60px; }

/* Responsive */
@media (max-width: 900px) {
    .portafolio-interactivo {
        margin: 0 5%;
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
        gap: 40px;
    }
    .portafolio-libro-cta { order: -1; }
}

/* =========================================
   NAVBAR RESPONSIVE (MENÚ HAMBURGUESA MÓVIL)
   ========================================= */
@media (max-width: 900px) {
    .hamburger { 
        display: block; 
        color: #fff;
    }
    
    .menu {
        display: none; /* Lo oculta por defecto */
        flex-direction: column;
        background-color: #111;
        position: absolute;
        top: 80px; /* Baja justo debajo del logo */
        left: 0;
        width: 100%;
        padding: 30px 0;
        gap: 25px;
        align-items: center;
        z-index: 9999;
        border-bottom: 1px solid #333;
        box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    }
    
    .menu.activo { 
        display: flex; /* Lo muestra cuando haces clic */
    }
    
    .menu a {
        font-size: 1.2rem;
        letter-spacing: 2px;
        text-transform: uppercase;
    }
    
    .logo img { 
        height: 40px; 
    }
    
    .navbar-container {
        justify-content: space-between;
    }
}

/* =========================================
   CORRECCIÓN DEFINITIVA BOTÓN VOLVER
   ========================================= */
.detalle-nav {
    padding: 30px 5% 20px 5% !important;
}

.detalle-nav a.btn-volver,
.detalle-nav a.btn-volver:link,
.detalle-nav a.btn-volver:visited,
.detalle-nav a.btn-volver:hover,
.detalle-nav a.btn-volver:active {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Dior: intro a dos columnas, foto ancha y final con cita + vídeo */
.cs-dos-col { display: grid; grid-template-columns: 5fr 7fr; gap: 60px; align-items: start; margin-bottom: 50px; }
.cs-dos-col h2 { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 300; line-height: 1.15; }
.cs-dos-col .cs-texto p:first-child { margin-top: 0; }
.cs-logo-ancho { width: 170px; }
.cs-foto-ancha { margin: 0 0 140px 0; }
.cs-foto-ancha img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.cs-par-dior { margin-bottom: 120px; }
.cs-par-dior img, .cs-par-dior video { aspect-ratio: 3/4; height: auto; }
.cs-par-dior figcaption { grid-column: 1 / -1; color: #949494; font-size: 0.85rem; margin-top: 4px; }
.cs-cita-final { text-align: center; margin: 0 auto 120px auto; }
.cs-cita { font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 300; line-height: 1.2; margin: 0 0 24px 0; color: #fff; }
@media (max-width: 900px) {
    .cs-dos-col { grid-template-columns: 1fr; gap: 24px; }
    .cs-par-dior, .cs-cita-final { margin-bottom: 80px; }
    .cs-foto-ancha { margin-bottom: 80px; }
    .cs-foto-ancha img { aspect-ratio: 4/3; }
}

/* Cierre con la foto entera, sin recorte (Soleris) */
.cs-cierre-completa img, .cs-cierre-completa img[style] { aspect-ratio: auto; height: auto; object-fit: contain; }
@media (max-width: 900px) { .cs-cierre-completa img { aspect-ratio: auto; } }

/* Singular Essence: en móvil el texto va antes de la imagen para no juntar dos imágenes seguidas */
@media (max-width: 900px) { #singular .cs-fila-proceso .cs-natural { order: 2; } }
.cs-banda-fotos.cs-banda-retrato img { aspect-ratio: 4/5; }
.cs-par-se { margin-bottom: 120px; }
.cs-par-se img { aspect-ratio: 4/5; }
@media (max-width: 900px) { .cs-par-se { margin-bottom: 80px; } }

/* ZenTide */
.cs-zt-ancha { margin: 0 0 140px 0; }
.cs-zt-gama { grid-template-columns: 4fr 7fr; }
.cs-zt-par { margin-bottom: 120px; }
.cs-zt-par img { aspect-ratio: 16/9; }
.cs-zt-par figcaption { grid-column: 1 / -1; color: #949494; font-size: 0.85rem; margin-top: 4px; }
@media (max-width: 900px) {
    .cs-zt-ancha, .cs-zt-par { margin-bottom: 80px; }
    .cs-zt-gama { grid-template-columns: 1fr; }
    .cs-zt-par { grid-template-columns: 1fr; }
    #zentide .cs-fila-proceso .cs-natural { order: 2; }
}

/* Portada con la foto entera, sin recorte (ZenTide) */
.cs-hero.cs-hero-completa { aspect-ratio: 16/9; }
@media (max-width: 900px) { .cs-hero.cs-hero-completa { aspect-ratio: 16/9; } }

/* ===== ACERCA DE MÍ (rediseño) ===== */
.ab { max-width: 1200px; margin: 0 auto; padding: 50px 5% 40px 5%; }
.ab-intro { display: grid; grid-template-columns: 7fr 5fr; gap: 70px; align-items: center; margin-bottom: 90px; }
.ab-eyebrow { color: #888; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 18px 0; }
.ab-intro h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 300; line-height: 1.02; margin: 0 0 28px 0; }
.ab-lead { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.4; color: #fff; margin: 0 0 22px 0; max-width: 30em; }
.ab-texto > p.es, .ab-texto > p.en { color: #bbb; font-size: 0.95rem; line-height: 1.7; margin: 0 0 14px 0; max-width: 36em; }
.ab-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 26px 0; }
.ab-btn { display: inline-block; padding: 12px 24px; border: 1px solid rgba(255,255,255,0.6); color: #fff; text-decoration: none; font-size: 0.85rem; letter-spacing: 1px; transition: background-color 0.3s ease, color 0.3s ease; }
.ab-btn:hover { background-color: rgba(255,255,255,0.12); }
.ab-btn-principal { background-color: #fff; color: #111; border-color: #fff; }
.ab-btn-principal:hover { background-color: #ddd; color: #111; }
.ab-redes { justify-content: flex-start; }
.ab-foto { margin: 0; }
.ab-foto img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 0% 30%; display: block; }

.ab-cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 0 0 100px 0; padding: 34px 0; border-top: 1px solid #2c2c2c; border-bottom: 1px solid #2c2c2c; }
.ab-cifras div { margin: 0; }
.ab-cifras dt { font-size: clamp(2.4rem, 4.5vw, 3.6rem); font-weight: 300; line-height: 1; margin-bottom: 10px; }
.ab-cifras dd { margin: 0; color: #999; font-size: 0.85rem; line-height: 1.5; }

.ab-destacados h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 400; margin: 0 0 26px 0; }
.ab-tarjetas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 70px; }
.ab-tarjeta { display: flex; flex-direction: column; padding: 26px 22px; background: #1a1a1a; border: 1px solid #262626; color: #fff; text-decoration: none; transition: border-color 0.3s ease, transform 0.3s ease; }
a.ab-tarjeta:hover { border-color: #666; transform: translateY(-4px); }
.ab-num { color: #8a8a8a; font-size: 0.8rem; letter-spacing: 1px; margin-bottom: 26px; }
.ab-tarjeta h3 { font-size: 1.1rem; font-weight: 400; margin: 0 0 12px 0; }
.ab-tarjeta p { color: #aaa; font-size: 0.85rem; line-height: 1.6; margin: 0 0 18px 0; }
.ab-ver { margin-top: auto; font-size: 0.8rem; color: #fff; letter-spacing: 0.5px; }
.ab-disciplinas { text-align: center; color: #949494; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 20px 0; }

@media (max-width: 900px) {
    .ab { padding-top: 30px; }
    .ab-intro { grid-template-columns: 1fr; gap: 36px; margin-bottom: 60px; }
    .ab-foto { order: -1; max-width: 420px; }
    .ab-cifras { grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 70px; }
    .ab-tarjetas { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .ab-tarjetas { grid-template-columns: 1fr; }
}

/* ===== PORTAFOLIO (rediseño) ===== */
.pf-intro { display: grid; grid-template-columns: 7fr 5fr; gap: 70px; align-items: center; margin-bottom: 100px; }
.pf-intro h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 300; line-height: 1.02; margin: 0 0 28px 0; }
.pf-libro { display: flex; justify-content: center; }
.pf-tapa { position: relative; display: block; width: 100%; max-width: 340px; aspect-ratio: 210/297; background: #f2f0ec; color: #111; text-decoration: none;
    box-shadow: -6px 0 16px rgba(0,0,0,0.35), 18px 22px 40px rgba(0,0,0,0.55); transition: transform 0.4s ease; overflow: hidden; }
.pf-tapa:hover { transform: translateY(-6px) rotate(-1deg); }
.pf-tapa::before { content: ""; position: absolute; z-index: 2; top: 0; left: 0; width: 12px; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0.35), rgba(0,0,0,0.12) 50%, transparent); }
.pf-tapa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.pf-tapa-texto { position: absolute; left: 12%; right: 10%; bottom: 12%; display: flex; flex-direction: column; gap: 10px; }
.pf-tapa-texto small { font-size: 0.65rem; letter-spacing: 2px; color: #949494; }
.pf-tapa-texto strong { font-size: 1.7rem; font-weight: 400; line-height: 1.05; letter-spacing: 1px; }
.pf-tapa-texto em { font-style: normal; font-size: 0.7rem; letter-spacing: 2px; color: #7a7a7a; }

.pf-contenido { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 30px; }
.pf-contenido h2 { font-size: 0.8rem; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; color: #888; margin: 0 0 14px 0; }
.pf-lista { list-style: none; padding: 0; margin: 0; border-top: 1px solid #2c2c2c; }
.pf-lista li { border-bottom: 1px solid #2c2c2c; }
.pf-fila { display: grid; grid-template-columns: 36px 1fr auto 40px; gap: 14px; align-items: baseline; padding: 16px 4px; color: #fff; text-decoration: none; }
a.pf-fila { transition: background-color 0.3s ease, padding 0.3s ease; }
a.pf-fila:hover { background-color: #1a1a1a; padding-left: 10px; }
.pf-num { color: #8a8a8a; font-size: 0.8rem; }
.pf-nombre { font-size: 1.05rem; }
.pf-disc { color: #888; font-size: 0.8rem; text-align: right; }
.pf-pag { color: #8a8a8a; font-size: 0.8rem; text-align: right; }
a.pf-fila .pf-pag { color: #fff; font-size: 1rem; }
.pf-nota { color: #8a8a8a; font-size: 0.8rem; margin: 0 0 40px 0; }

@media (max-width: 900px) {
    .pf-intro { grid-template-columns: 1fr; gap: 40px; margin-bottom: 70px; }
    .pf-libro { order: -1; }
    .pf-tapa { max-width: 260px; }
    .pf-contenido { grid-template-columns: 1fr; gap: 40px; }
    .pf-fila { grid-template-columns: 30px 1fr 30px; }
    .pf-disc { grid-column: 2; grid-row: 2; text-align: left; }
}

/* Sobre mí · Trayectoria */
.ab-trayectoria { margin: 0 0 90px 0; }
.ab-trayectoria > h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 400; margin: 0 0 26px 0; }
.ab-exp { list-style: none; padding: 0; margin: 0 0 80px 0; border-top: 1px solid #2c2c2c; }
.ab-exp li { display: grid; grid-template-columns: 170px 4fr 6fr; gap: 30px; padding: 24px 0; border-bottom: 1px solid #2c2c2c; align-items: baseline; }
.ab-exp-fecha { color: #949494; font-size: 0.8rem; letter-spacing: 0.5px; }
.ab-exp h3 { font-size: 1.1rem; font-weight: 400; margin: 0 0 4px 0; }
.ab-exp-rol { color: #888; font-size: 0.85rem; margin: 0; }
.ab-exp-txt { color: #bbb; font-size: 0.9rem; line-height: 1.6; margin: 0; }
.ab-exp-ver { color: #fff; font-size: 0.8rem; white-space: nowrap; margin-left: 6px; text-decoration: none; border-bottom: 1px solid #555; }
.ab-exp-ver:hover { border-color: #fff; }
.ab-saber { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; margin-bottom: 60px; }
.ab-saber h3 { font-size: 0.8rem; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; color: #888; margin: 0 0 18px 0; }
.ab-saber dl { margin: 0; }
.ab-saber dl div { padding: 12px 0; border-top: 1px solid #2c2c2c; }
.ab-saber dt { color: #fff; font-size: 0.9rem; margin-bottom: 4px; }
.ab-saber dd { margin: 0; color: #aaa; font-size: 0.85rem; line-height: 1.55; }
.ab-saber-sub { margin-top: 34px !important; }
.ab-idiomas { color: #fff; font-size: 0.95rem; margin: 0; padding-top: 12px; border-top: 1px solid #2c2c2c; }
.ab-cv-final { display: flex; justify-content: center; }
@media (max-width: 900px) {
    .ab-exp li { grid-template-columns: 1fr; gap: 8px; }
    .ab-saber { grid-template-columns: 1fr; gap: 40px; }
}

/* Sobre mí · Trayectoria compacta (sustituye a la versión larga) */
.ab-trayectoria { margin: 0 0 70px 0; }
.ab-t-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 60px; margin-bottom: 40px; }
.ab-trayectoria h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 400; margin: 0 0 22px 0; }
.ab-t-lista { list-style: none; padding: 0; margin: 0; border-top: 1px solid #2c2c2c; }
.ab-t-lista li { border-bottom: 1px solid #2c2c2c; }
.ab-t-lista a, .ab-t-lista li > div { display: grid; grid-template-columns: 110px 1fr auto 24px; gap: 16px; align-items: baseline; padding: 14px 4px; color: #fff; text-decoration: none; }
.ab-t-lista a { transition: background-color 0.3s ease, padding 0.3s ease; }
.ab-t-lista a:hover { background-color: #1a1a1a; padding-left: 10px; }
.ab-t-fecha { color: #949494; font-size: 0.8rem; }
.ab-t-emp { font-size: 1rem; }
.ab-t-rol { color: #888; font-size: 0.8rem; text-align: right; }
.ab-t-ir { color: #fff; text-align: right; }
.ab-t-lado p { color: #aaa; font-size: 0.85rem; line-height: 1.6; margin: 0 0 18px 0; padding-top: 12px; border-top: 1px solid #2c2c2c; }
.ab-t-lado strong { color: #fff; font-weight: 400; font-size: 0.95rem; }
.ab-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ab-tags li { border: 1px solid #333; color: #bbb; font-size: 0.78rem; padding: 7px 14px; border-radius: 30px; }
@media (max-width: 900px) {
    .ab-t-grid { grid-template-columns: 1fr; gap: 40px; }
    .ab-t-lista a, .ab-t-lista li > div { grid-template-columns: 90px 1fr 20px; }
    .ab-t-rol { grid-column: 2; grid-row: 2; text-align: left; }
}

/* Sobre mí · ajustes de UI */
.ab-intro { grid-template-columns: 8fr 4fr; gap: 60px; margin-bottom: 80px; }
.ab-intro h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); white-space: nowrap; }
.ab-redes .btn-social { width: 36px; height: 36px; background: transparent; border: 1px solid rgba(255,255,255,0.45); }
.ab-redes .btn-social i { color: #fff; font-size: 14px; }
.ab-redes .btn-social:hover { background: rgba(255,255,255,0.12); transform: translateY(-3px); }
.ab-mini { list-style: none; padding: 22px 0 0 0; margin: 28px 0 0 0; border-top: 1px solid #2c2c2c; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.ab-mini li { color: #888; font-size: 0.8rem; }
.ab-mini strong { color: #fff; font-size: 1.5rem; font-weight: 300; margin-right: 4px; vertical-align: -2px; }
.ab-foto img { object-position: 50% 20%; }
.ab-t-emp { display: flex; flex-direction: column; gap: 6px; }
.ab-t-logros { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-t-logro { font-size: 0.7rem; color: #e8d9b5; border: 1px solid #5a4f36; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.3px; }
.ab-trayectoria { margin-bottom: 40px; }
.ab { padding-bottom: 20px; }
#menu a.activo { color: #fff; border-bottom: 1px solid #fff; padding-bottom: 3px; }
@media (max-width: 900px) {
    .ab-intro { grid-template-columns: 1fr; gap: 36px; margin-bottom: 60px; }
    .ab-intro h1 { white-space: normal; }
}
/* Retrato entero, sin zoom */
.ab-foto img { aspect-ratio: 3/4; object-fit: cover; object-position: 50% 50%; }

/* Iconos de redes en SVG propio (no dependen de librerías externas) */
.ico { width: 16px; height: 16px; display: block; }
.btn-social .ico { color: #000; }
.ab-redes .btn-social .ico { color: #fff; width: 15px; height: 15px; }
.footer-centro a { display: inline-flex; }
.footer-centro .ico { width: 18px; height: 18px; }
/* Retrato cuadrado, entero */
.ab-foto img { aspect-ratio: 1/1; }

/* OJ Napoli: foto vertical a la derecha, casi entera, fundida con el negro (sin zoom) */
.cs-hero-oj img {
    position: absolute; top: 0; right: 0;
    width: 30%; height: 100%; object-fit: cover; object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
    mask-image: linear-gradient(to right, transparent 0, #000 22%);
}
@media (max-width: 900px) {
    .cs-hero-oj img { width: 100%; -webkit-mask-image: none; mask-image: none; }
}

/* ===== BARRA DE NAVEGACIÓN (rediseño) ===== */
.navbar { position: sticky; top: 0; z-index: 900; background: transparent; padding: 0 40px; }
.navbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(17,17,17,0.82);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.07); }
.navbar-container { height: 64px; display: flex; align-items: center; gap: 0; max-width: none; }
.navbar .logo { display: flex; align-items: center; text-decoration: none; }
.navbar .logo img { height: 34px; max-width: 150px; }
.menu { margin-left: auto; display: flex; align-items: center; gap: 30px; }
.menu a { font-size: 14px; letter-spacing: 0.5px; color: #aaa; transition: color 0.2s ease; }
.menu a:hover { color: #fff; }
#menu a.activo { color: #fff; border-bottom: 1px solid #fff; padding-bottom: 3px; }
.menu-cta a { color: #fff; border: 1px solid rgba(255,255,255,0.5); padding: 8px 18px; transition: background-color 0.2s ease; }
.menu-cta a:hover { background-color: rgba(255,255,255,0.12); }
#menu .menu-cta a.activo { border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 8px; background-color: rgba(255,255,255,0.12); }
.idioma { display: flex; align-items: center; gap: 6px; margin-left: 28px; font-size: 12px; color: #7a7a7a; }
.idioma button { background: none; border: none; color: #949494; font: inherit; font-size: 12px; letter-spacing: 1px; cursor: pointer; padding: 4px 2px; }
.idioma button:hover { color: #fff; }
.lang-es .idioma [data-l="es"], .lang-en .idioma [data-l="en"] { color: #fff; }
.hamburger { display: none; }

@media (max-width: 900px) {
    .navbar { padding: 0 20px; }
    .navbar-container { height: 58px; }
    .navbar .logo img { height: 30px; }
    .idioma { margin-left: auto; margin-right: 14px; }
    .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px;
        background: none; border: none; cursor: pointer; padding: 6px; position: relative; z-index: 2; }
    .hamburger span { display: block; height: 1.5px; width: 100%; background: #fff; transition: transform 0.3s ease, opacity 0.3s ease; }
    .hamburger.abierto span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .hamburger.abierto span:nth-child(2) { opacity: 0; }
    .hamburger.abierto span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
    .menu { position: fixed; inset: 0; top: 0; left: 0; width: 100%; height: 100vh; margin: 0; padding: 0;
        display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 34px;
        background: #111; border: none; box-shadow: none; z-index: 1;
        opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
    .menu.activo { display: flex; opacity: 1; visibility: visible; }
    .menu a { font-size: 1.7rem; letter-spacing: 1px; text-transform: none; color: #ddd; }
    .menu-cta a { font-size: 1.2rem; padding: 12px 28px; }
    body.menu-abierto { overflow: hidden; }
}
@media (max-width: 900px) { .navbar .logo, .idioma { position: relative; z-index: 2; } }
/* Anula el estilo genérico de los botones del formulario en la barra */
.idioma button, .hamburger { width: auto; margin: 0; min-width: 0; box-shadow: none; border-radius: 0; text-transform: none; }
.idioma button:hover, .hamburger:hover { background: none; transform: none; box-shadow: none; }
@media (max-width: 900px) { .hamburger { width: 34px; height: 34px; } }

/* Pantalla de entrada: un solo botón y selector de idioma */
.entrada { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 40px;
    opacity: 0; animation: aparecerSuave 1s ease-out forwards; animation-delay: 0.5s; }
.entrada .subtitulo-btn { margin: 0; }
.idioma-entrada { margin: 0; font-size: 13px; }
.idioma-entrada button { font-size: 13px; letter-spacing: 2px; padding: 4px 6px; }
.entrada .btn-entrar { margin: 6px 0 0 0; width: auto; min-width: 120px; padding: 11px 28px; }

/* Siguiente proyecto, al final de cada caso */
.cs-siguiente { width: calc(min(1200px, 100%) - 10%); margin: 60px auto 30px auto; display: grid; grid-template-columns: 5fr 7fr;
    align-items: stretch; background: #181818; border: 1px solid #262626; color: #fff; text-decoration: none; overflow: hidden; transition: border-color 0.3s ease; }
.cs-siguiente:hover { border-color: #555; }
.cs-sig-texto { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 40px; }
.cs-sig-eti { color: #999; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; }
.cs-sig-texto strong { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 300; line-height: 1.05; }
.cs-sig-disc { color: #aaa; font-size: 0.85rem; }
.cs-sig-ir { font-size: 1.4rem; margin-top: 10px; transition: transform 0.3s ease; }
.cs-siguiente:hover .cs-sig-ir { transform: translateX(8px); }
.cs-siguiente img { width: 100%; height: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; transition: transform 0.6s ease; }
.cs-siguiente:hover img { transform: scale(1.03); }
@media (max-width: 900px) {
    .cs-siguiente { grid-template-columns: 1fr; margin-top: 40px; }
    .cs-siguiente img { order: -1; }
    .cs-sig-texto { padding: 26px 22px; }
}

/* ===== CONTACTO (rediseño) ===== */
.ct-grid { display: grid; grid-template-columns: 6fr 5fr; gap: 80px; align-items: start; margin-bottom: 60px; }
.ct-grid h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 300; line-height: 1.02; margin: 0 0 28px 0; }
.ct-email { display: inline-block; font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 300; color: #fff; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.35); padding-bottom: 4px; margin: 10px 0 30px 0; transition: border-color 0.2s ease; word-break: break-all; }
.ct-email:hover { border-color: #fff; }
.ct-lista { list-style: none; padding: 0; margin: 0 0 24px 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.ct-lista a { display: inline-flex; align-items: center; gap: 9px; color: #bbb; text-decoration: none; font-size: 0.9rem; }
.ct-lista a:hover { color: #fff; }
.ct-lista .ico { width: 16px; height: 16px; }
.ct-lugar { color: #999; font-size: 0.85rem; margin: 0; }
.ct-form { display: flex; flex-direction: column; gap: 8px; background: #181818; border: 1px solid #262626; padding: 34px; margin: 0; }
.ct-form label { color: #aaa; font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 10px; text-align: left; }
.ct-form input, .ct-form textarea { width: 100%; background: #111; border: 1px solid #333; color: #fff; font: inherit; font-size: 0.95rem;
    padding: 12px 14px; border-radius: 0; margin: 0; transition: border-color 0.2s ease; }
.ct-form input:focus, .ct-form textarea:focus { outline: none; border-color: #fff; }
.ct-form textarea { resize: vertical; min-height: 130px; }
.ct-form .ct-enviar { margin-top: 18px; width: 100%; background: #fff; color: #111; border: 1px solid #fff; border-radius: 0; padding: 14px; font: inherit;
    font-size: 0.85rem; letter-spacing: 1px; cursor: pointer; transition: background-color 0.2s ease; }
.ct-form .ct-enviar:hover { background: #ddd; }
.ct-nota { color: #888; font-size: 0.78rem; margin: 6px 0 0 0; }
@media (max-width: 900px) {
    .ct-grid { grid-template-columns: 1fr; gap: 44px; }
    .ct-form { padding: 24px 20px; }
}


/* Accesibilidad: contorno visible al navegar con teclado */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [onclick]:focus-visible {
    outline: 2px solid #fff; outline-offset: 3px;
}
.proyecto:focus-visible { outline-offset: -2px; }

/* Siguiente proyecto: versión discreta, separada del caso por espacio y una línea fina */
.cs-siguiente { margin: 120px auto 10px auto; display: flex; align-items: center; justify-content: space-between; gap: 24px;
    background: none; border: none; border-top: 1px solid #2a2a2a; padding: 28px 0 0 0; overflow: visible; }
.cs-siguiente:hover { border-color: #2a2a2a; }
.cs-sig-texto { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px; align-items: baseline; padding: 0; justify-content: start; }
.cs-sig-eti { grid-column: 1 / -1; font-size: 0.7rem; letter-spacing: 2px; color: #949494; }
.cs-sig-texto strong { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 400; line-height: 1.2; }
.cs-sig-disc { display: none; }
.cs-sig-ir { font-size: 1.1rem; margin: 0; color: #aaa; }
.cs-siguiente:hover .cs-sig-ir { color: #fff; transform: translateX(6px); }
.cs-siguiente img { width: 120px; height: auto; aspect-ratio: 16/10; flex: 0 0 auto; opacity: 0.75; transition: opacity 0.3s ease; }
.cs-siguiente:hover img { transform: none; opacity: 1; }
@media (max-width: 900px) {
    .cs-siguiente { display: flex; margin-top: 80px; }
    .cs-siguiente img { order: 0; width: 90px; }
}
.cs-banda-pie { width: auto; margin: 14px 0 0 0; color: #949494; font-size: 0.8rem; letter-spacing: 1px; }

/* NEMYX: código y cierre doble */
.cs-codigo img { background: #1e1e1e; border: 1px solid #2c2c2c; max-width: 520px; margin-left: auto; }
.cs-cierre-par { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-cierre-par img { aspect-ratio: 4/3; }
@media (max-width: 900px) {
    .cs-cierre-par { grid-template-columns: 1fr; }
    .cs-cierre-par img { aspect-ratio: 4/3; }
    .cs-codigo img { margin: 0; }
}

/* ===== GALERÍA (rediseño) ===== */
.gal-cab { max-width: 1200px; margin: 0 auto; padding: 50px 5% 10px 5%; }
.gal-cab h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 300; line-height: 1.02; margin: 0 0 24px 0; }
.gal-cab .ab-lead { margin-bottom: 34px; }
.gal-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.gal-filtro { width: auto; margin: 0; background: none; border: 1px solid #333; color: #bbb; font: inherit; font-size: 0.8rem;
    padding: 8px 16px; border-radius: 30px; cursor: pointer; transition: all 0.2s ease; }
.gal-filtro:hover { border-color: #888; color: #fff; background: none; }
.gal-filtro.activo { background: #fff; color: #111; border-color: #fff; }
.contenedor-galeria { padding-top: 30px; }
.proyecto.oculto { display: none; }

/* Nombre del proyecto siempre visible; el detalle aparece al pasar el ratón */
.info-overlay { opacity: 1; padding: 28px; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 45%, transparent 70%); }
.info-overlay h3 { transform: none; font-size: 1.25rem; font-weight: 500; margin-bottom: 4px; }
.info-overlay p { font-size: 0.85rem; }
@media (hover: hover) {
    .info-overlay p { opacity: 0; max-height: 0; transform: translateY(6px); transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease; }
    .proyecto:hover .info-overlay { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 55%, transparent 100%); }
    .proyecto:hover .info-overlay p { opacity: 1; max-height: 4em; transform: none; }
}
@media (max-width: 768px) {
    .gal-cab { padding-top: 30px; }
    .info-overlay { padding: 20px; }
    .info-overlay h3 { font-size: 1.1rem; }
}

/* Portada del portafolio: se adapta a la forma real de la portada (horizontal) y se ve entera */
.pf-tapa:has(img) { aspect-ratio: auto; background: #fff; max-width: 520px; }
.pf-tapa img { position: relative; inset: auto; width: 100%; height: auto; object-fit: contain; }
.pf-tapa:has(img) .pf-tapa-texto { display: none; }
@media (max-width: 900px) { .pf-tapa:has(img) { max-width: 100%; } }

/* Portada del portafolio con más presencia: libro inclinado con páginas detrás, brillo y aviso al pasar */
.pf-libro { flex-direction: column; align-items: center; gap: 22px; position: relative; }
.pf-libro::before { content: ""; position: absolute; inset: 10% 5% 18% 5%; background: radial-gradient(closest-side, rgba(255,255,255,0.10), transparent); filter: blur(30px); z-index: 0; }
.pf-escena { perspective: 1400px; width: 100%; display: flex; justify-content: center; position: relative; z-index: 1; }
.pf-tapa { transform: rotateY(-14deg) rotateX(4deg); transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(.2,.8,.2,1), box-shadow 0.6s ease;
    box-shadow: -2px 0 0 #e9e7e2, -5px 3px 0 #d8d5cf, -8px 6px 0 #c9c6bf, 30px 40px 60px rgba(0,0,0,0.6); border-radius: 2px 4px 4px 2px; }
.pf-tapa:hover { transform: rotateY(0deg) rotateX(0deg) translateY(-6px); box-shadow: 0 0 0 #000, 0 0 0 #000, 0 0 0 #000, 20px 30px 60px rgba(0,0,0,0.55); }
.pf-abrir { position: absolute; z-index: 3; right: 14px; bottom: 14px; background: #111; color: #fff; font-size: 0.75rem; letter-spacing: 1px;
    padding: 8px 14px; opacity: 0; transform: translateY(6px); transition: opacity 0.3s ease, transform 0.3s ease; }
.pf-tapa:hover .pf-abrir { opacity: 1; transform: none; }
.pf-pie { color: #949494; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; margin: 0; position: relative; z-index: 1; }
@media (max-width: 900px) {
    .pf-tapa { transform: rotateY(-8deg) rotateX(3deg); }
    .pf-abrir { opacity: 1; transform: none; }
}

/* Portada del portafolio: versión plana y limpia (sustituye al libro inclinado) */
.pf-libro::before { display: none; }
.pf-escena { perspective: none; }
.pf-tapa, .pf-tapa:hover { transform: none; border-radius: 0; }
.pf-tapa { border: 1px solid #2c2c2c; box-shadow: 0 24px 50px rgba(0,0,0,0.45); transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; }
.pf-tapa::before { display: none; }
.pf-tapa:hover { transform: translateY(-4px); border-color: #555; box-shadow: 0 30px 60px rgba(0,0,0,0.55); }
.pf-abrir { display: none; }
@media (max-width: 900px) { .pf-tapa, .pf-tapa:hover { transform: none; } }

/* Revisión general (oct 2026) */
/* Volver a proyectos alineado con la columna del contenido */
.detalle-nav { max-width: 1200px; margin: 0 auto; box-sizing: border-box; }
/* Lectura: texto de los casos un poco más grande y claro; pies de foto mínimo legibles */
.cs-texto p { font-size: 1.0625rem; color: #c4c4c4; }
.cs-lista li { font-size: 1.0625rem; }
.cs-proceso-lista p, .cs-antes-despues p { font-size: 0.95rem; color: #b0b0b0; }
.cs-par-leyenda figcaption, .cs-par-dior figcaption, .cs-zt-par figcaption, .cs-banda-pie, .cs-cifras span { font-size: 0.875rem; }
.cs-credito { font-size: 0.8rem; }
/* Galería: categoría y año siempre visibles bajo el nombre */
.gal-meta { display: block; color: rgba(255,255,255,0.75); font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px; }
@media (hover: hover) { .proyecto:hover .gal-meta { display: none; } }
@media (hover: none) { .gal-meta { display: none; } }
/* Herramientas agrupadas */
.ab-tags-grupos { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ab-tags-tit { color: #8a8a8a; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 12px 0; }
@media (max-width: 768px) { .ab-tags-grupos { grid-template-columns: 1fr; gap: 22px; } }
/* Contacto centrado en la pantalla, sin hueco antes del pie */
#contacto .ct { min-height: calc(100vh - 190px); display: flex; flex-direction: column; justify-content: center; }
#contacto .ct-grid { width: 100%; margin-bottom: 0; }
/* Formulario con Formspree */
.ct-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ct-form .ct-enviar:disabled { opacity: 0.6; cursor: default; }
.ct-nota.ct-ok { color: #9fd3a8; }
.ct-nota.ct-error { color: #e0a39a; }
