@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Misma paleta que index.html */
    --color-fondo-1: #E4C76D;
    --color-rojo-oscuro: #8C182A;
    --color-fondo-3: #C0392B;
    --color-fondo-4: #A16A46;
    --color-primario: #8C182A;
    --color-texto: #3b2a24;
    --color-blanco: #FFF9F2;
    --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.15);
    --sombra-hover: 0 10px 25px rgba(0, 0, 0, 0.25);
    --transicion-suave: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --borde-radio: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Quita el flash azul en móviles */
    -webkit-text-size-adjust: 100%;           /* Evita que el navegador cambie el tamaño del texto al girar el cel */
    box-sizing: border-box;                   /* Evita problemas con el padding y el tamaño */
    user-select: none;                        /* Evita que el usuario seleccione el texto */
    -webkit-user-select: none;                /* Safari y Chrome móvil */
    -webkit-touch-callout: none;              /* Evita el menú de "Copiar" en iOS */
}

@keyframes gradienteVivo {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes entradaSuave {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(-45deg, #E4C76D, #DDB85A, #CDA84A, #EDD27A);
    background-size: 400% 400%;
    animation: gradienteVivo 15s ease infinite;
    color: var(--color-texto);
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ─── TÍTULO ─── */
.fondo_titulo {
    background: #FFF9F2;
    border-radius: 12px;
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 40px auto 10px;
    padding: 30px 60px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    animation: entradaSuave 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.titulo {
    color: var(--color-rojo-oscuro);
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    margin: 0;
}

.fondo_subtitulo {
    text-align: center;
    color: var(--color-fondo-4);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 12px 0 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ─── GRÁFICA ─── */
.chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0 auto 70px;
    height: 400px;
    width: 90%;
    max-width: 800px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(140, 24, 42, 0.2);
    gap: 20px;
}

.bar {
    width: 12%;
    min-width: 60px;
    background: linear-gradient(to top, var(--color-rojo-oscuro), var(--color-fondo-3));
    border-radius: 10px 10px 0 0;
    position: relative;
    transition: var(--transicion-suave);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: white;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding-top: 10px;
    box-shadow: 0 4px 12px rgba(140, 24, 42, 0.25);
}

.bar:hover {
    transform: scaleY(1.05);
    transform-origin: bottom;
    box-shadow: 0 8px 22px rgba(140, 24, 42, 0.35);
}

.bar .label {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--color-texto);
    font-weight: 600;
    text-align: center;
    width: 120px;
    line-height: 1.2;
}

/* ─── ALTURAS PROPORCIONALES DE CADA BARRA ─── */
/* Escala: 100% del eje = 100 unidades → altura 93% del chart */
.barra_docentes   { height: 93%; }   /* 93% participación docente   */
.barra_proyectos  { height: 37%; }   /* 37 proyectos (de 100)       */
.barra_concurso   { height: 10%; min-height: 36px; } /* 4 proyectos a concurso */
.barra_ponderacion{ height: 30%; }   /* 30% ponderación             */

/* Colores diferenciados por barra */
.barra_docentes {
    background: linear-gradient(to top, #8C182A, #C0392B);
}
.barra_proyectos {
    background: linear-gradient(to top, #A16A46, #C88A60);
}
.barra_concurso {
    background: linear-gradient(to top, #6B3A2A, #9C5A40);
}
.barra_ponderacion {
    background: linear-gradient(to top, #8C182A, #E05A30);
}


/* ─── TABLAS ─── */
table {
    width: 75%;
    max-width: 900px;
    margin: 0 auto 30px;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFF9F2;
    border-radius: var(--borde-radio);
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    border: 2px solid transparent;
    transition: var(--transicion-suave);
}

table:hover {
    box-shadow: var(--sombra-hover);
    border-color: rgba(140, 24, 42, 0.12);
}

th, td {
    padding: 10px 16px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--color-rojo-oscuro);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.82rem;
}

td {
    border-bottom: 1px solid rgba(140, 24, 42, 0.07);
    color: var(--color-texto);
    line-height: 1.5;
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) td {
    background: rgba(228, 199, 109, 0.08);
}

/* ─── TABLA ESTADÍSTICA ─── */
.informacion_estadistica th {
    text-align: center;
}

.informacion_estadistica td {
    font-size: 0.95rem;
    text-align: center;
}

/* ─── TABLA DESCRIPCIÓN ─── */
.informacion_descripcion th:first-child {
    text-align: center;
}

.informacion_descripcion td {
    vertical-align: middle;
}

.informacion_descripcion td:last-child {
    text-align: justify;
}

.informacion_descripcion h4 {
    color: var(--color-rojo-oscuro);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 8px 0 0;
    text-align: center;
}

.img_calculo_reciclaje {
    width: 100%;
    max-width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #FFF9F2;
    display: block;
    margin: 0 auto;
    transition: var(--transicion-suave);
}

.img_calculo_reciclaje:hover {
    transform: scale(1.04);
    border-color: var(--color-rojo-oscuro);
    box-shadow: var(--sombra-hover);
}

/* ─── BOTÓN INICIO ─── */
.item_boton {
    display: flex;
    justify-content: center;
    margin: 40px 0 0;
    animation: entradaSuave 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.item_boton a {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: #FFF9F2;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: var(--sombra-suave);
    transition: var(--transicion-suave);
    border: 2px solid transparent;
}

.item_boton a:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
    border-color: var(--color-rojo-oscuro);
    background: #FFFFFF;
}

.boton_inicio {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.boton_inicio img {
    width: 40px;
    height: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
}

.item_boton a:hover .boton_inicio img {
    transform: translateX(-5px);
}

.item_boton span {
    color: var(--color-rojo-oscuro);
    font-weight: 600;
    font-size: 1.2rem;
}

/* ─── FOOTER ─── */
.pie_pagina {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 18px 20px 24px;
    margin-top: 30px;
    border-top: 1px solid rgba(140, 24, 42, 0.15);
}

.pie_pagina p {
    color: #8a7060;
    font-size: 0.78rem;
    font-weight: 400;
    font-style: italic;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .fondo_titulo {
        width: calc(100% - 20px);
        padding: 20px 16px;
        margin: 20px auto 10px;
    }

    .titulo {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
    }

    .fondo_subtitulo {
        font-size: 0.95rem;
        margin-bottom: 35px;
    }

    .chart {
        height: 280px;
        gap: 10px;
    }

    .bar .label {
        font-size: 0.7rem;
        bottom: -50px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 20px;
        background: #FFF9F2;
        border-radius: 12px;
        box-shadow: var(--sombra-suave);
        padding: 10px;
    }

    td {
        border: none;
        position: relative;
        padding-left: 15px;
    }

    .informacion_estadistica td {
        border-bottom: 1px solid rgba(140, 24, 42, 0.08);
    }

    .item_boton a {
        padding: 12px 20px;
    }

    .boton_inicio img {
        width: 32px;
    }
}

@media (max-width: 480px) {
    .titulo {
        font-size: 1.3rem;
    }
}

