/* ==========================================================================
   Transparencia — Template Transparencia (Transparencia/transparencia.php)
   Maqueta: Figma "DUOC - Transparencia" (desktop 159:3840 / mobile 50:10065)
   ========================================================================== */

.transparencia {
    --tr-negro: #1a1a1a;
    --tr-gris-900: #0f172a;
    --tr-amarillo: #ffb800;
    --tr-crema: #fffcea;
    --tr-menu-bg: #f9f9f8;
    --tr-menu-activo: #e4e4e2;
    --tr-borde: #cacaca;

    font-family: "Lato", sans-serif;
    color: var(--tr-negro);
    letter-spacing: -0.015em;
}

.transparencia *,
.transparencia *::before,
.transparencia *::after {
    box-sizing: border-box;
}

.transparencia h2,
.transparencia h3,
.transparencia p {
    font-family: "Lato", sans-serif;
    color: var(--tr-negro);
    letter-spacing: -0.015em;
    text-transform: none;
}

.transparencia button {
    font-family: "Lato", sans-serif;
    letter-spacing: -0.015em;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.transparencia button:focus-visible,
.transparencia a:focus-visible {
    outline: 2px solid var(--tr-gris-900);
    outline-offset: 2px;
}

.transparencia section {
    /* custom-layout.css aplica "section{display:flex;flex-direction:column;min-height:280px}" */
    min-height: 0;
}

.tr-wrap {
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ---------- Intro ---------- */

.tr-intro {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding-top: 40px;
}

.tr-intro__card {
    background: var(--tr-crema);
    border-radius: 20px;
    padding: 30px;
}

.transparencia .tr-intro__titulo {
    font-size: 31.25px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px;
}

.tr-intro__texto p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 24px;
}

.tr-intro__texto > :last-child {
    margin-bottom: 0;
}

.transparencia .tr-marco__titulo {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px;
}

.tr-marco__texto p {
    font-size: 20px;
    line-height: 1.2;
    margin: 0 0 10px;
}

.tr-marco__texto > :last-child {
    margin-bottom: 0;
}

/* ---------- Menú lateral + contenido ---------- */

.transparencia .tr-docs-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 40px;
}

.tr-menu {
    flex: 0 0 300px;
    width: 300px;
    background: var(--tr-menu-bg);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* "Menú Transparencia": solo mobile */
.tr-menu__toggle {
    display: none;
}

.tr-chevron-menu {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    transition: transform .2s ease;
}

.transparencia .tr-menu__grupo-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 68px;
    padding: 10px;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--tr-negro);
}

.tr-menu__grupo.is-open > .tr-menu__grupo-btn {
    background: var(--tr-menu-activo);
    font-weight: 700;
    color: var(--tr-gris-900);
}

.tr-menu__grupo.is-open > .tr-menu__grupo-btn .tr-chevron-menu,
.tr-menu.is-open > .tr-menu__toggle .tr-chevron-menu {
    transform: rotate(180deg);
}

.tr-menu__items {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tr-menu__grupo.is-open > .tr-menu__items {
    display: block;
}

.transparencia .tr-menu__item {
    display: block;
    width: 100%;
    padding: 10px 10px 10px 20px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--tr-gris-900);
}

.transparencia .tr-menu__item:hover,
.transparencia .tr-menu__item.is-active {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tr-contenido {
    flex: 1 1 0;
    min-width: 0;
}

.tr-panel[hidden] {
    display: none;
}

.transparencia .tr-panel__titulo {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 40px;
    outline: none;
}

.tr-panel__descripcion {
    font-size: 16px;
    line-height: 1.5;
    margin: -20px 0 30px;
}

.transparencia .tr-panel__vacio {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* ---------- Desplegable por año ---------- */

.tr-acordeon {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 4px rgba(0, 0, 0, .14);
    padding: 20px;
}

.tr-acordeon + .tr-acordeon,
.tr-docs + .tr-acordeon {
    margin-top: 10px;
}

.tr-docs + .tr-acordeon {
    margin-top: 30px;
}

.transparencia .tr-acordeon__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--tr-negro);
}

.tr-chevron {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    transition: transform .2s ease;
}

.tr-acordeon.is-open .tr-chevron {
    transform: rotate(180deg);
}

.tr-acordeon__body {
    margin-top: 20px;
}

.tr-acordeon__body[hidden] {
    display: none;
}

/* ---------- Lista de documentos ---------- */

.tr-docs__lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tr-doc {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--tr-borde);
}

.transparencia .tr-doc__titulo {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
    overflow-wrap: anywhere;
}

.transparencia .tr-doc__boton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    height: 34px;
    padding: 0 12.4px;
    border-radius: 25px;
    background: var(--tr-amarillo);
    color: var(--tr-negro);
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: filter .15s ease;
}

.transparencia .tr-doc__boton:hover {
    color: var(--tr-negro);
    text-decoration: none;
    filter: brightness(.95);
}

.tr-doc__boton img {
    width: 21px;
    height: 21px;
}

/* "Ver todos los documentos": solo mobile */
.tr-docs__ver-todos {
    display: none;
}

/* ==========================================================================
   Mobile (maqueta 428px)
   ========================================================================== */
@media (max-width: 991px) {
    .tr-intro {
        gap: 50px;
        padding-top: 30px;
    }

    .tr-intro__card {
        background: none;
        border-radius: 0;
        padding: 0;
    }

    .transparencia .tr-intro__titulo {
        margin-bottom: 29px;
    }

    .tr-intro__texto p {
        margin-bottom: 0;
    }

    .transparencia .tr-docs-section {
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .tr-menu {
        flex: none;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
    }

    .transparencia .tr-menu__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 68px;
        padding: 10px;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
        color: var(--tr-gris-900);
    }

    .tr-menu:not(.is-open) > .tr-menu__grupos {
        display: none;
    }

    .transparencia .tr-menu__grupo-btn {
        padding-right: 30px;
    }

    .tr-acordeon__body {
        margin-top: 20px;
    }

    .tr-doc {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 0 20px;
    }

    .transparencia .tr-doc__titulo {
        flex: none;
        width: 100%;
    }

    .tr-docs--colapsable:not(.is-expanded) .tr-doc--extra {
        display: none;
    }

    .tr-docs--colapsable:not(.is-expanded) .tr-docs__ver-todos {
        display: flex;
        justify-content: center;
        margin-top: 20px;
    }

    .transparencia .tr-docs__ver-todos-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        padding: 10px 25px;
        border: 1px solid var(--tr-amarillo);
        border-radius: 100px;
        font-size: 16px;
        line-height: 1.5;
        color: #000;
        text-align: center;
    }
}
