*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}


html, body {
    overflow-x: hidden;
    font-family:Arial, Helvetica, sans-serif;
    overflow-y: hidden;
    width: 100%;
    height: 100%;
    touch-action: none;
    pointer-events: auto;
}

.textito{
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* =========================
FONDO DEGRADADO BASE
========================= */
#background{
    position:fixed;
    inset:0;
    background: linear-gradient(120deg, #2d3250, #424769, #676f9d, #f9b17a);
    background-size:400% 400%;
    animation:bgShift 20s ease infinite;
    transition:filter 1s ease;
    z-index: 1;
}

/* =========================
CAMARA
========================= */
#camera{
    position:fixed;
    inset:0;
    width:100vw;
    height:100vh;
    z-index: 2;
    overflow: hidden;
}

/* =========================
ESCENAS
========================= */
.scene{
    position:absolute;
    width:100vw;
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    transform-style:preserve-3d;
}

/* =========================
NUEVO: IMÁGENES ATMOSFÉRICAS DE FONDO
========================= */
.scene-bg {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    opacity: 0.15; 
    mix-blend-mode: overlay; 
}

.scene-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.8);
}

/* =========================
ELEMENTOS FLOTANTES CONTENIDO
========================= */
.floating-container {
    position: absolute;
    width: min(1100px, 90vw);
    display: flex;
    gap: 60px;
    align-items: center;
    justify-content: space-between;
    
    transform-style: preserve-3d;
    transition: transform 0.2s linear, filter 0.2s linear;
}

.text-block {
    flex: 1;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); 
}

.image-block {
    flex: 1;
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); 
}

.image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-layout {
    justify-content: center;
    text-align: center;
}

@media (max-width: 768px) {
    .floating-container {
        flex-direction: column;
        gap: 30px;
    }
    .image-block {
        height: 250px;
        width: 100%;
    }
}

/* =========================
TEXTOS
========================= */
.text-block h1{
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 20px;
}

.text-block h2{
    font-size: 3rem;
    margin-bottom: 25px;
}

.text-block p{
    line-height: 1.8;
    font-size: 1.2rem;
    margin-bottom: 18px;
}

.text-block ul{
    padding-left: 25px;
    line-height: 2;
    margin-bottom: 20px;
    font-size: 1.15rem;
}

/* =========================
ANIMACIONES
========================= */
@keyframes bgShift{
    0%{ background-position:0% 50%; }
    25%{ background-position:50% 100%; }
    50%{ background-position:100% 50%; }
    75%{ background-position:50% 0%; }
    100%{ background-position:0% 50%; }
}

/* =========================
ESTILOS EXCLUSIVOS ESCENA 6 (OBRAS)
========================= */

.wide-layout {
    display: block !important;
    width: min(1700px, 100vw) !important;
}

.wide-layout .text-block h2 {
    text-align: center;
    margin-bottom: 30px; 
}

.works-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.work-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.work-link {
    display: block;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.work-item h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    text-align: center;
    transition: color 0.3s ease;
}

.work-item h5 {
    color: #ffffff;
    font-size: 0.95rem; 
    font-weight: normal;
    margin-bottom: 15px;
    opacity: 0.75;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    text-align: center;
}

/* Formato horizontal para las imágenes */
.work-thumb {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.4s ease;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    margin-top: 15px;
    background: #f9b17a;
    color: #2d3250;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-align: center;
    position: absolute;
    bottom: -45px;
    pointer-events: none;
}

/* =========================
EFECTO HOVER SECCIÓN OBRAS
========================= */
.work-link:hover {
    transform: translateY(-12px);
}


.work-link:hover .work-thumb {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.work-link:hover h3 {
    color: #f9b17a; 
}

/* Ajuste Responsive */
@media (max-width: 768px) {
    .works-grid {
        flex-direction: column;
        gap: 60px;
    }
    .work-thumb {
        height: 160px;
    }
    .badge {
        position: relative;
        bottom: 0;
        margin-top: 10px;
    }
}

/* =========================
EFECTO HOVER PARA LAS FOTOS
========================= */

.work-link:hover .work-thumb {
    transform: translateY(-8px) scale(1.04); 
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7); 
}

.work-link {
    display: block;
    width: 100%;
    max-width: 70%;
    cursor: pointer;
    text-decoration: none;
}

.work-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.work-thumb {
    width: 100%;
    max-width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease !important;
}

/* =========================
AJUSTES RESPONSIVE CRÍTICOS
========================= */
@media (max-width: 768px) {
    /* Ajustes de tipografía general */
    .text-block h1 {
        font-size: 2.2rem !important; /* Más chico para que no se corte */
        margin-bottom: 12px;
    }

    .text-block h2 {
        font-size: 1.8rem !important;
        margin-bottom: 15px;
    }

    .text-block p {
        font-size: 0.95rem !important;
        line-height: 1.5;
    }

    .text-block ul {
        font-size: 0.9rem !important;
        line-height: 1.6;
        padding-left: 15px;
    }

    /* Contenedor flotante en móviles */
    .floating-container {
        width: 85vw !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 20px !important;
        text-align: center;
    }

    /* Bloques de imágenes en las escenas */
    .image-block {
        height: 180px !important; /* Reducimos la altura para que entre junto al texto */
        width: 100% !important;
        max-width: 280px; /* Evita que se estire demasiado a lo ancho */
        margin: 0 auto;
    }
    
    .text-block ul {
        text-align: left; /* Las listas se leen mejor alineadas a la izquierda */
        display: inline-block;
    }

    /* Rediseño de la Escena 6 (Obras importantes) */
    .wide-layout {
        width: 90vw !important;
        padding-top: 20px;
    }

    .works-grid {
        flex-direction: column !important;
        gap: 35px !important; /* Espacio para que respire cada obra */
    }

    .work-link {
        max-width: 100% !important; /* Que use el ancho disponible */
    }

    .work-thumb {
        height: 110px !important; /* Más compactas para móviles */
        max-width: 220px;
        margin: 0 auto;
    }

    .work-item h3 {
        font-size: 1.1rem !important;
    }

    .work-item h5 {
        font-size: 0.8rem !important;
        margin-bottom: 8px;
    }

    /* El botón de Webby Award */
    .badge {
        position: relative !important;
        bottom: 0 !important;
        margin-top: 8px !important;
        display: inline-block;
        font-size: 0.75rem !important;
        padding: 4px 10px !important;
    }
}