/* ═══════════════════════════════════════════════════════════════
   HELGA · SECCIONES NUEVAS
   Usa solo tokens (var --rose, --night, etc.) para que funcione
   con cualquiera de los dos temas. Cargar AL FINAL.
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────
   1 · PILARES — franja de tres promesas
   ─────────────────────────────────────────────── */
.pillars {
    background: var(--beige);
    padding-block: clamp(2.5rem, 5vw, 3.75rem);
    border-bottom: 1px solid var(--sand);
}
.pillars__grid {
    display: grid;
    gap: clamp(1.75rem, 3.5vw, 3rem);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .pillars__grid { grid-template-columns: repeat(3, 1fr); } }

.pillar {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    position: relative;
}
@media (min-width: 768px) {
    .pillar:not(:last-child)::after {
        content: '';
        position: absolute;
        right: clamp(-1.5rem, -2vw, -.9rem);
        top: 10%; bottom: 10%;
        width: 1px;
        background: var(--sand);
    }
}
.pillar__icon {
    flex-shrink: 0;
    width: 58px; height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--rose);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 10px 28px -8px var(--rose-glow);
    transition: transform var(--dur-mid) var(--ease-back);
}
.pillar:hover .pillar__icon { transform: translateY(-4px) scale(1.06); }
.pillar h3 {
    font-family: var(--sans);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: .45rem;
}
.pillar p {
    font-size: .87rem;
    line-height: 1.7;
    color: var(--slate);
    margin: 0;
}

/* ───────────────────────────────────────────────
   2 · PROBLEMAS QUE ATIENDO — "Esto NO es normal"
   ─────────────────────────────────────────────── */
.problems__head {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 992px) {
    .problems__head { grid-template-columns: 1fr auto 1fr; }
    .problems__head > *:first-child { text-align: right; }
}

.problems__badge {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1.3rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-pill, 999px);
    font-size: .78rem;
    letter-spacing: .1em;
    color: rgba(255,255,255,.75);
}
.problems__badge i { color: var(--rose); }

.problems__grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.problem-card {
    position: relative;
    background: var(--paper);
    border-radius: var(--radius, 0);
    overflow: hidden;
    text-align: center;
    transition: transform var(--dur-mid) var(--ease-out),
                box-shadow var(--dur-mid) var(--ease-soft);
    will-change: transform;
}
.problem-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-glow);
}
.problem-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--beige);
}
.problem-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease-out);
}
.problem-card:hover .problem-card__media img { transform: scale(1.07); }

.problem-card__icon {
    position: absolute;
    left: 50%;
    top: calc(75% - 26px);
    transform: translateX(-50%);
    width: 52px; height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--paper);
    color: var(--rose);
    font-size: 1.05rem;
    box-shadow: 0 6px 20px -6px rgba(0,0,0,.2), inset 0 0 0 1px var(--sand);
    z-index: 2;
    transition: background-color var(--dur-mid), color var(--dur-mid), box-shadow var(--dur-mid);
}
.problem-card:hover .problem-card__icon {
    background: var(--rose);
    color: #fff;
    box-shadow: 0 8px 24px -6px var(--rose-glow);
}

.problem-card__body { padding: 2.4rem 1.3rem 1.7rem; }
.problem-card h4 {
    font-size: 1.18rem;
    font-weight: 500;
    line-height: 1.28;
    margin-bottom: .5rem;
}
.problem-card p {
    font-size: .84rem;
    color: var(--slate);
    line-height: 1.65;
    margin: 0;
}

/* ───────────────────────────────────────────────
   3 · VIDEO + SOBRE MÍ
   ─────────────────────────────────────────────── */
.videobio__grid {
    display: grid;
    gap: clamp(2rem, 4.5vw, 3.5rem);
    align-items: center;
}
@media (min-width: 992px) { .videobio__grid { grid-template-columns: 1fr 1fr; } }

