/* =========================================
   ESTILOS COMPLETOS: LABORATORIOS (labs.css)
   ========================================= */

/* --- 1. ANIMACIÓN DEL NAVBAR (Menu Sticky) --- */
/* Nota: Asegúrate de que tu navbar en el HTML tenga la clase .navbar */
.navbar {
    position: fixed; /* Fijo para que siempre esté disponible al subir */
    top: 0; 
    width: 100%; 
    z-index: 1000;
    transition: top 0.4s ease-in-out; /* La magia: suaviza la aparición/desaparición */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Sombra suave para separarlo del fondo */
}


/* --- 2. HERO SECTION (Encabezado) --- */
/* 1. EL CONTENEDOR (Solo Imagen y Tamaño) */
.lab-hero {
    height: 260px;
    position: relative; /* Necesario para que el overlay se posicione encima */
    margin-top: 50px;   /* Espacio para el navbar */
    
    /* Solo la imagen aquí */
    background-image: url('Logos_feria/fondo_feria.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Quitamos flexbox de aquí porque lo manejará el overlay */
}

/* 2. LA CAPA DE COLOR Y TEXTO (Color + Alineación) */
.hero-overlay {
    /* Tu gradiente azul (ajusté un poco la opacidad para que se vea la foto detrás) */
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.85), rgba(2, 20, 92, 0.75)); 
    
    /* Ocupa todo el espacio del padre */
    width: 100%; 
    height: 100%;
    position: absolute; 
    top: 0; 
    left: 0;
    
    /* Centrar el contenido (Texto) */
    display: flex; 
    align-items: center;     /* Verticalmente al centro */
    justify-content: center; /* Horizontalmente al centro */
    
    /* Color del texto */
    color: white;
    text-align: center;
}
.lab-hero-content { position: relative; z-index: 2; padding: 20px; }

.lab-hero h1 {
    font-family: 'Merriweather', serif;
    font-size: 4rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    
}

.lab-hero p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 400;
}


/* --- 3. CONTENEDOR PRINCIPAL --- */
.lab-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Títulos de sección */
.intro-block { text-align: center; margin-bottom: 50px; }

.intro-block h2 {
    font-family: 'Merriweather', serif;
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.separator-line {
    width: 70px; height: 4px;
    background: #00bcd4;
    margin: 0 auto;
    border-radius: 2px;
}


/* --- 4. GRID DE TARJETAS (RESPONSIVE) --- */
.labs-grid {
    display: grid;
    /* Se adapta automáticamente: Tarjetas de mínimo 340px */
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    align-items: start;
}


/* --- 5. DISEÑO DE LA TARJETA (CARD) --- */
.lab-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border: 1px solid #eef0f2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lab-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(21, 101, 192, 0.15);
    border-color: #b3e5fc;
}

/* Cabecera con Imagen */
.lab-header {
    height: 160px;
    background-color: #cfd8dc;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Etiqueta de Facultad (Glassmorphism) */
.faculty-badge {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 10px 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    display: flex; align-items: center; gap: 8px;
}
.faculty-badge i { color: #00bcd4; font-size: 0.9rem; }


/* --- 6. CUERPO DE LA TARJETA --- */
.lab-body { padding: 25px; }

.lab-title {
    margin: 0 0 20px 0;
    color: #1565c0;
    font-family: 'Merriweather', serif;
    font-size: 1.15rem;
    line-height: 1.4;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}


/* --- 7. SECCIÓN DE LÍDERES (Jefe/Subjefe) --- */
.lab-leadership {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Separación entre Jefe y Subjefe */
    margin-bottom: 25px;
}

.leader-item {
    display: flex;
    align-items: flex-start; /* Alineado arriba */
    gap: 15px;
}

/* Círculos de Iconos */
.icon-box {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0; /* Evita que se aplaste */
}

.icon-box.boss {
    background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb;
}
.icon-box.sub {
    background: #f5f5f5; color: #757575; border: 1px solid #e0e0e0;
}

.leader-info {
    display: flex; flex-direction: column; width: 100%;
}

.role {
    font-size: 0.65rem; text-transform: uppercase; font-weight: 700; color: #90a4ae; margin-bottom: 2px;
}
.name {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: 700;
    line-height: 1.3;
}


/* --- 8. ESTILOS DEL CORREO + BOTÓN COPIAR --- */
.email-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Texto a la izq, botón a la derecha */
    background: #f8f9fa;
    padding: 6px 5px;
    border-radius: 6px;
    border: 1px solid #eef0f2;
    width: 100%; /* Ocupa el ancho disponible */
    max-width: 240px; /* Pero no demasiado ancho */
}

.email-link {
    font-size: 0.75rem;
    color: #00bcd4;
    text-decoration: none;
    display: flex; align-items: center; gap: 6px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Puntos suspensivos si es muy largo */
}
.email-link:hover { text-decoration: underline; color: #0277bd; }

.copy-btn {
    background: white;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    color: #757575;
    font-size: 0.85rem;
    width: 24px; height: 24px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: #1565c0;
    border-color: #1565c0;
    background-color: #e3f2fd;
}

.copy-btn:active { transform: scale(0.95); }


/* --- 9. ACTIVIDADES (TAGS) --- */
.divider-dashed {
    border-top: 1px dashed #e0e0e0;
    margin: 20px 0;
}

.lab-activities h5 {
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 700;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #e1f5fe;
    color: #0277bd;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #b3e5fc;
}

/* Variación Verde para Biología */
.tag.green {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}


/* --- 10. TARJETA PLACEHOLDER (Futuro Lab) --- */
.lab-card.placeholder {
    border: 2px dashed #e0e0e0;
    background: #fafafa;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    cursor: default;
}
.lab-card.placeholder:hover {
    transform: none;
    border-color: #bdbdbd;
}

.placeholder-content {
    text-align: center;
    color: #bdbdbd;
    padding: 20px;
}
.placeholder-content i { font-size: 3rem; margin-bottom: 15px; opacity: 0.5; }
.placeholder-content h4 { margin: 0; font-size: 1.1rem; color: #9e9e9e; }
.placeholder-content p { font-size: 0.9rem; margin-top: 5px; }


/* --- 11. RESPONSIVE --- */
@media (max-width: 768px) {
    .labs-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
    .lab-hero h1 { font-size: 1.8rem; }
    .email-wrapper { max-width: 100%; } /* Email ocupa todo el ancho */
}