@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

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

body {
  font-family: 'Cairo', sans-serif;
  background-color: #f4f7f6;
  color: #2c3e50;
  direction: rtl;
  line-height: 1.6;
}

/* Header */
.main-header {
  background: #fff;
  border-bottom: 1px solid #e1e8ed;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0d7377, #2ecc71);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
}

.logo-text {
  color: #0d7377;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -1px;
}

.logo-sub {
  color: #7f8c8d;
  font-size: 0.7rem;
  margin-top: -5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #0d7377;
}

.nav-links .highlight {
  background: #0d7377;
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
}

.nav-links .highlight:hover {
  background: #0a5c5f;
  color: white;
}

.user-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #0d7377;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: #0d7377;
  color: white;
}

.btn-primary:hover {
  background: #0a5c5f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 115, 119, 0.3);
}

.btn-success {
  background: #2ecc71;
  color: white;
}

.btn-success:hover {
  background: #27ae60;
}

.btn-danger {
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c;
}

.btn-danger:hover {
  background: #fdf2f2;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-outline {
  background: transparent;
  color: #0d7377;
  border: 1px solid #0d7377;
}

.btn-outline:hover {
  background: #f0fafa;
}

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

.btn-lg {
  padding: 0.85rem 2.5rem;
  font-size: 1rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1a3c3d 0%, #0d7377 100%);
  color: white;
  padding: 2rem 2rem 1.5rem;
  position: relative;
}

.breadcrumb {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
  opacity: 0.85;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb .sep {
  color: rgba(255,255,255,0.5);
}

.breadcrumb .current {
  color: white;
  font-weight: 600;
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.hero-main {
  flex: 1;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.hero-tags {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255,255,255,0.12);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}

/* Wizard */
.wizard-container {
  background: #1a3c3d;
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.wizard {
  display: flex;
  justify-content: space-between;
  position: relative;
  max-width: 950px;
  margin: 0 auto;
}

.wizard::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50px;
  right: 50px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  z-index: 0;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
  flex: 1;
}

.wizard-step .step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid rgba(255,255,255,0.25);
  transition: all 0.3s;
}

.wizard-step.active .step-number {
  background: #2ecc71;
  border-color: #2ecc71;
  color: white;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
}

.wizard-step.completed .step-number {
  background: #2ecc71;
  border-color: #2ecc71;
  color: white;
}

.wizard-step .step-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s;
}

.wizard-step.active .step-label {
  color: #2ecc71;
  font-weight: 700;
}

.wizard-step.completed .step-label {
  color: rgba(255,255,255,0.9);
}

/* Main Content */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #e8ecef;
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eef2f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfb;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d7377;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #eef2f5;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: #34495e;
  font-size: 0.85rem;
}

.form-label .required {
  color: #e74c3c;
  margin-right: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #d5dde5;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  transition: all 0.3s;
  background: white;
  color: #2c3e50;
}

.form-control:focus {
  outline: none;
  border-color: #0d7377;
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.08);
}

.form-control:read-only,
.form-control[readonly] {
  background: #f8f9fa;
  color: #5a6c7d;
  cursor: default;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230d7377' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  padding-left: 2.5rem;
}

/* Grid */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.form-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.form-row-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem;
  border-radius: 8px;
  transition: background 0.3s;
}

.checkbox-container:hover {
  background: #f8fafa;
}

.checkbox-container input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #0d7377;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
}

/* File Upload */
.file-upload {
  border: 2px dashed #c8d5e0;
  border-radius: 10px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  background: #fafbfb;
}

.file-upload:hover {
  border-color: #0d7377;
  background: #f0fafa;
}

.file-upload-icon {
  font-size: 2.5rem;
  color: #0d7377;
  margin-bottom: 1rem;
}

.file-upload-text {
  color: #5a6c7d;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.file-upload-hint {
  color: #95a5a6;
  font-size: 0.8rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f0fafa;
  border-radius: 8px;
  border: 1px solid #d5e8e9;
  margin-top: 1rem;
}

.file-name {
  font-weight: 600;
  color: #0d7377;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Actions Bar */
.actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eef2f5;
}

.actions-right, .actions-left {
  display: flex;
  gap: 0.75rem;
}

/* Review Section */
.review-section {
  margin-bottom: 2rem;
}

.review-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d7377;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #f0fafa;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.review-item {
  background: #fafbfb;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #eef2f5;
}

.review-label {
  font-size: 0.78rem;
  color: #7f8c8d;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.review-value {
  font-weight: 700;
  color: #2c3e50;
  font-size: 0.9rem;
}