/* Fachada de video: no carga el iframe hasta que se hace clic */
.video-facade {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius, 0);
    overflow: hidden;
    cursor: pointer;
    background: var(--night);
    box-shadow: 0 24px 70px -24px var(--rose-glow);
    border: 1px solid rgba(255,255,255,.1);
}
.video-facade img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .9s var(--ease-out), filter .5s;
    filter: brightness(.82);
}
.video-facade:hover img { transform: scale(1.05); filter: brightness(.95); }

.video-facade__play {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 78px; height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: var(--rose);
    font-size: 1.3rem;
    padding-left: 5px;
    transition: transform var(--dur-mid) var(--ease-back), background-color var(--dur-mid);
    z-index: 2;
}
.video-facade__play::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.4);
    animation: playPulse 2.4s var(--ease-soft) infinite;
}
@keyframes playPulse {
    0%   { transform: scale(.9); opacity: .8; }
    70%  { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}
.video-facade:hover .video-facade__play {
    transform: translate(-50%, -50%) scale(1.09);
    background: #fff;
}
.video-facade iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Video local. object-fit: contain y no cover, porque el
   contenedor es 16/10 y recortar el encuadre de una entrevista
   se come las cabezas. Las bandas quedan en el negro del marco. */
.video-facade video {
    width: 100%; height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.video-facade__label {
    position: absolute;
    left: 1.1rem; bottom: 1.1rem;
    z-index: 2;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(6px);
    padding: .4rem .9rem;
    border-radius: var(--radius-pill, 999px);
}

/* Lista de credenciales compacta */
.credentials { margin-top: 1.4rem; }
.credentials li {
    position: relative;
    padding-left: 1.3rem;
    font-size: .86rem;
    line-height: 1.65;
    margin-bottom: .5rem;
    color: var(--slate);
}
.credentials li::before {
    content: '';
    position: absolute;
    left: 0; top: .62em;
    width: 8px; height: 2px;
    border-radius: 2px;
    background: var(--rose);
}
.section--dark .credentials li { color: rgba(255,255,255,.6); }

/* Tarjetas laterales de valor */
.value-list { display: grid; gap: .8rem; }
.value-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--paper);
    border: 1px solid var(--sand);
    border-radius: var(--radius, 0);
    transition: transform var(--dur-mid) var(--ease-out), box-shadow var(--dur-mid);
}
.value-item:hover { transform: translateX(6px); box-shadow: var(--shadow-md); }
.value-item i {
    flex-shrink: 0;
    width: 42px; height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--rose);
    color: #fff;
    font-size: .95rem;
}
.value-item span { font-size: .87rem; line-height: 1.55; color: var(--ink); }

/* ───────────────────────────────────────────────
   4 · BANDA DE ALCANCE NACIONAL
   ─────────────────────────────────────────────── */
.reach {
    background: var(--night-2, var(--night));
    position: relative;
    overflow: hidden;
    padding-block: clamp(2.5rem, 5vw, 4rem);
}
.reach::after {
    content: '';
    position: absolute;
    right: -4%; top: 50%;
    transform: translateY(-50%);
    width: 320px; height: 320px;
    background: var(--grad-glow, radial-gradient(circle, var(--rose-glow), transparent 70%));
    filter: blur(30px);
    opacity: .5;
    pointer-events: none;
}
.reach__grid {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
    text-align: center;
}
@media (min-width: 900px) { .reach__grid { grid-template-columns: repeat(4, 1fr); } }
.reach__item { padding: 1rem .5rem; position: relative; }
@media (min-width: 900px) {
    .reach__item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0; top: 20%; bottom: 20%;
        width: 1px;
        background: rgba(255,255,255,.12);
    }
}
.reach__num {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: #fff;
    line-height: 1;
}
.reach__label {
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    margin-top: .55rem;
}

/* ───────────────────────────────────────────────
   5 · TECNOLOGÍA
   ─────────────────────────────────────────────── */
