/* =============================================
   pages/seccionazul-dossier.css
   Sección Azul, parte 3/3: ficha completa del aliado, transicion de
   pagina y tema claro.

   La ficha es "la pagina completa" de esa entrada del directorio: placa
   ancha arriba, cabecera con el giro en monoespaciada y bloques con
   etiquetas tecnicas. Mismo lenguaje que el listado (reglas finas, sin
   redondeos, acento por giro), no un modal generico.
   Viene de pages/seccionazul-grid.css.
   ============================================= */

.sz-dossier {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal, 2400);
    display: none;
}

.sz-dossier.is-open {
    display: block;
}

.sz-dossier-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: sz-overlay-in 240ms var(--ease-out) both;
}

@keyframes sz-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sz-dossier-card {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100% - 32px));
    max-height: calc(100vh - 12vh);
    overflow-y: auto;
    margin: 6vh auto 0;
    border-top: 3px solid var(--brand-cyan, #38bdf8);
    background: #071426;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
    animation: sz-dossier-in 320ms var(--ease-out) both;
}

@keyframes sz-dossier-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sz-dossier-overlay,
    .sz-dossier-card {
        animation: none;
    }
}

.sz-dossier-close {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: color var(--duration-base) var(--ease-out),
                background var(--duration-base) var(--ease-out);
}

.sz-dossier-close:hover {
    color: #04121c;
    background: var(--brand-cyan, #38bdf8);
}

.sz-dossier-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Placa ancha: la fotografia del aliado a todo el ancho de la ficha. */
.sz-dossier-plate {
    height: clamp(180px, 30vh, 280px);
    overflow: hidden;
    background: rgba(147, 180, 217, 0.08);
}

.sz-dossier-plate img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sz-dossier-head {
    padding: var(--space-5) clamp(20px, 4vw, 36px) var(--space-4);
    border-bottom: 1px solid rgba(147, 180, 217, 0.18);
}

.sz-dossier-tag {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand-cyan, #38bdf8);
    margin-bottom: 8px;
}

#sz-dossier-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: #ffffff;
    margin-bottom: 6px;
}

#sz-dossier-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--text-sm);
}

.sz-dossier-body {
    padding: var(--space-3) clamp(20px, 4vw, 36px) var(--space-7);
}

.sz-dossier-block {
    padding-top: var(--space-5);
}

/* Etiqueta tecnica del bloque, en monoespaciada y en su propia columna
   cuando hay ancho -- como los rubros impresos al margen de una ficha. */
.sz-dossier-label {
    display: block;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-text);
    padding-bottom: 10px;
    margin-bottom: var(--space-4);
    border-bottom: 1px solid rgba(147, 180, 217, 0.14);
}

#sz-dossier-description p {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.75;
    margin-bottom: var(--space-3);
}

#sz-dossier-description p:last-child {
    margin-bottom: 0;
}

/* Contactos como renglones de directorio, no como botones de red social. */
.sz-dossier-socials {
    display: grid;
    gap: 1px;
}

.sz-dossier-socials a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 10px 11px 2px;
    border-bottom: 1px solid rgba(147, 180, 217, 0.14);
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
    transition: color var(--duration-base) var(--ease-out),
                padding-left var(--duration-base) var(--ease-out),
                background var(--duration-base) var(--ease-out);
}

.sz-dossier-socials a:hover {
    color: var(--brand-cyan, #38bdf8);
    padding-left: 10px;
    background: rgba(147, 180, 217, 0.06);
}

.sz-dossier-socials svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--brand-cyan, #38bdf8);
    stroke: currentColor;
}

.sz-dossier-map {
    overflow: hidden;
    border: 1px solid rgba(147, 180, 217, 0.18);
}

.sz-dossier-map iframe {
    display: block;
    width: 100%;
    height: 300px;
    border: 0;
    /* El embed de Google llega en blanco brillante y rompe la pagina en
       tema oscuro; se atenua para que se integre al resto de la ficha. */
    filter: grayscale(0.35) contrast(1.05) brightness(0.88);
}

.sz-dossier-empty {
    color: var(--soft-text);
    font-size: var(--text-sm);
}

/* =========================================================
   PAGE TRANSITION (llegada) — Sección Azul es el directorio: entra
   como una hoja que se asienta, con un desplazamiento corto.
   Ver components/page-transitions.css.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root) {
        animation: pt-sz-exit var(--duration-base) var(--ease-out);
    }

    ::view-transition-new(root) {
        animation: pt-sz-enter var(--duration-slow) var(--ease-out);
    }

    @keyframes pt-sz-exit {
        to { opacity: 0; transform: translateY(-10px); }
    }

    @keyframes pt-sz-enter {
        from { opacity: 0; transform: translateY(14px); }
    }
}

/* =========================================================
   Light theme
   ========================================================= */
body.light-theme .dir {
    --dir-rule: rgba(15, 23, 42, 0.14);
    --dir-plate: rgba(15, 23, 42, 0.04);
}

body.light-theme .dir-index {
    background: linear-gradient(to bottom, #ffffff 82%, transparent);
}

body.light-theme .dir-masthead-title,
body.light-theme .dir-entry-name,
body.light-theme .dir-section-name,
body.light-theme .dir-colophon dd,
body.light-theme .dir-join-label,
body.light-theme .dir-join-cta {
    color: #0f172a;
}

body.light-theme .dir-entry-summary,
body.light-theme .dir-masthead-sub,
body.light-theme .dir-join-text {
    color: #334155;
}

body.light-theme .sz-dossier-card {
    background: #ffffff;
}

body.light-theme #sz-dossier-title {
    color: #0f172a;
}

body.light-theme #sz-dossier-subtitle,
body.light-theme #sz-dossier-description p,
body.light-theme .sz-dossier-socials a {
    color: #334155;
}

body.light-theme .sz-dossier-head,
body.light-theme .sz-dossier-label,
body.light-theme .sz-dossier-socials a,
body.light-theme .sz-dossier-map {
    border-color: rgba(15, 23, 42, 0.14);
}

body.light-theme .sz-dossier-map iframe {
    filter: none;
}
