/* ==========================================
   نظام هافانا - ملف التنسيقات الرئيسي
   Havana System - Main Stylesheet
   ========================================== */

/* CSS Variables - نظام الألوان */
:root {
  /* الألوان الأساسية */
  --primary-gold: #d4af37;
  --gold-light: #f4e5c2;
  --gold-dark: #b8960c;
  --primary-teal: #1abc9c;
  --teal-dark: #16a085;
  --teal-light: #48c9b0;

  /* ألوان النص */
  --text-primary: #2c3e50;
  --text-secondary: #34495e;
  --text-muted: #7f8c8d;
  --text-light: #95a5a6;

  /* ألوان الخلفية */
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-cream: #fdfbf7;
  --bg-dark: #2c3e50;

  /* ألوان الحالة */
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;

  /* التدرجات */
  --gold-gradient: linear-gradient(135deg, #d4af37 0%, #c9a961 100%);
  --teal-gradient: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
  --mixed-gradient: linear-gradient(135deg, #d4af37 0%, #1abc9c 100%);
  --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);

  /* الظلال */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
  --shadow-teal: 0 4px 20px rgba(26, 188, 156, 0.3);

  /* الحدود */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 30px;

  /* الانتقالات */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.6;
  /* direction controlled by JS LanguageManager */
  overflow-x: hidden;
}

/* Force English (Latin) numerals throughout the system */
html,
body,
* {
  /* Force lining numerals (0-9) instead of Arabic-Indic numerals */
  font-variant-numeric: lining-nums tabular-nums;
  /* Additional support for older browsers */
  -moz-font-feature-settings: "lnum" 1;
  -webkit-font-feature-settings: "lnum" 1;
  font-feature-settings: "lnum" 1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  /* Increased from 60px for larger logo */
}

.header.header-hidden {
  transform: translateY(-100%);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 75px;
  /* Increased from 50px */
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon .logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-icon i {
  font-size: 24px;
  color: var(--primary-gold);
}

.logo-text {
  font-size: 33px;
  /* Increased from 22px */
  font-weight: 800;
  background: var(--mixed-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu,
.nav-menu-desktop {
  display: flex;
  list-style: none;
  gap: 30px;
}

/* Visible only on desktop */
.desktop-nav {
  display: flex;
  align-items: center;
}

/* Mobile sidebar: hidden completely on desktop */
.mobile-sidebar {
  display: none;
}

/* Mobile toggle hidden on desktop */
.mobile-toggle {
  display: none;
}

.nav-actions-mobile {
  display: none !important;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-gold);
}

.nav-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--border-radius-xl);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--gold-gradient);
  color: white;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
  background: var(--teal-gradient);
  color: white;
  box-shadow: var(--shadow-teal);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(26, 188, 156, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-gold);
  color: var(--primary-gold);
}

.btn-outline:hover {
  background: var(--gold-gradient);
  color: white;
}

