:root {
    --border: #c7c0cc;
    --shadow: rgba(0,0,0,0.2);
    --bg: #f8f2f9;
    /*--bg-hover:#c7c0cc;*/
    --bg-hover: #ffffff;
    --focus-ring: #111827;
    --accent: #0077b6;
    /* Mejor contraste de texto */
    --text: #243041;
    --text-muted: #243041;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    line-height: 1.4;
    background: #fff;
}

.homeTacrc {
    font-size: 0.85rem;
}

    .homeTacrc a {
        font-size: 0.85rem;
    }
/****** logo + banners + texto ******/
.homeTacrc-top-fila nav {
    display: block;
}

.homeTacrc-top {
    max-width: 1200px;
    margin-inline: auto;
    padding: 0.5rem;
    display: grid;
    gap: 0.5rem;
}
/* Fila superior: logo + banners */
.homeTacrc-top-fila {
    display: grid;
    gap: 1rem;
    align-items: center;
}
/* Logo */
.homeTacrc-top-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .homeTacrc-top-logo a {
        display: inline-flex;
        align-items: center;
        border-radius: 6px;
    }

        .homeTacrc-top-logo a:focus-visible {
            outline: none;
            box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--focus-ring);
        }

    .homeTacrc-top-logo img {
        width: min(295px, 100%);
        height: auto;
        max-height: 80px;
    }
/* Banners */
.homeTacrc-top-banners {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap; /* si falta espacio, baja a la línea siguiente */
    justify-content: center;
    align-items: center;
    flex-flow: column;
    list-style-type: none;
    background: none;
}

    .homeTacrc-top-banners li {
        padding-left: 0px !important;
        background: none !important;
    }
    ul.homeTacrc-top-banners li {
        max-width:232px;
    }

    .homeTacrc-top-banners a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        border: 2px solid transparent; /* para no “saltar” al enfocar */
        text-decoration: none;
    }

        .homeTacrc-top-banners a:hover {
            box-shadow: 0 0 5px 2px rgba(112, 112, 112, 0.9);
        }
        /* Foco visible en banners */
        .homeTacrc-top-banners a:focus-visible {
            outline: none;
            border-color: #fff;
            box-shadow: 0 0 0 3px var(--focus-ring);
        }
    /* Imagen del banner */
    .homeTacrc-top-banners img {
        width: min(232px, 100%);
        height: auto;
        max-height: 115px;
        aspect-ratio: 232 / 115;
        object-fit: cover;
        border-radius: 6px;
    }
/* Bloque de texto */
.homeTacrc-top-text {
    padding: 0rem;
}

    .homeTacrc-top-text a:focus-visible {
        outline: none;
        box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--focus-ring);
        border-radius: 4px;
    }
/*********** Desplegable ************/
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
/* Contenedor grid */

section ul.lista-botones ul li {
    padding-left: 0px;
}

section ul.lista-botones li ul li {
    padding-left: 15px;
}

.lista-botones {
    position: relative; /* referencia del panel absoluto */
    display: grid;
    --lb-gap: 0.5rem;
    gap: var(--lb-gap); /* vuelve el espaciado vertical y horizontal */
    grid-template-columns: 1fr;
    padding: 0.5rem;
    padding-right: 0px;
    margin-inline: auto;
    max-width: 1200px;
}
/* Item */
.lista-botones-item {
    border-radius: 5px;
    /*background:var(--bg)!important;*/
    border: 1.5px solid var(--border);
    overflow: hidden; /* por defecto recorta (pero al abrir se hace visible) */
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
    padding-left: 0px !important;
    margin-bottom: 0 !important; /*quita el doble espaciado*/
    background-color: var(--bg) !important;
    background-image: none !important;
}

    .lista-botones-item:hover {
        background: var(--bg-hover) !important;
        box-shadow: 0 0 5px 2px rgba(112, 112, 112, 0.3);
    }
/* Botón */
.lista-botones-trigger {
    display: flex;
    align-items: center;
    gap: 0 1.3rem;
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 1.25rem 1rem;
    text-align: left;
    min-height: 110px; /* target size */
    height: 100%;
    border-radius: 5px;
    color: var(--text-muted);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    margin-left: auto;
}

.lista-botones-item:hover .lista-botones-trigger {
    /*color:#fff;*/
    color: var(--text-muted);
}
/* Focus visible (WCAG 2.2) */
.lista-botones-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--focus-ring);
}
/* Resaltar tarjeta cuando el botón tiene foco */
.lista-botones-item:has(.lista-botones-trigger:focus-visible) {
    box-shadow: 0 0 0 2px rgba(0,119,182,0.35), 2px 2px 9px var(--shadow);
}
/* Icono */
.lista-botones-trigger img {
    width: clamp(24px,15vw,50px);
    height: clamp(24px,15vw,50px);
    flex-shrink: 0;
    transition: filter 0.2s ease;
}

