/* ===== ANIMACIONES PARA LA PÁGINA DE COMUNIDAD ===== */

/* Animaciones base */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efectos de hover en imágenes */
.masonry-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
}

.masonry-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.masonry-item img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.masonry-item:hover img {
  transform: scale(1.05);
}

/* Animaciones para elementos de la comunidad */
.comunidad-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i, 0) * 0.1s);
}

.comunidad-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Efecto sutil en los títulos de sección */
.section-head h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-head h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.section-head.visible h2::after {
  width: 100%;
}

/* Efecto en botones */
.btn-instagram {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.btn-instagram:hover {
  background: var(--text);
  color: white;
  transform: translateY(-2px);
}

.btn-instagram svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.btn-instagram svg {
  transition: transform 0.3s ease;
}

.btn-instagram:hover svg {
  transform: scale(1.1);
}

/* Animación para el contador del lightbox */
.lightbox-counter {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.active .lightbox-counter {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* Efecto en los botones de navegación del lightbox */
.lightbox-nav {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.lightbox.active .lightbox-nav {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.3s;
}

/* Efecto en el botón de cerrar */
.lightbox-close {
  opacity: 0;
  transform: rotate(0deg);
  transition: all 0.3s ease;
}

.lightbox.active .lightbox-close {
  opacity: 1;
  transform: rotate(90deg);
  transition-delay: 0.1s;
}

.lightbox-close:hover {
  transform: rotate(90deg) scale(1.1);
}

/* Animación para la imagen del lightbox */
.lightbox-content img {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lightbox.active .lightbox-content img {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.1s;
}
