/*
Estilo Moderno
Nerea Ruiz Tercero
mailto:nrt17@alu.ua.es
*/

/* --- ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #efefef; /* Gris muy suave de fondo */
    color: #333333;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: #E52E71; /* Rosa base */
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #8E2DE2; /* Morado al pasar el raton */
    text-decoration: underline;
}

/* --- CONTENEDOR PRINCIPAL --- */
#contenedor {
    background-color: #ffffff;
    max-width: 1000px; /* Ancho maximo solicitado para la captura */
    margin: 40px auto;
    padding: 50px;
    /* Sombra elegante y difusa */
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    /* Borde superior colorido */
    border-top: 6px solid #E52E71; 
    border-image: linear-gradient(to right, #8E2DE2, #E52E71) 1;
}

/* --- CABECERA --- */
#intro {
    text-align: center;
    margin-bottom: 50px;
}

#titulo h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    /* Degradado mediante color solido como fallback */
    color: #E52E71;
}

#titulo h2 {
    font-size: 22px;
    font-weight: 300;
    color: #666;
    margin-bottom: 40px;
}

#resumen, #comentario {
    max-width: 800px;
    margin: 0 auto 30px auto;
    background-color: #fafafa;
    padding: 20px;
    border-left: 4px solid #E52E71;
    border-radius: 0 8px 8px 0;
}

#resumen ul {
    list-style: none; /* Sin bullets */
    margin: 15px 0 20px 0;
    padding: 0;
    text-align: center; 
}

#resumen ul li {
    color: #E52E71;
    font-weight: 600;
    margin-bottom: 8px; 
    font-size: 1.1em;
}

/* --- NAVEGACION (#enlacesintra) --- */
#enlacesintra {
    margin-bottom: 60px;
    text-align: center;
}

#enlacesintra h3 {
    display: none;
}

#enlacesintra ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

#enlacesintra li a {
    display: inline-block;
    padding: 12px 25px;
    background: #ffffff;
    color: #333;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid transparent; 
    background-clip: padding-box;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Efecto hover en los botones */
#enlacesintra li a:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(229, 46, 113, 0.25);
    color: #E52E71;
    text-decoration: none;
}

/* --- SECCIONES DE CONTENIDO (#apartados) --- */
#apartados > div {
    margin-bottom: 60px;
}

#apartados h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

/* Subrayado con degradado para los titulos */
#apartados h3::after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background: linear-gradient(to right, #8E2DE2, #E52E71);
    margin-top: 8px;
    border-radius: 2px;
}

#apartados ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

#apartados ul li {
    margin-bottom: 8px;
}

/* DEFINICIONES (Profesores y Bibliografia) */
dl {
    background-color: #fafafa;
    border: 1px solid #eeeeee;
    padding: 20px;
    border-radius: 8px;
}

dt {
    color: #E52E71;
    font-weight: bold;
    margin-top: 15px;
    font-size: 1.1em;
}

dt:first-child {
    margin-top: 0;
}

dd {
    margin-left: 0;
    margin-bottom: 10px;
    color: #555;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

dd:last-child {
    border-bottom: none;
}

span.autores {
    font-weight: 600;
    color: #444;
}

/* --- PIE DE PAGINA (#enlaces, #enlacesversiones) --- */
#enlaces, #enlacesversiones {
    background-color: #333;
    color: #fff;
    padding: 40px;
    margin-top: 50px;
    border-radius: 12px;
    text-align: center;
}

#enlaces h3, #enlacesversiones h3 {
    color: #E52E71;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    display: inline-block;
}

#enlaces ul, #enlacesversiones ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

#enlaces a, #enlacesversiones a {
    color: #ddd;
    font-size: 14px;
}

#enlaces a:hover, #enlacesversiones a:hover {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #E52E71;
}

#lselecciona, #lhistorico, #lrecursos {
    margin-bottom: 30px;
}

/* =========================================
   MEDIA QUERIES
   ========================================= */

/* --- TABLET (Entre 601px y 900px aprox) --- */
/* Los botones se ponen en dos filas, dos botones en cada una */
@media screen and (max-width: 900px) {
    #contenedor {
        width: 95%;
        padding: 30px;
    }
    
    #enlacesintra ul {
        justify-content: space-between;
    }

    #enlacesintra li {
        /* 48% para que quepan 2 por fila con un pequeno hueco */
        width: 48%; 
        margin-bottom: 10px;
    }

    #enlacesintra li a {
        width: 100%;
    }
}

/* --- MOVIL (Menos de 600px) --- */
/* Una columna vertical, margen lateral visible */
@media screen and (max-width: 600px) {
    #contenedor {
        /* Dejo un 90% de ancho para que se vea el fondo gris (5% a cada lado) */
        width: 90%; 
        margin: 20px auto; 
        padding: 20px;
    }

    #titulo h1 {
        font-size: 32px;
    }

    /* Navegacion vertical */
    #enlacesintra ul {
        flex-direction: column;
        gap: 10px;
    }

    #enlacesintra li {
        width: 100%;
    }

    #enlacesintra li a {
        width: 100%;
        border: 1px solid #e0e0e0;
    }

    /* Pie de pagina vertical */
    #enlaces ul, #enlacesversiones ul {
        flex-direction: column;
    }
    
    #resumen, #comentario {
        border-left: none;
        border-top: 4px solid #E52E71;
    }
}