:root {
  --primary: #c0392b;
  --primary-dark: #a93226;
  --primary-light: #e74c3c;
  --secondary: #2c3e50;
  --accent: #f39c12;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-card: #ffffff;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --text-muted: #95a5a6;
  --border: #e9ecef;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --navbar-bg: rgba(255,255,255,0.95);
  --footer-bg: #1a252f;
  --footer-text: #b0bec5;
  --gradient-1: linear-gradient(135deg, #c0392b, #e74c3c);
  --gradient-2: linear-gradient(135deg, #2c3e50, #34495e);
  --font-arabic: 'Cairo', sans-serif;
  --font-english: 'Poppins', sans-serif;
}

[data-theme="dark"] {
  --primary: #e74c3c;
  --primary-dark: #c0392b;
  --primary-light: #f1948a;
  --secondary: #ecf0f1;
  --accent: #f1c40f;
  --bg: #0f1923;
  --bg-alt: #1a2332;
  --bg-card: #1e2a3a;
  --text: #ecf0f1;
  --text-light: #b0bec5;
  --text-muted: #78909c;
  --border: #2a3a4a;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
  --navbar-bg: rgba(15,25,35,0.95);
  --footer-bg: #0a1118;
  --footer-text: #78909c;
  --gradient-1: linear-gradient(135deg, #e74c3c, #c0392b);
  --gradient-2: linear-gradient(135deg, #1a2332, #0f1923);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-english);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
  padding-top: 76px;
}

html[lang="ar"] body,
html[lang*="ar"] body {
  font-family: var(--font-arabic);
}

html[lang="ar"] .navbar-brand,
html[lang*="ar"] .navbar-brand,
html[lang="ar"] h1, html[lang*="ar"] h1,
html[lang="ar"] h2, html[lang*="ar"] h2,
html[lang="ar"] h3, html[lang*="ar"] h3,
html[lang="ar"] h4, html[lang*="ar"] h4,
html[lang="ar"] h5, html[lang*="ar"] h5,
html[lang="ar"] h6, html[lang*="ar"] h6 {
  font-family: var(--font-arabic);
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  transition: background 0.3s;
}

.navbar-brand {
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand i { font-size: 1.4rem; }

.nav-link {
  font-weight: 500;
  color: var(--text) !important;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: all 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.3s;
  border-radius: 2px;
}

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

.nav-link:hover { color: var(--primary) !important; }

.nav-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
  margin: 0 8px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1rem;
}

.btn-icon:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: rotate(15deg);
}

.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
}

.dropdown-item {
  color: var(--text);
  padding: 8px 16px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.dropdown-item:hover { background: var(--bg-alt); color: var(--primary); }
.dropdown-item.active { background: var(--bg-alt); color: var(--primary); }

/* ===== HERO ===== */
.hero-section {
  min-height: calc(100vh - 76px);
  position: relative;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
}

.shape-1 {
  width: 600px; height: 600px;
  background: var(--primary);
  top: -200px; right: -200px;
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  width: 400px; height: 400px;
  background: var(--accent);
  bottom: -100px; left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 250px; height: 250px;
  background: var(--primary-light);
  bottom: 30%; right: 10%;
  animation: float 6s ease-in-out infinite 2s;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--gradient-1);
  color: #fff;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(192,57,43,0.3);
}

.hero-badge i { font-size: 0.75rem; }

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== HERO IMAGE ===== */
.hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-main {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  color: #fff;
  box-shadow: 0 20px 60px rgba(192,57,43,0.3);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  animation: floatCard 5s ease-in-out infinite;
}

.floating-card i { font-size: 1.2rem; color: var(--primary); }

.card-1 { top: 20px; right: 20px; animation-delay: 0s; }
.card-2 { bottom: 30px; left: 20px; animation-delay: 2s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 12px 28px;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 15px rgba(192,57,43,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(192,57,43,0.4);
  color: #fff;
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-badge {
  display: inline-block;
  padding: 6px 18px;
  background: var(--bg-alt);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
}

/* ===== SERVICES ===== */
.services-section { padding: 100px 0; background: var(--bg-alt); }

.service-card {
  background: var(--bg-card);
  padding: 36px 28px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.4s;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
  color: #fff;
}

.service-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0;
}

/* ===== STATS ===== */
.stats-section { padding: 80px 0; background: var(--gradient-2); }

.stat-item {
  text-align: center;
  color: #fff;
  padding: 20px;
}

.stat-item i {
  font-size: 2.2rem;
  margin-bottom: 16px;
  opacity: 0.8;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.8;
  font-weight: 500;
}

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: var(--primary);
  opacity: 0.03;
  border-radius: 50%;
}

.page-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-hero p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== ABOUT ===== */
.about-section { padding: 100px 0; }

.about-image-wrapper {
  position: relative;
}

.about-image-main {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.about-image-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
}

.about-image-card i {
  font-size: 2rem;
  color: var(--accent);
}

.about-image-card strong {
  display: block;
  font-size: 1.3rem;
  color: var(--text);
}

.about-image-card span {
  font-size: 0.85rem;
  color: var(--text-light);
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 32px;
}

.about-details { margin-bottom: 32px; }

.about-detail-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.about-detail-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
}

.about-detail-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.about-detail-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* ===== VALUES ===== */
.values-section { padding: 80px 0; background: var(--bg-alt); }

.value-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

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

.value-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.value-card h5 {
  font-weight: 700;
}

/* ===== WORKS ===== */
.works-section { padding: 80px 0; }

.work-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s;
  height: 100%;
}

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

