  html, body {
    margin: 0;
    padding: 0;
    background-color: red;
    font-family: Arial, sans-serif;
    color: white;
    cursor: crosshair;
  }


  /* lienzo solo alto de pantalla */
  #draw {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* solo altura de la ventana */
    z-index: 1;
  }

  /* imagen del museo encima del lienzo */
  .museo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 50vw;
    z-index: 2;
    pointer-events: none;
  }
  /* perchero arriba al lado del museo */
  .perchero {
    position: fixed;
    top: 35%;
    left: calc(50% + 320px); /* desplazado a la derecha del museo */
    transform: translate(-50%, -50%);
    width: 180px;
    z-index: 2;
    pointer-events: none;
  }

  /* cuadro abajo al otro lado */
  .cuadro {
    position: fixed;
    top: 70%;
    left: calc(50% - 320px); /* desplazado a la izquierda del museo */
    transform: translate(-50%, -50%);
    width: 200px;
    z-index: 2;
    pointer-events: none;
  }
.scroll-arrow {
  position: fixed;
  bottom: 20px;        /* siempre en la parte inferior */
  left: 50%;
  transform: translateX(-50%);
  width: 50px;         /* ajusta según tu imagen */
  height: auto;
  cursor: pointer;
  z-index: 100;
  animation: bounce 1s infinite alternate; /* efecto “sube y baja” */
}

/* animación de “sube y baja” */
@keyframes bounce {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(10px); }
}

/* oculto cuando desaparece */
.scroll-arrow.hidden {
  opacity: 0;
  visibility: hidden;
}

/* solo mostrar en móviles y tablets */
@media (min-width: 993px) {
  .scroll-arrow { display: none; }
}

.sectionjua {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url('fondo.jpg'); /* fondo de la sección */
  background-size: cover; /* cubre toda la sección */
  background-position: center;
  background-repeat: no-repeat;
  z-index: 3;
  position: relative;
  margin-top: 100vh; /* sigue estando debajo del lienzo de dibujo */
}


.flexbox {
  display: flex;
  align-items: center;
  gap: 40px;
  background-color: rgba(255,255,255,0.1);
  padding: 30px;
  border-radius: 20px;
  cursor: pointer;
  max-width: 900px;
  transition: transform 0.3s ease;
}

  .flexbox:hover { transform: scale(1.03); }
  .flexbox img { width: 250px; border-radius: 10px; }

  .flex-text h1 { font-size: 3rem; color: black; margin: 0; }
  .flex-text h2 { font-size: 1rem; font-style: italic; margin: 5px 0 15px; color: #ddd; }
  .flex-text p { font-size: 1rem; line-height: 1.5em; color: white; }

  /* POPUP */
  .popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 10;
  }

  .popup-content {
    background-image: url('fondojua.png');
    background-size: cover;
    background-position: center;
    width: 90%;
    max-width: 1000px;
    height: 80%;
    border-radius: 20px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
  }

 /* carrusel con fade */
.popup-left {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 15px;
}

.fade-img {
  position: absolute;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  object-fit: cover;
  border-radius: 10px;
}

.fade-img.active {
  opacity: 1;
}

/* texto con scroll */
.popup-right::-webkit-scrollbar {
  width: 10px;
}

.popup-right::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}

.popup-right::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 10px;
}

.popup-right::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

  .popup-left img { width: 100%; border-radius: 10px; }

  .popup-right {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    color: white;
    font-size: 1rem;
    line-height: 1.6em;
    backdrop-filter: brightness(0.8);
  }

  .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 20;
  }

  /* ===================================================== */
/* === MEDIA QUERIES RESPONSIVE ACTUALIZADAS ============ */
/* ===================================================== */

/* 💻 Laptops (max-width: 1200px) */
@media (max-width: 1200px) {
  .museo { width: 50vw; }
  .perchero { left: calc(50% + 280px); width: 260px; }
  .cuadro { left: calc(50% - 280px); width: 280px; }
  .flex-text h1 { font-size: 2.5rem; }
}