.btn-dark {
  background: var(--bg-dark);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-dark:hover {
  transform: translateY(-2px);
  background: #1a252f;
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

/* Global Form/Modal Footer Buttons Override to Match Premium Dark Theme */
.modal-footer .btn-primary,
.hp-modal-content .modal-footer .btn-primary {
  background: var(--bg-dark) !important;
  color: white !important;
  box-shadow: var(--shadow-sm) !important;
  border: none !important;
}

.modal-footer .btn-primary:hover,
.hp-modal-content .modal-footer .btn-primary:hover {
  transform: translateY(-2px) !important;
  background: #1a252f !important;
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4) !important;
}

.modal-footer .btn-outline,
.hp-modal-content .modal-footer .btn-outline {
  background: transparent !important;
  border: 1px solid var(--primary-gold) !important;
  color: var(--primary-gold) !important;
}

.modal-footer .btn-outline:hover,
.hp-modal-content .modal-footer .btn-outline:hover {
  background: var(--bg-light) !important;
  color: var(--primary-gold) !important;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.mobile-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-normal);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(253, 251, 247, 0.97) 0%, rgba(253, 251, 247, 0.92) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23d4af37' fill-opacity='0.1'%3E%3Cpath fill-rule='evenodd' d='M11 0l5 3 5-3v11l-5 3-5-3V0zm29 0l5 3 5-3v11l-5 3-5-3V0zM0 10l5-3 5 3-5 3-5-3zm34 0l5-3 5 3-5 3-5-3zm23 0l5-3 5 3-5 3-5-3zm-6 29l-5 3-5-3V28l5-3 5 3v11zm-24 0l-5 3-5-3V28l5-3 5 3v11zm43 0l-5 3-5-3V28l5-3 5 3v11zM28 28l5-3 5 3-5 3-5-3zm34 0l5-3 5 3-5 3-5-3zM0 38l5-3 5 3-5 3-5-3zm23 0l5-3 5 3-5 3-5-3zm23 0l5-3 5 3-5 3-5-3zm23 0l5-3 5 3-5 3-5-3zM0 50l5-3 5 3-5 3-5-3zm34 0l5-3 5 3-5 3-5-3zm23 0l5-3 5 3-5 3-5-3zm-6 29l-5 3-5-3V68l5-3 5 3v11zm-24 0l-5 3-5-3V68l5-3 5 3v11zm43 0l-5 3-5-3V68l5-3 5 3v11zM28 68l5-3 5 3-5 3-5-3zm34 0l5-3 5 3-5 3-5-3zM11 80l5-3 5 3V70l-5-3-5 3v10zm29 0l5-3 5 3V70l-5-3-5 3v10zM0 0l11 11L0 22V0zm80 0L69 11l11 11V0zM0 80l11-11L0 58v22zm80 0L69 69l11-11v22z'/%3E%3C/g%3E%3C/svg%3E");
  display: flex;
  align-items: center;
  padding-top: 140px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 188, 156, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: right;
  position: relative;
  /* Context for absolute positioning */
  z-index: 2;
}

.hero-interactive-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  /* Large size */
  height: 600px;
  z-index: -1;
  /* Behind text */
  opacity: 0.07;
  /* Very subtle transparency */
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hero-interactive-bg img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
  animation: logoFloat 8s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1.05);
  }
}


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--primary-gold);
  padding: 8px 20px;
  border-radius: var(--border-radius-xl);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 25px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 25px;
  color: var(--text-primary);
}

.hero-title span {
  background: var(--mixed-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 35px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-gold);
  display: block;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

.hero-image {
  position: relative;
}

.hero-slider {
  width: 100%;
  max-width: 550px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: grid;
  grid-template-areas: "stack";
}

.hero-image-main {
  grid-area: stack;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-image-main.active {
  opacity: 1;
  z-index: 2;
}

.hero-image-decoration {
  position: absolute;
  top: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: var(--gold-gradient);
  border-radius: var(--border-radius-lg);
  opacity: 0.2;
  z-index: 0;
}

.hero-image-decoration-2 {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: var(--teal-gradient);
  border-radius: 50%;
  opacity: 0.2;
  z-index: 0;
}

.hero-image-logo {
  position: absolute;
  top: 45%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 2;
  padding: 10px;
  border: 2px solid var(--primary-gold);
  backdrop-filter: blur(5px);
  animation: float 6s ease-in-out infinite;
}

.hero-image-logo i {
  font-size: 24px;
  color: var(--primary-gold);
  margin-bottom: 5px;
}

.hero-image-logo span {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes float {
  0% {
    transform: translate(-50%, -50%) translateY(0px);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-10px);
  }

  100% {
    transform: translate(-50%, -50%) translateY(0px);
  }
}

/* ==========================================
   FILTER SECTION
   ========================================== */

/* ==========================================
   HIGH-END FILTERS SYSTEM
   ========================================== */

.filter-section {
  padding: 60px 0;
  background: var(--bg-cream);
  position: relative;
}

.filter-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.filter-group-premium {
  margin-bottom: 30px;
}

.filter-group-premium:last-child {
  margin-bottom: 0;
}

.filter-label-premium {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}

/* Category Pills (Job Types) */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: white;
  color: var(--text-secondary);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.pill i {
  font-size: 14px;
  transition: all 0.3s ease;
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
  border-color: rgba(212, 175, 55, 0.2);
}

.pill.active {
  background: var(--gold-gradient);
  color: white;
  box-shadow: var(--shadow-gold);
}

.pill.active i {
  color: white;
}

/* Nationality Pills */
.nationality-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 2px 15px;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  mask-image: linear-gradient(to right, black 90%, transparent 100%);
}

[dir="rtl"] .nationality-scroll {
  mask-image: linear-gradient(to left, black 90%, transparent 100%);
}

.nationality-scroll::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.nat-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  background: white;
  color: var(--text-secondary);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  flex-shrink: 0;
}

