* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Bebas Neue', sans-serif;
  background-color: #334049;
}

.logo {
  width: 150px;
  height: 60px;
  cursor: pointer;
}

.contenedor {
  display: flex;
  justify-content: center;
}

.titulo {
  text-align: center;
  margin: 2vh auto;
  background-color: #C00000;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  border: 4px solid white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  width: fit-content;
  max-width: 90%;
}

.galeria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1400px;
  margin: 20px auto;
  padding: 20px;
}

.photo {
  flex: 0 0 calc((100% - (4 * 20px)) / 5);
  max-width: calc((100% - (4 * 20px)) / 5);
  height: 190px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 2px solid white;
  -webkit-box-reflect: below 0px linear-gradient(transparent, rgba(0, 0, 0, 0.1));
  cursor: pointer;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
}

.oculto {
  display: none;
}

.imagen-activa {
  max-width: 90%;
  max-height: 80%;
  margin: 20px auto;
  border: 4px solid white;
  border-radius: 10px;
}

.cerrar {
  color: white;
  font-size: 40px;
  position: absolute;
  top: 20px;
  right: 40px;
  cursor: pointer;
}

.navegacion {
  background: none;
  border: none;
  color: white;
  font-size: 50px;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  user-select: none;
}

#anterior {
  left: 20px;
}

#siguiente {
  right: 20px;
}

#btnSubir {
  width: 50px;
  height: 50px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background-color: #C00000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  font-size: 20px;
  display: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#btnSubir:hover {
  background-color: #a00000;
}

@media (max-width: 1200px) {
  .photo {
    flex: 0 0 calc((100% - (3 * 20px)) / 4);
    max-width: calc((100% - (3 * 20px)) / 4);
  }
}

@media (max-width: 992px) {
  .photo {
    flex: 0 0 calc((100% - (2 * 20px)) / 3);
    max-width: calc((100% - (2 * 20px)) / 3);
  }
}

@media (max-width: 600px) {
  .photo {
    flex: 0 0 calc((100% - (1 * 20px)) / 2);
    max-width: calc((100% - (1 * 20px)) / 2);
  }
}

@media (max-width: 420px) {
  .photo {
    flex: 0 0 100%;
    max-width: 100%;
  }
}