/* Modern Islamic Theme CSS for PSB Pondok Pesantren */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Amiri:ital,wght@0,700;1,400&display=swap');

:root {
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;

  --gold-600: #b45309;
  --gold-500: #d97706;
  --gold-400: #f59e0b;
  --gold-300: #fbbf24;
  --gold-100: #fef3c7;
  --gold-50: #fffbeb;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 4px rgba(6, 78, 59, 0.04);
  --shadow-md: 0 8px 24px rgba(6, 78, 59, 0.08);
  --shadow-lg: 0 16px 40px rgba(6, 78, 59, 0.12);
  --shadow-glow: 0 0 25px rgba(217, 119, 6, 0.3);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f4f7f6;
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 78, 59, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.05) 0px, transparent 50%);
  color: var(--slate-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Islamic Header / Hero Banner */
.psb-header {
  background: linear-gradient(135deg, var(--emerald-950) 0%, var(--emerald-900) 50%, var(--emerald-800) 100%);
  color: #ffffff;
  padding: 3rem 1rem 4rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.psb-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 50% 120%, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.psb-header .logo-box {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.25rem auto;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.psb-header .logo-box:hover {
  transform: scale(1.05) rotate(2deg);
}

.psb-header .academic-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-300);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  backdrop-filter: blur(4px);
}

.psb-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.psb-header .pondok-sub {
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  color: var(--gold-300);
  margin-bottom: 0.5rem;
}

.psb-header p.desc {
  max-width: 600px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Card Container */
.psb-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(6, 78, 59, 0.08);
  padding: 2rem;
  margin-top: -2.5rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 10;
}

@media (max-width: 640px) {
  .psb-card {
    padding: 1.25rem;
    margin-top: -2rem;
    border-radius: var(--radius-md);
  }
  .psb-header h1 {
    font-size: 1.5rem;
  }
}

/* Landing Info Section */
.info-section {
  text-align: center;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
  text-align: left;
}

.info-item-card {
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.info-item-card .icon-wrap {
  background: var(--emerald-700);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.info-item-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--emerald-900);
  margin-bottom: 0.2rem;
}

.info-item-card p {
  font-size: 0.85rem;
  color: var(--slate-600);
}

/* Step Wizard Progress Bar */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--slate-200);
  z-index: 1;
}

.wizard-progress-bar {
  position: absolute;
  top: 22px;
  left: 10%;
  height: 4px;
  background: linear-gradient(90deg, var(--emerald-700), var(--gold-500));
  z-index: 2;
  transition: width 0.4s ease;
  width: 0%;
}

.step-item {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: default;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--slate-200);
  color: var(--slate-400);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.step-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-400);
  text-align: center;
  transition: color 0.3s ease;
}

.step-item.active .step-circle {
  border-color: var(--emerald-700);
  background: var(--emerald-700);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--emerald-100);
}

.step-item.active .step-title {
  color: var(--emerald-900);
  font-weight: 700;
}

.step-item.completed .step-circle {
  border-color: var(--gold-500);
  background: var(--gold-500);
  color: #ffffff;
}

.step-item.completed .step-title {
  color: var(--gold-600);
}

@media (max-width: 520px) {
  .step-title {
    font-size: 0.7rem;
  }
  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  .wizard-progress::before, .wizard-progress-bar {
    top: 18px;
  }
}

/* Form Controls & Steps */
.wizard-step {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.wizard-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-heading {
  border-bottom: 2px solid var(--emerald-50);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.step-heading h2 {
  font-size: 1.3rem;
  color: var(--emerald-950);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-heading p {
  font-size: 0.88rem;
  color: var(--slate-600);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

@media (max-width: 768px) {
  .col-8, .col-6, .col-4, .col-3 {
    grid-column: span 12;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-700);
}

.form-group label .req {
  color: #dc2626;
  margin-left: 2px;
}

.form-control, .form-select, textarea.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--slate-800);
  background-color: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus, .form-select:focus, textarea.form-control:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3.5px var(--emerald-100);
}

.form-control.is-invalid, .form-select.is-invalid {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.invalid-feedback {
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 500;
}

/* Radio & Checkbox Card Groups */
.radio-card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.radio-card {
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
}

.radio-card:hover {
  border-color: var(--emerald-500);
  background: var(--emerald-50);
}

.radio-card input[type="radio"], .radio-card input[type="checkbox"] {
  accent-color: var(--emerald-700);
  width: 18px;
  height: 18px;
}

.radio-card.active {
  border-color: var(--emerald-700);
  background: var(--emerald-50);
  box-shadow: 0 0 0 2px var(--emerald-600);
}

.radio-card-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-800);
}

/* File Dropzone Upload */
.upload-dropzone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 1.75rem 1rem;
  text-align: center;
  background: var(--slate-50);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--emerald-600);
  background: var(--emerald-50);
}

