/* ============================================
   MODAL FORM
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-dark);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 768px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-header {
  text-align: center;
  padding: 48px 48px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.modal-header p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.modal-body {
  padding: 0 48px 48px;
}

.modal-body iframe {
  width: 100%;
  min-height: 500px;
  border: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 20px 12px;
    align-items: flex-end;
  }

  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }

  .modal-overlay.open .modal {
    transform: translateY(0);
  }

  .modal-header {
    padding: 32px 24px 16px;
  }

  .modal-header h2 {
    font-size: 24px;
  }

  .modal-body {
    padding: 0 24px 32px;
  }

  .modal-body iframe {
    min-height: 400px;
  }
}