.work-image-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.work-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.work-card:hover .work-image { transform: scale(1.1); }

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
}

.work-card:hover .work-overlay { opacity: 1; }

.work-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 14px;
  background: var(--gradient-1);
  color: #fff;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.work-info {
  padding: 20px;
}

.work-info h5 {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1rem;
}

.work-info p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

/* ===== CONTACT ===== */
.contact-section { padding: 80px 0; }

.contact-form-wrapper, .contact-info-wrapper {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  height: 100%;
}

.contact-form-wrapper h3, .contact-info-wrapper h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group label i { margin-left: 8px; color: var(--primary); }

.form-control {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
  background: var(--bg);
  color: var(--text);
}

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

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.contact-info-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
}

.contact-info-item h6 {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.contact-info-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* ===== LOCATION ===== */
.location-section { padding: 80px 0; }

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 450px;
}

#map { width: 100%; height: 100%; }

.location-info {
  background: var(--bg-card);
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  height: 100%;
}

.location-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.location-detail {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.location-detail i {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.location-detail h6 {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.location-detail p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

.location-note {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  margin-top: 24px;
}

.location-note i {
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.location-note p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 60px 0 0;
}

.footer h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer h5 i { color: var(--primary); }

.footer p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  transition: all 0.3s;
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.footer-links, .contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li, .contact-list li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.contact-list i {
  width: 16px;
  color: var(--primary);
}

.footer-bottom {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-title { font-size: 2.5rem; }
  .hero-section { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .page-hero h1 { font-size: 2rem; }
  .nav-divider { display: none; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .section-header h2 { font-size: 1.7rem; }
  .about-image-card { left: 10px; bottom: -10px; }
  .contact-form-wrapper, .contact-info-wrapper { padding: 24px; }
}

@media (max-width: 576px) {
  body { padding-top: 66px; }
  .hero-section { padding: 40px 0; }
  .hero-title { font-size: 1.7rem; }
  .page-hero { padding: 60px 0 40px; }
  .page-hero h1 { font-size: 1.6rem; }
  .services-section, .about-section, .works-section,
  .contact-section, .location-section { padding: 60px 0; }
  .stats-section .col-6:nth-child(n+3) { margin-top: 20px; }
}

/* ===== RTL OVERRIDES ===== */
[dir="rtl"] .nav-link::after {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

[dir="rtl"] .navbar-brand {
  margin-left: auto;
  margin-right: 0;
}

[dir="rtl"] .shape-1 {
  right: auto;
  left: -200px;
}

[dir="rtl"] .shape-2 {
  left: auto;
  right: -100px;
}

[dir="rtl"] .shape-3 {
  right: auto;
  left: 10%;
}

[dir="rtl"] .card-1 {
  right: auto;
  left: 20px;
}

[dir="rtl"] .card-2 {
  left: auto;
  right: 20px;
}

[dir="rtl"] .hero-subtitle {
  margin-left: 0;
  margin-right: 0;
}

[dir="rtl"] .about-image-card {
  left: auto;
  right: -20px;
}

[dir="rtl"] .about-image-card:hover {
  padding-right: 5px;
}

[dir="rtl"] .work-category {
  left: auto;
  right: 12px;
}

[dir="rtl"] .form-group label i {
  margin-left: 0;
  margin-right: 8px;
}

[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 5px;
}

[dir="rtl"] .contact-list li,
[dir="rtl"] .footer-links li {
  text-align: right;
}

[dir="rtl"] .page-hero::before {
  right: auto;
  left: -20%;
}

[dir="rtl"] .dropdown-menu {
  text-align: right;
}

[dir="rtl"] .location-note {
  text-align: right;
}

[dir="rtl"] .section-header {
  text-align: center;
}

[dir="rtl"] .hero-actions {
  justify-content: flex-start;
}

@media (max-width: 992px) {
  [dir="rtl"] .hero-actions { justify-content: center; }
  [dir="rtl"] .hero-subtitle { margin-right: auto; margin-left: auto; }
}

@media (max-width: 768px) {
  [dir="rtl"] .about-image-card { right: 10px; left: auto; }
}
