/* =========================================================================
 * flex/css/07.css — Maqueta 07 · Informe, solo con flexbox simple.
 * Sustituye a layouts/l07-informe.css. Usa base.css para página, cabecera y pie.
 *
 *   .pg.c7 ..................... COLUMN     cabecera / portada / cuerpo / pie
 *   ├─ .c7-portada ............. COLUMN     centrada: align-items + text-align
 *   │   └─ .c7-cifras .......... ROW wrap   centradas con justify-content
 *   └─ main.c7-cuerpo .......... ROW        índice | artículo
 *       ├─ .c7-indice .......... COLUMN     sticky + align-self: flex-start
 *       └─ .c7-articulo ........ COLUMN     secciones (cada una, COLUMN)
 *           ├─ .c7-cita ........ ROW        cifra grande | texto
 *           └─ .c7-pareja/trio . ROW wrap   figuras a partes iguales
 * ========================================================================= */

.c7 { background: #fff; }

/* ---------- Portada: columna con todo centrado en horizontal ---------- */
.c7-portada {
    display: flex;
    flex-direction: column;
    align-items: center;            /* X (en columna, align = eje cruzado = horizontal) */
    gap: 10px;
    text-align: center;             /* centra las líneas DENTRO de cada texto */
    padding: 56px var(--lado) 40px;
    background: linear-gradient(180deg, var(--b-50), #fff);
    border-bottom: 1px solid var(--panel-border);
}
.c7-portada > span { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ba-blue); }
.c7-portada h1 { max-width: 860px; margin-top: 4px; font-size: 48px; font-weight: 300; line-height: 1.08; color: var(--ink); }
.c7-portada p  { font-size: 16px; color: var(--ink-2); }

.c7-cifras {
    align-self: stretch;            /* ¡ojo! con align-items: center el padre la encoge a su contenido
                                       y las cifras saltan de línea; stretch le devuelve todo el ancho… */
    display: flex; flex-wrap: wrap;
    justify-content: center;        /* …y aquí se centran las cifras dentro de ese ancho */
    margin-top: 24px;
}
.c7-cifras > div {
    flex: 0 1 220px;                /* no crecen: 220 px como máximo, encogen si hace falta */
    display: flex; flex-direction: column; gap: 4px;
    padding: 0 26px; border-right: 1px solid var(--panel-border);
}
.c7-cifras > div:last-child { border-right: 0; }
.c7-cifras b    { font-size: 44px; font-weight: 700; line-height: 1; color: var(--ba-blue); font-variant-numeric: tabular-nums; }
.c7-cifras > div:nth-child(2) b { color: var(--b-600); }
.c7-cifras > div:nth-child(3) b { color: var(--b-500); }
.c7-cifras span { font-size: 13px; color: var(--ink-2); }

/* ---------- Cuerpo: fila índice | artículo, centrada a 1104 px útiles ---------- */
.c7-cuerpo {
    --ancho: 1104px;
    --lado: max(28px, calc((100% - var(--ancho)) / 2));
    display: flex;
    gap: 48px;
    padding: 40px var(--lado) 64px;
}

.c7-indice {
    flex: 0 0 210px;
    align-self: flex-start;         /* sin esto la fila lo estira a toda la altura y sticky no tiene recorrido */
    position: sticky; top: 24px;
    display: flex; flex-direction: column; gap: 4px;
}
.c7-indice p { margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.c7-indice a { padding: 7px 0 7px 14px; border-left: 2px solid var(--panel-border); font-size: 14px; color: var(--ink-2); }
.c7-indice a.on, .c7-indice a:hover { color: var(--ba-blue); border-color: var(--ba-blue); font-weight: 600; }
.c7-indice .btn-b { margin-top: 18px; justify-content: center; }

.c7-articulo { flex: 1; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 28px; }
.c7-articulo section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
.c7-articulo h2 { display: flex; align-items: baseline; gap: 12px;          /* ROW: número · título, por la línea del texto */
                  font-size: 26px; font-weight: 600; color: var(--ink); }
.c7-articulo h2 span { padding: 2px 8px; border-radius: 6px; background: var(--b-700); color: #fff; font-size: 13px; font-weight: 700; }
.c7-articulo p   { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.c7-articulo p b { color: var(--ink); }

/* ---------- Piezas del artículo ---------- */
.c7-figura { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--panel-border); border-radius: var(--r-md); background: #fff; }
.c7-figura figcaption { font-size: 13px; color: var(--ink-3); }
.c7-figura-cab { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }   /* título | leyenda */
.c7-centrado   { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; }
.c7-centrado .legend { flex-direction: column; }

.c7-cita { display: flex; align-items: center; gap: 22px;                    /* ROW: cifra | frase */
           padding: 24px 26px; border-radius: var(--r-md); color: #fff;
           background: linear-gradient(120deg, var(--b-800), var(--b-600)); }
.c7-cita b    { flex: none; font-size: 56px; font-weight: 300; line-height: 1; }  /* la cifra no encoge */
.c7-cita span { font-size: 17px; line-height: 1.45; }

.c7-pareja, .c7-trio { display: flex; flex-wrap: wrap; gap: 16px; }
.c7-pareja > * { flex: 1 1 260px; min-width: 0; }
.c7-trio   > * { flex: 1 1 190px; min-width: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .c7-indice { display: none; }
    .c7-portada h1 { font-size: 34px; }
    .c7-cifras > div { border-right: 0; padding: 10px 16px; }
    .c7-cuerpo { padding: 28px 16px 48px; }
    .c7-cita { flex-direction: column; align-items: flex-start; }   /* la cita pasa a columna */
}