.nat-flag-img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nat-pill:hover {
  background: #fdfbf7;
  border-color: var(--primary-gold);
  transform: translateY(-2px);
}

.nat-pill.active {
  background: white;
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.nat-pill.active .nat-flag-img {
  transform: scale(1.1);
}

/* Reset Filter Button */
.reset-filter-premium {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  padding: 5px 10px;
  border-radius: 4px;
}

.reset-filter-premium:hover {
  color: var(--danger);
  background: rgba(231, 76, 60, 0.05);
}

/* Search Bar Integration */
.filter-search-wrap {
  position: relative;
  max-width: 400px;
}

.filter-search-input {
  width: 100%;
  padding: 12px 45px 12px 20px;
  border-radius: 50px;
  border: 1px solid #eee;
  background: white;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

[dir="rtl"] .filter-search-input {
  padding: 12px 20px 12px 45px;
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.filter-search-icon {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--text-light);
}

[dir="rtl"] .filter-search-icon {
  right: auto;
  left: 18px;
}


/* ==========================================
   WORKERS SECTION
   ========================================== */

.workers-section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(26, 188, 156, 0.1);
  color: var(--primary-teal);
  padding: 8px 20px;
  border-radius: var(--border-radius-xl);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.section-description {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.workers-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

/* Worker Card */
.worker-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
}

.worker-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.worker-image-container {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.worker-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: var(--transition-slow);
}

.worker-card:hover .worker-image {
  transform: scale(1.05);
}

.worker-status {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 14px;
  border-radius: var(--border-radius-xl);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.worker-status.available {
  background: var(--success);
  color: white;
}

.worker-status.booked {
  background: var(--danger);
  color: white;
}

.worker-price-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--gold-gradient);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
}

.worker-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.worker-content {
  padding: 20px;
}

.worker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.worker-flag {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.worker-nationality {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.worker-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.worker-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.worker-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg-light);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.worker-tag i {
  color: var(--primary-gold);
  font-size: 11px;
}

.worker-documents {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.doc-item i {
  font-size: 14px;
}

.doc-item.valid i {
  color: var(--success);
}

.doc-item.invalid i {
  color: var(--text-light);
}

.worker-actions {
  display: flex;
  gap: 10px;
}

.worker-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}

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

/* ==========================================
   STATISTICS SECTION
   ========================================== */

.stats-section {
  padding: 80px 0;
  background: var(--dark-gradient);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="p" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23p)"/></svg>');
}

.stats-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.stat-icon {
  width: 70px;
  height: 70px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  color: white;
  box-shadow: var(--shadow-gold);
}

.stat-card h3 {
  font-size: 42px;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================
   FEATURES SECTION
   ========================================== */

.features-section {
  padding: 100px 0;
  background: var(--bg-cream);
}

.features-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background: white;
  padding: 40px 30px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold-gradient);
  transform: scaleX(0);
  transition: var(--transition-normal);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(26, 188, 156, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 32px;
  color: var(--primary-gold);
  transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
  background: var(--gold-gradient);
  color: white;
}

.feature-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================
   FAQ SECTION
   ========================================== */

.faq-section {
  padding: 100px 0;
  background: white;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.faq-item {
  background: var(--bg-light);
  border-radius: var(--border-radius-md);
  margin-bottom: 15px;
  overflow: hidden;
  transition: var(--transition-normal);
}

.faq-item.active {
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: right;
  font-family: inherit;
}

.faq-question i {
  color: var(--primary-gold);
  transition: var(--transition-normal);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 25px 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==========================================
   TESTIMONIALS SECTION
   ========================================== */

.testimonials-section {
  padding: 100px 0;
  background: var(--bg-cream);
}

.testimonials-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.testimonial-card {
  background: white;
  padding: 35px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 80px;
  color: var(--primary-gold);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.testimonial-rating {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}

.testimonial-rating i {
  color: #ffc107;
  font-size: 16px;
}

.testimonial-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.testimonial-avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-light);
}

.testimonial-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.testimonial-info p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================
   STEPS SECTION
   ========================================== */

.steps-section {
  padding: 100px 0;
  background: white;
}

.steps-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.steps-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 40px 0;
}

.steps-timeline::before {
  content: '';
  position: absolute;
  top: 80px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-gold) 0%, var(--primary-teal) 100%);
  border-radius: 2px;
}

