/* === VARIABLES === */
:root {
    --rojo-inst: #CA0B0B;
    --azul-inv: #172A3A;
    --blanco-inv: #F7F8FA;
    --gris-graf: #343A40;
    --turquesa: #18A6A6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--blanco-inv);
    color: var(--gris-graf);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

h1, h2, h3, .brand-container { font-family: 'Montserrat', sans-serif; }
h1 { font-weight: 800; letter-spacing: -1px; color: #ffffff; text-transform: uppercase; line-height: 1.1; font-size: 4.5rem; margin-bottom: 1rem; }
h1 span { display: block; color: var(--turquesa); }
h2 { font-weight: 600; color: var(--azul-inv); text-transform: uppercase; margin-bottom: 2rem; }
h3 { font-weight: 600; color: var(--azul-inv); }

/* === NAVEGACIÓN Y LOGO === */
.navbar {
    position: fixed; top: 0; width: 100%;
    background-color: rgba(23, 42, 58, 0.98);
    padding: 0.8rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; border-bottom: 2px solid var(--rojo-inst);
}
.brand-container { display: flex; align-items: center; gap: 15px; }
.logo-circular {
    width: 50px; height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--blanco-inv);
}
.navbar-brand { font-weight: 700; font-size: 1.2rem; color: var(--blanco-inv); text-decoration: none; }
.nav-links a { text-decoration: none; color: var(--blanco-inv); margin-left: 2rem; font-weight: 500; font-size: 0.9rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--turquesa); }

/* === SECCIONES === */
section { padding: 120px 5% 80px; max-width: 1200px; margin: 0 auto; }

/* === HERO (INICIO) CON IMAGEN === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; padding: 0 5%;
    /* Aquí se carga la imagen de fondo con un degradado azul semitransparente encima para contraste */
    background-image: linear-gradient(rgba(23, 42, 58, 0.85), rgba(23, 42, 58, 0.9)), url('../img/fondo-inicio.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto parallax */
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero .frase { font-size: 1.5rem; color: var(--blanco-inv); margin-bottom: 2rem; font-weight: 500; }
.hero-datos {
    font-family: 'Roboto Mono', monospace; font-size: 1.2rem; font-weight: 700;
    color: var(--turquesa); margin-bottom: 2rem; display: flex; gap: 20px; align-items: center;
}
.separador { color: var(--turquesa); }

/* === BOTONES === */
.btn-rojo {
    display: inline-block; background-color: var(--rojo-inst); color: var(--blanco-inv);
    padding: 15px 35px; text-decoration: none; font-family: 'Montserrat', sans-serif;
    font-weight: 700; text-transform: uppercase; transition: 0.3s;
}
.btn-rojo:hover { background-color: #a30909; transform: translateY(-2px); }

/* === BLOQUES DE INVESTIGACIÓN === */
.bloques-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 3rem; }
.bloque { border: 1px solid rgba(23, 42, 58, 0.1); background: #ffffff; padding: 2rem; transition: border-color 0.3s; }
.bloque:hover { border-color: var(--turquesa); }
.numero-bloque { font-family: 'Roboto Mono', monospace; font-size: 1.5rem; font-weight: 700; color: var(--rojo-inst); display: block; margin-bottom: 0.5rem; }
.bloque h3 { font-size: 1.2rem; margin-bottom: 1rem; text-transform: uppercase; }

/* === PONENTE === */
.ponente-main {
    background-color: var(--blanco-inv); display: flex; gap: 4rem; align-items: flex-start;
    margin-top: 2rem; border-left: 4px solid var(--rojo-inst); padding-left: 2rem;
}
.ponente-img-wrapper { position: relative; flex-shrink: 0; }
.ponente-img-wrapper::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--rojo-inst); opacity: 0.15; pointer-events: none;
}
.ponente-img { width: 350px; height: auto; display: block; filter: grayscale(20%) contrast(110%); }
.ponente-info h3 { font-size: 2rem; margin-bottom: 0.5rem; }
.ponente-cargo { font-weight: 600; color: var(--rojo-inst); margin-bottom: 1.5rem; display: block; }
.ponente-cv ul { list-style: none; margin-bottom: 1.5rem; }
.ponente-cv li { margin-bottom: 0.8rem; position: relative; padding-left: 1.5rem; }
.ponente-cv li::before { content: '●'; color: var(--turquesa); position: absolute; left: 0; font-size: 0.8rem; top: 4px; }
.ponente-contacto { font-family: 'Roboto Mono', monospace; background: #fff; padding: 1rem; border: 1px solid #e0e0e0; font-size: 0.9rem; color: var(--azul-inv); }

/* === INSCRIPCIÓN === */
.seccion-inscripcion { background-color: var(--blanco-inv); border-top: 1px solid #e2e8f0; }
.form-bloque { max-width: 600px; margin: 0 auto; text-align: center; }
.form-bloque p { margin-bottom: 2rem; }

/* === RESPONSIVE === */
/* === RESPONSIVE ESTRICTO PARA MÓVILES === */
@media (max-width: 900px) {
    /* 1. Ajuste del menú superior */
    .navbar { 
        flex-direction: column; 
        padding: 10px; 
    }
    .brand-container {
        flex-direction: column; /* Apila el logo y el texto */
        text-align: center;
        gap: 5px;
        margin-bottom: 10px;
    }
    .logo-circular {
        width: 45px; 
        height: 45px;
    }
    .navbar-brand {
        font-size: 0.9rem; /* Letra más pequeña para el nombre de la facultad */
        line-height: 1.2;
    }
    .nav-links { 
        display: flex; 
        flex-wrap: wrap; /* Permite que los enlaces bajen de línea si no caben */
        justify-content: center; 
        gap: 12px; 
        width: 100%;
    }
    .nav-links a { 
        margin: 0; 
        font-size: 0.75rem; 
    }

    /* 2. Ajuste del título principal para que no se corte */
    h1 { 
        font-size: 2.2rem; /* Título mucho más pequeño en celulares */
        word-wrap: break-word; /* Obliga a cortar la palabra si es muy larga */
    }
    
    /* 3. Ajuste de los datos y otros elementos */
    .hero-datos { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 5px; 
        font-size: 1rem;
    }
    .separador {
        display: none; /* Ocultamos las barras diagonales en móvil */
    }
    
    /* 4. Ajuste del ponente */
    .ponente-main { 
        flex-direction: column; 
        gap: 2rem; 
    }
    .ponente-img { 
        width: 100%; 
        max-width: 400px; 
    }
}