.edit-link {
  color: #0d7377;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

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

/* Terms */
.terms-content {
  max-height: 420px;
  overflow-y: auto;
  padding: 1.5rem;
  background: #fafbfb;
  border-radius: 8px;
  line-height: 2;
  font-size: 0.9rem;
  border: 1px solid #eef2f5;
}

.terms-content::-webkit-scrollbar {
  width: 6px;
}

.terms-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.terms-content::-webkit-scrollbar-thumb {
  background: #0d7377;
  border-radius: 3px;
}

.terms-item {
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.terms-bullet {
  color: #0d7377;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.8;
  flex-shrink: 0;
}

.terms-text {
  color: #444;
}

/* Page 1 - Service Landing */
.service-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.service-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #e8ecef;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.info-card-title {
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon {
  width: 42px;
  height: 42px;
  background: #f0fafa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0d7377;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.info-content h4 {
  font-size: 0.85rem;
  color: #2c3e50;
  margin-bottom: 0.15rem;
  font-weight: 700;
}

.info-content p {
  font-size: 0.82rem;
  color: #7f8c8d;
  font-weight: 500;
}

.service-main {
  background: white;
  border-radius: 10px;
  border: 1px solid #e8ecef;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.service-header {
  margin-bottom: 2rem;
}

.service-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.service-tags {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.service-tag {
  background: #f0fafa;
  color: #0d7377;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #d5e8e9;
}

.service-desc {
  color: #5a6c7d;
  line-height: 1.8;
  font-size: 0.95rem;
}

.service-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eef2f5;
}

.tabs {
  display: flex;
  gap: 2.5rem;
  border-bottom: 2px solid #eef2f5;
  margin-bottom: 2rem;
}

.tab {
  padding: 1rem 0.25rem;
  color: #95a5a6;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.tab:hover {
  color: #0d7377;
}

.tab.active {
  color: #0d7377;
  border-bottom-color: #0d7377;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Map & Coordinates */
.map-container {
  background: linear-gradient(135deg, #ffd4c4 0%, #ffccb3 100%);
  border-radius: 10px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid #ffcbb8;
}

.map-placeholder {
  text-align: center;
  color: #c0392b;
  font-weight: 700;
}

.map-dots {
  position: absolute;
  width: 100%;
  height: 100%;
}

.coord-badge {
  position: absolute;
  background: white;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2980b9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #d5e8e9;
}

.coord-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.coord-item {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  background: #fafbfb;
  border-radius: 8px;
  border: 1px solid #eef2f5;
}

.coord-num {
  width: 28px;
  height: 28px;
  background: #0d7377;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Footer */
.main-footer {
  background: #1a3c3d;
  color: white;
  padding: 2.5rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-info {
  background: #e8f6f6;
  color: #0d7377;
  border: 1px solid #d5e8e9;
}

/* Responsive */
@media (max-width: 768px) {
  .service-layout {
    grid-template-columns: 1fr;
  }

  .form-row,
  .form-row-3,
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .wizard {
    overflow-x: auto;
    gap: 1rem;
  }

  .wizard::before {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .hero-content {
    flex-direction: column;
  }

  .nav-links {
    display: none;
  }
}

/* Helper */
.text-muted {
  color: #95a5a6;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 1.5rem;
}

.hidden {
  display: none !important;
}

/* Section side title */
.side-section {
  margin-bottom: 2rem;
}

.side-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0d7377;
  margin-bottom: 1.25rem;
  padding-right: 1rem;
  border-right: 4px solid #0d7377;
}

/* Explicit RTL Wizard Support */
.wizard {
  direction: rtl;
}

.wizard-step {
  direction: rtl;
}

/* Actions Bar RTL */
.actions-bar {
  direction: rtl;
}

.actions-bar > * {
  direction: rtl;
}

/* Ensure all cards and forms are RTL */
.card, .form-group, .form-row, .review-grid, .service-layout, .info-item, .footer-content {
  direction: rtl;
}

/* Wizard line should flow RTL */
.wizard::before {
  right: 50px;
  left: 50px;
}

/* Fix checkbox in RTL */
.checkbox-container input[type="checkbox"] {
  margin-left: 0;
  margin-right: 0;
}

/* File upload RTL */
.file-upload {
  direction: rtl;
}

/* Coord items RTL */
.coord-item {
  direction: rtl;
}

/* Tabs RTL */
.tabs {
  direction: rtl;
}

/* Service layout RTL */
.service-layout {
  direction: rtl;
}

/* Ensure text alignment */
body, .container, .card, .hero, .main-header, .main-footer {
  text-align: right;
}

/* Form labels and inputs RTL alignment */
.form-control, select.form-control {
  text-align: right;
}

/* Review items RTL */
.review-item {
  text-align: right;
}

/* Info card items RTL */
.info-item {
  direction: rtl;
}