/* 📱 Tablets y laptops pequeñas (max-width: 992px) */
@media (max-width: 1002px) {
  .museo { width: 800px; top: 50%; }
  .perchero { top: 30%; left: calc(50% + 200px); width: 200px; }
  .cuadro { top: 75%; left: calc(50% - 200px); width: 250px; }

  .flexbox {
    flex-direction: column;
    text-align: center;
  }

  .flex-text h1 { font-size: 2.2rem; }
  .flex-text p { font-size: 0.95rem; }

  .popup-content {
    flex-direction: column;
    height: auto;
    max-height: 90%;
  }

  .popup-right {
    padding: 25px;
    font-size: 0.95rem;
    overflow-y: visible; /* 👈 sin scroll interno */
  }
}

/* 📱 Celulares grandes (max-width: 768px) */
@media (max-width: 768px) {
  /* ✅ Mostrar todo arriba */
  .museo {
    width: 600px;
    top: 20%;
    transform: translate(-50%, -20%);
  }

  .perchero {
    display: block;
    top: 15%;
    left: 75%;
    width: 200px;
    transform: translate(-50%, -50%);
  }

  .cuadro {
    display: block;
    top: 65%;
    left: 25%;
    width: 220px;
    transform: translate(-50%, -50%);
  }

  /* ✅ Sección Juana vertical (imagen arriba, texto abajo) */
  .flexbox {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 20px;
  }

  .flexbox img {
    width: 70%;
    max-width: 280px;
  }

  .flex-text {
    margin-top: 20px;
  }

  .flex-text h1 { font-size: 2rem; }
  .flex-text p { font-size: 0.9rem; }

  /* ✅ Popup también imagen arriba y texto abajo */
  .popup-content {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 95%;
    height: auto;
    max-height: 90vh;
  }

  .popup-left {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1; /* cuadrado visual para las imágenes */
  }

  .popup-right {
    width: 100%;
    padding: 20px;
    font-size: 0.9rem;
    overflow-y: visible; /* 👈 sin scroll interno */
    text-align: center;
  }

  .close-btn {
    font-size: 1.5rem;
    right: 15px;
  }
}

/* 📱 Celulares pequeños (max-width: 480px) */
@media (max-width: 480px) {
  .museo {
    width: 390px;
    top: 38%;
  }

  .perchero {
    top: 23%;
    left: 78%;
    width: 150px;
  }

  .cuadro {
    top: 65%;
    left: 22%;
    width: 180px;
  }

  .flexbox { gap: 15px; padding: 15px; }
  .flexbox img { width: 80%; }

  .flex-text h1 { font-size: 1.8rem; }
  .flex-text h2 { font-size: 0.9rem; }
  .flex-text p { font-size: 0.85rem; }

  .popup-content {
    width: 95%;
    height: auto;
  }

  .popup-right {
    font-size: 0.85rem;
    padding: 15px;
  }
}

/* === AJUSTE FINAL DE JUANA Y ELEMENTOS GRANDES === */

/* 💻 Laptops medianas (entre 992px y 1200px) */
@media (max-width: 1200px) and (min-width: 992px) {
  .flexbox img {
    width: 55%; /* 🔹 vuelve a un tamaño más moderado */
    max-width: 400px;
  }
}

/* 🖥️ Pantallas grandes (desde 1920px) */
@media (min-width: 1920px) {
  .flexbox img {
    width: 45%; /* 🔹 mantiene proporción elegante con el texto */
    max-width: 500px;
  }

  .museo {
    width: 1200px;
    max-width: 1200px;
  }

  .perchero {
    width: 360px;
    left: calc(50% + 400px);
    top: 35%;
  }

  .cuadro {
    width: 400px;
    left: calc(50% - 400px);
    top: 70%;
  }
}

/* Flecha volver */
.btn-volver {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.btn-volver img {
  width: 50px;
  filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.5));
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}