.tech-item {
    display: grid;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    padding-block: clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--sand);
}
@media (min-width: 900px) {
    .tech-item { grid-template-columns: 1fr 1fr; }
    .tech-item:nth-child(even) .tech-item__media { order: 2; }
}
.tech-item:last-child { border-bottom: none; }
.tech-item__media {
    aspect-ratio: 16 / 11;
    border-radius: var(--radius, 0);
    overflow: hidden;
    background: var(--beige);
}
.tech-item__media img { width: 100%; height: 100%; object-fit: cover; }
.tech-item__num {
    font-family: var(--serif);
    font-size: 2.6rem;
    line-height: 1;
    color: var(--rose);
    opacity: .35;
    margin-bottom: .6rem;
}
.tech-item h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .7rem; }

/* ───────────────────────────────────────────────
   6 · BLOG
   ─────────────────────────────────────────────── */
.post-grid {
    display: grid;
    gap: 1.6rem;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--sand);
    border-radius: var(--radius, 0);
    overflow: hidden;
    height: 100%;
    transition: transform var(--dur-mid) var(--ease-out),
                box-shadow var(--dur-mid) var(--ease-soft),
                border-color var(--dur-mid);
}
.post-card:hover {
    transform: translateY(-6px);
    border-color: var(--rose);
    box-shadow: var(--shadow-glow);
}
.post-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--beige); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.06); }
.post-card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    align-items: center;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: .7rem;
}
.post-tag {
    padding: .22rem .7rem;
    border-radius: var(--radius-pill, 999px);
    background: var(--cream);
    color: var(--rose);
    font-weight: 500;
    border: 1px solid var(--sand);
}
.post-card h3 { font-size: 1.22rem; line-height: 1.3; margin-bottom: .55rem; }
.post-card p { font-size: .86rem; color: var(--slate); line-height: 1.7; margin-bottom: 1.1rem; }
.post-card__more { margin-top: auto; }

.post-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--slate);
    border: 1px dashed var(--sand);
    padding: .3rem .75rem;
    border-radius: var(--radius-pill, 999px);
}

/* ───────────────────────────────────────────────
   7 · FAQ (acordeón accesible)
   ─────────────────────────────────────────────── */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item {
    border-bottom: 1px solid var(--sand);
}
.faq__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.25rem 0;
    text-align: left;
    font-family: var(--serif);
    font-size: clamp(1.02rem, 1.8vw, 1.25rem);
    font-weight: 500;
    color: var(--ink);
    transition: color var(--dur-fast);
}
.faq__q:hover { color: var(--rose); }
.faq__q i {
    flex-shrink: 0;
    color: var(--rose);
    font-size: .85rem;
    transition: transform var(--dur-mid) var(--ease-out);
}
.faq__item.is-open .faq__q i { transform: rotate(45deg); }
.faq__a {
    overflow: hidden;
    max-height: 0;
    transition: max-height .45s var(--ease-out);
}
.faq__a p {
    font-size: .9rem;
    line-height: 1.8;
    color: var(--slate);
    padding-bottom: 1.35rem;
    margin: 0;
}

/* ───────────────────────────────────────────────
   8 · AVISO DE CONTENIDO PENDIENTE (uso interno)
   ─────────────────────────────────────────────── */
