/* ═══════════════════════════════════════════════════════════
   SIGNARIO — layout  v3.0
═══════════════════════════════════════════════════════════ */

/* ── Fix WPBakery containers ─────────────────────────────── */
.vc_row:has(#signario) .full_section_inner,
.vc_row:has(#signario) .vc_column-inner,
.vc_row:has(#signario) .wpb_wrapper,
.vc_row:has(#signario) .wpb_raw_html {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ── Sección wrapper full-bleed ──────────────────────────── */
#signario {
    width: 100vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    position: relative !important;
    background-color: #060614 !important;
    padding: 80px 0 100px !important;
    overflow: hidden !important;
    isolation: isolate;
}

/* ── Ocultar <p> y <br> inyectados por WPBakery ──────────── */
#signario > p,
#signario .wpb_wrapper > p { display: none !important; }

/* ── Cabecera ────────────────────────────────────────────── */
.signario__header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ── Archive (flechas + stage) ───────────────────────────── */
#signarioArchive {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ── Flechas ─────────────────────────────────────────────── */
.signario__arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.7);
    border: 1px solid #2a2a2a;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, background 0.3s;
}
.signario__arrow:hover      { border-color: #00d3f3; background: rgba(0,211,243,0.08); }
.signario__arrow:disabled   { opacity: 0.25; cursor: default; pointer-events: none; }

/* ── Stage wrapper (ocupa el espacio flexible) ───────────── */
.signario__stage {
    flex: 1;
    overflow: hidden;
}

/* ── Track: fila de clusters SIEMPRE en una sola línea ───── */
.signario__track {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    padding: 20px 0 60px;
    perspective: 1200px;
}

/* ══════════════════════════════════════════════════════════
   CLUSTER HOLOGRÁFICO
══════════════════════════════════════════════════════════ */

.signario-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    user-select: none;
    -webkit-user-select: none;
    position: relative; /* needed for cluster-hover-frame absolute positioning */
}

/* ── Stage 3D (contexto preserve-3d que gira en JS) ─────── */
.cluster-stage {
    position: relative;
    width: 320px;
    height: 265px;
    transform-style: preserve-3d;
    perspective: 800px;
    will-change: transform;
}

/* ── Carta holográfica (posicionada en JS con fan) ───────── */
.sgn-holo {
    position: absolute;
    width: 288px;
    height: 182px;
    top: 50%;
    left: 50%;
    border-radius: 4px;
    transform-style: preserve-3d;
    will-change: transform;
    /* pointer-events: none → elimina el hit-testing 3D en preserve-3d.
       Hover y click los maneja .cluster-stage (fuera del contexto 3D). */
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   DOTS DE PAGINACIÓN
══════════════════════════════════════════════════════════ */

.signario__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
    position: relative;
    z-index: 1;
}
.signario__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2a2a2a;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}
.signario__dot.is-active { background: #00d3f3; transform: scale(1.3); }

/* ══════════════════════════════════════════════════════════
   PANEL DE EPISODIOS
══════════════════════════════════════════════════════════ */

#signarioPanel {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-end;
}
#signarioPanel[hidden] { display: none !important; }

.signario-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
}
.signario-panel__sheet {
    position: relative;
    width: 100%;
    max-height: 85vh;
    background: #06060e;
    border-top: 1px solid #1e1e2e;
    overflow-y: auto;
    padding: 40px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a transparent;
}
.signario-panel__sheet::-webkit-scrollbar { width: 4px; }
.signario-panel__sheet::-webkit-scrollbar-thumb { background: #2a2a2a; }
#signarioPanel.is-open .signario-panel__sheet { transform: translateY(0); }

.signario-panel__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
}
.signario-panel__close {
    margin-left: auto;
    width: 36px; height: 36px;
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}
.signario-panel__close:hover { border-color: #fff; }

.signario-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* ── Episodio card en panel ───────────────────────────────── */
.signa-ep {
    background: #0a0a14;
    border: 1px solid #1a1a22;
    overflow: hidden;
}
.signa-ep:hover { outline: 1px solid var(--cc, #00d3f3); }

.signa-ep__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #0f0f1e;
}
.signa-ep__body { padding: 12px 14px; }
.signa-ep__play {
    width: 100%;
    margin-top: 10px;
    padding: 8px 0;
    background: transparent;
    border: 1px solid var(--cc, #00d3f3);
    color: var(--cc, #00d3f3);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.signa-ep__play:hover { background: var(--cc, #00d3f3); color: #000; }

/* ══════════════════════════════════════════════════════════
   PLAYER MODAL
══════════════════════════════════════════════════════════ */

#signarioPlayer {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
}
#signarioPlayer[hidden] { display: none !important; }

.signario-player__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
}
.signario-player__wrap {
    position: relative;
    width: min(900px, 92vw);
}
.signario-player__close {
    position: absolute;
    top: -44px; right: 0;
    width: 36px; height: 36px;
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}
.signario-player__close:hover { border-color: #fff; }

.signario-player__iframe-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}
.signario-player__iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
