.cdm-bib-group-featured-image {
    margin: 0 0 1.75rem;
}

.cdm-bib-group-featured-image-img {
    display: block;
    width: 100%;
    height: auto;
}

.cdm-bib-group-meta {
    margin: 0 0 1.75rem;
}

.cdm-bib-group-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cdm-bib-group-meta dt {
    font-weight: 600;
}

.cdm-bib-group-meta dd {
    margin: 0;
}

.cdm-bib-group-description {
    margin-bottom: 2rem;
}

.cdm-bib-group-section {
    margin-top: 2rem;
}

.cdm-bib-group-section > h2 {
    margin-bottom: 0.8rem;
}

.cdm-bib-participant-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cdm-bib-participant {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.12));
}

.cdm-bib-participant:first-child {
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.12));
}

.cdm-bib-participant-name {
    display: block;
    font-weight: 600;
}

.cdm-bib-participant-roles {
    display: block;
    margin-top: 0.15rem;
    opacity: 0.78;
}

/* CDM_BIB_GROUP_WP_META_V016_START
 * Las fichas documentales de Agrupación no muestran autor ni fecha
 * editorial de WordPress. Se oculta el bloque de metadatos del tema
 * solo en este CPT; los datos documentales se presentan en la ficha.
 */
body.single-cdm_bib_agrupacion .entry-meta,
body.single-cdm_bib_persona .entry-meta {
    display: none !important;
}
/* CDM_BIB_GROUP_WP_META_V016_END */

/* CDM_BIB_PERSON_FRONTEND_V019_START */
.cdm-bib-participant-name {
    font-weight: 600;
}

a.cdm-bib-participant-name {
    text-decoration: none;
}

.cdm-bib-person-biography {
    margin-bottom: 2rem;
}

.cdm-bib-person-section {
    margin-top: 2rem;
}

.cdm-bib-person-career-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.cdm-bib-person-career-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98em;
}

.cdm-bib-person-career-table th,
.cdm-bib-person-career-table td {
    padding: 0.75rem 0.85rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.12));
}

.cdm-bib-person-career-table th {
    font-weight: 600;
}

.cdm-bib-person-career-table tbody tr:first-child td {
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.12));
}

.cdm-bib-career-year {
    white-space: nowrap;
}

.cdm-bib-career-group a {
    font-weight: 600;
    text-decoration: none;
}

.cdm-bib-person-other-names {
    margin-top: 2.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.12));
    font-size: 0.9em;
    opacity: 0.72;
}

.cdm-bib-person-other-names p {
    margin: 0.2rem 0;
}
/* CDM_BIB_PERSON_FRONTEND_V019_END */

/* CDM_BIB_YOUTUBE_V0110_START */
.cdm-bib-youtube-list {
    display: grid;
    gap: 1.75rem;
}

.cdm-bib-youtube-item > h3 {
    margin-bottom: 0.75rem;
}
/* CDM_BIB_YOUTUBE_V0110_END */

/* CDM_BIB_GALLERY_V0111_START */
.cdm-bib-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.cdm-bib-gallery-figure {
    margin: 0;
}

.cdm-bib-gallery-link,
.cdm-bib-gallery-image {
    display: block;
}

.cdm-bib-gallery-image {
    width: 100%;
    height: auto;
}

.cdm-bib-gallery-figure figcaption {
    margin-top: 0.4rem;
    font-size: 0.9em;
}

@media (max-width: 700px) {
    .cdm-bib-gallery {
        grid-template-columns: 1fr;
    }
}
/* CDM_BIB_GALLERY_V0111_END */

/* CDM_BIB_LIBRETTO_V0112_START */
.cdm-bib-libretto {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.cdm-bib-libretto-cover-wrap {
    flex: 0 0 180px;
}

.cdm-bib-libretto-cover {
    display: block;
    width: 100%;
    height: auto;
}

.cdm-bib-libretto-info {
    min-width: 0;
    flex: 1 1 auto;
}

.cdm-bib-libretto-info > h3 {
    margin-top: 0;
}

.cdm-bib-libretto-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

@media (max-width: 700px) {
    .cdm-bib-libretto {
        display: block;
    }

    .cdm-bib-libretto-cover-wrap {
        max-width: 180px;
        margin-bottom: 1rem;
    }
}
/* CDM_BIB_LIBRETTO_V0112_END */

/* CDM_BIB_PIECES_V0113_START */
.cdm-bib-pieces {
    display: grid;
    gap: 2rem;
}

.cdm-bib-piece {
    padding-top: 1rem;
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.12));
}

.cdm-bib-piece:first-child {
    padding-top: 0;
    border-top: 0;
}

.cdm-bib-piece > h3 {
    margin-bottom: 0.8rem;
}

.cdm-bib-piece-title {
    font-weight: 400;
}

.cdm-bib-piece-text > :first-child {
    margin-top: 0;
}

.cdm-bib-piece-text > :last-child {
    margin-bottom: 0;
}
/* CDM_BIB_PIECES_V0113_END */

/* CDM_BIB_AUDIO_V0116_START */

.cdm-bib-audio-player {
    --cdm-bib-audio-accent: var(--theme-palette-color-1, currentColor);

    display: grid;
    gap: 1rem;
}

.cdm-bib-audio-current {
    margin-bottom: -0.25rem;
}

.cdm-bib-audio-current-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.62;
}

.cdm-bib-audio-current-title {
    margin: 0;
    font-size: 1.1rem;
}

.cdm-bib-audio-element {
    display: block;
    width: 100%;
    max-width: 100%;
}

.cdm-bib-audio-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cdm-bib-audio-nav .button {
    min-height: 2.25rem;
}

.cdm-bib-audio-tracklist {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cdm-bib-audio-tracklist-item {
    margin: 0;
    padding: 0;
}

.cdm-bib-audio-track {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: baseline;

    padding: 0.58rem 0.7rem;

    color: inherit;
    text-decoration: none;

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.45rem;

    background: rgba(0, 0, 0, 0.018);

    transition:
        background-color 120ms ease,
        border-color 120ms ease;
}

.cdm-bib-audio-track:hover,
.cdm-bib-audio-track:focus-visible {
    color: inherit;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.045);
    border-color: rgba(0, 0, 0, 0.16);
}

.cdm-bib-audio-track.is-active {
    font-weight: 600;
    border-color: var(--cdm-bib-audio-accent);
    background: rgba(0, 0, 0, 0.055);
}

.cdm-bib-audio-track-number {
    font-variant-numeric: tabular-nums;
    opacity: 0.58;
}

.cdm-bib-audio-track.is-active .cdm-bib-audio-track-number {
    color: var(--cdm-bib-audio-accent);
    opacity: 1;
}

.cdm-bib-audio-track-title {
    min-width: 0;
}

@media (max-width: 520px) {
    .cdm-bib-audio-track {
        grid-template-columns: 2rem minmax(0, 1fr);
        gap: 0.45rem;
        padding: 0.52rem 0.6rem;
    }
}

/* CDM_BIB_AUDIO_V0116_END */