.lista-botones-trigger:hover img {
    /*filter:brightness(0) invert(1);*/
}
/* Texto */
.lista-botones-trigger span {
    flex: 1;
    font-size: clamp(0.85rem,1vw,1rem);
    font-weight: 500;
}
/* Estado expandido */
.lista-botones-trigger[aria-expanded="true"] {
    background: #ffffff;
    color: #000;
    border: 2px solid var(--border);
}

.lista-botones-item:has(.lista-botones-trigger[aria-expanded="true"]) button:hover {
    color: var(--text-muted);
    background: #ffffff;
    overflow: visible; /* permite que el panel absoluto no se recorte */
}

.lista-botones-item:has(.lista-botones-trigger[aria-expanded="true"]) .lista-botones-trigger:hover img {
    /*filter:grayscale();*/
}
/* Panel */
.lista-botones-panel {
    position: absolute;
    left: 0px;
    right: 0px;
    z-index: 9999;
    overflow: hidden; /* para animar height */
    will-change: height;
}

    .lista-botones-panel[hidden] {
        display: none;
    }
/* Espaciador (empuja lo de abajo) */
.lista-botones-spacer {
    grid-column: 1 / -1;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    position: absolute;
    inset: 0 auto auto 0; /* top-left */
    width: 1px;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}
    /* Solo existe cuando hay panel abierto */
    /* Compensación del doble gap SOLO cuando hay panel abierto */
    .lista-botones-spacer[data-open="true"] {
        margin-block: calc(-1 * var(--lb-gap, 0.5rem));
        position: static;
        grid-column: 1 / -1;
        margin-block: calc(-1 * var(--lb-gap, 0.5rem));
    }
/* Sublista */
.sublista {
    margin: 10px 0;
    padding: 1rem;
    background: #fff;
    border: 3px solid var(--border);
    margin-inline: auto;
    border-radius: 0;
}

    .sublista ul {
        margin: 0;
    }

    .sublista li {
        margin-bottom: 0.5rem;
        border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
        padding-bottom: 5px;
    }

    .sublista ul {
        margin-top: 5px;
    }

        .sublista ul li {
            padding-left: 0px;
            background: url("../img/ico-bulletLista.svg") no-repeat 0px 5px / 6px !important;
            background-size: 20px;
        }
            /*
.homeTacrc ul li {
  background:none!important;
}*/

            .sublista ul li ul li {
                border-bottom: 0px;
                padding-left: 15px !important;
            }

    .sublista li:last-child {
        border: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .sublista a {
        color: var(--text);
        text-decoration: none;
        /*display:inline-flex!important;*/
        padding: 0px;
        position: relative;
        font-weight: normal;
        /*padding-bottom: 20px;*/
    }

        .sublista a:hover,
        .sublista a:focus-visible {
            text-decoration: underline;
        }

    /*Desplegable sublistas anidadas*/
    .sublista li.sublista-has-nested {
        background: none !important; /* quita el bullet de fondo SOLO en estos */
        padding-left: 0 !important;
        display: grid;
        grid-template-columns: 22px 1fr; /* columna del icono +/− y texto */
        column-gap: 1rem;
        row-gap: .25rem;
        align-items: start;
    }
        /* Colocación: botón (col 1), enlace/título (col 2), UL anidada (col 2) */
        .sublista li.sublista-has-nested > button.sublista-nested-trigger {
            grid-column: 1;
            grid-row: 1;
        }

        .sublista li.sublista-has-nested > :is(a, span, strong, em, b, i, p) {
            grid-column: 2;
            grid-row: 1;
        }

        .sublista li.sublista-has-nested > ul {
            grid-column: 2;
            grid-row: 2;
            margin-top: .15rem;
        }
    /* Botón icono: sin texto visible, solo pseudo-elemento */
    .sublista .sublista-nested-trigger {
        appearance: none;
        border: 1px solid var(--border);
        background: #fff;
        border-radius: 6px;
        cursor: pointer;
        /* tamaño objetivo (WCAG 2.2 Target Size mínimo 24px) */
        width: 24px;
        height: 24px;
        display: inline-grid;
        place-items: center;
        padding: 0;
        line-height: 1;
        min-width: auto;
        margin-left: 0px;
    }

        .sublista .sublista-nested-trigger::before {
            content: url("../img/ico-bulletDesplegarC.svg");
            font-weight: 700;
            font-size: 18px;
            transform: translateY(-1px);
            width: 25px;
            top: 0px;
            position: relative;
            left: -1px;
        }

        .sublista .sublista-nested-trigger[aria-expanded="true"]::before {
            content: url("../img/ico-bulletPlegarC.svg");
            width: 25px;
        }
        /* foco visible (WCAG 2.2) */
        .sublista .sublista-nested-trigger:focus-visible {
            outline: none;
            box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--focus-ring);
        }
        /* Estado hover (sutil) */
        .sublista .sublista-nested-trigger:hover {
            box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
        }

/*Solucion problema conflicto bullets*/
.contenido .homeTacrc li {
    background: none !important;
    list-style: none !important;
    padding-left: 0 !important;
    display: flex;
    flex: 1;
}

