/* --- VARIABLES ACTUALIZADAS --- */
:root {
    --lab-bg: #0a0a0a;
    --lab-surface: #121212; /* Un poco más neutro que el morado oscuro */
    --lab-purple: #7F2AF7;  /* Tu morado */
    --lab-cyan: #64FFDA;    /* Tu cyan */
    --font-main: 'Montserrat', sans-serif;
}

.lab-wrapper {
    background-color: var(--lab-bg);
    color: #eee;
    font-family: var(--font-main);
}

/* --- HERO LIMPIO --- */
.lab-hero {
    position: relative;
    min-height: 85vh; /* Un poco menos alto */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fondo: Solo un degradado radial muy sutil, sin rayas molestas */
.lab-hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgb(15, 4, 31) 0%, var(--lab-bg) 60%);
    z-index: 0;
}

.lab-hero-content {
    position: relative; z-index: 2;
    text-align: center; max-width: 800px; padding: 20px;
    display: flex; flex-direction: column; align-items: center; /* Centrar todo */
}

/* --- ESTILO DEL LOGO --- */
.lab-logo-wrapper {
    position: relative;
    width: 120px; /* Tamaño del logo */
    height: 120px;
    margin-bottom: 30px; /* Espacio entre logo y título */
}

.lab-main-logo {
    width: 100%; height: 100%; object-fit: contain;
    position: relative; z-index: 2;
    /* Sombra suave Cyan para que destaque del fondo oscuro */
    filter: drop-shadow(0 0 15px rgba(100, 255, 218, 0.3));
}

/* Resplandor decorativo detrás del logo */
.logo-glow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 160px; height: 160px;
    background: var(--lab-purple);
    filter: blur(60px); opacity: 0.4;
    z-index: 1;
}

/* --- TIPOGRAFÍA HERO --- */
.lab-title {
    font-size: 4.5rem; font-weight: 800; line-height: 1; margin: 0 0 20px 0;
    color: white; letter-spacing: -1px;
}
.lab-highlight-text { color: var(--lab-cyan); }

.lab-desc {
    color: #bbb; font-size: 1.1rem; line-height: 1.6; max-width: 600px; margin-bottom: 40px;
}

/* Botón más limpio */
.lab-btn-primary {
    padding: 15px 40px; background: white; color: black;
    font-weight: 700; text-decoration: none; border-radius: 50px;
    transition: 0.3s; display: inline-block;
}
.lab-btn-primary:hover {
    background: var(--lab-cyan); box-shadow: 0 0 20px rgba(100, 255, 218, 0.5); transform: translateY(-3px);
}


/* --- SECCIONES (LIMPIEZA) --- */
.lab-section { padding: 100px 5%; max-width: 1100px; margin: 0 auto; }

.lab-section-title {
    color: var(--lab-purple); font-size: 2rem; font-weight: 700;
    margin-bottom: 50px; text-align: left;
}

/* Cards más minimalistas */
.lab-services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px;
}

.lab-card {
    background: var(--lab-surface); border-radius: 12px; padding: 30px;
    transition: 0.3s; border: 1px solid transparent;
}
.lab-card:hover {
    border-color: var(--lab-purple); transform: translateY(-5px);
    background: #181818;
}

.lab-icon { font-size: 2rem; color: var(--lab-cyan); margin-bottom: 20px; }
.lab-card h3 { color: white; font-size: 1.2rem; margin-bottom: 10px; }
.lab-card p { color: #888; font-size: 0.9rem; line-height: 1.5; margin: 0; }

/* Tarjeta Loading */
.lab-card-loading {
    border: 1px dashed #333; background: transparent;
}
.lab-loading-status {
    font-size: 0.7rem; color: var(--lab-cyan); margin-bottom: 15px; font-weight: bold; text-transform: uppercase;
}
.dot { display: inline-block; width: 6px; height: 6px; background: var(--lab-cyan); border-radius: 50%; margin-right: 5px; animation: blink 1s infinite; }


/* --- GAME SECTION CLEAN --- */
.game-section {
    padding: 15% 5%;
}
.lab-game-layout {
    display: flex; align-items: center; gap: 60px; flex-wrap: wrap;
}
.game-info-col, .game-visual-col { flex: 1; min-width: 300px; }

.lab-category-tag {
    font-size: 0.75rem; color: var(--lab-purple); font-weight: 800; 
    border: 1px solid var(--lab-purple); padding: 4px 10px; border-radius: 20px;
}

.game-title { font-size: 3rem; margin: 20px 0; color: white; line-height: 1; }
.game-desc { color: #aaa; line-height: 1.6; margin-bottom: 30px; }

.game-specs-clean {
    display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 30px;
}
.game-specs-clean span {
    color: white; font-size: 0.9rem; font-weight: 600; 
    display: flex; align-items: center; gap: 8px;
}
.game-specs-clean i { color: var(--lab-cyan); }

.lab-btn-outline {
    color: white; text-decoration: none; border-bottom: 2px solid var(--lab-cyan);
    padding-bottom: 5px; transition: 0.3s; font-weight: 700;
}
.lab-btn-outline:hover { color: var(--lab-cyan); }

/* Imagen del juego limpia */
.game-img-clean {
    width: 100%; border-radius: 12px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: 0.3s;
}
.game-img-clean:hover { transform: scale(1.02); }


/* --- GALERÍA --- */
.lab-gallery-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px;
}
.lab-gal-item img {
    width: 100%; height: 250px; object-fit: cover; border-radius: 8px;
    opacity: 0.7; transition: 0.3s;
}
.lab-gal-item:hover img { opacity: 1; transform: scale(1.02); }

@media (max-width: 768px) {
    .lab-title { font-size: 3rem; }
    .lab-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}



/* --- FEATURED PROJECTS (CASE STUDIES) --- */

.lab-projects-stack {
    display: flex; flex-direction: column; gap: 40px;
}

.project-banner {
    display: block; position: relative;
    width: 100%; height: 400px; /* Altura imponente */
    border-radius: 16px; overflow: hidden;
    text-decoration: none; border: 1px solid #333;
    transition: 0.4s ease;
}

/* Fondo con Imagen/GIF */
.project-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
}
.project-bg img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease; filter: brightness(0.6);
}

