/* ---------------------------------------------
   Galería 
--------------------------------------------- */
#gallery .container {
  border-bottom: 5px solid #f7f7f7;
  padding-bottom: 80px;
}

/* ---------------------------
   Grid Responsive Mejorado
--------------------------- */
.gallery-grid .gallery-item {
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform .25s ease, opacity .25s ease;
}

.gallery-grid .gallery-item:hover {
  transform: scale(1.03);
  opacity: 0.85;
}

.gallery-grid img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

/* 2 columnas en móvil */
@media (max-width: 768px) {
  .gallery-grid img {
    height: 160px;
  }
}

/* ---------------------------
   Modal
--------------------------- */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;

  background: rgba(0, 0, 0, 0.877);
  backdrop-filter: blur(4px);

  justify-content: center;
  align-items: center;
  padding: 20px;
}

.gallery-modal-content {
  background: transparent;
  padding: 25px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  animation: fadeIn .3s ease;
}

.gallery-modal img {
  width: 100%;
  margin-bottom: 20px;
}

.gallery-close {
  float: right;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  color: #FF0000;
}

.gallery-modal h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  background-color: #FF0000;
  color: #fff;
}

.gallery-modal p {
  font-size: 1rem;
  color: #ffffff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/****************************/
/* --------------------------------------
   ESTILO FILTROS — DESKTOP
-------------------------------------- */
#gallery .filters {
  margin-top: 30px;
}

#gallery .filters ul {
  display: flex;
  flex-direction: column; /* uno debajo del otro */
  gap: 12px;
  padding: 0;
  margin: 0;
}

#gallery .filters ul li {
  list-style: none;
  padding: 14px 20px;
  cursor: pointer;
  color: #f81f1f;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: .5px;

  transition: all .25s ease;
}

/* Hover + activo */
#gallery .filters ul li:hover,
#gallery .filters ul li.active {
  background: #ff1a1a;
  border-color: #b30000;
  box-shadow: 0 4px 12px rgba(255,0,0,0.35);
  transform: translateY(-2px);
  color: #fff;
}

/* --------------------------------------
   MOBILE — BOTONES PEQUEÑOS Y AGRUPADOS
-------------------------------------- */
@media (max-width: 768px) {
  #gallery .filters {
  margin-bottom: 30px;
  
  }
  #gallery .filters ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    
  }

  #gallery .filters ul li {
    flex: 1 1 calc(50% - 8px); /* dos columnas */
    padding: 10px 12px;
    font-size: 0.75rem;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  }

  #gallery .filters ul li:hover,
  #gallery .filters ul li.active {
    background: #ff3333;
    transform: none;
  }
}

/* --------------------------------------
   TABLET
-------------------------------------- */
@media (max-width: 992px) {
  #gallery .filters ul li {
    font-size: 0.85rem;
    padding: 12px 16px;
  }
}