.step-item {
  text-align: center;
  position: relative;
  flex: 1;
  max-width: 200px;
}

.step-number {
  width: 80px;
  height: 80px;
  background: white;
  border: 4px solid var(--primary-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-gold);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.step-item.active .step-number {
  background: var(--gold-gradient);
  color: white;
  border-color: transparent;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================
   CTA SECTION
   ========================================== */

.cta-section {
  padding: 100px 0;
  background: var(--mixed-gradient);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="p" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23p)"/></svg>');
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 42px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 35px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.cta-buttons .btn {
  padding: 16px 40px;
  font-size: 16px;
}

.cta-buttons .btn-primary {
  background: white;
  color: var(--primary-gold);
}

.cta-buttons .btn-primary:hover {
  background: var(--text-primary);
  color: white;
}

.cta-buttons .btn-outline {
  border-color: white;
  color: white;
}

.cta-buttons .btn-outline:hover {
  background: white;
  color: var(--primary-teal);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background: var(--dark-gradient);
  color: white;
  padding: 80px 0 0;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-brand .logo {
  margin-bottom: 20px;
}

.footer-brand .logo-icon {
  width: 60px;
  height: auto;
}

.footer-brand .logo-text {
  font-size: 24px;
  background: linear-gradient(135deg, #fff 0%, var(--gold-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 25px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  transition: var(--transition-normal);
}

.footer-social a:hover {
  background: var(--gold-gradient);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-normal);
}

.footer-links a::before {
  content: '\f104';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 12px;
  color: var(--primary-gold);
}

.footer-links a:hover {
  color: var(--primary-gold);
  padding-right: 5px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 18px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
  width: 35px;
  height: 35px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--primary-gold);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links {
  display: flex;
  gap: 25px;
}

.footer-bottom-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links a:hover {
  color: var(--primary-gold);
}

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

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

/* دعم كلا الـ class للتوافق مع جميع الإصدارات */
.modal-overlay.active,
.modal-overlay.show,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
  display: flex !important;
  opacity: 1;
}

.modal {
  background: white;
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s ease;
  margin: auto;
  flex-shrink: 0;
}

.modal-overlay.active .modal,
.modal-overlay.show .modal,
.modal-overlay[style*="display: flex"] .modal,
.modal-overlay[style*="display:flex"] .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 30px;
  background: var(--gold-gradient);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  position: relative;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

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

.modal-body {
  padding: 25px 30px;
  overflow-y: visible;
}

.worker-preview {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--border-radius-md);
  margin-bottom: 25px;
}

.worker-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
}

.worker-preview-info h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.worker-preview-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 15px;
  border: 2px solid #e8e8e8;
  border-radius: var(--border-radius-md);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition-normal);
  background: var(--bg-white);
  color: var(--text-primary);
  font-weight: 400;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 5px;
  display: none;
}

.form-group.error .form-input {
  border-color: var(--danger);
}

.form-group.error .form-error {
  display: block;
}

.tracking-number-display {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(26, 188, 156, 0.1) 100%);
  padding: 20px;
  border-radius: var(--border-radius-md);
  text-align: center;
  margin-bottom: 20px;
  border: 2px dashed var(--primary-gold);
}

.tracking-number-display label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.tracking-number-display .tracking-code {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-gold);
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fff;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 100px;
  left: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  padding: 15px 25px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  transform: translateX(-100%);
  opacity: 0;
  transition: var(--transition-normal);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-right: 4px solid var(--success);
}

.toast.error {
  border-right: 4px solid var(--danger);
}

.toast.info {
  border-right: 4px solid var(--info);
}