.todo-note {
    background: #FFF8E6;
    border: 1px dashed #D4A44C;
    border-radius: var(--radius, 0);
    padding: 1rem 1.3rem;
    font-size: .84rem;
    color: #7A5A18;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.todo-note strong { color: #5C4210; }

/* ───────────────────────────────────────────────
   9 · LOGOTIPOS DE MEMBRESÍAS
   Los PNG de assets/membresias son tinta oscura sobre
   fondo transparente, así que siempre se apoyan sobre
   superficie clara. Sobre fondo oscuro NO se invierten
   (invertir altera el color corporativo de cada marca):
   se les pone una placa clara detrás — ver .section--dark
   más abajo.

   El tamaño se fija con height + aspect-ratio y no con el
   ancho intrínseco, porque el marquee mide scrollWidth
   antes de que las imágenes terminen de cargar.
   ─────────────────────────────────────────────── */
.memb-logo {
    display: block;
    aspect-ratio: 301 / 167;
    width: auto;
    object-fit: contain;
    /* Cada logotipo trae su propio color de marca. En reposo
       se atenúan para que el muro se lea como un conjunto;
       el color completo vuelve al pasar el cursor o enfocar. */
    filter: grayscale(1);
    opacity: .55;
    transition: filter var(--dur-mid) var(--ease-soft),
                opacity var(--dur-mid) var(--ease-soft);
}

.memb:hover .memb-logo,
.memb:focus-within .memb-logo,
.marquee__item:hover .memb-logo,
.badge:hover .memb-logo,
.badge:focus-visible .memb-logo {
    filter: none;
    opacity: 1;
}

/* Sin cursor no hay hover que revele el color: se muestran
   siempre a color. Igual si se pidió menos movimiento. */
@media (hover: none), (prefers-reduced-motion: reduce) {
    .memb-logo { filter: none; opacity: 1; }
}

/* Placa clara para cuando el logotipo caiga en fondo oscuro */
.section--dark .memb-logo,
.menu-overlay .memb-logo {
    filter: none;
    opacity: 1;
    background: var(--paper);
    border-radius: var(--radius, 0);
    padding: .5rem .7rem;
}

/* ── Insignias del hero ── */
.badge--logo {
    display: inline-flex;
    align-items: center;
    padding: .34rem .8rem;
}
.badge--logo .memb-logo { height: 20px; }

/* ── Marquee ──
   .marquee__item ya viene con opacity .55; se anula para no
   multiplicarla por la del propio logotipo. */
.marquee__item--logo { align-items: center; opacity: 1; }
.marquee__item--logo .memb-logo { height: 40px; }

/* ── Tarjetas de la cuadrícula de membresías ── */
.memb--logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    padding-block: 1.5rem;
}
.memb--logo .memb-logo { height: 52px; }
@media (max-width: 480px) {
    .memb--logo .memb-logo { height: 44px; }
}

/* ───────────────────────────────────────────────
   10 · VIDEO DE FONDO EN LA CABECERA INTERNA
   Mismo patrón que el menú inmersivo: capa de medio +
   velo. El video NO cambia la altura de .page-head: esta
   la siguen definiendo el padding y el contenido, y las
   dos capas nuevas son absolutas.

   Orden de capas dentro de .page-head (que ya trae
   isolation: isolate, así que el apilado es local):
     0 · __media  video
     1 · __veil   velo de contraste
     2 · .grain y .hero__blob
     3 · .wrap    ← el texto, siempre arriba
   .wrap se promueve a propósito: al no estar posicionada
   quedaría DEBAJO de cualquier capa absoluta.
   ─────────────────────────────────────────────── */
.page-head__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.page-head__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Atenuado: el degradado oscuro de .page-head sigue
       mandando y el video solo insinúa movimiento. */
    opacity: 0;
    filter: saturate(.85);
    transition: opacity 1.2s var(--ease-soft);
}
.page-head__media.is-playing video { opacity: .55; }

/* Velo: es lo que garantiza que el texto no pierda
   legibilidad. Con estas alfas el punto más claro posible
   del video queda en ~12% de luminancia, así que el blanco
   del h1 y los grises de .crumbs conservan el contraste
   que tenían sobre el fondo sólido. */
.page-head__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(90% 120% at 82% 0%, rgba(213,30,140,.26), transparent 60%),
        linear-gradient(180deg,
            rgba(21,12,51,.82) 0%,
            rgba(31,17,71,.80) 45%,
            rgba(21,12,51,.90) 100%);
    backdrop-filter: blur(2px) saturate(115%);
    -webkit-backdrop-filter: blur(2px) saturate(115%);
}

.page-head .grain,
.page-head .hero__blob { z-index: 2; }

.page-head > .wrap {
    position: relative;
    z-index: 3;
}

/* Sin video: queda exactamente la cabecera actual */
@media (prefers-reduced-motion: reduce) {
    .page-head__media { display: none; }
}
