/* Al-Junad Domestic Workers Recruitment - Fully Responsive (Mobile & Full Desktop PC) Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

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

html, body {
  width: 100%;
  min-height: 100%;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background-color: #F2F5F7;
  color: #1e293b;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Page wrapper - full width on PC, centered container */
.app-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  width: 100%;
  margin: 0 auto;
}

/* Header */
.app-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s;
}

.header-brand:hover {
  opacity: 0.9;
}

.header-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

.header-text-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.header-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #131d3b;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 0.72rem;
  font-weight: 800;
  color: #22c55e;
  letter-spacing: 0.08em;
}

/* Main Content Area */
.app-main {
  flex: 1;
  padding: 24px 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Headings */
.page-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  line-height: 1.25;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
  text-align: center;
  margin-bottom: 24px;
}

/* Primary Service Buttons (Screen 1) */
.service-btn-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 500px;
  margin: 0 auto;
}

.service-btn {
  width: 100%;
  padding: 18px 22px;
  border-radius: 20px;
  border: 2px solid transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.service-btn:active {
  transform: scale(0.98);
}

.service-btn-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.service-btn-icon {
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-btn-text {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.service-btn-arrow {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
  transition: transform 0.2s;
}

.service-btn:hover .service-btn-arrow {
  transform: translateX(-4px);
}

/* Specific Service Button Colors */
.service-btn-month {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.28);
}

.service-btn-month:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
  transform: translateY(-2px);
}

.service-btn-hour {
  background: #131d3b;
  box-shadow: 0 6px 20px rgba(19, 29, 59, 0.22);
}

.service-btn-hour:hover {
  background: #1c2b54;
  border-color: #22c55e;
  transform: translateY(-2px);
}

.service-btn-year {
  background: #1e293b;
  box-shadow: 0 6px 20px rgba(30, 41, 59, 0.22);
}

.service-btn-year:hover {
  background: #0f172a;
  border-color: #22c55e;
  transform: translateY(-2px);
}

/* Form Styles (Screen 2) */
.form-card-container {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.form-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 22px;
}

.form-header-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
}

.form-header-service-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: #d97706;
  margin-top: 3px;
}

.btn-change {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-change:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.form-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 4px;
  position: relative;
}

.form-group.col-full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 6px;
}

.form-input, .select-box {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background-color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.select-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.select-box:hover {
  border-color: #94a3b8;
}

.select-box-value {
  font-weight: 800;
  color: #0f172a;
}

.select-box-icon {
  width: 18px;
  height: 18px;
  color: #94a3b8;
}

/* Location and GPS */
.location-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.gps-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #b45309;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.gps-badge-btn:hover {
  background: #fde68a;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .form-input {
  padding-left: 14px;
  padding-right: 42px;
}

.input-inner-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

/* Autocomplete list */
.suggestions-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 50;
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 11px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: #fef3c7;
  color: #b45309;
}

/* Form Action Buttons */
.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  gap: 14px;
}

.btn-back {
  padding: 13px 28px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-back:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.btn-submit-next {
  flex: 1;
  padding: 14px 32px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.3);
  transition: all 0.15s;
  text-align: center;
}

.btn-submit-next:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
}

.btn-submit-next:active {
  transform: scale(0.98);
}

.form-error-alert {
  padding: 12px 16px;
  background-color: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 12px;
  margin-top: 14px;
}

/* Worker Selection Grid (Screen 3) */
.workers-container {
  max-width: 1100px;
  margin: 0 auto;
}

.workers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.worker-card {
  position: relative;
  background: #ffffff;
  border: 2.5px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.worker-card:hover {
  border-color: #94a3b8;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Active Selected Worker Card */
.worker-card.selected {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3), 0 10px 25px rgba(34, 197, 94, 0.2);
}

.worker-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #f1f5f9;
}

.worker-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.worker-card:hover .worker-img {
  transform: scale(1.04);
}

/* Checkmark badge on selected card */
.worker-check-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.worker-card.selected .worker-check-badge {
  display: flex;
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.worker-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #ffffff;
}

.worker-name {
  font-size: 0.92rem;
  font-weight: 900;
  color: #0f172a;
}

.worker-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 9px;
  border-radius: 6px;
  align-self: flex-start;
}

