/* ==========================
   MODAL BASE
   ========================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* Caja */
.modal-box {
  background: #ffffff;
  width: 90%;
  max-width: 820px;
  max-height: 85vh;
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.modal-header {
  padding: 1.6rem 2.2rem 1.2rem;
  border-bottom: 1px solid #e6e6e6;
}

.modal-header h2 {
  font-family: 'Dancing Script', cursive;
  font-size: 2.2rem;
  color: #6b4eff;
  text-align: center;
}

/* ==========================
   CUERPO BASE
   ========================== */

.modal-body {
  padding: 2rem 2.4rem;
  overflow-y: auto;
  flex: 1;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #4f4f4f;
}

.modal-body p {
  margin-bottom: 1.1rem;
  text-align: justify;
}

.modal-body ul {
  margin: 1rem 0 1.4rem 1.2rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

/* ==========================
   CTA
   ========================== */

.modal-cta {
  margin-top: 1.8rem;
}

@keyframes floatSoft {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.modal-whatsapp {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: #6b4eff;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #7b6cf6, #4fc3e8) border-box;
  border: 2px solid transparent;
  animation: floatSoft 5.5s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.modal-whatsapp:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 22px rgba(107, 78, 255, 0.3);
}

/* ==========================
   FOOTER
   ========================== */

.modal-footer {
  padding: 1.2rem 2rem;
  border-top: 1px solid #e6e6e6;
  display: flex;
  justify-content: flex-end;
}

.modal-close {
  background: #6b4eff;
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(107, 78, 255, 0.35);
}

/* =========================
   MODAL EQUIPO – DISEÑO
   ========================= */

.modal.modal-equipo .modal-box {
  max-width: 720px;
}

.modal.modal-equipo .modal-body {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.modal.modal-equipo .modal-header h2 {
  color: #4a6cff;
  text-align: left;
}

.modal.modal-equipo .subtitle {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: #4a6cff;
  margin-bottom: 16px;
}

.modal.modal-equipo .modal-text {
  flex: 1;
}

.modal.modal-equipo .modal-body p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
}

/* Fotos SOLO equipo */
.modal.modal-equipo .modal-body img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #ffffff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Bordes especiales */
.modal.modal-equipo img[src*="juliethg"],
.modal.modal-equipo img[src*="dianag"] {
  border: 4px solid transparent;
  background-image:
    linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #6aa9ff, #9dd9ff, #bfa8ff);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

.modal.modal-equipo img[src*="dianar"] {
  border: none;
}

/* Responsive equipo */
@media (max-width: 768px) {
  .modal.modal-equipo .modal-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .modal.modal-equipo img {
    margin-bottom: 16px;
  }
}

/* =========================
   FIX DEFINITIVO MODAL HOME
   ========================= */

.modal:not(.modal-equipo) .modal-body {
  display: block !important;
  columns: 1 !important;
  column-count: 1 !important;
  column-gap: 0 !important;
}
