@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg: #050505;
    --text: #ffffff;
    --accent: #00d2ff;
    --muted: rgba(255, 255, 255, 0.4);
    --border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 
   --- Common Back to Lab Button ---
   Este estilo se mantiene para cuando la presentación se abre fuera del Lab, 
   usando la misma clase que el componente de React.
*/
.back-to-lab-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 20001;
    background: rgba(16, 16, 16, 0.2);
    backdrop-filter: blur(4px) saturate(180%) contrast(1.1);
    -webkit-backdrop-filter: blur(4px) saturate(180%) contrast(1.1);
    border: 0.5px solid #ffffff;
    color: #ffffff;
    padding: 0.8rem 1.6rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    user-select: none;
    text-decoration: none;
    mix-blend-mode: difference;
}

.back-to-lab-btn span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.back-to-lab-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 3px rgba(255, 255, 255, 0.1);
}

.back-to-lab-btn:hover span { opacity: 1; }
.back-to-lab-btn svg { width: 20px; height: 20px; transition: transform 0.4s ease; }
.back-to-lab-btn:hover svg { transform: translateX(-3px); }

/* Script inyectado en HTML manejará la ocultación real si está en iframe */

/* --- ESTILOS BASE (Tipo Acuario LED) --- */
.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.project-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    margin-bottom: 6rem;
    padding: 5rem 3rem;
    border-radius: 20px;
    background: #111; /* Se puede reemplazar por una imagen desde HTML */
    position: relative;
    border: 1px solid var(--border);
    overflow: hidden;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    z-index: 10;
}

.header-content .tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.3em;
    display: block;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.header-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.header-content .dot {
    color: var(--accent);
}

.header-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    justify-content: center;
}

.btn-action {
    background: #00ff88;
    color: #000;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    text-decoration: none;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
    background: #05ff8d;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.info-block h2 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-transform: uppercase;
}

.info-block h2::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: var(--border);
}

.info-block p {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.8;
}

.info-block ul {
    list-style: none;
}

.info-block li {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.info-block li span {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 700;
    min-width: 120px;
}

.info-block.full-width {
    grid-column: span 2;
    margin-top: 2rem;
}

.info-block.conclusion {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 3rem;
}

.info-block.conclusion h2 { color: var(--accent); }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step h3 {
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.step p {
    font-size: 0.9rem;
    opacity: 0.6;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.media-item {
    background: var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.media-content {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    background: #222;
}

.media-caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.project-footer {
    margin-top: 8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
}

@media (max-width: 900px) {
    .project-grid { grid-template-columns: 1fr; }
    .info-block.full-width { grid-column: span 1; }
    .header-content h1 { font-size: 3rem; }
}

/* --- LIGHTBOX UNIVERSAL --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.15);
    transform: rotate(90deg) scale(1.1);
}

.media-item {
    cursor: zoom-in;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, background 0.4s ease;
}

.media-item:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    background: rgba(255, 255, 255, 0.08);
}

.media-content {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-item:hover .media-content {
    transform: scale(1.15);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }
}
