/* ==== GALERÍA INDEPENDIENTE ==== */
.gallery-grid-box {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  gap: 12px;
  padding: 10px;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-grid-box .gallery-item {
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  position: relative;
}

/* Efecto visual de la imagen */
.gallery-grid-box .gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  filter: grayscale(100%); /* 🔹 gris por defecto */
  transition: transform 0.6s ease, filter 0.6s ease, rotate 0.6s ease;
}

/* Al pasar el cursor: color, zoom y rotación */
.gallery-grid-box .gallery-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.2) rotate(3deg);
}

/* ==== MÓVIL ==== */
@media (max-width: 600px) {
  .gallery-grid-box {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid-box .gallery-item {
    width: 100%;
    height: 100%;
  }
}

/* ==== LIGHTBOX ==== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
}
.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}
.lightbox .prev { left: 30px; }
.lightbox .next { right: 30px; }
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 35px;
  color: white;
  cursor: pointer;
}

/* ====== AJUSTE PARA BLOGGER ====== */
.post-body .gallery-grid-box,
.entry-content .gallery-grid-box {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box;
}

.gallery-grid-box .gallery-item {
  max-width: 100%;
}

/* Asegura que las imágenes no se salgan */
.gallery-grid-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