/* CDM_BIB_FRONTEND_V0117_START
 * Trayectoria histórica, participantes en tabla y carrusel local de galería.
 */

/* Trayectoria de Agrupación */
.cdm-bib-trajectory-name {
    margin: 0 0 0.85rem;
    font-weight: 600;
}

.cdm-bib-trajectory-table-wrap,
.cdm-bib-participants-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.cdm-bib-trajectory-table,
.cdm-bib-participants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98em;
}

.cdm-bib-trajectory-table th,
.cdm-bib-trajectory-table td,
.cdm-bib-participants-table th,
.cdm-bib-participants-table td {
    padding: 0.72rem 0.85rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(
        --theme-border-color,
        rgba(0, 0, 0, 0.12)
    );
}

.cdm-bib-trajectory-table thead th,
.cdm-bib-participants-table thead th {
    font-weight: 600;
}

.cdm-bib-trajectory-table tbody tr:first-child td,
.cdm-bib-participants-table tbody tr:first-child th,
.cdm-bib-participants-table tbody tr:first-child td {
    border-top: 1px solid var(
        --theme-border-color,
        rgba(0, 0, 0, 0.12)
    );
}

.cdm-bib-trajectory-year {
    width: 5.5rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.cdm-bib-trajectory-modality {
    width: 9rem;
}

.cdm-bib-trajectory-group a,
.cdm-bib-trajectory-current {
    font-weight: 600;
    text-decoration: none;
}

.cdm-bib-trajectory-table tr.is-current {
    background: rgba(0, 0, 0, 0.035);
}

/* Participantes */
.cdm-bib-participants-table {
    table-layout: fixed;
}

.cdm-bib-participants-table thead th:first-child {
    width: 38%;
}

.cdm-bib-participant-person-cell {
    font-weight: 600;
}

.cdm-bib-participant-role-cell {
    opacity: 0.82;
}

.cdm-bib-participants-table a.cdm-bib-participant-name {
    color: inherit;
}

/* Galería */
.cdm-bib-gallery-carousel {
    position: relative;
}

.cdm-bib-gallery-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    border-radius: 0.65rem;
}

.cdm-bib-gallery-viewport::-webkit-scrollbar {
    display: none;
}

.cdm-bib-gallery-carousel .cdm-bib-gallery {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    width: 100%;
}

.cdm-bib-gallery-carousel .cdm-bib-gallery-figure {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.cdm-bib-gallery-carousel .cdm-bib-gallery-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.cdm-bib-gallery-carousel .cdm-bib-gallery-image {
    display: block;
    width: 100%;
    height: min(68vh, 620px);
    object-fit: contain;
    margin: 0;
    border-radius: 0.65rem;
    background: rgba(0, 0, 0, 0.025);
    user-select: none;
}

.cdm-bib-gallery-carousel figcaption {
    margin: 0.55rem 0 0;
    padding: 0 0.15rem;
    font-size: 0.9em;
    opacity: 0.78;
}

.cdm-bib-gallery-nav,
.cdm-bib-gallery-counter {
    display: none;
}

.cdm-bib-gallery-carousel.is-enhanced .cdm-bib-gallery-nav {
    display: inline-flex;
    position: absolute;
    top: min(34vh, 310px);
    z-index: 2;
    align-items: center;
    justify-content: center;

    width: 2.75rem;
    height: 2.75rem;
    padding: 0;

    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 999px;

    color: var(--theme-text-color, currentColor);
    background: var(
        --theme-palette-color-8,
        rgba(255, 255, 255, 0.92)
    );

    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.12);

    font: inherit;
    font-size: 1.35rem;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);
    transition:
        transform 140ms ease,
        opacity 140ms ease,
        box-shadow 140ms ease;
}

.cdm-bib-gallery-carousel.is-enhanced
.cdm-bib-gallery-nav:hover:not(:disabled),
.cdm-bib-gallery-carousel.is-enhanced
.cdm-bib-gallery-nav:focus-visible:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 0.3rem 1rem rgba(0, 0, 0, 0.16);
}

.cdm-bib-gallery-nav:disabled {
    opacity: 0.28;
    cursor: default;
}

.cdm-bib-gallery-prev {
    left: 0.75rem;
}

.cdm-bib-gallery-next {
    right: 0.75rem;
}

.cdm-bib-gallery-carousel.is-enhanced .cdm-bib-gallery-counter {
    display: flex;
    justify-content: center;
    gap: 0.15rem;
    margin-top: 0.6rem;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.62;
}

@media (max-width: 700px) {
    .cdm-bib-trajectory-table,
    .cdm-bib-participants-table {
        font-size: 0.93em;
    }

    .cdm-bib-trajectory-table th,
    .cdm-bib-trajectory-table td,
    .cdm-bib-participants-table th,
    .cdm-bib-participants-table td {
        padding: 0.62rem 0.55rem;
    }

    .cdm-bib-trajectory-year {
        width: 4.5rem;
    }

    .cdm-bib-trajectory-modality {
        width: 7rem;
    }

    .cdm-bib-participants-table thead th:first-child {
        width: 42%;
    }

    .cdm-bib-gallery-carousel .cdm-bib-gallery-image {
        height: min(62vh, 440px);
    }

    .cdm-bib-gallery-carousel.is-enhanced .cdm-bib-gallery-nav {
        top: min(31vh, 220px);
        width: 2.5rem;
        height: 2.5rem;
    }

    .cdm-bib-gallery-prev {
        left: 0.45rem;
    }

    .cdm-bib-gallery-next {
        right: 0.45rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdm-bib-gallery-carousel.is-enhanced .cdm-bib-gallery-nav {
        transition: none;
    }
}

/* CDM_BIB_FRONTEND_V0117_END */
/* CDM_BIB_FRONTEND_V0118_START
 * Color de enlaces de personas, orden visual estable y galería con lightbox.
 */

.cdm-bib-group {
    --cdm-bib-link-accent: var(--theme-palette-color-2, #8c4a3a);
}

/* Enlaces de personas dentro de la ficha de Agrupación */
.cdm-bib-participants-table a.cdm-bib-participant-name {
    color: var(--cdm-bib-link-accent);
    text-decoration: none;
}

.cdm-bib-participants-table a.cdm-bib-participant-name:hover,
.cdm-bib-participants-table a.cdm-bib-participant-name:focus-visible {
    color: var(--cdm-bib-link-accent);
    text-decoration: underline;
}

.cdm-bib-participant-role-cell {
    word-break: break-word;
}

/* Carrusel inline */
.cdm-bib-gallery-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: zoom-in;
}

.cdm-bib-gallery-open img {
    pointer-events: none;
}

.cdm-bib-gallery-carousel .cdm-bib-gallery-image {
    transition: transform 180ms ease;
}

.cdm-bib-gallery-open:hover .cdm-bib-gallery-image,
.cdm-bib-gallery-open:focus-visible .cdm-bib-gallery-image {
    transform: scale(1.01);
}

/* Lightbox */
html.cdm-bib-gallery-lightbox-open,
body.cdm-bib-gallery-lightbox-open {
    overflow: hidden;
}

.cdm-bib-gallery-lightbox[hidden] {
    display: none !important;
}

.cdm-bib-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.cdm-bib-gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 20, 0.86);
}

