/* =========================================================
   CURSO DE PROTOCOLO — estilos propios de esta página
   (hero parallax, cifras animadas, timeline con scroll-lock,
   tarjetas de ponentes con flip, ediciones deslizables,
   galería con parallax)
========================================================= */

/* ---------- HERO — encajado al ratio real del vídeo (más grande que el resto) ---------- */
.cp-hero {
    background: var(--black);
}

/* en móvil no hay ancho suficiente para que el ratio del vídeo deje
   sitio al título; ahí se mantiene la altura normal del hero */
@media (min-width: 700px) {
    .cp-hero.bleed-hero-tall {
        min-height: 0;
        aspect-ratio: 1276 / 720;
    }
}

/* ---------- CIFRAS ---------- */
.cp-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(255, 255, 255, .03);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cp-stat {
    flex: 1 1 180px;
    text-align: center;
    padding: var(--space-lg) var(--space-sm);
}

.cp-stat .cp-stat-num {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(38px, 6vw, 56px);
    color: var(--gold);
    line-height: 1;
}

.cp-stat .cp-stat-lbl {
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 10px;
}

/* ---------- TIMELINE (navegación solo con flechas) ---------- */
.cp-timeline-stage {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: var(--black);
}

.cp-timeline-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.cp-panel {
    /*
     * ancho fijo en vw (no % del track): un ancho relativo al
     * contenedor crea una dependencia circular con el propio
     * ancho del track, que se calcula a partir de sus hijos.
     * El JS mueve el track en píxeles medidos, no en %.
     */
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8vw;
    position: relative;
}

.cp-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 25%, var(--gold-faint), transparent 60%);
}

.cp-panel .cp-panel-num {
    position: relative;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(70px, 14vw, 150px);
    color: #C9A24D;
    line-height: 1;
}

.cp-panel .cp-panel-title {
    position: relative;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(28px, 5vw, 46px);
    margin-top: -0.3em;
    color: var(--text);
}

.cp-panel .cp-panel-desc {
    position: relative;
    color: var(--muted);
    font-size: 15px;
    max-width: 460px;
    margin-top: var(--space-xs);
    line-height: 1.8;
}

.cp-timeline-dots {
    position: absolute;
    bottom: 36px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 5;
}

.cp-timeline-dots .cp-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
    transition: all .25s var(--ease);
}

.cp-timeline-dots .cp-dot.on {
    background: var(--gold);
    transform: scale(1.5);
}

.cp-timeline-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid rgba(201, 162, 77, .4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    z-index: 5;
    opacity: .7;
    transition: opacity .2s var(--ease), border-color .2s var(--ease);
}

.cp-timeline-arrow:hover {
    opacity: 1;
    border-color: var(--gold);
}

.cp-timeline-arrow:disabled {
    opacity: .3;
    cursor: default;
}

.cp-timeline-arrow.left {
    left: 22px;
}

.cp-timeline-arrow.right {
    right: 22px;
}

/* ---------- PONENTES — tarjetas con flip ---------- */
.cp-ponentes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.cp-card {
    width: 240px;
    height: 320px;
    perspective: 1200px;
    cursor: pointer;
}

.cp-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .6s cubic-bezier(.4, .2, .2, 1);
}

.cp-card.is-flipped .cp-card-inner {
    transform: rotateY(180deg);
}

@media (hover: hover) {
    .cp-card:hover .cp-card-inner {
        transform: rotateY(180deg);
    }
}

.cp-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: var(--radius);
    overflow: hidden;
}

.cp-card-front {
    border: 1px solid var(--border);
}

.cp-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cp-card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .88) 100%);
}

.cp-card-front-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: var(--space-sm);
}

.cp-card-front .cp-card-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 19px;
    color: var(--white);
}

.cp-card-front .cp-card-role {
    font-size: 11px;
    color: var(--gold);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-top: 4px;
}


.cp-card-back {
    background: var(--gold);
    color: #1a1608;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-md);
}

.cp-card-back .cp-card-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 10px;
}

.cp-card-back p {
    font-size: 13px;
    line-height: 1.65;
}

/* ---------- EDICIONES — deslizable en horizontal ---------- */
.cp-ediciones {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: 4px 6vw var(--space-sm);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.cp-ediciones::-webkit-scrollbar {
    display: none;
}

.cp-edicion {
    scroll-snap-align: start;
    flex: 0 0 260px;
    height: 300px;
    border-radius: var(--radius);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
}

.cp-edicion .cp-roman {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-md);
    font-family: var(--font-serif);
    font-size: 13px;
    color: var(--gold);
    letter-spacing: .12em;
}

.cp-edicion .cp-etitle {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 23px;
    color: var(--text);
}

.cp-edicion .cp-etag {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
}

/* ---------- GALERÍA — carrusel (mismo patrón que el de inicio) ---------- */
.cp-gallery .cp-ph {
    position: relative;
}

.cp-gallery .cp-ph::after {
    content: attr(data-label);
    position: absolute;
    bottom: 10px;
    left: 12px;
    z-index: 1;
    font-size: 10px;
    letter-spacing: .08em;
    color: var(--white);
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
}
