/* ========================================================
   متغيرات الهوية البصرية وإعدادات النظام الأساسية
======================================================== */
:root {
  --primary: #0b1329;
  --secondary: #1d4ed8;
  --accent: #0284c7;
  --cyan: #38bdf8;
  --bg-light: #f1f5f9;
  --white: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(11, 19, 41, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 19, 41, 0.1);
  --shadow-lg: 0 16px 36px rgba(11, 19, 41, 0.16);
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
  direction: rtl;
  text-align: right;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ========================================================
   شريط التحفيز العلوي الديناميكي (Urgency Bar)
======================================================== */
.urgency-bar {
  background: linear-gradient(90deg, var(--primary) 0%, #1e293b 100%);
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}
.urgency-bar a {
  background: rgba(251, 191, 36, 0.15);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  transition: var(--transition);
  font-size: 0.85rem;
}
.urgency-bar a:hover {
  background: #fbbf24;
  color: var(--primary);
}

/* ========================================================
   قسم الهيرو (Hero Section) مع طبقة تعتيم احترافية
======================================================== */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding: 4rem 1.25rem;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 19, 41, 0.88) 0%, rgba(11, 19, 41, 0.82) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--white);
}
.hero p {
  font-size: 1.15rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ========================================================
   الأزرار التفاعلية (CTA Buttons)
======================================================== */
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.btn-primary {
  background: var(--secondary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}
.btn-call {
  background: var(--accent);
  color: var(--white);
}
.btn-call:hover {
  background: #0369a1;
  transform: translateY(-2px);
}
.btn-whatsapp {
  background: #25d366;
  color: var(--white);
}
.btn-whatsapp:hover {
  background: #1eb855;
  transform: translateY(-2px);
}

/* ========================================================
   شريط الثقة (Trust Bar)
======================================================== */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0;
  box-shadow: var(--shadow-sm);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.trust-item h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.trust-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ========================================================
   الأقسام والشبكات والكروت
======================================================== */
.section {
  padding: 4rem 0;
}
.section-title {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 2.5rem;
}
.section-title h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.section-title p {
  font-size: 1rem;
  color: var(--text-muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover img {
  transform: scale(1.03);
}
.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-content h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.card-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

/* ========================================================
   معرض الأعمال (Gallery Grid)
======================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #cbd5e1;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
}

/* ========================================================
   محرك تكبير الصور المدمج (Pure Vanilla Lightbox Modal)
======================================================== */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 41, 0.92);
  backdrop-filter: blur(5px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.lightbox-modal.active {
  display: flex;
}
.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  text-align: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: var(--white);
  margin-top: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.lightbox-close {
  position: absolute;
  top: -45px;
  left: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ========================================================
   جداول الأسعار وصندوق التنبيه الرسمي
======================================================== */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.price-table th, .price-table td {
  padding: 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.price-table th {
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
}
.price-table tr:hover {
  background: #f8fafc;
}
.official-alert-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-right: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
}

/* ========================================================
   نموذج جمع الطلبات التفاعلي السريع (.ajax-lead-form)
======================================================== */
.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}
.ajax-lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-full {
  grid-column: 1 / -1;
}
.form-group label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background: #f8fafc;
  color: var(--text-dark);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

/* ========================================================
   الأزرار العائمة الثابتة وزر الصعود
======================================================== */
.custom-floating-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99990;
}
.custom-float-btn {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  font-size: 1.55rem;
  text-decoration: none;
  animation: pulseShake 4s infinite ease-in-out;
}
.custom-float-wa {
  background: #25d366;
}
.custom-float-call {
  background: var(--accent);
  animation-delay: 2s;
}
.custom-scroll-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99990;
  border: 1px solid #334155;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

@keyframes pulseShake {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
  60% { transform: scale(1.08) rotate(-4deg); }
  70% { transform: scale(1.08) rotate(4deg); }
  80% { transform: scale(1); }
}

/* ========================================================
   استجابة الشاشات الصغيرة (Mobile Responsiveness)
======================================================== */
@media (max-width: 768px) {
  .hero {
    min-height: 460px;
    padding: 3rem 1rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .ajax-lead-form {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 2.75rem 0;
  }
}
