/* ==== Estilo general ==== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f4f6f8;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #1e3d59;
}

/* ==== Contenedor de botones ==== */
.group-list {
  display: grid;
  justify-content: center;               /* Centra el grid completo */
  justify-items: center;                 /* Centra los botones dentro de las celdas */
  align-items: center;
                             /* 🔹 Espacio entre los botones */
  margin: 30px auto;
  max-width: 900px;
  grid-template-columns: repeat(2, 1fr); /* 🔹 2 columnas por defecto (celular) */
  padding: 10px;
}

/* 🔹 En pantallas grandes → 3 columnas */
@media (min-width: 768px) {
  .group-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==== Botones de grupos ==== */
.group-btn {
  background: #00796b;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  font-size: 1rem;
  text-align: center;
  width: 70%;                           /* 🔹 Botones ocupan el 70 % del ancho */
  margin: 0 auto;                       /* 🔹 Centra cada botón dentro de su celda */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.group-btn:hover {
  background: #004d40;
  transform: translateY(-2px);
}

/* ==== Modal flotante con animación ==== */
.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

/* ==== Botón cerrar ==== */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

/* ==== Tabla de detalles ==== */
#modal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

#modal-table th,
#modal-table td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

#modal-table th {
  background: #1e3d59;
  color: white;
  width: 35%;
}

/* ==== Enlace a Google Maps ==== */
#map-link {
  margin-top: 15px;
  text-align: center;
}

#map-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1a73e8;
  text-decoration: none;
  font-weight: bold;
}

#map-link img {
  width: 24px;
  height: 24px;
}

/* ==== Responsive: pantallas pequeñas ==== */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .group-btn {
    width: 75%; /* 🔹 Un poco más ancho en pantallas chicas */
    font-size: 0.95rem;
  }

  #modal-table th, #modal-table td {
    padding: 8px;
    font-size: 0.9rem;
  }

  #map-link a {
    font-size: 0.9rem;
  }
}
