/* ==============================
   UNIFIED ELEGANT MODALS & POPUP FORMS
   ============================== */

.proposal-popup,
.bs-timed-modal,
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 10050;
  background: rgba(10, 15, 30, 0.78);
  backdrop-filter: blur(6px);
  animation: bsModalFade 0.25s ease;
}

@keyframes bsModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bsModalPop {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.popup-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Split Modal (Proposal & 5s Welcome Consultation) */
.popup-container,
.bs-modal-split {
  position: relative;
  width: min(880px, 95vw);
  max-height: 92dvh;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 65px rgba(2, 6, 23, 0.45);
  display: flex;
  overflow: hidden;
  z-index: 2;
  animation: bsModalPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Single-Column Card Modal (Course 5s, Enroll, Syllabus, Service Inquiry) */
.bs-modal-card {
  position: relative;
  width: min(580px, 95vw);
  max-height: 92dvh;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 65px rgba(2, 6, 23, 0.48);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
  animation: bsModalPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.bs-card-banner {
  background: radial-gradient(circle at 18% 20%, rgba(136, 19, 55, 0.55), transparent 60%),
              linear-gradient(135deg, #0a0f1e 0%, #1c1028 55%, #4a071d 100%);
  color: #ffffff;
  padding: 24px 28px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 2px solid rgba(245, 158, 11, 0.35);
}

.bs-card-banner h2 {
  margin: 10px 0 6px;
  font-size: 1.38rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.bs-card-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(241, 245, 249, 0.88);
  line-height: 1.5;
}

.bs-card-body {
  padding: 24px 28px 26px;
  overflow-y: auto;
  text-align: left;
}

/* Left Hero Panel inside Split Modals */
.popup-left,
.bs-modal-hero {
  width: 40%;
  background: radial-gradient(circle at 20% 18%, rgba(245, 158, 11, 0.16), transparent 48%),
              linear-gradient(145deg, #0a0f1e 0%, #240c1f 55%, #680c2a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 28px;
  color: #ffffff;
}

.popup-image {
  width: 170px;
  opacity: 0.16;
  margin: 0 auto;
}

.popup-image-overlay {
  position: absolute;
  inset: 0;
  padding: 34px 28px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.popup-image-overlay h3,
.bs-modal-hero h3 {
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 12px 0 10px;
  color: #ffffff;
}

.popup-image-overlay p,
.bs-modal-hero p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(241, 245, 249, 0.9);
  margin-bottom: 20px;
}

.benefits-list,
.bs-trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.benefits-list li,
.bs-trust-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  font-size: 0.9rem;
  color: #f8fafc;
}

.benefits-list i,
.bs-trust-list i {
  color: #fbbf24;
  flex-shrink: 0;
}

.bs-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.48);
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bs-hero-contact-chip {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fde68a;
  font-size: 0.83rem;
  font-weight: 600;
  word-break: break-word;
}

/* Right Form Panel inside Split Modals */
.popup-right,
.bs-modal-body {
  width: 60%;
  padding: 32px 30px;
  overflow-y: auto;
  position: relative;
  text-align: left;
}

.bs-modal-head {
  margin-bottom: 18px;
  padding-right: 34px;
}

.bs-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 4px;
}

.popup-right h2,
.bs-modal-body h2 {
  font-size: 1.42rem;
  font-weight: 700;
  margin: 0;
  color: var(--dark);
  line-height: 1.25;
}

/* Close Buttons */
.bs-close-btn,
.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
}

.bs-close-btn:hover,
.popup-close:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: rotate(90deg);
}

.bs-close-light {
  position: static;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.bs-close-light:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0a0f1e;
}

/* Elegant Form Layout & Controls */
.proposal-form,
.bs-elegant-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.bs-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bs-elegant-form .form-group,
.proposal-form .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bs-elegant-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.93rem;
  font-family: inherit;
  background: #f8fafc;
  color: #0a0f1e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(136, 19, 55, 0.12);
}

.dropdown {
  width: 100%;
}

.dropdown select {
  width: 100% !important;
  margin: 0 !important;
}

.textarea-input {
  min-height: 86px;
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
}

.form-checkbox input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.privacy-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.privacy-link:hover {
  text-decoration: underline;
}

.bs-submit-btn {
  width: 100%;
  margin-top: 4px;
  padding: 13px 22px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(136, 19, 55, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.bs-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(136, 19, 55, 0.36);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
}

/* ==============================
   LOGO POPUP (DARK MODAL)
   ============================== */

.modal-dark {
  background: rgba(0, 0, 0, 0.9);
}

.modal-dark .modal-content {
  background: #111;
  color: #fff;
  width: 500px;
  max-width: 90%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
  animation: bsModalPop 0.28s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.3s, transform 0.2s;
}

.modal-close:hover {
  color: #fff;
  transform: scale(1.1);
}

.modal-body {
  padding: 20px;
  text-align: center;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ==============================
   RESPONSIVE MODALS
   ============================== */

@media (max-width: 820px) {
  .popup-container,
  .bs-modal-split {
    flex-direction: column;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .popup-left,
  .bs-modal-hero,
  .popup-right,
  .bs-modal-body {
    width: 100%;
    flex: 0 0 auto;
  }

  .popup-left,
  .bs-modal-hero {
    padding: 22px 20px;
    overflow: visible;
    min-height: min-content;
  }

  .bs-modal-hero h3,
  .popup-image-overlay h3 {
    font-size: 1.25rem;
    overflow-wrap: break-word;
  }

  .bs-card-banner,
  .bs-card-body {
    flex: 0 0 auto;
  }

  .bs-modal-card {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .popup-image {
    display: none;
  }

  .popup-image-overlay {
    position: static;
    padding: 0;
  }

  .popup-right,
  .bs-modal-body {
    padding: 22px 20px;
    overflow-y: visible;
  }
}

@media (max-width: 600px) {
  .bs-form-grid {
    grid-template-columns: 1fr;
  }

  .bs-card-banner,
  .bs-card-body {
    padding: 18px 18px;
  }

  .bs-modal-hero {
    padding: 18px 18px;
  }

  .bs-trust-list,
  .bs-hero-contact-chip {
    display: none;
  }

  .bs-modal-hero p {
    margin-bottom: 0;
    font-size: 0.85rem;
  }

  .form-input {
    font-size: 16px; /* prevents iOS Safari zoom on focus */
  }
}
