/* ========================
   hz-modalstaff.css mejorado responsive + estilo CPL
   ======================== */

:root {
  --cpl-primary: #002c6e;
  --cpl-accent: #007bff;
  --cpl-accent-dark: #0056b3;
  --cpl-bg: #f9f9f9;
  --cpl-text: #333;
  --cpl-border: #d0d6dc;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.gallery figure {
  text-align: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 12px;
}

.gallery img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery figcaption {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cpl-text);
}

/* Modal General */
#modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  z-index: 9999;
  padding: 2rem 1rem;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 880px;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 32px;
  color: var(--cpl-primary);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: color 0.3s;
}

.close:hover {
  color: var(--cpl-accent);
}

.modal-body {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.modal-body img {
  flex: 0 0 40%;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--cpl-text);
  line-height: 1.65;
  max-height: 500px;
  overflow-y: auto;
  text-align: justify;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-text h2 {
  font-size: 1.6rem;
  color: var(--cpl-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  text-align: left;
}

.modal-text p,
.modal-text ul {
  margin-bottom: 1rem;
  padding-left: 1rem;
}

.modal-text ul li {
  list-style: disc;
  margin-left: 1rem;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.modal-buttons button {
  background-color: var(--cpl-accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.modal-buttons button:hover {
  background-color: var(--cpl-accent-dark);
}

/* Responsive */
@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
    align-items: center;
  }

  .modal-body img,
  .modal-text {
    width: 100%;
  }

  .modal-text {
    max-height: none;
  }

  .modal-text h2 {
    text-align: center;
  }
}

/* Sección de presentación */
.hz-staff-presentacion {
  margin-top: 3rem;
}

.hz-staff-titulo-central {
  text-align: center;
  margin: 4rem 0 2rem;
}

.hz-staff-titulo-central h2 {
  font-size: 1.8rem;
  color: var(--cpl-primary);
  font-weight: 700;
  border-bottom: 2px solid #cce0f5;
  display: inline-block;
  padding-bottom: 0.5rem;
}