/* Mantener las tarjetas del grid sin bullet del portal */
.contenido .homeTacrc .lista-botones > .lista-botones-item {
    background-color: var(--bg) !important;
    background-image: none !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
}

    /* Hover de las tarjetas */
    .contenido .homeTacrc .lista-botones > .lista-botones-item:hover {
        background: var(--bg-hover) !important;
    }

/* Reaplicar SOLO los bullets propios de las sublistas */
/* LI normales de sublista: sí llevan tu bullet */
.contenido .homeTacrc .sublista ul > li {
    background: url("../img/ico-bulletLista.svg") no-repeat 0 center !important;
    background-size: 8px !important;
    padding-left: 15px !important;
    display: block;
}

.contenido .homeTacrc .sublista ul > li a {
    min-height: auto;
}
/* LI que tienen sublista anidada: NO llevan bullet, llevan botón */
.contenido .homeTacrc .sublista li.sublista-has-nested {
    background: none !important;
    padding-left: 0 !important;
}
    /* Los LI dentro de una sublista anidada también usan tu bullet,
     salvo los que JS marque como sublista-has-nested */
    .contenido .homeTacrc .sublista li.sublista-has-nested > ul > li {
        background: url("../img/ico-bulletLista.svg") no-repeat 0 2px !important;
        background-size: 8px !important;
        padding-left: 15px !important;
    }

        .contenido .homeTacrc .sublista li.sublista-has-nested > ul > li.sublista-has-nested {
            background: none !important;
            padding-left: 0 !important;
        }

/* Reduce motion (por si luego añades animación) */
@media (prefers-reduced-motion: reduce) {
    .sublista .sublista-nested-trigger {
        transition: none !important;
    }
}

/*Fin desplegable sublistas anidadas*/
/* Reduce motion: evita “animación” en usuarios sensibles 
@media (prefers-reduced-motion: reduce){
.lista-botones__item,
.lista-botones__trigger{
transition:none !important;
}
}*/
/********** Banner Faq y texto*********/
/* banner faq */
.bottomTacrc-faq {
    max-width: 1200px;
    margin-inline: auto;
    padding: 0.5rem;
}

.bottomTacrc-faq-banner a {
    /* target size */
    min-height: 44px;
    width: fit-content;
    max-width: 400px;
    width: 100%;
    display: block;
}

    .bottomTacrc-faq-banner a:hover {
        filter: brightness(0.95);
        text-decoration: underline;
    }

    .bottomTacrc-faq-banner a:focus-visible {
        outline: none;
        border-color: #fff;
        box-shadow: 0 0 0 3px var(--focus-ring);
    }
/* Bloque de texto */
.bottomTacrc-text {
    max-width: 1200px;
    margin-inline: auto;
    padding: 0.5rem;
}

    .bottomTacrc-text p:last-child {
        margin-bottom: 0;
    }
li.lista-botones-item a {
    display:inline-flex;
    color: #243041;
    min-height: 110px;
}

li.lista-botones-item a:not(:first-child) {
    padding-left: 5px;
}

/*Escritorio y tablet*/
@media (min-width: 430px) {
    .homeTacrc-top-logo,
    .homeTacrc-top-banners {
        justify-content: center;
        flex-flow: wrap;
    }
}

@media (min-width: 768px) {
    .lista-botones {
        /*gap: 1.5rem;*/
        --lb-gap: 1.5rem;
    }

    .bottomTacrc-faq-banner a {
        /* target size */
        min-height: 44px;
        width: fit-content;
        max-width: 400px;
        width: 50vw;
        display: block;
    }
}

@media (min-width: 754px) {
    .homeTacrc-top-logo {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .homeTacrc-top-banners {
        justify-content: space-between;
        flex-flow: row;
    }
}

@media (min-width: 950px) {
    .homeTacrc-top-logo {
        display: flex;
        align-items: flex-start;
    }

    .homeTacrc-top-banners {
        justify-content: flex-start;
        flex-flow: row;
    }
}
/* Logo a la izquierda, banners a la derecha */
@media (min-width: 950px) {
    .homeTacrc-top-fila {
        /*grid-template-columns: 295px 1fr;
    align-items: center;*/
        justify-content: flex-start;
        grid-template-columns: 1fr;
    }

        .homeTacrc-top-fila nav {
            grid-column: 1 / span 1;
            display: flex;
            justify-content: center;
        }

    .homeTacrc-top-banners {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
}

@media (min-width: 1140px) {
    /* Panel */
    .lista-botones-panel {
        position: absolute;
        right: 0px;
        margin: 0px 8px;
    }
}

.lista-botones-panel {
    margin: 0px 8px;
}

.lista-botones {
    padding-right: 8px;
}
/* Responsive columnas */
@media (min-width:600px) {
    .lista-botones {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width:900px) {
    .lista-botones {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width:1600px) {
    .lista-botones {
        grid-template-columns: repeat(4, 1fr);
    }
}