.cdm-bib-gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(94vw, 1200px);
    max-height: 92vh;
    margin: 4vh auto;
    padding: 3.2rem 1rem 1rem;
    border-radius: 0.85rem;
    background: rgba(24, 28, 31, 0.96);
    color: #fff;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.cdm-bib-gallery-lightbox-close,
.cdm-bib-gallery-lightbox-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 140ms ease,
        background-color 140ms ease,
        opacity 140ms ease;
}

.cdm-bib-gallery-lightbox-close:hover,
.cdm-bib-gallery-lightbox-close:focus-visible,
.cdm-bib-gallery-lightbox-nav:hover:not(:disabled),
.cdm-bib-gallery-lightbox-nav:focus-visible:not(:disabled) {
    transform: scale(1.04);
    background: rgba(255, 255, 255, 0.22);
}

.cdm-bib-gallery-lightbox-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
}

.cdm-bib-gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.cdm-bib-gallery-lightbox-prev {
    left: 0.8rem;
}

.cdm-bib-gallery-lightbox-next {
    right: 0.8rem;
}

.cdm-bib-gallery-lightbox-nav:disabled {
    opacity: 0.28;
    cursor: default;
}

.cdm-bib-gallery-lightbox-figure {
    margin: 0;
    text-align: center;
}

.cdm-bib-gallery-lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(70vh, 760px);
    height: auto;
    margin: 0 auto;
    border-radius: 0.6rem;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
}

.cdm-bib-gallery-lightbox-caption {
    margin-top: 0.85rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}

.cdm-bib-gallery-lightbox-caption:empty {
    display: none;
}

.cdm-bib-gallery-lightbox-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
}

.cdm-bib-gallery-lightbox-counter {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.82;
}

.cdm-bib-gallery-lightbox-actions {
    margin: 0;
}

.cdm-bib-gallery-lightbox-actions a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

