:root {
  --primary-color: #003366;
  --primary-dark: #002244;
  --secondary-color: #00a080;
  --secondary-light: #20d9a3;
  --neutral-light: #f8f9fa;
  --neutral-dark: #333333;
  --text-color: #2c3e50;
  --border-color: #e0e0e0;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  
  --font-family-ar: 'Cairo', 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  --font-family-en: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family: var(--font-family-ar);
  
  --transition: all 0.3s ease-out;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: 1.6;
  background-color: #ffffff;
  direction: rtl;
}

html[lang="en"] body {
  direction: ltr;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--secondary-light);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navigation */
header {
  background-color: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.logo img {
  height: 50px;
  margin-right: 1rem;
}

html[lang="en"] .logo img {
  margin-right: 0;
  margin-left: 1rem;
}

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

.nav-menu a {
  color: var(--text-color);
  font-weight: 500;
  transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--secondary-color);
}

.btn-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-weight: 600;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-required::after {
  content: ' *';
  color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(0, 160, 128, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--danger);
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #155724;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #721c24;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #856404;
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.1);
  border: 1px solid rgba(23, 162, 184, 0.3);
  color: #0c5460;
}

/* Cards */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-header {
  padding: 1.5rem;
  background-color: var(--neutral-light);
  border-bottom: 1px solid var(--border-color);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1.5rem;
  background-color: var(--neutral-light);
  border-top: 1px solid var(--border-color);
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
  font-size: 3.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn {
  margin-top: 1rem;
}

/* Section */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.125rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Service Cards */
.service-card {
  text-align: center;
}

.service-card-icon {
  width: 80px;
  height: 80px;
  background-color: var(--neutral-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2.5rem;
}

.service-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.service-card-price {
  font-size: 1.5rem;
  color: var(--secondary-color);
  font-weight: 700;
  margin: 1rem 0;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h5 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  padding: 0.5rem 0;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Loader */
.loader {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--neutral-light);
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .hero {
    padding: 3rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 1rem;
    background-color: white;
    padding: 2rem 1rem;
    box-shadow: var(--shadow);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .btn-menu-toggle {
    display: block;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Admin specific */
.admin-sidebar {
  background-color: var(--primary-color);
  color: white;
  min-height: 100vh;
  padding: 2rem 0;
  position: fixed;
  width: 250px;
  left: 0;
  top: 0;
  z-index: 1000;
  overflow-y: auto;
}

html[lang="en"] .admin-sidebar {
  left: auto;
  right: 0;
}

.admin-content {
  margin-right: 250px;
  padding: 2rem;
}

html[lang="en"] .admin-content {
  margin-right: 0;
  margin-left: 250px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu a {
  display: block;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background-color: rgba(0, 0, 0, 0.2);
  color: white;
}

.admin-header {
  background-color: white;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 2rem;
}

.stat-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 1rem 0;
}

.stat-label {
  color: #666;
  font-size: 0.875rem;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

th {
  background-color: var(--neutral-light);
  padding: 1rem;
  text-align: right;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

html[lang="en"] th {
  text-align: left;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

tr:hover {
  background-color: var(--neutral-light);
}

/* Pagination */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  list-style: none;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.pagination a:hover {
  background-color: var(--primary-color);
  color: white;
}

.pagination .active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Print */
@media print {
  body {
    background-color: white;
  }
  
  .no-print {
    display: none;
  }
}
