/* =========================================================
   MAPA DO SITE — PORTAL TJBA 2026
   Página dinâmica baseada no menu principal
========================================================= */

.tjba-mapa-site {
    background:
        linear-gradient(180deg, #ffffff 0%, #ffffff 38%, #f7f9fc 100%);
}

.tjba-mapa-site__container {
    padding-bottom: 96px;
}

.tjba-mapa-site__conteudo {
    overflow: visible;
}

.tjba-mapa-site__texto-editorial {
    max-width: 980px;
    margin-bottom: 30px;
}

.tjba-mapa-site__painel {
    position: relative;
    display: block;
    margin-bottom: 38px;
    padding: 34px 38px;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 0%, rgba(199, 154, 66, 0.17), transparent 32%),
        linear-gradient(135deg, #f8fafc 0%, #eef4f9 100%);
    border: 1px solid #d9e2ec;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(0, 38, 82, 0.08);
}

.tjba-mapa-site__painel::after {
    content: "";
    position: absolute;
    top: -90px;
    right: -90px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(199, 154, 66, 0.22);
    border-radius: 50%;
    pointer-events: none;
}

.tjba-mapa-site__painel-copy {
    position: relative;
    z-index: 1;
    max-width: 860px;
    min-width: 0;
}

.tjba-mapa-site__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--tjba-dourado-escuro);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.tjba-mapa-site__eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background-color: var(--tjba-dourado);
}

.tjba-mapa-site__painel-titulo {
    max-width: 760px;
    margin: 0 0 12px;
    color: var(--tjba-azul-escuro);
    font-size: clamp(1.55rem, 1.85vw, 2.15rem);
    font-weight: 800;
    line-height: 1.15;
}

.tjba-mapa-site__painel-descricao {
    max-width: 760px;
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.65;
}

.tjba-mapa-site__navegacao {
    position: relative;
}

.tjba-mapa-site__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tjba-mapa-site__card {
    position: relative;
    align-self: start;
    min-width: 0;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #dce4ec;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 38, 82, 0.055);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tjba-mapa-site__card::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--tjba-dourado) 0%, rgba(199, 154, 66, 0.2) 100%);
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .tjba-mapa-site__card:hover {
        border-color: #cbd7e4;
        box-shadow: 0 14px 34px rgba(0, 38, 82, 0.085);
    }
}

.tjba-mapa-site__accordion {
    margin: 0;
}

.tjba-mapa-site__card-topo {
    display: block;
    min-height: 78px;
    padding: 21px 22px 20px 27px;
    color: var(--tjba-azul-escuro);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.tjba-mapa-site__card-topo::-webkit-details-marker {
    display: none;
}

.tjba-mapa-site__card-topo::marker {
    content: "";
}

.tjba-mapa-site__card-topo:hover {
    color: var(--tjba-azul);
    background: #f8fbfe;
}

.tjba-mapa-site__card-topo:focus-visible {
    position: relative;
    z-index: 2;
    outline: 3px solid #85b9ff;
    outline-offset: -3px;
}

.tjba-mapa-site__accordion[open] .tjba-mapa-site__card-topo {
    color: var(--tjba-azul-escuro);
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border-bottom: 1px solid #e6edf3;
}


.tjba-mapa-site__card-topo--link {
    color: var(--tjba-azul-escuro);
    text-decoration: none;
}

.tjba-mapa-site__card-topo--link:hover,
.tjba-mapa-site__card-topo--link:focus-visible {
    color: var(--tjba-azul);
    text-decoration: none;
}

.tjba-mapa-site__card-topo--estatico {
    cursor: default;
    user-select: text;
}

.tjba-mapa-site__card-topo--estatico:hover {
    color: var(--tjba-azul-escuro);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.tjba-mapa-site__card-seta--link {
    font-size: 1rem;
    font-weight: 800;
}

.tjba-mapa-site__card-titulo {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    color: inherit;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.35;
}

.tjba-mapa-site__card-titulo-texto {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tjba-mapa-site__card-indice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    color: var(--tjba-azul-escuro);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background-color: #f4ead2;
    border: 1px solid #ead6aa;
    border-radius: 10px;
}

.tjba-mapa-site__card-seta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-left: auto;
    color: #53677b;
    background-color: #f1f5f9;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.25s ease;
}

.tjba-mapa-site__card-seta svg {
    width: 18px;
    height: 18px;
}

.tjba-mapa-site__card-topo:hover .tjba-mapa-site__card-seta,
.tjba-mapa-site__card-topo:focus-visible .tjba-mapa-site__card-seta {
    color: var(--tjba-azul-escuro);
    background-color: #e5edf5;
}

.tjba-mapa-site__accordion[open] .tjba-mapa-site__card-seta {
    color: #ffffff;
    background-color: var(--tjba-azul);
    transform: rotate(180deg);
}

.tjba-mapa-site__card-corpo {
    padding: 20px 24px 25px 27px;
}

.tjba-mapa-site__card-acesso-wrap {
    margin: 0 0 17px;
    padding: 0 0 15px;
    border-bottom: 1px solid #edf1f5;
}

.tjba-mapa-site__card-acesso {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--tjba-azul);
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.4;
    text-decoration: none;
}

