/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
}

/* Body con fondo degradado suave */
body {
  background: linear-gradient(135deg, #00103a, #19c6ff, #001a49,#19c6ff,#001a49);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  max-width: 900px;
  width: 100%;
  padding: 20px;
  background: linear-gradient(90deg, #bd049e, #19c6ff, #7c00f8);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(118, 75, 162, 0.6);
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 11px;
  letter-spacing: 3px;
  text-shadow: 0 3px 6px rgba(234, 0, 255, 0.5);
}

header p {
  font-size: 1.3rem;
  font-weight: 500;
  opacity: 0.85;
}

/* Imagen en header */
.header-img {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.left-img {
  left: -220px;
  width: 200px;
}

/* Contenedor de cards */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 25px;
  max-width: 900px;
  width: 100%;
  padding: 0 10px;
}

/* Cards estilo moderno con degradados */
.card {
  background: linear-gradient(145deg, #2575fc, #6a11cb,  #2575fc,#6a11cb, #2575fc);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(101, 41, 255, 0.4);
  padding: 25px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  user-select: none;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
}

.card:hover {
  background: linear-gradient(145deg, #2575fc, #6a11cb);
  box-shadow: 0 12px 30px rgba(101, 41, 255, 0.7);
  transform: translateY(-8px);
}

/* Modales */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
  z-index: 1000;
}

/* Modal content */
.modal-content {
  background: linear-gradient(145deg, #4e54c8, #8f94fb);
  border-radius: 18px;
  padding: 30px 35px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 15px 40px rgba(79, 89, 198, 0.8);
  position: relative;
  color: #f0f0f0;
  animation: fadeInScale 0.4s ease forwards;
}

/* Animación para modal */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Botón cerrar modal */
.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

.close:hover {
  color: #ffd700;
}

/* Títulos modal */
.modal-content h3 {
  margin-bottom: 15px;
  font-size: 1.8rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Párrafos modal */
.modal-content p {
  font-size: 1.1rem;
  line-height: 1.5;
  opacity: 0.95;
}

/* Imagen en modal */
.modal-content img.header-img.left-img {
  float: left;
  margin-right: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  width: 150px;
}

/* Responsive */
@media(max-width: 600px) {
  header {
    padding: 15px;
  }
  .header-img.left-img {
    display: none;
  }
  .card-container {
    grid-template-columns: 1fr;
  }
  .modal-content img.header-img.left-img {
    float: none;
    margin: 0 0 20px 0;
    display: block;
    width: 100%;
    max-width: 300px;
  }
}



.right-img {
  position: absolute;
  top: 50%;
  right: -220px; /* Igual distancia que la imagen izquierda pero a la derecha */
  transform: translateY(-50%);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Responsive: esconder imágenes laterales para pantallas chicas */
@media(max-width: 600px) {
  .right-img {
    display: none;
  }
}



.modal-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto 0 auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.modal-img:hover {
  transform: scale(1.05);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.85);
  display: none; /* por defecto oculto */
  align-items: center;
  /* justify-content por defecto centrado */
  justify-content: center;
  padding: 15px;
  z-index: 1000;
}

/* Modal a la izquierda */
.modal-left {
  justify-content: flex-start;
  padding-left: 40px;
}

/* Modal a la derecha */
.modal-right {
  justify-content: flex-end;
  padding-right: 40px;
}

/* Contenido del modal */
.modal-content {
  background: linear-gradient(145deg, #4e54c8, #8f94fb);
  border-radius: 18px;
  padding: 30px 35px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 15px 40px rgba(79, 89, 198, 0.8);
  position: relative;
  color: #f0f0f0;
  animation: fadeInScale 0.4s ease forwards;
}

footer {
  background: linear-gradient(to right, #4b027c, #02399e); /* Azul a celeste */
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-family: Arial, sans-serif;
  border-top: 2px solid #0056b3;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}
