 html, body {
    height: 100%;
    font-family: 'Raleway', sans-serif;
    background-color: #111111;
  }
  
  html .page-home, body .page-home {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body::-webkit-scrollbar { display: none; }

  .panel.hero {
  position: relative;
  width: 100%;
  height: 100vh;      /* ocupa toda la altura de la ventana */
  overflow: hidden;
  }

  .panel.hero .bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;        /* siempre cubre todo el ancho */
    height: 100%;       /* siempre cubre toda la altura */
    /* object-fit: cover;  */
    /* mantiene proporción y recorta lo que sobre */
    z-index: 1;
  }

  .horizontal-container {
    display: flex;
    height: 100vh;
    width: 800%;   /* 8 panels */
    position: fixed; top: 0; left: 0;
    cursor: grab;
  }
  .horizontal-container.grabbing { cursor: grabbing; }

  .panel {
    flex: 0 0 100vw;
    height: 100vh;
    padding: 2rem;
    color: #fff;
    border-left: 1px solid #3c3b3b;
    background: #111111;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
  }
  .panel.half { flex: 0 0 50vw; }

  .panel.hero {
    position: relative; overflow: hidden;
  }
  .panel.hero .bg-video {
    position: absolute; top:50%; left:50%;
    transform: translate(-50%,-50%);
    min-width:100%; min-height:100%; object-fit:cover;
    z-index:1;
  }
  .panel.hero .overlay-text {
    position: relative; z-index:2;
    text-align: center;
  }

  .story-card {
    position: relative; overflow:hidden;
    cursor:pointer;
  }
  .story-card img, .story-card video {
    width:100%; height:100%; object-fit:cover; display:block;
  }
  .story-card video {
    position:absolute; top:0; left:0; opacity:0;
  }
  .story-card:hover video { opacity:1; }
  .story-card:hover img   { opacity:0; }
  .card-title {
    position:absolute; bottom:10px; left:10px;
    background:rgba(0,0,0,0.5); padding:.25rem .5rem;
    border-radius:.25rem; z-index:2;
  }

  /* CAROUSEL */

  .carousel-indicators {
      bottom: -50px;
  }



  /* Masonry gallery dentro de panel5 */
  /* Panel5 ocupa todo el alto y no deja scroll vertical */
  #panel5 {
    display: flex;
    flex-direction: column;
    overflow: hidden;     /* elimina cualquier scroll vertical */
    height: 100vh;
    padding: 0;
  }

  /* El título */
  #panel5 h2 {
    margin: 0;
  }

  /* Contenedor masonry sin scroll interno */
  #panel5 .masonry {
    flex: 1;              /* ocupa todo el espacio sobrante */
    column-count: 4;      /* 4 columnas en desktop */
    column-gap: 1rem;
    height: 100%;         /* todo el alto del panel */
    overflow-y: hidden;   /* sin scroll vertical */
    padding: 1rem;
    box-sizing: border-box;
  }

  /* Ítems sin partirse entre columnas */
  #panel5 .masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  /* Imágenes que llenan su contenedor y se recortan si es necesario */
  #panel5 .masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: .5rem;
  }

  /* Garantizar que cada fila tenga mitad de la altura del panel */
  #panel5 .row {
    height: calc(100% - 4rem); /* resto espacio del título (2×2rem padding) */
  }
  #panel5 .row > .col-4 {
    height: 50%;               /* dos filas */
    display: flex;
  }
  #panel5 .img-cover {
    object-fit: cover;         /* recorta la imagen para llenar el contenedor */
  }

  /* Panel7 ocupa su espacio normal */
  #panel7 {
    flex: 0 0 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
  }

  /* Rectángulo vertical centrado en su columna */
  .parallax-rect {
    /* width: 600px;           
    height: 80vh;             */
    overflow: visible;
    position: relative;
    border-radius: 8px;      /* opcional, esquinas redondeadas */
    /* box-shadow: 0 4px 20px rgba(0,0,0,0.5); */
  }

  /* Caption solapando la parte inferior izquierda */
  .parallax-rect .rect-caption {
      position: absolute;
      bottom: 6rem;
      left: -8rem;
      transform: translateY(50%);
      z-index: 3;
  }

  .parallax-rect .rect-caption h5 {
      margin: 0;
      color: #000;
      border-radius: .25rem;
      display: inline-block;
      background: #ffffffb3;
      padding: 5px 15px;
      font-size: 18px;
  }

  /* Capa de fondo que haremos parallax */
  .parallax-rect .bg {
    position: absolute;
    top: 0; 
    left: -20%;                /* empieza desplazado 20% a la izquierda */
    width: 140%;               /* ancho extra para el parallax */
    height: 100%;              /* ocupa todo el alto del rectángulo */
    background: url('https://picsum.photos/600/800?random=99') center/cover no-repeat;
    will-change: transform;
  }

  #iris-overlay {
    position: fixed;
    inset: 0;              
    background: #000;   
    pointer-events: none;
    z-index: 2000;
    --r: 0%;
    mask-image: radial-gradient(circle at center, transparent 100%, black 100%);
    -webkit-mask-image: radial-gradient(circle at center, transparent 100%, black 100%);
  }

  h2.text-white.question {
      font-size: 116px !important;
      font-weight: 900 !important;
  }


  h1 {
      font-weight: 900 !important;
  }

  h2 a, h2 {
      font-weight: 900 !important;
      text-decoration: none;
      font-size: 80px !important;
  }