.toast i {
  font-size: 20px;
}

.toast.success i {
  color: var(--success);
}

.toast.error i {
  color: var(--danger);
}

.toast.info i {
  color: var(--info);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1200px) {
  .workers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-image {
    display: none;
  }

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

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

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

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

  .steps-timeline {
    flex-direction: column;
    gap: 40px;
  }

  .steps-timeline::before {
    display: none;
  }

  .step-item {
    max-width: 100%;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 28px;
  }

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

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

  .stats-container {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .cta-section h2 {
    font-size: 28px;
  }

  .cta-buttons {
    flex-direction: column;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gold-light);
  border-top-color: var(--primary-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* ==========================================
   LANGUAGE TOGGLE BUTTON
   ========================================== */

.lang-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: #fffdf5;
  /* لون كريمي فاتح مثل الصورة */
  border: 1px solid #e1c27d;
  /* إطار ذهبي نحيف مثل الصورة */
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #1a2d42;
  /* لون نص غامق مثل الصورة */
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lang-toggle-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
  border-color: var(--primary-gold);
}

.lang-toggle-btn .lang-text {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-toggle-btn i,
.lang-toggle-btn .lang-icon {
  color: #d4af37;
  /* لون الكرة الأرضية ذهبي */
  font-size: 16px;
  transition: transform 0.3s ease;
}

.lang-toggle-btn:hover i,
.lang-toggle-btn:hover .lang-icon {
  transform: scale(1.1);
}

/* LTR Support */
body.ltr {
  direction: ltr;
  text-align: left;
}

body.ltr .hero-content {
  text-align: left;
}

body.ltr .nav-link::after {
  right: auto;
  left: 0;
}

body.ltr .filter-group::after {
  left: auto;
  right: 15px;
}

body.ltr .filter-select {
  padding: 14px 15px 14px 40px;
}

body.ltr .worker-status {
  right: auto;
  left: 15px;
}

body.ltr .modal-close {
  left: auto;
  right: 15px;
}

body.ltr .faq-question i {
  margin-left: 0;
  margin-right: auto;
}

body.ltr .footer-brand,
body.ltr .footer-links-section,
body.ltr .footer-contact-section {
  text-align: left;
}

body.ltr .stat-item {
  text-align: center;
}

/* Mobile Language Toggle */
@media (max-width: 992px) {
  .lang-toggle-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .lang-toggle-btn .lang-flag {
    font-size: 18px;
  }
}

/* ==========================================
   LANGUAGE TOGGLE - DASHBOARD SPECIFIC
   ========================================== */

.dashboard-lang-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
}

.dashboard-lang-toggle .lang-toggle-btn {
  box-shadow: var(--shadow-md);
  background: white;
}

body.ltr .dashboard-lang-toggle {
  left: auto;
  right: 20px;
}

/* Worker Chips in Client List */
.worker-cells {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.worker-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-bg);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  width: fit-content;
  min-width: 200px;
  transition: all 0.2s ease;
}

.worker-chip:hover {
  border-color: var(--primary-gold);
  background: rgba(212, 175, 55, 0.05);
}

.worker-chip-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-gold);
}

.worker-chip-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.worker-chip-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.worker-chip-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 6px;
  align-items: center;
}

.worker-chip-subtitle i {
  color: var(--primary-gold);
  font-size: 0.75rem;
}



/* ==========================================
   CUSTOM CLIENT MODAL (Fixed & Professional)
   ========================================== */
.custom-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 99999;
  /* Highest priority */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
  display: flex !important;
  opacity: 1;
}