.tjba-mapa-site__card-acesso:hover,
.tjba-mapa-site__card-acesso:focus-visible {
    color: var(--tjba-dourado-escuro);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.tjba-mapa-site__card-acesso:focus-visible {
    outline: 2px solid #85b9ff;
    outline-offset: 3px;
}

.tjba-mapa-site__card-acesso-icone {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.tjba-mapa-site__card-acesso:hover .tjba-mapa-site__card-acesso-icone,
.tjba-mapa-site__card-acesso:focus-visible .tjba-mapa-site__card-acesso-icone {
    transform: translateX(3px);
}

.tjba-mapa-site__lista-nivel {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tjba-mapa-site__lista-nivel .tjba-mapa-site__lista-nivel {
    gap: 4px;
    margin-top: 5px;
}

.tjba-mapa-site__node {
    min-width: 0;
}

.tjba-mapa-site__node-accordion {
    margin: 0;
    border-radius: 9px;
}

.tjba-mapa-site__node-summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 8px 6px 14px;
    color: var(--tjba-azul-escuro);
    font-size: 0.91rem;
    font-weight: 700;
    line-height: 1.4;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.tjba-mapa-site__node-summary::-webkit-details-marker {
    display: none;
}

.tjba-mapa-site__node-summary::marker {
    content: "";
}

.tjba-mapa-site__node-summary::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 5px;
    height: 5px;
    background-color: var(--tjba-dourado);
    border-radius: 50%;
    transform: translateY(-50%);
}

.tjba-mapa-site__node-summary:hover {
    color: var(--tjba-azul);
    background-color: #f3f7fb;
}

.tjba-mapa-site__node-summary:focus-visible {
    outline: 2px solid #85b9ff;
    outline-offset: 2px;
}

.tjba-mapa-site__node-summary-titulo {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tjba-mapa-site__node-summary-seta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin-left: auto;
    color: #637489;
    background-color: #edf2f7;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.22s ease;
}

.tjba-mapa-site__node-summary-seta svg {
    width: 14px;
    height: 14px;
}

.tjba-mapa-site__node-accordion[open] > .tjba-mapa-site__node-summary {
    color: var(--tjba-azul-escuro);
    background-color: #f6f9fc;
}

.tjba-mapa-site__node-accordion[open] > .tjba-mapa-site__node-summary .tjba-mapa-site__node-summary-seta {
    color: #ffffff;
    background-color: var(--tjba-azul);
    transform: rotate(180deg);
}

.tjba-mapa-site__node-corpo {
    margin: 3px 0 5px 9px;
    padding: 5px 0 3px 15px;
    border-left: 1px solid #d8e0e8;
}

.tjba-mapa-site__node-accordion[open] > .tjba-mapa-site__node-corpo {
    animation: tjba-mapa-site-revelar 0.18s ease-out;
}

@keyframes tjba-mapa-site-revelar {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tjba-mapa-site__node-acesso {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    padding: 2px 0;
    color: var(--tjba-azul);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.tjba-mapa-site__node-acesso:hover,
.tjba-mapa-site__node-acesso:focus-visible {
    color: var(--tjba-dourado-escuro);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.tjba-mapa-site__node-acesso:focus-visible {
    outline: 2px solid #85b9ff;
    outline-offset: 2px;
}

.tjba-mapa-site__node-link,
.tjba-mapa-site__node-texto {
    display: inline-flex;
    align-items: flex-start;
    max-width: 100%;
    color: #334155;
    font-size: 0.91rem;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.tjba-mapa-site__node-link {
    position: relative;
    padding: 4px 4px 4px 14px;
    text-decoration: none;
}

.tjba-mapa-site__node-link::before {
    content: "";
    position: absolute;
    top: 0.83em;
    left: 2px;
    width: 5px;
    height: 5px;
    background-color: var(--tjba-dourado);
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.tjba-mapa-site__node-link:hover,
.tjba-mapa-site__node-link:focus-visible {
    color: var(--tjba-azul);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.tjba-mapa-site__node-link:focus-visible {
    outline: 2px solid #85b9ff;
    outline-offset: 2px;
}

.tjba-mapa-site__node-link:hover::before,
.tjba-mapa-site__node-link:focus-visible::before {
    background-color: var(--tjba-azul);
    transform: scale(1.35);
}

.tjba-mapa-site__node-texto {
    position: relative;
    padding: 4px 4px 4px 14px;
    color: #526274;
}

.tjba-mapa-site__node-texto::before {
    content: "";
    position: absolute;
    top: 0.83em;
    left: 2px;
    width: 5px;
    height: 5px;
    background-color: #a7b2bf;
    border-radius: 50%;
}

.tjba-mapa-site__indisponivel {
    display: block;
    margin-top: 0;
    padding: 26px 28px;
    color: #334155;
    background-color: #ffffff;
    border: 1px dashed #c5d0dc;
    border-radius: 16px;
}

.tjba-mapa-site__indisponivel h2 {
    margin: 0 0 4px;
    color: var(--tjba-azul-escuro);
    font-size: 1rem;
    font-weight: 800;
}

.tjba-mapa-site__indisponivel p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.55;
}

.tjba-mapa-site [hidden] {
    display: none !important;
}

/* =========================================================
   MAPA DO SITE — RESPONSIVIDADE
========================================================= */

@media (max-width: 1440px) {
    .tjba-mapa-site__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) {
    .tjba-mapa-site__painel {
        padding: 30px 32px;
    }

    .tjba-mapa-site__grid {
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .tjba-mapa-site__container {
        padding-bottom: 76px;
    }

    .tjba-mapa-site__painel {
        border-radius: 18px;
    }

    .tjba-mapa-site__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .tjba-mapa-site__container {
        padding-bottom: 60px;
    }

    .tjba-mapa-site__painel {
        margin-bottom: 26px;
        padding: 24px 22px;
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(0, 38, 82, 0.07);
    }

    .tjba-mapa-site__painel-titulo {
        font-size: 1.45rem;
    }

    .tjba-mapa-site__painel-descricao {
        font-size: 0.94rem;
    }

    .tjba-mapa-site__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tjba-mapa-site__card {
        border-radius: 15px;
    }

    .tjba-mapa-site__card-topo {
        min-height: 70px;
        padding: 17px 18px 16px 23px;
    }

    .tjba-mapa-site__card-corpo {
        padding: 17px 20px 21px 23px;
    }

    .tjba-mapa-site__node-link,
    .tjba-mapa-site__node-texto {
        font-size: 0.93rem;
    }

    .tjba-mapa-site__indisponivel {
        padding: 22px;
    }

}

@media (max-width: 430px) {
    .tjba-mapa-site__painel {
        padding: 22px 18px;
    }

    .tjba-mapa-site__card-topo {
        padding-right: 15px;
        padding-left: 20px;
    }

    .tjba-mapa-site__card-titulo {
        gap: 11px;
    }

    .tjba-mapa-site__card-corpo {
        padding-right: 17px;
        padding-left: 20px;
    }

    .tjba-mapa-site__card-indice {
        width: 31px;
        height: 31px;
        border-radius: 9px;
    }

    .tjba-mapa-site__card-titulo {
        font-size: 1.02rem;
    }

    .tjba-mapa-site__card-seta {
        width: 28px;
        height: 28px;
    }
}
