body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.8),
    rgba(50, 50, 50, 0.5)
  );
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 999;
  backdrop-filter: blur(27px); /* Desenfoque del fondo */
  -webkit-backdrop-filter: blur(27px); /* Compatibilidad con Safari */
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  width: 100%;
  min-width: auto;
  margin: 0 1rem 0 1rem;
  height: 60vh;
  transition: height 0.3s ease, border-radius 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.modal-content.fullscreen {
  height: 80vh;
  border-radius: 1rem;
  z-index: 2;
}

.modal-header {
  background: linear-gradient(to right, #f7d074, #f9e3a7);
  padding: 0.7rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e0c76e;
  cursor: pointer;
}

.modal-header h3 {
  font-size: 1.4rem;
  margin: 0;
  color: #2c2c2c;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-actions a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #7f6019;
  text-decoration: none;
  transition: color 0.2s;
}

.modal-actions a:hover {
  color: #b57f04;
}

.modal-close {
  font-size: 1.6rem;
  background: #7d7765;
  border: none;
  border-radius: 50%;
  height: 40px;
  width: 40px;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s;
}

.modal-close:hover {
  transform: scale(0.9);
}

.modal-body {
  position: relative;
  height: 100%;
  overflow-y: auto;
}

/* Asegúrate de que el contenido dentro pueda crecer */
.iframe-wrapper {
  position: relative;
  min-height: 100vh; /* simulamos contenido largo */
}

/* El iframe ocupa todo el ancho y su alto puede crecer */
.iframe-wrapper iframe {
  width: 100%;
  height: 100vh;
  border: none;
  display: block;
}

/* Máscara que solo bloquea clics, pero no el scroll de .modal-body */
.iframe-mask {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: transparent;
  pointer-events: all;
  cursor: default;
  height: 100vh;
}

.modal-backdrop-hint {
  position: absolute;
  bottom: 65vh; /* justo encima del modal de 60vh */
  width: 100%;
  text-align: center;
  color: #ffffffcc;
  font-size: 1rem;
  font-weight: 500;
  pointer-events: none; /* para que no bloquee el clic */
  animation: fadeInHint 0.8s ease-in-out both;
}

.modal-backdrop-hint {
  /* adicional */
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0;
  width: 100%;
  margin: 0 auto;
  z-index: 1;
}

@keyframes fadeInHint {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .modal-header h3 {
    font-size: 1.2rem;
  }
  .modal-close {
    font-size: 1.3rem;
    height: 34px;
    width: 34px;
  }
}

@media (max-width: 500px) {
  .modal-content {
    margin: 0;
  }
.modal-header h3 {
    font-size: 1rem;
  }
  .modal-close {
    font-size: 1rem;
    height: 30px;
    width: 30px;
  }
  .modal-actions a {
    font-size: 0.7rem;}
}

@media (max-width: 350px) {
.modal-header h3 {
    font-size: 0.9rem;
  }
  .modal-close {
    font-size: 1rem;
    height: 24px;
    width: 24px;
  }
  .modal-actions a {
    display: none;}
}
