*,
*::before,
*::after {
  box-sizing: border-box;
}

input, textarea, button, select, a {   -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } 

* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
  margin: 0;
  padding: 20px;
  background: #f5f5f5;
  font-family: system-ui, sans-serif;
  overflow-x: hidden; /* prevenir scroll horizontal */
  -webkit-tap-highlight-color: transparent;
}

/* galeria */
#gallery {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

/* Columnas */
.column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Imagenes como galerías */
.column img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  cursor: pointer;
  transition: filter 0.5s, transform 0.3s; 
}

/* efecto pasar por encima */
#gallery.dimmed img {
  filter: brightness(70%);
}

#gallery.dimmed img.hovered {
  filter: brightness(100%);
  transform: scale(1.05);
}

/* Popup overlay */
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Popup ( panel ) */
#popup {
  width: 550px;
  min-height: 100px;
  background: white;
  border-radius: 10px;
  padding: 20px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto; /* scroll if content is taller than popup */
}

/* Popup contenido */
#popup-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
}

/* cerrar popup */
#close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
}

/* fallback */
@media (max-width: 800px) {
  #popup {
    width: 90vw;
  }
}

/* fila botones */
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 12px;
  row-gap: 16px;
  width: 100%;
  margin-top: 10px;
}

.button-row .button {
  flex: 0 0 100px;
  width: 100px;
  height: 60px;

  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* Imagenes en botones */
.button-row .button .imgp {
  max-width: 70%;
  max-height: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.button-row .button:hover {
  transform: translateY(3px);
  box-shadow: 0px 6px 15px rgba(0,0,0,0.35);
}

/* botones en móvil */
@media (max-width: 500px) {
  .button-row .button {
    flex: 0 0 40%;
  }
}
