/* 
Dark Modern Minimal
Carlos Gras Brufal
*/

/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e6e6e6;
    background: #121212;
    background-image: linear-gradient(to bottom, #0a0a0a, #1a1a1a);
    min-height: 100vh;
}

#contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== ENCABEZADO Y TÍTULO ===== */
#intro {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#titulo {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #0078f2;
    position: relative;
}

#titulo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0078f2, transparent);
}

#titulo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 120, 242, 0.2);
}

#titulo h2 {
    font-size: 1.4rem;
    font-weight: 400;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SECCIONES DE CONTENIDO ===== */
#resumen, #comentario {
    background: rgba(25, 25, 25, 0.85);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #2a2a2a;
}

#resumen .p1, #comentario .p1, #comentario .p2 {
    font-size: 1.1rem;
    color: #d0d0d0;
    margin-bottom: 15px;
    line-height: 1.7;
}

#resumen .ul1 {
    list-style: none;
    margin: 20px 0;
    padding-left: 20px;
}

#resumen .ul1 li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #b0b0b0;
}

/* ===== MENÚS DE NAVEGACIÓN ===== */
#enlacesintra, #enlacesversiones {
    background: rgba(20, 20, 20, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    border: 1px solid #333;
}

#enlacesintra h3, #enlacesversiones h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

#enlacesintra .ul1, #enlacesversiones .ul1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    list-style: none;
}

#enlacesintra .ul1 li, #enlacesversiones .ul1 li {
    background: rgba(40, 40, 40, 0.7);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #3a3a3a;
}

#enlacesintra .ul1 li:hover, #enlacesversiones .ul1 li:hover {
    transform: translateY(-2px);
    border-color: #0078f2;
    box-shadow: 0 5px 20px rgba(0, 120, 242, 0.2);
}

#enlacesintra .ul1 a, #enlacesversiones .ul1 a {
    display: block;
    padding: 14px 18px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    background: rgba(0, 120, 242, 0.05);
}

#enlacesintra .ul1 a:hover, #enlacesversiones .ul1 a:hover {
    color: #0078f2;
    background: rgba(0, 120, 242, 0.1);
}

/* ===== APARTADOS PRINCIPALES ===== */
#apartados {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

#objetivos, #contenidos, #profesores, #bibliografia {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    padding: 35px;
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#objetivos:hover, #contenidos:hover, #profesores:hover, #bibliografia:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

#apartados h3 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #0078f2;
    position: relative;
}

#apartados h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #0078f2, transparent);
}

#apartados p {
    color: #b0b0b0;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* ===== LISTAS ANIDADAS ===== */
#contenidos .ul1, #contenidos .ul2 {
    list-style: none;
    margin: 25px 0;
}

#contenidos .ul1 > li {
    background: rgba(40, 40, 40, 0.7);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #0078f2;
}

#contenidos .ul1 > li > ul {
    margin-top: 15px;
    padding-left: 25px;
}

#contenidos .ul1 > li > ul li {
    padding: 8px 0;
    color: #a0a0a0;
    position: relative;
    padding-left: 20px;
}

/* ===== PROFESORES Y BIBLIOGRAFÍA ===== */
#profesores dl, #bibliografia dl {
    margin: 25px 0;
}

#profesores dt, #bibliografia dt {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 20px;
    padding-left: 20px;
    position: relative;
}

#profesores dd, #bibliografia dd {
    color: #a0a0a0;
    margin: 10px 0 20px 20px;
    padding: 15px;
    background: rgba(40, 40, 40, 0.5);
    border-radius: 6px;
    border-left: 3px solid #0078f2;
}

/* ===== ENLACES Y RECURSOS ===== */
#enlaces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

#lhistorico, #lrecursos {
    background: rgba(25, 25, 25, 0.9);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #333;
}

#lselecciona {
    background: rgba(25, 25, 25, 0.85);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #2a2a2a;
}

#enlaces h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

#enlaces ul {
    list-style: none;
}

#enlaces ul li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #d0d0d0;
    font-size: 1.1rem;
    line-height: 1.7;
}

#enlaces ul li:last-child {
    border-bottom: none;
}

#lhistorico a, #lrecursos a {
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

#lhistorico a:hover, #lrecursos a:hover {
    color: #0078f2;
    transform: translateX(5px);
}

#lselecciona a {
    color: #0078f2;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 0;
    font-weight: normal;
    display: inline;
}

#lselecciona a:hover {
    color: #66b3ff;
}

#lselecciona a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -1px;
    left: 0;
    background: linear-gradient(90deg, #0078f2, transparent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

#lselecciona a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ===== ELEMENTOS EXTRA (Opcionales) ===== */
#extraDiv1, #extraDiv2, #extraDiv3, 
#extraDiv4, #extraDiv5, #extraDiv6 {
    display: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    #contenedor {
        padding: 15px;
    }
    
    #intro {
        padding: 25px;
    }
    
    #titulo h1 {
        font-size: 2.5rem;
    }
    
    #titulo h2 {
        font-size: 1.2rem;
    }
    
    #enlacesintra .ul1, #enlacesversiones .ul1 {
        grid-template-columns: 1fr;
    }
    
    #enlacesintra .ul1 a, #enlacesversiones .ul1 a {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
    
    #apartados {
        gap: 20px;
    }
    
    #objetivos, #contenidos, #profesores, #bibliografia {
        padding: 25px;
    }
    
    #enlaces {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #lselecciona, #lhistorico, #lrecursos {
        padding: 20px;
    }
    
    #enlaces ul li {
        font-size: 1rem;
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    #titulo h1 {
        font-size: 2rem;
    }
    
    #titulo h2 {
        font-size: 1rem;
    }
    
    #apartados h3 {
        font-size: 1.5rem;
    }
    
    #resumen, #comentario, #lselecciona {
        padding: 20px;
    }
    
    #enlacesintra, #enlacesversiones {
        padding: 15px;
    }
    
    #enlacesintra h3, #enlacesversiones h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    #enlacesintra .ul1 a, #enlacesversiones .ul1 a {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    
    #lhistorico, #lrecursos {
        padding: 18px;
    }
    
    #enlaces ul li {
        font-size: 0.95rem;
        padding: 8px 0;
    }
}

/* ===== EFECTOS ESPECIALES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#intro, #enlacesintra, #apartados > div, #enlaces > div, #enlacesversiones {
    animation: fadeIn 0.8s ease-out forwards;
}

#intro { animation-delay: 0.1s; }
#enlacesintra { animation-delay: 0.2s; }
#objetivos { animation-delay: 0.3s; }
#contenidos { animation-delay: 0.4s; }
#profesores { animation-delay: 0.5s; }
#bibliografia { animation-delay: 0.6s; }
#enlaces > div { animation-delay: 0.7s; }
#enlacesversiones { animation-delay: 0.8s; }

/* ===== ESTILOS GLOBALES PARA ENLACES ===== */
a {
    color: #0078f2;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #66b3ff;
}

a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #0078f2, transparent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ===== MEJORAS DE LEGIBILIDAD ===== */
p {
    text-align: justify;
}

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.3px;
}