.btn-proceed-pay {
  width: 100%;
  max-width: 440px;
  margin: 28px auto 0;
  padding: 16px 24px;
  background: #22c55e;
  border: none;
  border-radius: 16px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
  transition: all 0.2s;
}

.btn-proceed-pay:hover {
  background: #16a34a;
}

.btn-proceed-pay:active {
  transform: scale(0.98);
}

.btn-proceed-pay:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Screen 4: Payment Method (الدفع .jpg) */
.payment-card-container {
  max-width: 580px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.payment-card-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  margin-top: 24px;
  transition: all 0.2s;
}

.payment-card-box:hover {
  border-color: #22c55e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.payment-card-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.payment-benefit-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.payment-card-title {
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
}

.payment-card-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 3px;
}

.btn-pay-now-green {
  background: #22c55e;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 9px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.28);
  transition: background-color 0.15s;
  white-space: nowrap;
}

.btn-pay-now-green:hover {
  background: #16a34a;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: #f0eff5;
  border-radius: 28px;
  padding: 24px 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.7);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.modal-option-row:hover {
  background-color: rgba(226, 232, 240, 0.8);
}

.modal-option-text {
  font-size: 0.95rem;
  font-weight: 900;
  color: #1e293b;
}

/* Radio circle on left */
.modal-radio-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.modal-radio-circle.active {
  border-color: #1e293b;
  background-color: #1e293b;
}

.modal-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ffffff;
}

/* Footer */
.app-footer {
  width: 100%;
  background-color: #e2e8f0;
  border-top: 1px solid #cbd5e1;
  padding: 28px 20px;
  text-align: center;
  margin-top: 40px;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  max-width: 500px;
  margin: 0 auto 10px;
  line-height: 1.6;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 900;
  color: #131d3b;
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

/* ============================================== */
/* Payment Gateway Transition Overlay (7 Seconds) */
/* ============================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loading-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 32px 26px 26px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: modalPop 0.25s ease-out;
}

.loading-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.loading-benefit-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.loading-brand-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.loading-spinner {
  width: 54px;
  height: 54px;
  border: 4px solid #e2e8f0;
  border-top-color: #22c55e;
  border-right-color: #c52227;
  border-radius: 50%;
  margin: 18px auto 14px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 6px;
}

.loading-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 14px;
}

.loading-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #c52227;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.loading-progress-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
}

.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #c52227);
  border-radius: 10px;
  transition: width 0.1s linear;
}

/* ============================================================== */
/* DESKTOP & LAPTOP FULL SCREEN MEDIA QUERIES (الحاسوب بالكامل) */
/* ============================================================== */
@media (min-width: 768px) {
  .app-main {
    padding: 36px 32px;
  }

  .page-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
  }

  .page-subtitle {
    font-size: 1.05rem;
    margin-bottom: 32px;
  }

  /* Screen 1: 3 columns grid on desktop */
  .service-btn-list {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }

  .service-btn {
    padding: 24px 22px;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    text-align: center;
    border-radius: 24px;
  }

  .service-btn-content {
    flex-direction: column;
    gap: 12px;
  }

  .service-btn-icon {
    font-size: 2.6rem;
  }

  .service-btn-text {
    font-size: 1.25rem;
  }

  .service-btn-arrow {
    display: none;
  }

  /* Screen 2: 2 columns form grid on desktop */
  .form-card-container {
    max-width: 820px;
    padding: 36px 32px;
    border-radius: 28px;
  }

  .form-grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 22px;
  }

  .form-actions-row {
    margin-top: 32px;
  }

  /* Screen 3: 4 columns workers grid on desktop */
  .workers-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }

  .worker-card {
    border-radius: 22px;
  }

  .worker-name {
    font-size: 1rem;
  }

  /* Screen 4: Centered payment box on desktop */
  .payment-card-container {
    max-width: 620px;
    padding: 40px 32px;
    border-radius: 28px;
  }
}

@media (min-width: 1024px) {
  .app-main {
    padding: 48px 36px;
  }

  .service-btn-list {
    gap: 28px;
  }

  .service-btn {
    padding: 32px 24px;
  }

  .service-btn-text {
    font-size: 1.35rem;
  }

  .workers-grid {
    gap: 26px;
  }
}
