/* ===== Variables locales ===== */
:root {
    --vis-accent: #b30f0f;
    --vis-header: 72px;
    /* se ajusta por JS al alto real del header */
    --vis-radius: 16px;
    --vis-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

/* ===== HERO ===== */
.vis-hero {
    position: relative;
    height: calc(100vh - var(--vis-header));
    margin-top: var(--vis-header);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vis-hero video,
.vis-hero .vis-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.5);
}

.vis-hero .vis-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 6%;
}

.vis-hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    margin: 0 0 10px;
    text-shadow: 0 0 22px rgba(179, 15, 15, .8);
}

.vis-hero p {
    font-size: clamp(1rem, 1.7vw, 1.3rem);
    opacity: .95
}

/* ===== SECCIONES ===== */
.vis-chapter {
    background: #0b0b0b;
    padding: 56px 5% 24px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.vis-chapter h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    margin: 0 0 8px;
}

.vis-chapter .lead {
    color: #ddd;
    max-width: 900px;
    line-height: 1.6;
    margin-bottom: 26px;
}

.vis-block {
    margin: 42px auto 64px;
    max-width: 1600px;
    scroll-margin-top: calc(var(--vis-header) + 18px);
}

.vis-block h3 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    margin: 0 0 6px;
    color: #fff;
}

.vis-block .meta {
    color: #999;
    font-size: .95rem;
    margin-bottom: 14px;
}

.vis-block .lore {
    color: #ddd;
    line-height: 1.65;
    margin: 10px 0 18px;
}

/* ===== WRAPPER que “crea” el tramo de scroll ===== */
.pin-wrap {
    position: relative;
    /* La altura se establece por JS: #slides * viewportHeight (ajustado por header) */
}

/* ===== Capa sticky a pantalla completa (full-bleed) ===== */
.vis-row {
    position: sticky;
    top: var(--vis-header);
    height: calc(100vh - var(--vis-header));
    min-height: 320px;

    /* full-bleed sin depender del padding del contenedor */
    width: 100vw;
    margin-left: calc(50% - 50vw);

    overflow: hidden;

    background: #000;
}

/* ===== Track horizontal ===== */
.vis-track {
    position: absolute;
    inset: 0;
    display: flex;
    will-change: transform;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}

/* Cada slide ocupa exactamente el ancho de la ventana */
.vis-slide {
    position: relative;
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    background: #151515 center/cover no-repeat;
}

.vis-slide::after {
    content: attr(data-title);
    position: absolute;
    left: 14px;
    bottom: 12px;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .08);
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: .95rem;
}

/* Controles */
.vis-ctrl {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.vis-ctrl button {
    pointer-events: auto;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: 1000;
    text-align:center;
    display: grid;
    place-items: center;
    transition: transform .2s ease, background .2s ease;
}

.vis-ctrl button:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, .6);
    color: #ff0000;
}

/* ===== Responsive ===== */
@media (max-width:1024px) {
    .vis-block {
        max-width: 100%;
    }
}

@media (max-width:768px) {
    .vis-row {
        height: calc(100vh - var(--vis-header));
        min-height: 320px;
    }
}

/* ===== Helpers ===== */
html,
body {
    scroll-behavior: smooth;
}

body.projectvis {
    background-color: #000;
}

/* === Fullscreen === */
.vis-fullscreen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}
.vis-fullscreen img {
  max-width: 95%;
  max-height: 95%;
  border-radius: var(--vis-radius);
}

/* === Banner personaje === */
.vis-banner {
  width: 100vw; /* ocupa todo el ancho de la ventana */
  margin-left: calc(50% - 50vw); /* rompe padding lateral del .vis-chapter */
  margin-bottom: 20px;
  overflow: hidden;
}

.vis-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 500px;   /* límite de alto para no romper el layout */
  object-fit: cover;   /* recorta si la proporción no es exacta */
}

/* Cita destacada */
.article-quote {
  font-size: 1.3rem;
  font-style: italic;
  color: #ff3333;
  border-left: 4px solid #ff3333;
  padding-left: 15px;
  margin: 40px 0;
}