@media (max-width: 700px) {
    .cdm-bib-gallery-lightbox-dialog {
        width: 96vw;
        margin: 2vh auto;
        padding: 3.25rem 0.65rem 0.85rem;
    }

    .cdm-bib-gallery-lightbox-close,
    .cdm-bib-gallery-lightbox-nav {
        width: 2.55rem;
        height: 2.55rem;
    }

    .cdm-bib-gallery-lightbox-prev {
        left: 0.45rem;
    }

    .cdm-bib-gallery-lightbox-next {
        right: 0.45rem;
    }

    .cdm-bib-gallery-lightbox-image {
        max-height: 64vh;
    }

    .cdm-bib-gallery-lightbox-meta {
        display: block;
    }

    .cdm-bib-gallery-lightbox-actions {
        margin-top: 0.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdm-bib-gallery-carousel .cdm-bib-gallery-image,
    .cdm-bib-gallery-lightbox-close,
    .cdm-bib-gallery-lightbox-nav {
        transition: none;
    }
}

/* CDM_BIB_FRONTEND_V0118_END */

/* CDM_BIB_DISCLOSURE_V0120_START
 * Plegado nativo de materiales extensos de la ficha de Agrupación.
 * Sin JavaScript, colores propios ni animaciones.
 */
.cdm-bib-disclosure {
    margin-top: 0.75rem;
}

.cdm-bib-disclosure > summary {
    cursor: pointer;
    padding: 0.35rem 0;
    font-weight: 600;
    line-height: 1.4;
}

.cdm-bib-disclosure > summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.cdm-bib-disclosure[open] > summary {
    margin-bottom: 1rem;
}
/* CDM_BIB_DISCLOSURE_V0120_END */


/* CDM_BIB_GROUP_HEADER_V0122_START
 * Primera capa visual de la ficha de Agrupación.
 * Conserva el H1 nativo de Blocksy y agrupa fotografía + metadatos.
 */

/* La ficha es una entidad documental, no una entrada editorial. */
.type-cdm_bib_agrupacion > .hero-section .entry-meta {
    display: none;
}

/* Mayor jerarquía para el nombre de la agrupación. */
.type-cdm_bib_agrupacion > .hero-section .page-title {
    font-size: clamp(2.15rem, 6vw, 3.15rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

/* Cabecera visual */
.cdm-bib-group-hero {
    position: relative;
    margin: 0 0 1.75rem;
}

.cdm-bib-group-featured-image {
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(23, 60, 64, 0.04);
    box-shadow:
        0 14px 36px rgba(23, 60, 64, 0.08),
        0 2px 8px rgba(23, 60, 64, 0.045);
}

.cdm-bib-group-featured-image-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Metadatos compactos sobre la fotografía */
.cdm-bib-group-hero.has-image .cdm-bib-group-meta {
    position: absolute;
    z-index: 2;
    left: 1rem;
    bottom: 1rem;

    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

    margin: 0;
}

.cdm-bib-group-meta-row {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;

    padding: 0.46rem 0.72rem;

    border: 1px solid rgba(23, 60, 64, 0.14);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 14px rgba(23, 60, 64, 0.08);
}

.cdm-bib-group-meta dt {
    margin: 0;

    color: #173c40;

    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.cdm-bib-group-meta dd {
    margin: 0;

    color: #c83b2e;

    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Fallback para agrupaciones sin fotografía. */
.cdm-bib-group-hero.no-image .cdm-bib-group-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

    margin: 0;
}

/* Texto descriptivo, cuando exista. */
.cdm-bib-group-description {
    width: 100%;
    max-width: none;
    margin: 0 0 2.25rem;

    font-size: 1.02rem;
    line-height: 1.75;
}

@media (max-width: 520px) {
    .type-cdm_bib_agrupacion > .hero-section .page-title {
        font-size: clamp(2rem, 10vw, 2.65rem);
    }

    .cdm-bib-group-featured-image {
        border-radius: 12px;
    }

    .cdm-bib-group-hero.has-image .cdm-bib-group-meta {
        left: 0.65rem;
        bottom: 0.65rem;
        gap: 0.35rem;
    }

    .cdm-bib-group-meta-row {
        padding: 0.4rem 0.6rem;
    }

    .cdm-bib-group-meta dt {
        font-size: 0.7rem;
    }

    .cdm-bib-group-meta dd {
        font-size: 0.76rem;
    }
}

/* CDM_BIB_GROUP_HEADER_V0122_END */

/* CDM_BIB_TABLES_V0125_START
 * Capa visual de Trayectoria y Participantes.
 * Se conserva el markup tabular semántico y el comportamiento responsive.
 */

.cdm-bib-group {
    --cdm-bib-ink: #173c40;
    --cdm-bib-accent: #c83b2e;
    --cdm-bib-line: rgba(23, 60, 64, 0.13);
    --cdm-bib-soft: rgba(23, 60, 64, 0.045);
    --cdm-bib-surface: #ffffff;
    --cdm-bib-link-accent: var(--cdm-bib-accent);
}

.cdm-bib-group-trajectory,
.cdm-bib-group-participants {
    margin-top: 2.35rem;
}

.cdm-bib-group-trajectory > h2,
.cdm-bib-group-participants > h2 {
    margin: 0 0 0.85rem;

    color: var(--cdm-bib-ink);

    font-size: clamp(1.45rem, 3vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

/* Trayectoria */
.cdm-bib-trajectory-name {
    margin: -0.15rem 0 0.85rem;

    color: rgba(23, 60, 64, 0.76);

    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
}

/* Superficie común */
.cdm-bib-trajectory-table-wrap,
.cdm-bib-participants-table-wrap {
    width: 100%;
    overflow-x: auto;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 12px;

    background: var(--cdm-bib-surface);

    box-shadow:
        0 8px 24px rgba(23, 60, 64, 0.045),
        0 1px 4px rgba(23, 60, 64, 0.025);
}

.cdm-bib-trajectory-table,
.cdm-bib-participants-table {
    width: 100%;

    border-collapse: separate;
    border-spacing: 0;

    font-size: 0.92rem;
    line-height: 1.45;
}

.cdm-bib-trajectory-table th,
.cdm-bib-trajectory-table td,
.cdm-bib-participants-table th,
.cdm-bib-participants-table td {
    padding: 0.78rem 0.9rem;

    border: 0;
    border-bottom: 1px solid var(--cdm-bib-line);

    text-align: left;
    vertical-align: top;
}

/* Elimina bordes heredados de las versiones anteriores. */
.cdm-bib-trajectory-table tbody tr:first-child td,
.cdm-bib-participants-table tbody tr:first-child th,
.cdm-bib-participants-table tbody tr:first-child td {
    border-top: 0;
}

.cdm-bib-trajectory-table thead th,
.cdm-bib-participants-table thead th {
    color: var(--cdm-bib-ink);
    background: var(--cdm-bib-soft);

    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.cdm-bib-trajectory-table thead th:first-child,
.cdm-bib-participants-table thead th:first-child {
    border-top-left-radius: 11px;
}

.cdm-bib-trajectory-table thead th:last-child,
.cdm-bib-participants-table thead th:last-child {
    border-top-right-radius: 11px;
}

.cdm-bib-trajectory-table tbody tr:last-child td,
.cdm-bib-participants-table tbody tr:last-child th,
.cdm-bib-participants-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Trayectoria: enlaces y edición actual */
.cdm-bib-trajectory-group a {
    color: var(--cdm-bib-accent);

    font-weight: 700;
    text-decoration: none;
}

.cdm-bib-trajectory-group a:hover,
.cdm-bib-trajectory-group a:focus-visible {
    color: var(--cdm-bib-accent);
    text-decoration: underline;
}

.cdm-bib-trajectory-table tr.is-current {
    background: transparent;
}

.cdm-bib-trajectory-table tr.is-current > td {
    background: rgba(200, 59, 46, 0.055);
}

.cdm-bib-trajectory-table tr.is-current > td:first-child {
    box-shadow: inset 3px 0 0 var(--cdm-bib-accent);

    color: var(--cdm-bib-accent);
    font-weight: 800;
}

.cdm-bib-trajectory-current {
    color: var(--cdm-bib-ink);

    font-weight: 800;
}

/* Participantes */
.cdm-bib-participants-table {
    table-layout: fixed;
}

.cdm-bib-participants-table thead th:first-child {
    width: 36%;
}

.cdm-bib-participant-person-cell {
    font-weight: 700;
}

.cdm-bib-participants-table a.cdm-bib-participant-name {
    color: var(--cdm-bib-accent);

    font-weight: 700;
    text-decoration: none;
}

.cdm-bib-participants-table a.cdm-bib-participant-name:hover,
.cdm-bib-participants-table a.cdm-bib-participant-name:focus-visible {
    color: var(--cdm-bib-accent);
    text-decoration: underline;
}

.cdm-bib-participant-role-cell {
    color: rgba(23, 60, 64, 0.76);

    opacity: 1;

    line-height: 1.5;
    word-break: normal;
    overflow-wrap: anywhere;
}

@media (hover: hover) {
    .cdm-bib-participants-table tbody tr:hover > th,
    .cdm-bib-participants-table tbody tr:hover > td {
        background: rgba(23, 60, 64, 0.025);
    }
}

@media (max-width: 700px) {
    .cdm-bib-group-trajectory,
    .cdm-bib-group-participants {
        margin-top: 2rem;
    }

    .cdm-bib-trajectory-table-wrap,
    .cdm-bib-participants-table-wrap {
        border-radius: 10px;
    }

    .cdm-bib-trajectory-table,
    .cdm-bib-participants-table {
        font-size: 0.9rem;
    }

    .cdm-bib-trajectory-table th,
    .cdm-bib-trajectory-table td,
    .cdm-bib-participants-table th,
    .cdm-bib-participants-table td {
        padding: 0.68rem 0.7rem;
    }

    .cdm-bib-trajectory-table thead th,
    .cdm-bib-participants-table thead th {
        font-size: 0.66rem;
    }

    .cdm-bib-trajectory-year {
        width: 4.2rem;
    }

    .cdm-bib-trajectory-modality {
        width: 6.4rem;
    }

    .cdm-bib-participants-table thead th:first-child {
        width: 41%;
    }
}

/* CDM_BIB_TABLES_V0125_END */

/* CDM_BIB_GALLERY_V0127_START
 * Vista previa escalable y recorte no destructivo.
 *
 * El figure actúa como ventana 4:3. El IMG conserva su relación
 * intrínseca para que el lightbox de WordPress siga conociendo
 * correctamente la geometría real de fotografías verticales.
 */

.cdm-bib-native-gallery.has-nested-images
figure.wp-block-image:not(#individual-image) {
    aspect-ratio: 4 / 3;
    overflow: hidden;

    align-items: center;
    justify-content: center;
}

/*
 * El IMG conserva siempre su proporción real.
 *
 * Verticales, cuadradas y hasta 4:3:
 * llenan la anchura y se recortan verticalmente.
 */
.cdm-bib-native-gallery.has-nested-images
figure.cdm-bib-thumb-fit-width:not(#individual-image) > img {
    display: block;

    width: 100% !important;
    height: auto !important;

    min-width: 0;
    min-height: 0;
    max-width: none !important;

    flex: 0 0 auto;
}

/*
 * Imágenes más panorámicas que 4:3:
 * llenan la altura y se recortan lateralmente.
 */
.cdm-bib-native-gallery.has-nested-images
figure.cdm-bib-thumb-fit-height:not(#individual-image) > img {
    display: block;

    width: auto !important;
    height: 100% !important;

    min-width: 0;
    min-height: 0;
    max-width: none !important;

    flex: 0 0 auto;
}

/*
 * Progressive enhancement:
 * sin JS la galería permanece completa y el botón no se muestra.
 */
.cdm-bib-gallery-toggle {
    display: none;
}

.cdm-bib-gallery-shell.is-enhanced .cdm-bib-gallery-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    margin-top: 0.85rem;
    padding: 0.48rem 0.8rem;

    border: 1px solid rgba(23, 60, 64, 0.18);
    border-radius: 999px;

    background: #ffffff;
    color: #c83b2e;

    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;

    cursor: pointer;
}

.cdm-bib-gallery-shell.is-enhanced
.cdm-bib-gallery-toggle:hover,
.cdm-bib-gallery-shell.is-enhanced
.cdm-bib-gallery-toggle:focus-visible {
    border-color: rgba(200, 59, 46, 0.38);
    background: rgba(200, 59, 46, 0.045);
    color: #c83b2e;
}

.cdm-bib-gallery-shell.is-enhanced
.cdm-bib-gallery-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/*
 * El contenido extra continúa teniendo layout y dimensiones reales.
 * Solo se recorta visualmente el wrapper.
 */
.cdm-bib-gallery-shell.is-enhanced:not(.is-expanded)
.cdm-bib-gallery-clip {
    max-height: var(
        --cdm-bib-gallery-collapsed-height,
        none
    );

    overflow: hidden;
}

/*
 * Mientras la vista está plegada, las fotos 7+ conservan espacio
 * y geometría pero no son visibles ni reciben foco.
 *
 * Antes de abrir el lightbox desde las seis primeras, el JS expande
 * automáticamente la galería.
 */
.cdm-bib-gallery-shell.is-enhanced:not(.is-expanded)
.cdm-bib-native-gallery
> figure.wp-block-image:nth-of-type(n + 7) {
    visibility: hidden;
}

/* CDM_BIB_GALLERY_V0127_END */

/* CDM_BIB_MEDIA_DESIGN_V0129_START
 * Acabado visual de Vídeos y Audio.
 * No modifica la lógica de privacidad, reproducción ni navegación.
 */

/* ---------- Vídeos ---------- */

.cdm-bib-group-youtube .cdm-bib-youtube-list {
    gap: 1.5rem;
}

.cdm-bib-group-youtube .cdm-bib-youtube-item > h3 {
    margin: 0 0 0.7rem;

    color: var(--cdm-bib-ink);

    font-size: clamp(1.05rem, 2vw, 1.18rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.cdm-bib-group-youtube .cdm-privacy-embed {
    overflow: hidden;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 12px;

    box-shadow:
        0 8px 24px rgba(23, 60, 64, 0.045),
        0 1px 4px rgba(23, 60, 64, 0.025);
}


/* ---------- Audio ---------- */

.cdm-bib-group-audio .cdm-bib-disclosure > summary {
    color: var(--cdm-bib-ink);

    font-size: 0.9rem;
    font-weight: 600;
}

.cdm-bib-group-audio .cdm-bib-disclosure > summary::marker {
    color: var(--cdm-bib-accent);
}

.cdm-bib-audio-player {
    --cdm-bib-audio-accent: var(--cdm-bib-accent);

    padding: 1rem;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 12px;

    background: var(--cdm-bib-surface);

    box-shadow:
        0 8px 24px rgba(23, 60, 64, 0.04),
        0 1px 4px rgba(23, 60, 64, 0.025);
}

.cdm-bib-audio-current {
    margin-bottom: -0.1rem;
}

.cdm-bib-audio-current-label {
    color: rgba(23, 60, 64, 0.64);

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.045em;

    opacity: 1;
}

.cdm-bib-audio-current-title {
    color: var(--cdm-bib-ink);

    font-size: 1.05rem;
    line-height: 1.3;
}

.cdm-bib-audio-nav {
    justify-content: flex-end;
    gap: 0.4rem;
}

.cdm-bib-group .cdm-bib-audio-nav .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 2.45rem;
    min-width: 2.45rem;
    min-height: 2.45rem;
    padding: 0;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 999px;

    background: #ffffff;
    color: var(--cdm-bib-ink);

    box-shadow: none;

    font-size: 1.05rem;
    line-height: 1;
}

.cdm-bib-group .cdm-bib-audio-nav .button:hover,
.cdm-bib-group .cdm-bib-audio-nav .button:focus-visible {
    border-color: rgba(200, 59, 46, 0.38);

    background: rgba(200, 59, 46, 0.045);
    color: var(--cdm-bib-accent);
}

.cdm-bib-group .cdm-bib-audio-nav .button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.cdm-bib-group .cdm-bib-audio-nav .button:disabled {
    border-color: var(--cdm-bib-line);

    background: #ffffff;
    color: var(--cdm-bib-ink);

    opacity: 0.32;
    cursor: default;
}

.cdm-bib-audio-track {
    border-color: var(--cdm-bib-line);
    border-radius: 8px;

    background: #ffffff;
}

.cdm-bib-audio-track:hover,
.cdm-bib-audio-track:focus-visible {
    border-color: rgba(23, 60, 64, 0.2);

    background: var(--cdm-bib-soft);
}

.cdm-bib-audio-track.is-active {
    border-color: rgba(200, 59, 46, 0.22);

    background: rgba(200, 59, 46, 0.05);

    box-shadow: inset 3px 0 0 var(--cdm-bib-accent);
}

.cdm-bib-audio-track.is-active .cdm-bib-audio-track-number {
    color: var(--cdm-bib-accent);
}

@media (max-width: 520px) {
    .cdm-bib-audio-player {
        padding: 0.8rem;
        border-radius: 10px;
    }

    .cdm-bib-group-youtube .cdm-privacy-embed {
        border-radius: 10px;
    }
}

/* CDM_BIB_MEDIA_DESIGN_V0129_END */

/* CDM_BIB_AUDIO_DISCLOSURE_V0130_START
 * El control de apertura de Audio replica el lenguaje visual
 * del botón "Ver X fotos más" de la galería.
 */

.cdm-bib-group-audio .cdm-bib-disclosure > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;

    min-height: 38px;
    margin: 0;
    padding: 0.48rem 0.8rem;

    border: 1px solid rgba(23, 60, 64, 0.18);
    border-radius: 999px;

    background: #ffffff;
    color: #c83b2e;

    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;

    cursor: pointer;
    list-style: none;
}

.cdm-bib-group-audio .cdm-bib-disclosure > summary::-webkit-details-marker {
    display: none;
}

.cdm-bib-group-audio .cdm-bib-disclosure > summary::marker {
    content: "";
}

.cdm-bib-group-audio .cdm-bib-disclosure > summary::before {
    content: "▶";

    display: inline-block;

    color: #c83b2e;

    font-size: 0.72em;
    line-height: 1;

    transform: translateY(-0.02em);
}

.cdm-bib-group-audio .cdm-bib-disclosure > summary:hover,
.cdm-bib-group-audio .cdm-bib-disclosure > summary:focus-visible {
    border-color: rgba(200, 59, 46, 0.38);

    background: rgba(200, 59, 46, 0.045);
    color: #c83b2e;
}

.cdm-bib-group-audio .cdm-bib-disclosure > summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Evita el margen pensado para summaries de texto al abrir Audio. */
.cdm-bib-group-audio .cdm-bib-disclosure[open] > summary {
    margin-bottom: 1rem;
}

/* CDM_BIB_AUDIO_DISCLOSURE_V0130_END */

/* CDM_BIB_LIBRETTO_PIECES_V0131_START
 * Acabado visual de Libreto y Letras.
 * Letras usa details nativos individuales para evitar desplegar
 * repertorios completos de una sola vez.
 */


/* =========================================================
 * Botones exteriores Libreto / Letras
 * ======================================================= */

.cdm-bib-group-libretto .cdm-bib-disclosure > summary,
.cdm-bib-group-pieces .cdm-bib-disclosure > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;

    min-height: 38px;
    margin: 0;
    padding: 0.48rem 0.8rem;

    border: 1px solid rgba(23, 60, 64, 0.18);
    border-radius: 999px;

    background: #ffffff;
    color: #c83b2e;

    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;

    cursor: pointer;
    list-style: none;
}

.cdm-bib-group-libretto
.cdm-bib-disclosure > summary::-webkit-details-marker,
.cdm-bib-group-pieces
.cdm-bib-disclosure > summary::-webkit-details-marker {
    display: none;
}

.cdm-bib-group-libretto .cdm-bib-disclosure > summary::marker,
.cdm-bib-group-pieces .cdm-bib-disclosure > summary::marker {
    content: "";
}

.cdm-bib-group-libretto .cdm-bib-disclosure > summary:hover,
.cdm-bib-group-libretto .cdm-bib-disclosure > summary:focus-visible,
.cdm-bib-group-pieces .cdm-bib-disclosure > summary:hover,
.cdm-bib-group-pieces .cdm-bib-disclosure > summary:focus-visible {
    border-color: rgba(200, 59, 46, 0.38);

    background: rgba(200, 59, 46, 0.045);
    color: #c83b2e;
}

.cdm-bib-group-libretto .cdm-bib-disclosure > summary:focus-visible,
.cdm-bib-group-pieces .cdm-bib-disclosure > summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.cdm-bib-group-libretto .cdm-bib-disclosure > summary::before {
    content: "▤";

    font-size: 0.9em;
    line-height: 1;
}

.cdm-bib-group-pieces .cdm-bib-disclosure > summary::before {
    content: "≡";

    font-size: 1.05em;
    font-weight: 800;
    line-height: 1;
}

.cdm-bib-group-libretto .cdm-bib-disclosure[open] > summary,
.cdm-bib-group-pieces .cdm-bib-disclosure[open] > summary {
    margin-bottom: 1rem;
}


/* =========================================================
 * Libreto
 * ======================================================= */

.cdm-bib-libretto {
    display: grid;
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;

    padding: 1rem;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 12px;

    background: var(--cdm-bib-surface);

    box-shadow:
        0 8px 24px rgba(23, 60, 64, 0.04),
        0 1px 4px rgba(23, 60, 64, 0.025);
}

.cdm-bib-libretto-cover-wrap {
    width: 100%;
    max-width: 160px;

    flex: none;
}

.cdm-bib-libretto-cover {
    display: block;

    width: 100%;
    height: auto;

    border-radius: 7px;

    box-shadow:
        0 5px 15px rgba(23, 60, 64, 0.08);
}

.cdm-bib-libretto-info > h3 {
    margin: 0 0 0.35rem;

    color: var(--cdm-bib-ink);

    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.cdm-bib-libretto-note {
    margin: 0.2rem 0 1rem;

    color: rgba(23, 60, 64, 0.68);

    font-size: 0.9rem;
    line-height: 1.5;
}

.cdm-bib-libretto-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;

    margin: 0.85rem 0 0;
}

.cdm-bib-libretto-action,
.cdm-bib-libretto-action:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 0.48rem 0.8rem;

    border: 1px solid rgba(23, 60, 64, 0.18);
    border-radius: 999px;

    background: #ffffff;

    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.cdm-bib-libretto-action-primary,
.cdm-bib-libretto-action-primary:visited {
    color: var(--cdm-bib-accent);
}

.cdm-bib-libretto-action-secondary,
.cdm-bib-libretto-action-secondary:visited {
    color: var(--cdm-bib-ink);
}

.cdm-bib-libretto-action:hover,
.cdm-bib-libretto-action:focus-visible {
    border-color: rgba(200, 59, 46, 0.38);

    background: rgba(200, 59, 46, 0.045);
    color: var(--cdm-bib-accent);

    text-decoration: none;
}

.cdm-bib-libretto-action:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}


/* =========================================================
 * Letras
 * ======================================================= */

.cdm-bib-pieces {
    display: grid;
    gap: 0.5rem;
}

.cdm-bib-piece,
.cdm-bib-piece:first-child {
    margin: 0;
    padding: 0;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 9px;

    background: var(--cdm-bib-surface);

    overflow: hidden;
}

.cdm-bib-piece-summary {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;

    padding: 0.72rem 0.85rem;

    color: var(--cdm-bib-ink);
    background: #ffffff;

    cursor: pointer;
    list-style: none;
}

.cdm-bib-piece-summary::-webkit-details-marker {
    display: none;
}

.cdm-bib-piece-summary::marker {
    content: "";
}

.cdm-bib-piece-summary::before {
    content: "▸";

    flex: 0 0 auto;

    color: var(--cdm-bib-accent);

    font-size: 0.82rem;
    line-height: 1;
}

.cdm-bib-piece[open] > .cdm-bib-piece-summary::before {
    content: "▾";
}

.cdm-bib-piece-summary:hover,
.cdm-bib-piece-summary:focus-visible {
    background: var(--cdm-bib-soft);
}

.cdm-bib-piece-summary:focus-visible {
    outline: 2px solid var(--cdm-bib-accent);
    outline-offset: -2px;
}

.cdm-bib-piece-type {
    flex: 0 0 auto;

    color: var(--cdm-bib-accent);

    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cdm-bib-piece-title {
    min-width: 0;

    color: var(--cdm-bib-ink);

    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
}

.cdm-bib-piece-text {
    max-width: 70ch;

    padding: 0.25rem 1rem 1rem 2rem;

    color: rgba(23, 60, 64, 0.88);

    font-size: 0.94rem;
    line-height: 1.65;
}

.cdm-bib-piece[open] > .cdm-bib-piece-summary {
    border-bottom: 1px solid var(--cdm-bib-line);

    background: rgba(200, 59, 46, 0.035);
}

@media (max-width: 600px) {
    .cdm-bib-libretto {
        grid-template-columns: 1fr;

        padding: 0.8rem;

        border-radius: 10px;
    }

    .cdm-bib-libretto-cover-wrap {
        max-width: 140px;
        margin-bottom: 0;
    }

    .cdm-bib-piece-summary {
        flex-wrap: wrap;
        gap: 0.25rem 0.45rem;

        padding: 0.68rem 0.72rem;
    }

    .cdm-bib-piece-text {
        padding:
            0.2rem
            0.8rem
            0.85rem
            1.55rem;

        font-size: 0.92rem;
    }
}

/* CDM_BIB_LIBRETTO_PIECES_V0131_END */

/* CDM_BIB_PIECES_TOGGLE_V0132_START
 * Etiqueta contextual del disclosure principal de Letras.
 * No requiere JavaScript: utiliza el estado nativo [open].
 */

.cdm-bib-group-pieces .cdm-bib-pieces-label-open {
    display: none;
}

.cdm-bib-group-pieces
.cdm-bib-disclosure[open]
> summary
.cdm-bib-pieces-label-closed {
    display: none;
}

.cdm-bib-group-pieces
.cdm-bib-disclosure[open]
> summary
.cdm-bib-pieces-label-open {
    display: inline;
}

/* CDM_BIB_PIECES_TOGGLE_V0132_END */

/* CDM_BIB_LIBRETTO_TOGGLE_V0133_START
 * Etiqueta contextual del disclosure de Libreto mediante
 * el estado nativo [open], sin JavaScript.
 */

.cdm-bib-group-libretto .cdm-bib-libretto-label-open {
    display: none;
}

.cdm-bib-group-libretto
.cdm-bib-disclosure[open]
> summary
.cdm-bib-libretto-label-closed {
    display: none;
}

.cdm-bib-group-libretto
.cdm-bib-disclosure[open]
> summary
.cdm-bib-libretto-label-open {
    display: inline;
}

/* CDM_BIB_LIBRETTO_TOGGLE_V0133_END */

/* CDM_BIB_PERSON_DESIGN_V0136_START
 * Ficha pública compacta de Persona.
 * Foto documental 3:4 lateral, biografía breve y trayectoria
 * con el lenguaje visual de las fichas de Agrupación.
 */

.cdm-bib-person {
    --cdm-bib-ink: #173c40;
    --cdm-bib-accent: #c83b2e;
    --cdm-bib-line: rgba(23, 60, 64, 0.14);
    --cdm-bib-soft: rgba(23, 60, 64, 0.035);
    --cdm-bib-surface: #ffffff;

    width: 100%;
}


/* =========================================================
 * Foto + biografía
 * ======================================================= */

.cdm-bib-person-intro {
    width: 100%;
    margin: 0 0 2.15rem;
}

.cdm-bib-person-intro.has-photo {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

.cdm-bib-person-photo-wrap {
    width: 150px;
    aspect-ratio: 3 / 4;

    overflow: hidden;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 12px;

    background: var(--cdm-bib-soft);

    box-shadow:
        0 8px 24px rgba(23, 60, 64, 0.05),
        0 1px 4px rgba(23, 60, 64, 0.025);
}

.cdm-bib-person-photo {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.cdm-bib-person-biography {
    min-width: 0;
    margin: 0;

    color: rgba(23, 60, 64, 0.88);

    font-size: 1rem;
    line-height: 1.7;
}

.cdm-bib-person-biography > :first-child {
    margin-top: 0;
}

.cdm-bib-person-biography > :last-child {
    margin-bottom: 0;
}


/* =========================================================
 * Trayectoria
 * ======================================================= */

.cdm-bib-person-section {
    margin-top: 2rem;
}

.cdm-bib-person-section > h2 {
    margin: 0 0 0.8rem;

    color: var(--cdm-bib-ink);
}

.cdm-bib-person-career-table-wrap {
    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    border: 1px solid var(--cdm-bib-line);
    border-radius: 10px;

    background: var(--cdm-bib-surface);

    box-shadow:
        0 8px 24px rgba(23, 60, 64, 0.04),
        0 1px 4px rgba(23, 60, 64, 0.025);
}

.cdm-bib-person-career-table {
    width: 100%;
    margin: 0;

    border-collapse: collapse;

    font-size: 0.92rem;
}

.cdm-bib-person-career-table th,
.cdm-bib-person-career-table td {
    padding: 0.68rem 0.8rem;

    border: 0;
    border-bottom: 1px solid var(--cdm-bib-line);

    text-align: left;
    vertical-align: top;
}

.cdm-bib-person-career-table thead th {
    background: rgba(23, 60, 64, 0.035);
    color: var(--cdm-bib-ink);

    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.cdm-bib-person-career-table tbody tr:last-child > td {
    border-bottom: 0;
}

.cdm-bib-person-career-table tbody tr:hover > td {
    background: rgba(23, 60, 64, 0.025);
}

.cdm-bib-career-year {
    white-space: nowrap;

    color: var(--cdm-bib-ink);

    font-weight: 700;
}

.cdm-bib-career-group a,
.cdm-bib-career-group a:visited {
    color: var(--cdm-bib-accent);

    font-weight: 700;
    text-decoration: none;
}

.cdm-bib-career-group a:hover,
.cdm-bib-career-group a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.cdm-bib-career-modality,
.cdm-bib-career-roles {
    color: rgba(23, 60, 64, 0.72);
}


/* =========================================================
 * Otros nombres
 * ======================================================= */

.cdm-bib-person-other-names {
    margin-top: 1.6rem;
    padding-top: 0.9rem;

    border-top: 1px solid var(--cdm-bib-line);

    color: rgba(23, 60, 64, 0.66);

    font-size: 0.86rem;
    line-height: 1.55;

    opacity: 1;
}

.cdm-bib-person-other-names p {
    margin: 0.18rem 0;
}

.cdm-bib-person-other-names strong {
    color: rgba(23, 60, 64, 0.82);
}


/* =========================================================
 * Móvil
 * ======================================================= */

@media (max-width: 600px) {
    .cdm-bib-person-intro.has-photo {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 0.9rem;

        margin-bottom: 1.75rem;
    }

    .cdm-bib-person-photo-wrap {
        width: 110px;

        border-radius: 10px;
    }

    .cdm-bib-person-biography {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .cdm-bib-person-career-table {
        min-width: 560px;

        font-size: 0.88rem;
    }

    .cdm-bib-person-career-table th,
    .cdm-bib-person-career-table td {
        padding: 0.58rem 0.65rem;
    }
}

@media (max-width: 380px) {
    .cdm-bib-person-intro.has-photo {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .cdm-bib-person-photo-wrap {
        width: 96px;
    }
}

/* CDM_BIB_PERSON_DESIGN_V0136_END */

/* CDM_BIB_COLLABORATION_V0140_START
 * BIB-D107.
 * Acciones secundarias de colaboración y contexto del formulario.
 */
.cdm-bib-collaboration,
.cdm-bib-collaboration-page {
    --cdm-bib-collab-ink: #173c40;
    --cdm-bib-collab-accent: #c83b2e;
    --cdm-bib-collab-line: rgba(23, 60, 64, 0.14);
    --cdm-bib-collab-soft: rgba(23, 60, 64, 0.035);
}

.cdm-bib-collaboration {
    margin-top: 2.5rem;
    padding-top: 1.1rem;

    border-top: 1px solid var(--cdm-bib-collab-line);
}

.cdm-bib-collaboration-title {
    margin: 0 0 0.7rem;

    color: rgba(23, 60, 64, 0.76);

    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.cdm-bib-collaboration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.cdm-bib-collaboration-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    padding: 0.45rem 0.72rem;

    border: 1px solid rgba(23, 60, 64, 0.18);
    border-radius: 999px;

    background: #fff;
    color: var(--cdm-bib-collab-accent);

    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.cdm-bib-collaboration-action:hover,
.cdm-bib-collaboration-action:focus-visible {
    border-color: rgba(200, 59, 46, 0.38);

    background: rgba(200, 59, 46, 0.045);
    color: var(--cdm-bib-collab-accent);

    text-decoration: none;
}

.cdm-bib-collaboration-action:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.cdm-bib-collaboration-context {
    margin: 0 0 1.5rem;
    padding: 0.9rem 1rem;

    border: 1px solid var(--cdm-bib-collab-line);
    border-radius: 10px;

    background: var(--cdm-bib-collab-soft);
}

.cdm-bib-collaboration-context-label,
.cdm-bib-collaboration-context-title,
.cdm-bib-collaboration-context-action {
    margin: 0;
}

.cdm-bib-collaboration-context-label {
    margin-bottom: 0.2rem;

    color: rgba(23, 60, 64, 0.68);

    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.cdm-bib-collaboration-context-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.cdm-bib-collaboration-context-title a {
    color: var(--cdm-bib-collab-accent);
    text-decoration: none;
}

.cdm-bib-collaboration-context-title a:hover,
.cdm-bib-collaboration-context-title a:focus-visible {
    text-decoration: underline;
}

.cdm-bib-collaboration-context-action {
    margin-top: 0.2rem;

    color: rgba(23, 60, 64, 0.72);

    font-size: 0.88rem;
}

@media (max-width: 520px) {
    .cdm-bib-collaboration-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cdm-bib-collaboration-action {
        width: 100%;
    }
}
/* CDM_BIB_COLLABORATION_V0140_END */

/* CDM_BIB_EDITORIAL_ACCESS_V0141_START
 * BIB-D109.
 * Acceso editorial privado desde Agrupaciones y Personas.
 */
.cdm-bib-editorial-access {
    display: flex;
    justify-content: flex-end;

    margin: 0 0 0.75rem;
}

.cdm-bib-editorial-access-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;
    padding: 0.38rem 0.68rem;

    border: 1px solid rgba(23, 60, 64, 0.18);
    border-radius: 999px;

    background: rgba(23, 60, 64, 0.035);
    color: #173c40;

    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.cdm-bib-editorial-access-link:hover,
.cdm-bib-editorial-access-link:focus-visible {
    border-color: rgba(200, 59, 46, 0.35);

    background: rgba(200, 59, 46, 0.045);
    color: #c83b2e;

    text-decoration: none;
}

.cdm-bib-editorial-access-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (max-width: 520px) {
    .cdm-bib-editorial-access {
        justify-content: flex-start;
    }
}
/* CDM_BIB_EDITORIAL_ACCESS_V0141_END */

/* CDM_BIB_HISTORICAL_V0151_START
 *
 * Cronologías históricas alimentadas por schema 3.
 * Reutilizan la tabla visual de Biblioteca para mantener
 * una sola identidad entre Personas, Trayectorias e Historia.
 */

.cdm-bib-historical {
    margin-block: 1.25rem 2rem;
}

.cdm-bib-historical-table {
    margin: 0;
}

.cdm-bib-historical-table th:first-child,
.cdm-bib-historical-table td:first-child {
    width: 5.75rem;
}

.cdm-bib-historical-recipient-list {
    display: grid;
    gap: 0.22rem;
}

.cdm-bib-historical-recipient-item {
    min-width: 0;
}

.cdm-bib-historical-place {
    display: block;

    margin-top: 0.28rem;

    font-size: 0.88em;
    line-height: 1.35;

    opacity: 0.68;
}

.cdm-bib-historical
    + .wp-block-heading {
    margin-top: 2.75rem;
}

@media (max-width: 520px) {
    .cdm-bib-historical {
        margin-block:
            1rem
            1.75rem;
    }

    .cdm-bib-historical-table
        th:first-child,
    .cdm-bib-historical-table
        td:first-child {
        width: 4.4rem;
    }

    .cdm-bib-historical-place {
        margin-top: 0.2rem;
    }
}

/* CDM_BIB_HISTORICAL_V0151_END */


/* CDM_BIB_ARCHIVE_V0157_START
 * Navegación pública por Año y Año + Modalidad.
 */

.cdm-bib-group-meta dd a {
    color: inherit;
    text-decoration: none;
}

.cdm-bib-group-meta dd a:hover {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.cdm-bib-group-meta dd a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 3px;
}

.cdm-bib-index-page {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.cdm-bib-index {
    width: min(calc(100% - 2rem), 1080px);
    margin: 0 auto;
}

.cdm-bib-index-header {
    margin-bottom: 1.5rem;
}

.cdm-bib-index-header h1 {
    margin: 0;
    color: #173c40;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.cdm-bib-index-count {
    margin: 0.6rem 0 1.25rem;
    color: rgba(23, 60, 64, 0.72);
    font-size: 0.95rem;
}

.cdm-bib-index-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cdm-bib-index-filter {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.42rem 0.78rem;

    border: 1px solid rgba(23, 60, 64, 0.16);
    border-radius: 999px;

    background: #fff;
    color: #173c40;

    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;
}

.cdm-bib-index-filter:hover {
    border-color: rgba(200, 59, 46, 0.45);
    color: #c83b2e;
}

.cdm-bib-index-filter.is-active {
    border-color: #173c40;
    background: #173c40;
    color: #fff;
}

.cdm-bib-index-filter:focus-visible,
.cdm-bib-index-item-link:focus-visible {
    outline: 2px solid #c83b2e;
    outline-offset: 3px;
}

.cdm-bib-index-list {
    display: grid;
    gap: 0.6rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.cdm-bib-index-item {
    margin: 0;
}

.cdm-bib-index-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    padding: 0.9rem 1rem;

    border: 1px solid rgba(23, 60, 64, 0.12);
    border-radius: 10px;

    background: #fff;
    color: #173c40;

    text-decoration: none;

    transition:
        border-color 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

.cdm-bib-index-item-link:hover {
    border-color: rgba(200, 59, 46, 0.34);
    box-shadow: 0 5px 18px rgba(23, 60, 64, 0.06);
    transform: translateY(-1px);
}

.cdm-bib-index-item-title {
    font-weight: 700;
}

.cdm-bib-index-item-modality {
    flex: 0 0 auto;

    color: #c83b2e;

    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .cdm-bib-index-page {
        padding-top: 1.5rem;
    }

    .cdm-bib-index {
        width: min(calc(100% - 1.25rem), 1080px);
    }

    .cdm-bib-index-item-link {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.3rem;
    }
}

/* CDM_BIB_ARCHIVE_V0157_END */


/* CDM_BIB_META_ALIGN_V0159_START
 * Alineación tipográfica de etiqueta y valor en chips Año/Modalidad.
 */
.cdm-bib-group-meta-row {
    align-items: baseline;
}
/* CDM_BIB_META_ALIGN_V0159_END */
