.legales-wrapper {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0 80px;
    color: #fff;
}

.legales-encabezado {
    text-align: center;
    margin-bottom: 30px;
}

.legales-marca {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.legales-marca .material-icons {
    font-size: 30px;
}

.legales-etiqueta {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

.legales-encabezado h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.15;
}

.legales-encabezado > p:last-child {
    max-width: 640px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.legales-indice {
    position: relative;
    z-index: auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    width: auto;
    height: auto;
    margin-bottom: 22px;
    padding: 0;
    line-height: normal;
    background: transparent;
    box-shadow: none;
    flex-wrap: wrap;
}

.legales-indice a {
    display: inline-flex;
    align-items: center;
    height: auto;
    margin: 0;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 22px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.legales-contenido {
    padding: 36px 42px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: rgba(7, 74, 113, 0.38);
    box-shadow: 0 18px 50px rgba(0, 45, 73, 0.18);
    backdrop-filter: blur(5px);
}

.legales-contenido section {
    scroll-margin-top: 20px;
}

.legales-contenido section + section {
    margin-top: 36px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.legales-contenido h2 {
    margin: 0 0 20px;
    font-size: 25px;
}

.legales-contenido h3 {
    margin: 22px 0 7px;
    font-size: 17px;
}

.legales-contenido p,
.legales-contenido li {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

.legales-contenido p {
    margin: 0 0 12px;
}

.legales-contenido ul {
    margin: 8px 0 0;
    padding-left: 22px;
}

.legales-enlaces {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.legales-enlaces a {
    padding: 10px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legales-aviso {
    margin-top: 32px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.legales-acciones {
    margin-top: 28px;
    text-align: center;
}

.legales-acciones .btn-pildora {
    display: inline-block;
}

.faq-buscador {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 620px;
    margin: 0 auto 24px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.16);
}

.faq-buscador .material-icons {
    color: rgba(255, 255, 255, 0.8);
}

body.tema-turnos .faq-buscador input[type="search"] {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    box-shadow: none;
}

body.tema-turnos .faq-buscador input[type="search"]:focus {
    border-bottom: 0;
    box-shadow: none;
}

.faq-buscador input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.faq-listado {
    display: grid;
    gap: 12px;
}

.faq-item {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(7, 74, 113, 0.38);
    box-shadow: 0 10px 30px rgba(0, 45, 73, 0.12);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary small {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.faq-expandir {
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-expandir {
    transform: rotate(180deg);
}

.faq-item[open] summary {
    background: rgba(255, 255, 255, 0.07);
}

.faq-respuesta {
    box-sizing: border-box;
    padding: 20px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.7;
}

.faq-respuesta p:first-child {
    margin-top: 0;
}

.faq-respuesta a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.faq-vacio {
    padding: 42px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(7, 74, 113, 0.3);
    text-align: center;
}

.faq-vacio .material-icons {
    font-size: 34px;
    opacity: 0.8;
}

.faq-vacio h2 {
    margin: 12px 0 6px;
    font-size: 21px;
}

.faq-vacio p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.faq-acciones {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.faq-link-legal {
    color: #fff;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media screen and (max-width: 640px) {
    .legales-wrapper {
        width: min(100% - 28px, 920px);
        padding-top: 34px;
    }

    .legales-contenido {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .legales-contenido h2 {
        font-size: 22px;
    }

    .legales-enlaces {
        flex-direction: column;
    }

    .faq-item summary,
    .faq-respuesta {
        padding-right: 18px;
        padding-left: 18px;
    }

}
