﻿/* ── VARIABLES DE COLOR ─────────────────────────────────────── */

:root {
    --tau-azul-oscuro: #3d5a80; /* secciones, fondo oscuro */
    --tau-azul-claro: #98c1d9; /* subsecciones, número de pregunta, cabecera */
    --tau-azul-medio: #6E98AF; /* respuesta seleccionada, zona de respuesta */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* BARRA SUPERIOR FIJA */
.header {
    position: sticky;
    top: 0;
    height: 48px;
    background-color: #98c1d9;
    display: grid;
    grid-template-columns: 2fr 6fr 2fr;
    gap: 16px;
    padding: 0 20px;
    align-items: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* COLUMNA 1: BOTONES */
.header-left {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.tau-header-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
    /*font-weight: 500;*/
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    background-color: #00C7FF;
    font-size: 14px;
}

    .tau-header-btn:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .tau-header-btn:active {
        background-color: rgba(255, 255, 255, 0.3);
    }

/* COLUMNA 2: TÍTULO */
.header-center {
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
}

/* COLUMNA 3: PROGRESO */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.progress-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.progress-bar-container {
    width: 100px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4ade80;
    background-color: red;
    border-radius: 4px;
    transition: width 0.1s ease;
    width: 0%;
}



/* ── 3. ÍNDICE Y ÁRBOL ───────────────────────────────────────── */

.tau-indice-titulo {
    font-size: 1.8em;
    font-weight: 700;
    padding: 10px 0 0;
}

.tau-arbol {
    color: darkslategrey;
    border-radius: 5px;
    padding-left: 10vw;
}

.tau-arbol-titulo {
    font-weight: bold;
    font-size: 20px;
    color: darkslategray;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.tau-indice-link-titulo {
    color: black;
    font-size: 20px;
    font-weight: bold;
}

.tau-indice-link-seccion {
    display: grid;
    grid-template-columns: 2fr 1fr;
    color: black;
    font-weight: bold;
    font-size: 18px;
}

.tau-indice-link-seccion--popup {
    display: grid;
    grid-template-columns: 2fr 1fr;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    justify-items: left;
}

.tau-indice-link-item {
    display: grid;
    grid-template-columns: 2fr 1fr;
    color: darkslategray;
    font-size: 14px;
    margin-left: 40px;
    cursor: pointer;
    justify-items: left;
}





/* CONTENIDO PRINCIPAL  PILAS!! */
.container {
    /*    display: grid;
    grid-template-columns: 1fr 26fr 1fr;
    gap: 20px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 48px);*/
}

.sidebar-left {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 68px;
}

    .sidebar-left h3 {
        color: #98c1d9;
        margin-bottom: 12px;
        font-size: 14px;
    }

    .sidebar-left p {
        font-size: 13px;
        color: #666;
        line-height: 1.6;
    }

.main-content {
    background-color: #f2f2f2;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

    .main-content h1 {
        color: #333;
        margin-bottom: 20px;
        font-size: 28px;
        line-height: 1.3;
    }

    .main-content p {
        color: #555;
        line-height: 1.8;
        margin-bottom: 16px;
        text-align: justify;
        /* tamaño de fuente proporcional al ancho de la ventana entre 12 y 20 px */
        /* usa clamp(min, preferred, max) con unidades vw para escalar según el ancho */
        font-size: clamp(14px, 1.5vw, 20px);
    }

    .main-content h2 {
        color: #98c1d9;
        margin-top: 30px;
        margin-bottom: 16px;
        font-size: 20px;
    }

.sidebar-right {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    /*top: 68px;*/
    margin-top: 40px;
}

    .sidebar-right h3 {
        color: #98c1d9;
        margin-bottom: 12px;
        font-size: 14px;
    }

    .sidebar-right p {
        font-size: 13px;
        color: #666;
        line-height: 1.6;
    }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 30px 16px;
    }

    .sidebar-left,
    .sidebar-right {
        display: none;
    }

    .main-content {
        padding: 24px;
    }

        .main-content h1 {
            font-size: 24px;
        }

        .main-content p {
            font-size: 15px;
        }
}

@media (max-width: 768px) {
    .header {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 12px;
        height: auto;
        min-height: 48px;
        flex-wrap: wrap;
        align-content: center;
    }

    .header-left {
        grid-column: 1;
        gap: 8px;
    }

    .header-center {
        grid-column: 1;
        font-size: 14px;
        white-space: normal;
        text-overflow: clip;
        overflow: visible;
    }

    .header-right {
        grid-column: 1;
        justify-content: flex-start;
        gap: 8px;
    }

    .progress-text {
        font-size: 12px;
    }

    .progress-bar-container {
        width: 80px;
    }

    .tau-header-btn {
        font-size: 16px;
        padding: 4px 8px;
        gap: 4px;
    }

    .main-content {
        padding: 16px;
    }

        .main-content h1 {
            font-size: 20px;
            margin-bottom: 16px;
        }

        .main-content p {
            font-size: 14px;
            text-align: left;
        }
}

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    .header-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-text {
        font-size: 11px;
    }

    .progress-bar-container {
        width: 60px;
    }

    .main-content h1 {
        font-size: 18px;
    }

    .main-content p {
        font-size: 13px;
    }
}


/* ── 4. SECCIÓN ──────────────────────────────────────────────── */

.tau-seccion {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    padding-top: 10px;
    margin-bottom: 60px;
    /*margin-right: -20px;*/
    background-color: var(--tau-azul-oscuro);
    color: white;
    height: 60px;
    border-radius: 30px;
}

.tau-seccion-col1 {
    align-content: center;
}

.tau-seccion-col2 {
    text-align: center;
}

.tau-seccion-col3 {
    font-size: 12px;
    font-weight: bold;
    text-align: end;
    align-content: center;
    padding-right: 10px;
}

.tau-seccion-texto { /* espacio semántico — sin estilos propios */
}


/* ── 5. SUBSECCIÓN ───────────────────────────────────────────── */

.tau-subseccion {
    font-size: 20px;
    font-weight: bold;
    margin-top: 50px;
    margin-bottom: 45px;
    /*margin-right: -20px;*/
    color: white;
    background-color: var(--tau-azul-claro);
    height: 45px;
    padding: 5px 30px;
    border-radius: 30px;
}


/* ── 11. IMAGEN EN POPUP ─────────────────────────────────────── */

.tau-popup-imagen-img {
    width: 100%;
    height: auto;
}

#ImagenPopUp {
    width: 100%;
    height: auto;
}

.tau-imagen-comentario {
    /* quiero que el ancho tenga un mínimo y un máximo */
    /*width: 50%;*/
    min-width: 50px;
    max-width: 90px;
    height: auto;
    margin-bottom: 6px;
}

.contenedor-botones-popup {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    /*padding: 20px;*/ /* Ajusta el valor según tu necesidad */
    gap: 8px; /* Espacio entre los botones */
}

.btn-tau {
    color: white;
    background-color: #00C7FF;
    ;
    font-weight: bold;
}

    .btn-tau:hover {
        color: white;
        background-color: grey;
        font-weight: bold;
        /*color: var(--bs-btn-hover-color);*/
    }

.TituloTau {
    font-weight:bold;
}