/* ==========================================
   GALERÍA
========================================== */

.gallery-page {
  padding: 90px 0;
  background: #fff;
}

/* ==========================================
   CARD
========================================== */

.gallery-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  height: 100%;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
  overflow: hidden;
  position: relative;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: all 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

/* Overlay */

.gallery-image-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(192, 36, 52, 0.15);
  opacity: 0;
  transition: 0.3s;
}

.gallery-card:hover .gallery-image-wrapper::after {
  opacity: 1;
}

/* ==========================================
   INFO
========================================== */

.gallery-info {
  padding: 20px;
}

.gallery-info span {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.gallery-info h5 {
  margin: 0;
  font-weight: 600;
  color: #222;
  font-size: 20px;
}

.gallery-info p {
  margin-top: 10px;
  color: #666;
  font-size: 14px;
}

/* ==========================================
   MODAL
========================================== */

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.gallery-modal-content {
  background: #fff;
  width: 100%;
  max-width: 950px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;

  animation: galleryFadeIn 0.25s ease;
}

.gallery-modal-content img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
}

.gallery-modal-body {
  padding: 30px;
}

.gallery-modal-body h3 {
  margin-bottom: 10px;
  color: var(--color-primary);
}

.gallery-modal-body p {
  color: #555;
  margin-bottom: 0;
}

/* ==========================================
   BOTÓN CERRAR
========================================== */

.gallery-close {
  position: absolute;
  top: 15px;
  right: 15px;

  width: 45px;
  height: 45px;

  border: none;
  border-radius: 50%;

  background: var(--color-primary);
  color: white;

  font-size: 24px;
  font-weight: bold;

  cursor: pointer;

  transition: 0.3s;
}

.gallery-close:hover {
  transform: rotate(90deg);
}

/* ==========================================
   ANIMACIONES
========================================== */

@keyframes galleryFadeIn {
  from {
    opacity: 0;
    transform: scale(.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 991px) {
  .gallery-image-wrapper img {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .gallery-page {
    padding: 60px 0;
  }

  .gallery-image-wrapper img {
    height: 220px;
  }

  .gallery-modal-content img {
    max-height: 50vh;
  }

  .gallery-modal-body {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .gallery-info h5 {
    font-size: 18px;
  }

  .gallery-image-wrapper img {
    height: 200px;
  }
}