/* Masonry estilo moderno */
@media (max-width: 1200px) {
	.gallery { column-count: 3; }
}
@media (max-width: 768px) {
	.gallery { column-count: 2; }
}
@media (max-width: 480px) {
	.gallery { column-count: 1; }
}

/* LIGHTBOX */
.lightbox {
	display: none;
	position: fixed;
	z-index: 9999;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.95);
	justify-content: center;
	align-items: center;
}

.lightbox img {
	max-width: 90%;
	max-height: 90%;
	border-radius: 10px;
}

.close {
	position: absolute;
	top: 20px;
	right: 40px;
	font-size: 40px;
	color: white;
	cursor: pointer;
}

.gallery-item {
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin: 10px;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.image-caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 10px;

  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}


.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0; 
}

@media (max-width: 1200px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery { grid-template-columns: repeat(1, 1fr); } }

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3; 
  margin: 0 !important; 
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.image-caption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); 
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  padding: 15px;
  pointer-events: none;
}

.gallery-item:hover .image-caption {
  opacity: 1;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.video-link {
  position: absolute;
  bottom: 10px;
  right: 10px;

  font-size: 0.95rem;
  font-weight: 500;
  color: #00aaff;
  text-decoration: underline;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  cursor: pointer;
  transition: all 0.2s ease;
}

.video-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.video-link:hover {
  color: #0077cc;
}

.video-link:hover::after {
  transform: translateX(3px);
}