/* ===== ESTILOS DEL MODAL - VERSIÓN SUAVE ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 1.5rem;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s ease;
  position: relative;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Grid interno con fade-in + ligero desplazamiento */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

.modal-overlay.active .modal-grid {
  opacity: 1;
  transform: translateY(0);
}

.modal-grid img {
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.2rem;
  color: #1a1c1c;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: rgba(255, 255, 255, 1);
}

@media (max-width: 768px) {
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .modal-content {
    padding: 1.5rem;
  }
  .modal-grid img {
    max-height: 280px;
  }
}