.custom-modal-container {
  background: var(--surface-bg, #ffffff);
  width: 90%;
  max-width: 850px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-overlay.active .custom-modal-container {
  transform: scale(1);
}

.custom-modal-header {
  padding: 20px 30px;
  background: var(--bg-primary, #f8f9fa);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color, #d4af37);
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-modal-header h3::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background: var(--primary-color, #d4af37);
  border-radius: 2px;
}

.custom-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary, #6b7280);
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.custom-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--danger, #ef4444);
}

.custom-modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
  background: var(--surface-bg, #ffffff);
}

/* Detail Sections */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.details-card {
  background: var(--bg-secondary, #f8f9fa);
  border-radius: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 20px;
  height: 100%;
}

.details-card h4 {
  color: var(--primary-color, #d4af37);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--border-color, #e5e7eb);
  display: flex;
  align-items: center;
  gap: 10px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.details-row:last-child {
  margin-bottom: 0;
}

.details-label {
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
}

.details-value {
  color: var(--text-primary, #111827);
  font-weight: 600;
  text-align: left;
}

/* Specific Card Styles */
.residency-card {
  background: linear-gradient(to bottom right, rgba(212, 175, 55, 0.05), transparent);
  border-color: rgba(212, 175, 55, 0.2);
}

.alert-warning-custom {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  border-radius: 12px;
  padding: 20px;
  margin-top: 25px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  animation: slideIn 0.3s ease-out;
}

.alert-warning-custom i {
  font-size: 24px;
  color: #f59e0b;
  margin-top: 2px;
}

.alert-content strong {
  display: block;
  color: #92400e;
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.alert-content p {
  color: #b45309;
  margin: 0;
  line-height: 1.4;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar styling for modal */
.custom-modal-body::-webkit-scrollbar {
  width: 8px;
}

.custom-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.custom-modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

#clientDetailsModal .modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex !important;
  /* Ensure flex for alignment */
  justify-content: space-between;
  align-items: center;
}

#clientDetailsModal .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

#clientDetailsModal .modal-body {
  padding: 25px;
  background: var(--bg-primary);
  /* Ensure contrast */
}

/* Custom Detail Styles */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.details-card {
  background: var(--surface-bg);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.details-card h4 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--primary-gold);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 5px;
}

.details-row:last-child {
  border-bottom: none;
}

.details-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.details-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Residency Status Badge */
.residency-card {
  background: rgba(212, 175, 55, 0.03);
  /* Subtle Gold Tint */
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.alert-warning-custom {
  background: #fff3cd;
  color: #856404;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #ffeeba;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

.close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  opacity: 0.7;
  padding: 0;
  margin: 0;
}

.close:hover {
  opacity: 1;
  color: var(--danger);
}

/* Dark Mode Adjustments */
body.dark-mode #clientDetailsModal .modal-content {
  background: var(--surface-bg);
}

body.dark-mode .residency-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .alert-warning-custom {
  background: rgba(255, 193, 7, 0.1);
  color: var(--warning);
  border-color: var(--warning);
}

/* Page Actions Container */
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#oldClientModal .modal-content {
  animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   VIDEO PLAYER STYLES
   ========================================== */

/* Video Button in Worker Card */
.btn-play-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-play-video i {
  font-size: 20px;
  margin-left: 3px;
  /* Visual centering adjustment for play icon */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.worker-image-container:hover .btn-play-video {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.btn-play-video:hover {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  transform: translate(-50%, -50%) scale(1.15) !important;
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.5);
}

.btn-play-video i {
  margin-left: 4px;
}

/* Video Modal Styles */
.video-modal-content {
  position: relative;
  width: 95%;
  max-width: 900px;
  background: #000;
  border-radius: 15px;
  overflow: visible;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  animation: modalScaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#video-player-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.video-player-element,
.video-iframe-element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-modal-content .modal-close {
  position: absolute !important;
  top: -20px !important;
  right: -20px !important;
  width: 45px !important;
  height: 45px !important;
  background: var(--primary-gold) !important;
  color: white !important;
  border-radius: 50% !important;
  border: 3px solid white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  cursor: pointer !important;
  z-index: 1001 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
}

[dir="rtl"] .video-modal-content .modal-close {
  right: auto !important;
  left: -20px !important;
}

.video-modal-content .modal-close:hover {
  transform: scale(1.1) rotate(90deg) !important;
  background: #b8962d !important;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* تحسينات الموبايل */
@media (max-width: 768px) {
  .btn-play-video {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }

  .video-modal-content .modal-close {
    width: 40px !important;
    height: 40px !important;
    top: -15px !important;
    right: -10px !important;
    font-size: 20px !important;
  }

  [dir="rtl"] .video-modal-content .modal-close {
    left: -10px !important;
    right: auto !important;
  }
}