/*
Diseño colorido tipo comic con 3 columnas y títulos subrayados
Sara Cuenca Garcia
*/

/* 1. FONDO Y BASE */
body#pi {
    background-color: #ffde03;
    background-image: radial-gradient(#000 0.8px, transparent 0.8px);
    background-size: 25px 25px;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 25px;
}

#contenedor {
    max-width: 1450px;
    margin: 0 auto;
    border: 5px solid #000;
    box-shadow: 10px 10px 0px #000;
    padding: 30px;

    /* Fondo de puntitos dentro del contenedor blanco */
    background-color: #ffffff; 
    background-image: radial-gradient(#000 0.8px, transparent 0.8px);
    background-size: 20px 20px;
    
    display: grid;
    /* Estructura: Izquierda (Enlaces), Centro (Contenido), Derecha (Versiones estrecha) */
    grid-template-columns: 320px 1fr 200px;
    column-gap: 30px;
    align-items: start;
}

/* --- COLUMNA 1: IZQUIERDA --- */
#enlaces {
    grid-column: 1;
    grid-row: 1;
    background-color: #00e5ff;
    border: 5px solid #000;
    padding: 20px;
    box-shadow: 10px 10px 0px #6200ea;
    transform: rotate(-1deg);
    margin-bottom: 20px;
}

#enlacesintra {
    grid-column: 1;
    grid-row: 2;
    background: #fff;
    border: 4px solid #000;
    padding: 20px;
    box-shadow: 10px 10px 0px #000;
    transform: rotate(1deg);
}

/* --- COLUMNA 3: DERECHA --- */
#enlacesversiones {
    grid-column: 3;
    width: 100%;
    box-sizing: border-box;
    grid-row: 1;
    background: #ffeb3b;
    border: 4px solid #000;
    padding: 20px;
    box-shadow: 10px 10px 0px #fa7e36;
    transform: rotate(1deg);
}

/* --- COLUMNA 2: CENTRO  --- */
#intro {
    grid-column: 2;
    grid-row: 1;
    background: #ff5252;
    border: 5px solid #000;
    padding: 40px 30px;
    color: #fff;
    box-shadow: 12px 12px 0px #a8f153;
    margin-bottom: 80px;
    text-align: center;
}

#intro h1 {
    font-size: 4em;
    width: 90%;
    margin: 0 auto 20px auto;
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 10px 25px;
    text-decoration: underline;
    text-decoration-thickness: 8px;
    text-underline-offset: 10px;
    text-decoration-color: #a8f153;
    text-transform: uppercase;
}

#intro h2 {
    font-size: 1.5em;
    color: #fff;
    margin-top: 10px;
}

/* Bloques de contenido blancos */
#objetivos, #contenidos, #profesores, #bibliografia {
    grid-column: 2;
    background: #fff;
    border: 4px solid #000;
    padding: 30px;
    box-shadow: 12px 12px 0px #000;
    margin-bottom: 80px;
}

#objetivos h3, #contenidos h3, #profesores h3, #bibliografia h3 {
    font-size: 1.8em;
    display: inline-block;
    border-bottom: 8px solid #000;
    padding-bottom: 5px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 900;
}

/* --- ESTILOS DE ENLACES  --- */
#objetivos a, #contenidos a, #profesores a, #bibliografia a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #000;
}

#profesores a:hover, #bibliografia a:hover {
    background: #000;
    color: #fff;
}

/* Estilo para los menús laterales  */
#enlaces a, #enlacesintra a, #enlacesversiones a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #000;
}

#enlaces a:hover {
    background: #6200ea;
}

#enlacesintra a:hover{
    background: #000;
    color: #fff;
}

#enlacesversiones a:hover{
    background: #fa7e36;
}

/* --- ESTILOS COMUNES DE LISTAS --- */
#enlaces h3 span, #enlacesintra h3 span, #enlacesversiones h3 span {
    background: #000;
    color: #fff;
    display: block;
    padding: 5px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

#enlaces ul, #enlacesintra ul, #enlacesversiones ul { list-style: none; padding: 0; }
#enlaces li, #enlacesintra li, #enlacesversiones li { margin-bottom: 10px; border-bottom: 2px solid #000; }


#intro a {
    color: #fff; 
    text-decoration: none;
    border-bottom: 4px solid #000; 
    font-weight: bold;
    padding: 0 2px;
}

#intro a:hover {
    background-color: #a8f153; 
}

/* --- RESPONSIVE--- */
@media screen and (max-width: 950px) {
    #contenedor {
        display: flex;
        flex-direction: column;
        padding: 15px;
    }

    #enlaces, #enlacesintra, #enlacesversiones, #intro, #objetivos, #contenidos, #profesores, #bibliografia {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
        box-sizing: border-box;
        margin-bottom: 30px;
    }

    #intro h1 {
        font-size: 1.8em !important;
        width: auto !important;
        padding: 15px !important;
        line-height: 1.2;
        text-decoration-thickness: 4px;
    }

    #intro { padding: 20px 10px !important; }

    #objetivos h3, #contenidos h3, #profesores h3, #bibliografia h3 {
        font-size: 1.4em !important;
        border-bottom-width: 5px !important;
    }

    #pie { width: 100%; margin-top: 20px; }
}