/* El expediente de la demo usa la ilustración real de transporte. La capa
   comienza debajo de los subtítulos: deja accesibles los controles de guía. */
.bd-dossier {
    position: fixed;
    z-index: 34;
    right: 0;
    bottom: 0;
    left: 0;
    top: clamp(8px, var(--bd-dossier-top, 280px), max(8px, calc(100vh - 180px)));
    top: clamp(8px, var(--bd-dossier-top, 280px), max(8px, calc(100dvh - 180px)));
    padding: 10px max(14px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(23 61 54 / 0%);
}
.bd-dossier.is-open {
    background-color: rgb(23 61 54 / 27%);
    animation: bd-dossier-backdrop .42s ease both;
}
.bd-dossier-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1120px, 100%);
    width: min(calc(1120px * var(--bd-dossier-fit, 1)), 100%);
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #f5faf8;
    border-radius: 24px;
    box-shadow: 0 24px 72px rgb(23 61 54 / 25%);
    transform: scale(.48);
    transform-origin: center;
    opacity: 0;
}
.bd-dossier.is-open .bd-dossier-panel {
    transform: scale(1);
    opacity: 1;
    animation: bd-dossier-enter .42s cubic-bezier(.2, .75, .25, 1) both;
}
@keyframes bd-dossier-enter {
    from { transform: scale(.48); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes bd-dossier-backdrop {
    from { background-color: rgb(23 61 54 / 0%); }
    to { background-color: rgb(23 61 54 / 27%); }
}
.bd-dossier-body {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
}
.bd-dossier .transport-reveal {
    width: min(1120px, 100%);
    margin: 0 auto;
    zoom: var(--bd-dossier-fit, 1);
}
/* En el resto de la demostración los encabezados tienen su propio color;
   aquí conservamos la paleta de la ilustración original. */
.bd-dossier .transport-expediente h2, .bd-dossier .transport-expediente h3 { color: var(--transport-navy); }
.bd-dossier-close {
    position: absolute;
    z-index: 3;
    right: 10px;
    top: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #395f59;
    background: #fff;
    border: 1px solid #cce0d8;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 4px 12px rgb(23 61 54 / 8%);
}
.bd-dossier-close:hover { color: #173d36; border-color: #70a89e; background: #edf7f3; }
@media (max-width: 700px) {
    .bd-dossier { padding: 8px; }
    .bd-dossier-panel { width: min(1120px, 100%); border-radius: 18px; }
    .bd-dossier .transport-reveal { zoom: 1; }
    .bd-dossier .transport-expediente { border-radius: 18px; }
    .bd-dossier .transport-section-heading { padding-inline: 24px; }
    .bd-dossier-close { top: 7px; right: 7px; width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    .bd-dossier.is-open, .bd-dossier.is-open .bd-dossier-panel { animation: none; }
    .bd-dossier-panel { transform: none; }
}
