body {
  background-color: #000;
  margin: 0;
  color: white;
  font-family: sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

nav {
  height: 60px;
  flex-shrink: 0;
}

/* Carrusel: ocupa (100vh - 60px) / 4 = calc(25vh - 15px) */
.carousel {
  height: calc((100vh - 60px) / 4);
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  padding: 0;
  display: flex;
  align-items: center;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  padding: 1rem;
  height: 100%;
}

.carousel-image {
  height: 100%;
  max-height: 100%;
  width: auto;
  scroll-snap-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  object-fit: contain;
}

.carousel-image:hover {
  transform: scale(1.05);
}

.carousel-left .carousel-track {
  flex-direction: row-reverse;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  text-align: center;
}

.modal-content {
  max-height: 80vh;
  max-width: 90vw;
  margin-top: 5vh;
}

.close, .prev, .next {
  position: absolute;
  top: 50%;
  color: white;
  font-size: 2rem;
  padding: 16px;
  cursor: pointer;
  user-select: none;
}

.close {
  top: 10px;
  right: 25px;
  font-size: 3rem;
}

.prev {
  left: 0;
}

.next {
  right: 0;
}

/* Dropdown nav */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  color: white;
  text-decoration: none;
  padding: 1rem;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #111;
  min-width: 160px;
  z-index: 1000;
  flex-direction: column;
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  display: block;
  text-decoration: none;
}

.dropdown:hover .dropdown-content {
  display: flex;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  nav {
    height: auto;
  }

  .carousel {
    height: auto;
  }

  .carousel-image {
    max-height: 250px;
  }
}


body {
  margin: 0;
  background: #000;
  color: white;
  font-family: sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* NAV fijo */
nav.navbar {
  height: 60px;
  background: #111;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

main.carruseles {
  margin-top: 60px;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
}

/* Cada carrusel ocupa 1/4 del espacio disponible */
.carousel {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  display: flex;
  align-items: center;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  scroll-snap-type: x mandatory;
}

.carousel-image {
  max-height: 100%;
  width: auto;
  scroll-snap-align: center;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.carousel-image:hover {
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  nav.navbar {
    flex-wrap: wrap;
    height: auto;
  }

  main.carruseles {
    height: auto;
    margin-top: auto;
  }

  .carousel-image {
    max-height: 250px;
  }
}


/* Movimiento automático de carruseles */
.carousel-track {
  display: flex;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

.carousel-left .carousel-track {
  animation-name: scroll-left;
  animation-duration: 60s;
}

.carousel-right .carousel-track {
  animation-name: scroll-right;
  animation-duration: 60s;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}