@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap');

/* Estilos Generales y Reset Básico */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Ajustado a la altura del menú */
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Animación de Fondo con Degradado tipo Ola */
@keyframes animatedGradientWaves {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    color: #f0f0f0;
    font-family: sans-serif;
    font-weight: normal;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    background: linear-gradient(
        135deg,
        #001529, /* Azul muy oscuro */
        #6d5580, /* Morado oscuro */
        #9c423c, /* Rojo oscuro/terracota */
        #f0eded, /* Gris claro (neutro) */
        #6796c0, /* Azul oscuro */
        #456940, /* Amarillo/Mostaza oscuro */
        #0f2e1a  /* Verde oscuro original */
    );
    background-size: 400% 400%; 
    animation: animatedGradientWaves 20s ease infinite; 
}

p {
    color: #ccc;
    padding: 0.5em 1em;
    line-height: 1.6;
    font-size: 1rem;
    text-align: justify; /* Párrafos justificados */
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 500;
    margin: 0.5em 0;
}

h1, h2, h3, h4, h5, h6 {
    color: whitesmoke;
    font-family: 'EB Garamond', serif;
    font-weight: bolder;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h2.subtitle, h2.subtitle2 {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4d90fe; 
    display: inline-block;
    font-weight: 700;
}

a {
    color: #87CEFA; 
    text-decoration: none;
    transition: color 0.3s ease, font-size 0.3s ease;
}

a:hover, a:focus {
    color: #ADD8E6; 
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.main-content-area {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto 30px auto;
    padding: 40px 30px;
    background-color: rgba(15, 15, 15, 0.8); 
    border-radius: 10px;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* --- Estilos del Menú de Navegación --- */
.nav--container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.97);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.div--title { margin: 0; flex-shrink: 0; }
.div--title h1 { margin: 0; font-size: 2.4rem; color: #e8e8e8; font-family: 'EB Garamond', serif; font-weight: 600; letter-spacing: 1px; }
.nav--container nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; flex-grow: 1; margin-left: 30px; }
.nav--container a.link--menu { color: #d8d8d8; font-size: 1.25rem; font-family: 'EB Garamond', serif; font-weight: 500; margin: 5px 15px; padding: 10px 8px; text-align: center; text-decoration: none; position: relative; transition: color 0.4s ease; overflow: hidden; }
.nav--container a.link--menu:hover, .nav--container a.link--menu:focus { color: #ffffff; }
.nav--container a.link--menu::after { content: ''; position: absolute; bottom: 8px; left: 50%; width: 0; height: 2px; background-color: #87CEFA; transition: all 0.4s cubic-bezier(0.7, 0, 0.3, 1); transform: translateX(-50%); }
.nav--container a.link--menu:hover::after, .nav--container a.link--menu:focus::after { width: 90%; }
/* --- Fin Estilos Menú --- */


/* --- Estilos para el Contenido del Documento del Proyecto --- */
.project-document {
    margin-top: 20px;
}

.document-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #444;
}

.document-header h2 { 
    font-size: 2.8rem;
    color: #87CEFA; 
    margin-bottom: 10px;
}

.presenter-intro, .advisor-intro {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}

.presenter-list, .advisor-name {
    list-style: none;
    padding: 0;
    font-size: 1.2rem;
    color: #f0f0f0;
    /* Los items de lista de presentadores y asesor no se justifican, se centran por el text-align:center del header */
}
.advisor-name {
    margin-bottom: 15px;
}

.presenter-list li {
    margin-bottom: 3px;
}

.document-location-date {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 20px;
    font-style: italic;
}

.project-subtitle { 
    font-size: 1.8rem;
    color: #d8d8d8;
    margin-top: 20px;
    font-weight: 600;
}

.project-document section {
    margin-bottom: 40px;
}

.project-document h3 {
    font-size: 1.7rem;
    color: #e0e0e0;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #555;
}

.project-document h4 {
    font-size: 1.4rem;
    color: #d0d0d0;
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: 600;
}

.project-document ul, .project-document ol {
    margin-left: 20px; 
    padding-left: 20px; 
    color: #ccc;
}

.project-document ul li, .project-document ol li {
    margin-bottom: 0.7em;
    line-height: 1.7;
    text-align: justify; /* NUEVO: Justificar texto en items de lista */
}

.project-document ul ul { 
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}


/* Estilos para la Tabla de Contenidos */
.table-of-contents {
    background-color: rgba(25, 25, 25, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid #333;
}

.table-of-contents h2.subtitle {
    margin-top: 0;
    text-align: center;
    border-bottom-color: #87CEFA; 
}

.table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
}
.table-of-contents ul li {
    text-align: left; /* Para que los links de la TOC no se justifiquen */
}

.table-of-contents ul li a {
    font-size: 1.1rem;
    font-family: 'EB Garamond', serif;
}
.table-of-contents ul ul { 
    padding-left: 25px; 
    margin-top: 8px;
}
.table-of-contents ul ul li a {
    font-size: 1rem; 
    color: #b0c4de; 
}
.table-of-contents ul ul li a:hover {
    color: #c6def7;
}


/* Estilos para la sección de Descripción - Recursos Adicionales */
.project-links {
    margin-top: 25px;
    padding: 15px;
    background-color: rgba(30, 30, 30, 0.5);
    border-radius: 5px;
}
.project-links h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #87CEFA;
}
.project-links ul {
    list-style: none;
    padding-left: 0;
}
.project-links ul li {
    margin-bottom: 8px;
    text-align: left; /* Los links no se justifican */
}
.project-links ul ul { 
    padding-left: 20px;
    margin-top: 5px;
}

/* Estilo para el contenedor del video */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px; /* Máximo ancho para el video, opcional */
    margin: 25px auto; /* Centrar el video y añadir margen */
    padding-top: 56.25%; /* Proporción 16:9 (alto / ancho) */
    border-radius: 8px; /* Bordes redondeados como las imágenes */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* Quitar borde del iframe si lo tuviera */
}


/* Estilos para la Bitácora Metodológica */
.bitacora-list li strong {
    color: #87CEFA; 
}

/* Estilos para la Tabla de Materiales */
.materials-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    background-color: rgba(20,20,20, 0.7);
}

.materials-table th, .materials-table td {
    border: 1px solid #555;
    padding: 12px 15px;
    text-align: left;
    font-family: sans-serif; 
}

.materials-table th {
    background-color: rgba(50, 50, 50, 0.9);
    color: #e8e8e8;
    font-weight: bold;
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
}

.materials-table td {
    color: #ccc;
    /* El texto de las celdas de la tabla no suele justificarse, mantener a la izquierda */
}
.materials-table tr:nth-child(even) {
    background-color: rgba(30,30,30,0.6);
}
.materials-table tfoot td {
    font-weight: bold;
    color: #f0f0f0;
    background-color: rgba(40,40,40,0.8);
}
.materials-table td:nth-child(3), 
.materials-table td:nth-child(4), 
.materials-table td:nth-child(5) { 
    text-align: right;
}
.materials-table th:nth-child(3),
.materials-table th:nth-child(4),
.materials-table th:nth-child(5) {
    text-align: right;
}


/* Estilos para la lista de Referencias */
.references-list {
    list-style-type: decimal; 
    padding-left: 20px;
}
.references-list li {
    margin-bottom: 10px;
    padding-left: 5px;
    line-height: 1.6;
    /* text-align: justify; YA CUBIERTO POR .project-document ul li */
}
.references-list li a {
    margin-left: 5px; 
}

/* Hero section para AgroBot */
.background--home {
    padding: 100px 0; 
    text-align: center;
    position: relative; 
}
.hero-overlay {
    padding: 20px;
}
.Home--Title { 
    font-size: 4rem;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin: 0;
    font-family: 'EB Garamond', serif;
}

section h3, section h4 {
    font-family: 'EB Garamond', serif; 
}

h3.project-subtitle {
    border-bottom: none; 
}