/* Contenido sobre la imagen */
.project-content {
    position: relative; z-index: 2;
    height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
}

/* Etiquetas de Estado */
.project-meta { margin-bottom: 15px; display: flex; gap: 15px; align-items: center; }

.p-tag {
    font-size: 0.75rem; font-weight: 800; padding: 5px 12px; border-radius: 4px;
    color: #000; letter-spacing: 1px;
}
.p-tag.completed { background: var(--lab-cyan); } /* Verde/Cyan = Listo */
.p-tag.active { background: var(--lab-purple); color: white; animation: pulse 2s infinite; } /* Morado = Trabajando */
.p-tag.prototype { background: #FFAB00; } /* Naranja = Test */

.p-cat {
    color: #ccc; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
}

/* Textos */
.project-title {
    font-size: 2.5rem; color: white; margin: 0 0 15px 0; line-height: 1;
    text-transform: uppercase; font-weight: 800;
}

.project-summary {
    color: #ddd; font-size: 1.1rem; max-width: 700px; margin-bottom: 30px;
    line-height: 1.5; opacity: 0.9;
    transform: translateY(20px); transition: 0.4s; /* Efecto de entrada */
}

.project-link {
    color: var(--lab-cyan); font-weight: 700; font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
    transform: translateY(20px); opacity: 0; transition: 0.4s 0.1s; /* Retraso sutil */
}

/* --- EFECTOS HOVER (INTERACCIÓN) --- */
.project-banner:hover {
    border-color: var(--lab-cyan);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.project-banner:hover .project-bg img {
    transform: scale(1.05); /* Zoom suave */
    filter: brightness(0.8); /* Se aclara */
}
.project-banner:hover .project-summary {
    transform: translateY(0);
}
.project-banner:hover .project-link {
    transform: translateY(0); opacity: 1; /* Aparece la flecha */
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

/* RESPONSIVE */
@media (max-width: 768px) {
    .project-banner { height: auto; min-height: 450px; }
    .project-title { font-size: 1.8rem; }
    .project-content { padding: 25px; }
}

/* --- ESTILOS DEL MENÚ MÓVIL ABIERTO --- */

/* Solo aplica en pantallas donde el menú normal está oculto */
@media (max-width: 1024px) {
    
    /* Cuando le agreguemos la clase 'active' con JS, se mostrará así: */
    .lab-nav.active {
        display: flex; /* Lo hacemos visible */
        position: absolute;
        top: 80px; /* Justo debajo del header */
        left: 0;
        width: 100%;
        height: 100vh; /* Pantalla completa */
        background: rgba(5, 5, 5, 0.98); /* Fondo casi negro sólido */
        backdrop-filter: blur(10px);
        flex-direction: column; /* Enlaces uno debajo del otro */
        justify-content: flex-start;
        padding-top: 50px;
        gap: 40px;
        border-top: 1px solid #333;
        animation: slideDown 0.3s ease forwards;
    }

    /* Animación de entrada suave */
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Hacemos los enlaces más grandes en móvil */
    .lab-nav.active .lab-link {
        font-size: 1.5rem;
        color: white;
    }
    
    .lab-nav.active .nav-badge {
        font-size: 0.8rem; vertical-align: top;
    }
}

/* =========================================
   ESTILOS DEL MENÚ MÓVIL (PEGA ESTO AL FINAL DE TU CSS)
   ========================================= */

@media (max-width: 1024px) {
    
    /* 1. ESTADO CERRADO (Por defecto) */
    .lab-nav {
        position: fixed;
        top: 80px; /* Altura de tu header */
        left: 0;
        width: 100%;
        height: 0; /* IMPORTANTE: Altura 0 para que no se vea */
        background: rgba(10, 10, 10, 0.95); /* Fondo casi negro */
        backdrop-filter: blur(15px);
        overflow: hidden; /* Esconde el contenido */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: height 0.4s ease; /* Animación suave */
        border-bottom: 1px solid rgba(255,255,255,0.1);
        z-index: 999;
    }

    /* 2. ESTADO ABIERTO (La clase .active que agrega el JS) */
    .lab-nav.active {
        height: 350px; /* ¡AQUÍ ESTÁ LA MAGIA! Se despliega */
        padding: 20px 0;
        border-bottom: 1px solid var(--lab-purple);
    }

    /* Estilos de los enlaces en móvil */
    .lab-link {
        font-size: 1.2rem;
        margin: 15px 0;
        width: 100%;
        text-align: center;
        display: block;
    }

    /* Aseguramos que el botón de menú sea visible */
    .lab-menu-toggle {
        display: block !important;
        font-size: 1.5rem;
        cursor: pointer;
        color: white;
    }
    
    /* Ocultamos el botón de escritorio "Sketch Connection" si molesta */
    .lab-btn-back { display: none; } 
}