/* ── PANEL 5: Galería 3×3 fija a 100vh ───────────────────────────────── */
/* ── PANEL 5: contenedor 1920×1080 + galería 3×3 ───────────────────── */

/* El panel ocupa toda la pantalla */
.panel#panel5 {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #111;         /* fondo igual al resto de panels */
  overflow: hidden;
}

/* Wrapper centrado, con resolución fija 1920×1080 pero escalable */
.panel#panel5 .panel5-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  max-width: 100%;
  max-height: 100%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-rows: auto 1fr;  /* fila para título + fila para grid */
  padding: 1rem;
  box-sizing: border-box;
}

/* Título del panel */
.panel#panel5 .panel5-title {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 900;
}

/* Grid 3×3 que ocupa toda la segunda fila del wrapper */
.panel#panel5 .panel5-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.5rem;
  width: 100%;
  height: 100%;
}

/* Cada celda cuadrada, fondo negro en espacios sobrantes */
.panel#panel5 .grid-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen centrada, máxima escala sin deformar */
.panel#panel5 .grid-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

#panel5 h2 {
    position: relative;
    left: 55px;
    max-width: 30%;
    width: 30%;
    line-height: 80px;
}

/* Añade esto dentro del media query móvil */

@media only screen and (max-width: 768px) {
  .panel5-wrapper {
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    width: 100%;
    height: auto !important;
    display: block;
    padding: 1rem;
  }

  .gallery-panel {
    display: none !important;
  }

  .mobile-gallery {
    display: flex;
  }
}

/* Responsivo: menos columnas en pantallas pequeñas */
@media (max-width: 992px) {
  #panel5 .masonry { column-count: 3; }
}
@media (max-width: 768px) {
  #panel5 .masonry { column-count: 2; }
}
@media (max-width: 576px) {
  #panel5 .masonry { column-count: 1; }
}


@media only screen and (max-width: 600px) {
  .px-5 {
    padding-right: 0rem !important;
    padding-left: 0rem !important;
  }

    h2 a, h2 {
        font-size: 28px !important;
        line-height: 33px;
        margin-top: 10px;
    }

/* video.bg-video {
    height: auto !important;
    min-height: auto !important;
    position: relative;
    top: 110px !important;
    width: 100%;
} */

/* section#panel1 {
    height: 219px !important;
} */

.text-end img {
    width: 100%;
}

h2.text-white.question {
    font-size: 54px !important;
    font-weight: 900 !important;
}

.parallax-rect .rect-caption {
    bottom: 3rem;
    left: 0;
}



.pregunta {
    background: #000000;
}

.pregunta p {
    margin-top: 21px;
}


section#panel1 {
    padding: 90px 0 !important;
}


}


@media (max-width: 768px) {
  .sidebar  {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999999 !important;
    background: black;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    height: 32px;
  }

  body {
    padding-top: 70px; /* para que el contenido no quede oculto debajo del nav */
  }
}

/* FORM */
.minimal-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.minimal-form input,
.minimal-form textarea,
.minimal-form select {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 5px;
  outline: none;
}

.minimal-form input::placeholder,
.minimal-form textarea::placeholder {
  color: white;
  opacity: 0.6;
}

.minimal-form select {
  color: white;
  background-color: transparent;
}

.minimal-form option {
  background-color: #000; /* para que no desaparezcan en selects sobre fondo claro */
  color: white;
}

.minimal-form button {
  background-color: white;
  color: black;
  border: none;
  padding: 12px 20px;
  font-weight: bold;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.minimal-form button:hover {
  background-color: transparent;
  color: white;
  border: 1px solid white;
}

/* GALERY */
.gallery-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #111;
  padding: 2rem;
}

.gallery-container {
  display: flex;
  gap: 2vw;
  width: 90vw;
  overflow: visible;
}

.gallery__column {
  display: flex;
  flex-direction: column;
  gap: 2vh;
  flex: 1;
}

.gallery__column img {
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.5s ease;
}

.gallery__column img:hover {
  transform: scale(1.05);
  z-index: 2;
}


/* Solo visible en móvil */
.mobile-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #111;
  overflow-x: hidden;
}

.mobile-gallery__row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.mobile-gallery__row img {
  flex: 0 0 45%;
  max-width: 45%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  scroll-snap-align: start;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.mobile-gallery__row img.show {
  opacity: 1;
  transform: translateY(0);
}

.story-card a{
  color: #FFF !important
}