/*
Estilo burbujeante
Celia Fortea Quiles
mailto:cfq1@alu.ua.es
*/

/* === RESET BÁSICO === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Trebuchet MS", sans-serif;
    background: linear-gradient(180deg, #ffeef8, #e2f6ff);
    color: #4a4a4a;
    line-height: 1.6;
}

/* === CONTENEDOR GENERAL === */
#contenedor {
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
    background: rgba(255,255,255,0.7);
    border-radius: 20px;
    padding: 25px 35px;
    box-shadow: 0 0 20px rgba(0,0,0,.05);
}

ul {
    list-style: none;
    padding-left: 0;
}
/* === TÍTULO === */
#titulo h1 span {
    font-size: 2.6em;
    color: #ff82a9;
    font-weight: bold;
    text-shadow: 2px 2px #ffd7e8;
}
#titulo h2 span {
    font-size: 1.4em;
    color: #6fbce4;
    font-style: italic;
    margin-top: 8px;
    display: block;
}

/* === TEXTOS Y ENCABEZADOS === */
h3 span {
    font-size: 1.8em;
    color: #b788fc;
    border-bottom: 3px solid #b788fc;
    padding-bottom: 5px;
}

p span,
dd,
dt {
    font-size: 1.05em;
}

a {
    text-decoration: none;
    font-weight: bold;
    transition: .3s;
}

/* === COLORES PARA ENLACES === */
a:hover {
    opacity: .7;
}
.a1 { color: #ff82a9; }
.a2 { color: #6fbce4; }
.a3 { color: #ffc64d; }
.a4 { color: #98e391; }
.a5 { color: #b788fc; }

/* === LISTAS === */
ul li {
    margin: 7px 0;
}
dl dt {
    margin-top: 13px;
    color: #ff82a9;
}
dl dd {
    margin-left: 15px;
    color: #666;
}

/* === BLOQUES DE SECCIONES === */
#intro, #apartados > div, #enlaces, #enlacesversiones {
    margin-top: 45px;
    padding: 25px;
    border-radius: 15px;
    background: white;
    border: 2px dashed rgba(0,0,0,0.05);
    transition: .3s;
}
#intro:hover, #apartados > div:hover, #enlaces:hover, #enlacesversiones:hover {
    transform: scale(1.01);
    background: #ffffffc9;
}

/* === NAVEGACIÓN INTERNA === */
#enlacesintra ul li {
    margin: 8px 0;
    padding: 8px;
    border-radius: 10px;
}
#enlacesintra li:nth-child(1) { background: #ff82a92b; }
#enlacesintra li:nth-child(2) { background: #6fbce42b; }
#enlacesintra li:nth-child(3) { background: #ffc64d2b; }
#enlacesintra li:nth-child(4) { background: #98e3912b; }

/* === CAJAS FINALES DE ENLACES === */
#enlaces > div,
#enlacesversiones {
    background: #fafafa;
}

#lselecciona ul li,
#lhistorico ul li,
#lrecursos ul li {
    margin: 6px 0;
}

/* === BORDES Y ESTÉTICA DE CUADROS DE DATOS === */
dl {
    margin-top: 15px;
}

/* === FIGURAS EXTRA PARA DECORACIÓN === */
#extraDiv1, #extraDiv2, #extraDiv3,
#extraDiv4, #extraDiv5, #extraDiv6 {
    position: absolute;
    border-radius: 50%;
    opacity: 0.45;
    background: #ff82a9;
}
#extraDiv1 { width: 120px; height: 120px; top: 10px; right: 10px; background: #ff82a9; }
#extraDiv2 { width: 90px; height: 90px; top: 300px; left: 20px; background: #6fbce4; }
#extraDiv3 { width: 100px; height: 100px; bottom: 120px; right: 30px; background: #ffc64d; }
#extraDiv4 { width: 60px; height: 60px; bottom: 40px; left: 50px; background: #98e391; }
#extraDiv5 { width: 140px; height: 140px; bottom: 30%; right: 15%; background: #b788fc; }
#extraDiv6 { width: 50px; height: 50px; top: 500px; left: 60%; background: #6fbce4; }

/* === RESPONSIVE === */


@media (min-width: 1200px) {

    #contenedor {
        display: grid;
        grid-template-columns: 300px 1fr; /* Sidebar + contenido principal */
        gap: 40px;
        max-width: 1400px;
        margin: 40px auto;
        padding: 40px;
    }

    /* Sidebar lateral como cuadrado */
    #enlacesintra {
        grid-column: 1;
        position: relative; /* no sticky */
        width: 100%;
        max-height: 400px; /* altura fija del “cuadro” */
        padding: 25px;
        border-radius: 18px;
        background: rgba(255,255,255,0.85);
        box-shadow: 0 0 18px rgba(0,0,0,0.08);
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* empieza arriba */
        overflow: hidden; /* si hay mucho contenido, no crece */
    }

    /* Contenido principal */
    #intro {
        grid-column: 2;
        margin-top: 0;
    }

    #apartados {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        gap: 40px;
        margin-top: 20px;
    }

    #apartados > div {
        padding: 35px 45px;
    }

    /* Títulos más grandes */
    #titulo h1 span {
        font-size: 3em;
    }
    #titulo h2 span {
        font-size: 1.6em;
    }

    /* Enlaces y versiones debajo del “cuadro” */
    #enlaces, #enlacesversiones {
        margin-top: 25px;
        border-radius: 18px;
        padding: 20px;
        background: rgba(255,255,255,0.85);
        box-shadow: 0 0 15px rgba(0,0,0,0.08);
    }
}

/* === PANTALLAS MÓVILES (=500px) === */
@media (max-width: 500px) {

    body {
        font-size: 0.95em;
    }

    #contenedor {
        width: 96%;
        margin: 10px auto;
        padding: 15px;
    }

    /* Título más compacto */
    #titulo h1 span {
        font-size: 1.9em;
    }
    #titulo h2 span {
        font-size: 1.1em;
    }

    /* Ajuste de bloques */
    #intro, #apartados > div, #enlaces, #enlacesversiones {
        padding: 18px;
        margin-top: 30px;
    }

    /* Listas compactas */
    ul li {
        margin: 4px 0;
    }

    /* Burbujas más pequeñas */
    #extraDiv1, #extraDiv2, #extraDiv3,
    #extraDiv4, #extraDiv5, #extraDiv6 {
        opacity: 0.33;
        transform: scale(0.65);
    }
}


