:root {
  --lila-claro: #e2d4f0;
  --lila: #5f0c57;
  --morado-claro: #59175f;
  --morado: #862566;
  --morado-oscuro: #ce49bcde;
  --morado-profundo: #640f64;
  --sombra: 0 8px 32px rgba(105, 13, 74, 0.37);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: white;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--morado-profundo), #2d0a4a);
  overflow-x: hidden;
}

/* CABECERA */
.design-header {
  width: 100%;
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.design-header__content {
  max-width: 800px;
  margin: 0 auto;
}

.design-header__title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--lila-claro);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.design-header__description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* GALERÍA EN GRID */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 0;
  justify-items: center;
}

/* TARJETAS CON EFECTO GLASS */
.gallery__card {
  width: 100%;
  max-width: 250px;
  height: 320px;
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(139, 25, 214, 0.1);
  box-shadow: var(--sombra);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  cursor: pointer;
}

.gallery__card:hover {
  transform: scale(1.05);
}

.gallery__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* FONDO DEL MODAL */
.modal-background {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.055);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* CUANDO ESTÁ ACTIVO */
.modal-background.active {
  display: flex;
}

/* CONTENIDO DEL MODAL */
.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* IMAGEN EN EL MODAL */
.modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(146, 29, 111, 0.7);
  pointer-events: none;
  user-select: none;
}

/* BOTONES DE NAVEGACIÓN */
.modal-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(214, 79, 185, 0.288);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 1000;
  backdrop-filter: blur(6px);
  border-radius: 50%;
  transition: background 0.3s;
}

.modal-btn:hover {
  background-color: rgba(218, 97, 201, 0.4);
}

.modal-btn.left {
  left: 2%;
}

.modal-btn.right {
  right: 2%;
}

/* BOTÓN DE CERRAR ABAJO */
.modal-close {
  position: fixed;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(170, 25, 199, 0.555);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  z-index: 1000;
  backdrop-filter: blur(6px);
  border-radius: 10px;
  transition: background 0.3s;
}

.modal-close:hover {
  background-color: rgba(238, 37, 221, 0.4);
}

.back-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2rem;
  margin-top: 2rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--lila-claro);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
  color: white;
}

.back-button i {
  font-size: 1.2rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-btn {
    font-size: 1.5rem;
    padding: 0.3rem 0.6rem;
  }

  .modal-close {
    bottom: 4%;
    font-size: 1.2rem;
    padding: 0.4rem 1rem;
  }

  .gallery__card {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery__card {
    height: 260px;
  }

  
}