.upload-icon {
  font-size: 2.2rem;
  color: var(--emerald-700);
  margin-bottom: 0.5rem;
}

.upload-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-700);
}

.upload-sub {
  font-size: 0.78rem;
  color: var(--slate-400);
  margin-top: 0.25rem;
}

.file-preview-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid var(--emerald-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}

.preview-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--slate-200);
}

.file-info {
  flex: 1;
  overflow: hidden;
}

.file-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.btn-remove-file {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* Action Buttons */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--slate-100);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  touch-action: manipulation;
  min-height: 48px;
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-800));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.25);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-950));
  box-shadow: 0 6px 16px rgba(6, 78, 59, 0.35);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-600));
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--slate-700);
  border: 1.5px solid var(--slate-300);
}

.btn-outline:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
  background: #1eb857;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Confirmation Card Layout */
.summary-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.summary-card h3 {
  font-size: 1rem;
  color: var(--emerald-900);
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.summary-table td {
  padding: 0.4rem 0;
  vertical-align: top;
}

.summary-table td.lbl {
  color: var(--slate-500);
  width: 38%;
  font-weight: 500;
}

.summary-table td.val {
  color: var(--slate-800);
  font-weight: 600;
}

/* Success Page Styling */
.success-banner {
  text-align: center;
  padding: 2rem 1rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--emerald-100);
  color: var(--emerald-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 0 0 10px var(--emerald-50);
}

.registration-badge {
  background: var(--gold-100);
  border: 1.5px dashed var(--gold-500);
  color: var(--gold-600);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  font-weight: 800;
  display: inline-block;
  margin: 1.25rem 0;
  letter-spacing: 1px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-warning {
  background: #fef3c7;
  color: #b45309;
}

.status-success {
  background: #d1fae5;
  color: #047857;
}

.status-danger {
  background: #fee2e2;
  color: #dc2626;
}

/* Footer Branding */
footer {
  margin-top: auto;
  padding: 2rem 1rem;
  background: var(--slate-900);
  color: var(--slate-400);
  text-align: center;
  font-size: 0.85rem;
}

footer a {
  color: var(--gold-400);
  text-decoration: none;
}

/* Loading Overlay Modal */
.loading-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  gap: 1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Lightbox Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Floating WhatsApp Chat Widget */
.wa-floating-container {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.wa-floating-badge {
  background: #ffffff;
  color: var(--slate-800);
  border: 1.5px solid var(--emerald-200);
  padding: 8px 14px;
  border-radius: 20px 20px 4px 20px;
  box-shadow: 0 4px 18px rgba(6, 78, 59, 0.15);
  font-size: 0.83rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.wa-floating-badge span {
  color: var(--emerald-950);
}

.wa-badge-close {
  background: none;
  border: none;
  color: var(--slate-400);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
}

.wa-badge-close:hover {
  color: #dc2626;
}

.wa-floating-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff !important;
  padding: 12px 22px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.wa-floating-btn i {
  font-size: 1.5rem;
}

.wa-floating-btn:hover {
  transform: scale(1.06) translateY(-3px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
  color: #ffffff !important;
}

.wa-floating-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  border: 2px solid #25d366;
  animation: waPulse 2s infinite;
  pointer-events: none;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}

@keyframes bounceIn {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .wa-floating-container {
    bottom: 20px;
    right: 16px;
  }
  .wa-floating-text {
    display: none;
  }
  .wa-floating-btn {
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
  }
  .wa-floating-btn::after {
    border-radius: 50%;
  }
  .wa-floating-btn i {
    font-size: 1.8rem;
    line-height: 1;
    margin: 0;
  }
}

