/* ===================================================
   SA Services - Stylesheet
   Mobile-first, RTL, SEO-friendly, performance-optimized
   =================================================== */

:root {
  --primary: #0f5132;
  --primary-dark: #0a3a23;
  --primary-light: #198754;
  --accent: #d4a017;
  --accent-light: #f0c14b;
  --bg: #ffffff;
  --bg-soft: #f7f9f8;
  --bg-muted: #eef2f0;
  --text: #1c2e26;
  --text-soft: #5a6b63;
  --text-mute: #8a958f;
  --border: #e2e8e4;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(15, 81, 50, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 81, 50, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; width: 100%; max-width: 100%; }

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--primary-light); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }
ul, ol { padding-right: 1.5rem; margin-bottom: 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: inline-flex; } }

/* ===== Top Bar ===== */
.top-bar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.5rem 0;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top-bar-contact { display: flex; gap: 1rem; flex-wrap: wrap; }
.top-link { color: rgba(255,255,255,0.9); display: inline-flex; align-items: center; gap: 0.4rem; }
.top-link:hover { color: var(--accent-light); }
.btn-whatsapp-sm {
  background: #0c8043; color: #fff !important; padding: 0.3rem 0.75rem;
  border-radius: 6px; display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600;
}
.btn-whatsapp-sm:hover { background: #0a6e38; }

/* ===== Header ===== */
.site-header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 1000;
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}
.site-logo { display: flex; align-items: center; }
.site-logo img { max-height: 64px; width: auto; }
.logo-text { display: flex; align-items: center; gap: 0.65rem; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-weight: 900; font-family: 'Cairo', sans-serif;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 81, 50, 0.3);
}
.logo-name {
  font-family: 'Cairo', sans-serif; font-weight: 700;
  color: var(--text); font-size: 1rem; line-height: 1.2;
  max-width: 200px;
}

/* Nav */
.main-nav { display: none; }
.main-nav ul { list-style: none; display: flex; gap: 0.25rem; padding: 0; margin: 0; }
.main-nav a {
  display: inline-block;
  padding: 0.6rem 1rem;
  color: var(--text);
  font-weight: 500;
  border-radius: 8px;
  position: relative;
}
.main-nav a:hover, .main-nav a.active { background: var(--bg-soft); color: var(--primary); }
.main-nav .has-submenu { position: relative; }
.main-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  min-width: 200px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  flex-direction: column;
  gap: 0;
  list-style: none;
  border: 1px solid var(--border);
}
.main-nav .has-submenu:hover .submenu { display: flex; }
.main-nav .submenu a { padding: 0.5rem 0.75rem; }

/* Services dropdown (opens downward) */
.main-nav .has-dropdown { position: relative; }
.main-nav .dropdown-toggle { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.main-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  min-width: 230px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  list-style: none;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  z-index: 120;
  animation: dropIn .18s ease;
}
@keyframes dropIn { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }
.main-nav .has-dropdown.open .dropdown-menu { display: block; }
.main-nav .has-dropdown.open > .dropdown-toggle svg { transform: rotate(180deg); }
.main-nav .dropdown-toggle svg { transition: transform .2s; }
.main-nav .dropdown-menu li { display: block; }
.main-nav .dropdown-menu a {
  display: block; padding: 0.65rem 0.9rem; border-radius: 8px;
  white-space: nowrap; font-weight: 600; color: var(--text);
  transition: background .15s, color .15s, padding .15s;
}
.main-nav .dropdown-menu a:hover { background: var(--bg-soft); color: var(--primary); padding-inline-start: 1.2rem; }

.header-actions { display: flex; gap: 0.5rem; align-items: center; }
.btn-call {
  background: var(--primary); color: #fff !important;
  padding: 0.55rem 1rem; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 500;
}
.btn-call:hover { background: var(--primary-dark); }

.nav-toggle {
  display: flex; flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 22px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span {
  display: block; height: 3px; background: var(--primary);
  border-radius: 2px; transition: transform .3s var(--ease), opacity .2s;
}
.nav-close { display: none; }

@media (min-width: 992px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
}

@media (max-width: 991px) {
  .main-nav {
    position: fixed; top: 0; right: 0;
    width: 280px; max-width: 85vw; height: 100vh;
    background: #fff;
    padding: 1.5rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    z-index: 200;
    display: none;
    overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.25rem; margin-top: 2.5rem; }
  .main-nav .submenu { position: static; box-shadow: none; padding: 0 0 0 1rem; border: none; }
  .main-nav .dropdown-menu {
    position: static; box-shadow: none; border: none; padding: 0 0 0 1rem;
    min-width: 0; animation: none; display: none;
  }
  .main-nav .has-dropdown.open .dropdown-menu { display: block; }
  .main-nav .has-dropdown:hover .dropdown-menu { display: none; }
  .main-nav .has-dropdown.open .dropdown-menu { display: block; }
  .main-nav .has-submenu:hover .submenu { display: flex; }
  .nav-close {
    display: block; position: absolute; top: 1rem; left: 1rem;
    background: none; border: none; font-size: 2rem; cursor: pointer;
    color: var(--text);
  }
}

.nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 900; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.nav-overlay.active { opacity: 1; pointer-events: auto; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 5rem 1rem 4rem;
  background:
    radial-gradient(circle at 20% 80%, rgba(212, 160, 23, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(25, 135, 84, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, #f0faf3 0%, #e9f4ed 100%);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 81, 50, 0.07) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}
.hero-content { position: relative; text-align: center; max-width: 900px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(15, 81, 50, 0.1);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--text-soft); margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1rem; font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all .25s var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px rgba(15, 81, 50, 0.3);
}
.btn-primary:hover {
  background: var(--primary-dark); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 81, 50, 0.4);
}
.btn-outline {
  background: transparent; border-color: var(--primary); color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(212, 160, 23, 0.35);
}
.btn-accent:hover { background: #b88a13; color: #fff; }

/* ===== Section ===== */
.section { padding: 4rem 0; }
.section-soft { background: var(--bg-soft); }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem; font-weight: 700;
  color: #7d5d0d; letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-title { margin-bottom: 0.75rem; }
.section-subtitle { color: var(--text-soft); font-size: 1.05rem; }

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; right: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 70px; height: 70px;
  background: linear-gradient(135deg, rgba(15, 81, 50, 0.1), rgba(25, 135, 84, 0.15));
  border-radius: 18px;
  color: var(--primary);
  margin-bottom: 1.25rem;
}
.service-card h3 { margin-bottom: 0.75rem; }
.service-card p { color: var(--text-soft); }
.service-card .service-link {
  display: inline-block; margin-top: 1rem;
  font-weight: 600; color: var(--primary);
}
.service-card .service-link::after { content: ' ←'; transition: transform .2s; display: inline-block; }
.service-card:hover .service-link::after { transform: translateX(-3px); }

/* ===== Articles Grid ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.article-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.article-card-image {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.article-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.article-card:hover .article-card-image img { transform: scale(1.05); }
.article-card-image-fallback {
  font-family: 'Cairo', sans-serif;
  color: rgba(255,255,255,0.6);
  font-size: 3rem;
  font-weight: 900;
}
.article-card-image-fallback::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0, transparent 20px, rgba(255,255,255,0.05) 20px, rgba(255,255,255,0.05) 40px);
}
.article-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.article-card-cat {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.article-card-title {
  font-size: 1.1rem; line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-title a { color: var(--text); }
.article-card-title a:hover { color: var(--primary); }
.article-card-excerpt {
  color: var(--text-soft); font-size: 0.9rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}
.article-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-mute);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg-muted);
}

/* ===== Single article ===== */
.article-hero {
  background: linear-gradient(135deg, #e9f4ed 0%, #f7f9f8 100%);
  padding: 3rem 1rem 2.5rem;
}
.article-hero-inner { max-width: 800px; margin: 0 auto; }
.breadcrumb {
  font-size: 0.85rem; color: var(--text-soft);
  margin-bottom: 1rem; list-style: none; padding: 0;
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.breadcrumb li:not(:last-child)::after { content: '/'; margin-right: 0.5rem; color: var(--text-mute); }
.article-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  margin-bottom: 1rem;
}
.article-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-size: 0.9rem; color: var(--text-soft);
}
.article-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }

.article-body {
  max-width: 800px; margin: 0 auto;
  padding: 3rem 1rem;
  font-size: 1.075rem;
  line-height: 1.85;
}
.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-right: 1rem;
  border-right: 4px solid var(--accent);
  color: var(--primary-dark);
}
.article-body h3 { margin-top: 2rem; margin-bottom: 0.75rem; color: var(--primary); }
.article-body p { margin-bottom: 1.25rem; color: var(--text); }
.article-body ul, .article-body ol { margin-bottom: 1.5rem; padding-right: 1.75rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body img { border-radius: var(--radius); margin: 1.5rem 0; box-shadow: var(--shadow); }
.article-body a { color: var(--primary); text-decoration: underline; }

/* صفحة المقالة: صورة علوية + تخطيط بشريط جانبي */
.article-featured {
  width: 100%; aspect-ratio: 1200 / 630; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.75rem;
}
.article-wrap { padding: 2.5rem 1rem 1rem; }
.articles-layout > .article-body { max-width: none; margin: 0; padding: 0; }
.sidebar-latest { display: flex; flex-direction: column; gap: .8rem; }
.sidebar-latest a { display: flex; gap: .65rem; align-items: center; color: var(--text); font-size: .9rem; font-weight: 500; line-height: 1.45; }
.sidebar-latest img { width: 72px; height: 52px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sidebar-latest a:hover { color: var(--primary); }

/* الأسئلة الشائعة (FAQ) */
.faq-list { display: flex; flex-direction: column; gap: .7rem; margin-top: .5rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 700; color: var(--primary); list-style: none; position: relative; padding-inline-end: 2.2rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 1.1rem 1rem; margin: 0; color: var(--text-soft); line-height: 1.9; }

/* صندوق الكاتب (E-E-A-T) */
.author-box { display: flex; gap: 1rem; align-items: flex-start; margin-top: 2rem; padding: 1.25rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.author-box-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #fff; border: 1px solid var(--border); }
.author-box-info { line-height: 1.7; }
.author-box-label { font-size: .8rem; color: var(--text-mute); }
.author-box-info strong { display: block; color: var(--primary); font-size: 1.05rem; margin-bottom: .25rem; }
.author-box-info p { margin: 0; color: var(--text-soft); font-size: .92rem; }
@media (min-width: 992px){ .article-wrap .articles-sidebar { position: sticky; top: 88px; align-self: start; } }

.article-tags {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.article-tag {
  background: var(--bg-muted); color: var(--text-soft);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* ===== Floating side socials ===== */
.social-side {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 90;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  overflow: hidden;
}
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  color: var(--icon-color, var(--primary));
  background: #fff;
  border: none;
  transition: all .2s var(--ease);
  position: relative;
}
.social-icon:hover {
  background: var(--icon-color, var(--primary));
  color: #fff;
  transform: translateX(4px);
}
.social-icon + .social-icon { border-top: 1px solid var(--border); }

@media (max-width: 767px) {
  .social-side {
    top: auto; bottom: 80px;
    left: 12px;
    transform: none;
    flex-direction: column;
    border-radius: 999px;
    padding: 4px;
  }
  .social-icon { width: 38px; height: 38px; border-radius: 999px; }
  .social-icon + .social-icon { border-top: none; margin-top: 4px; }
}

/* ===== WhatsApp Floating ===== */
.whatsapp-float {
  position: fixed; bottom: 20px; right: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  z-index: 95;
}
.whatsapp-float::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: #25D366; z-index: -1;
  animation: pulse 2.4s infinite; will-change: transform, opacity;
}
.whatsapp-float:hover { transform: scale(1.07); }
@keyframes pulse {
  0% { transform: scale(1); opacity: .55; }
  70%, 100% { transform: scale(1.9); opacity: 0; }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 4rem 0 0;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
}
.footer-title {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.footer-title::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.footer-col p { color: rgba(255,255,255,0.92); font-size: 0.95rem; }
.footer-links, .footer-contact { list-style: none; padding: 0; }
.footer-links li, .footer-contact li { margin-bottom: 0.5rem; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,0.92); }
.footer-links a:hover, .footer-contact a:hover { color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.88);
}

/* ===== Pagination ===== */
.pagination {
  display: flex; gap: 0.5rem; justify-content: center;
  list-style: none; padding: 2rem 0; margin: 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 0.75rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}
.pagination a:hover { background: var(--bg-soft); border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.95rem; }
.form-control {
  width: 100%; padding: 0.7rem 0.9rem;
  font-family: inherit; font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.alert-success { background: #d4edda; color: #155724; border-right: 4px solid #28a745; }
.alert-error   { background: #f8d7da; color: #721c24; border-right: 4px solid #dc3545; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-right: 4px solid #17a2b8; }

/* ===== About / Contact ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 3.5rem 1rem;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 0.75rem; }
.page-hero p { color: rgba(255,255,255,0.9); max-width: 700px; margin: 0 auto; }
.page-content {
  max-width: 900px; margin: 3rem auto; padding: 0 1rem;
  font-size: 1.05rem; line-height: 1.85;
}
.page-content h2 { margin: 2rem 0 1rem; color: var(--primary); }
.page-content h3 { margin: 1.5rem 0 0.75rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1000px; margin: 3rem auto; padding: 0 1rem;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1.5fr; }
}
.contact-info {
  background: var(--bg-soft);
  padding: 2rem;
  border-radius: var(--radius);
}
.contact-info-item {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-bottom: 1.5rem;
}
.contact-info-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ===== Admin ===== */
.admin-body { background: #f0f3f5; min-height: 100vh; }
.admin-login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.login-card {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 420px; width: 100%;
}
.login-card h1 { text-align: center; margin-bottom: 1.5rem; color: var(--primary); }

/* ===== Admin layout (WordPress-style, mobile-first) ===== */
.admin-body { background: #eef1f3; }
.admin-layout { min-height: 100vh; }

/* Sidebar (fixed, RTL right) */
.admin-sidebar {
  position: fixed; top: 0; right: 0; width: 250px; max-width: 86vw; height: 100vh;
  display: flex; flex-direction: column; overflow-y: auto;
  background: linear-gradient(180deg, #0b3a25 0%, #0f5132 55%, #0b3a25 100%);
  color: #fff; z-index: 1000;
  transform: translateX(100%); transition: transform .28s ease;
  box-shadow: -8px 0 30px rgba(0,0,0,.28);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.admin-sidebar.open { transform: translateX(0); }
.admin-sidebar-logo {
  position: sticky; top: 0; z-index: 2;
  padding: 1.1rem 1.5rem; font-weight: 700; font-size: 1.05rem;
  font-family: 'Cairo', sans-serif;
  background: rgba(0,0,0,.18); border-bottom: 1px solid rgba(212,160,23,.4);
}
.admin-sidebar-logo a { color: #fff; display: flex; align-items: center; gap: .5rem; }
.admin-sidebar-close {
  position: absolute; top: .8rem; left: 1rem; background: none; border: none;
  color: rgba(255,255,255,.85); font-size: 1.7rem; cursor: pointer; line-height: 1;
}
.admin-menu { list-style: none; padding: .4rem 0 2rem; margin: 0; flex: 1; }
.admin-menu a {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem 1.5rem; color: rgba(255,255,255,.82); font-size: .95rem;
  transition: background .18s, color .18s, border-color .18s;
  border-right: 3px solid transparent;
}
.admin-menu a svg { opacity: .82; flex-shrink: 0; }
.admin-menu a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-menu a.active {
  background: linear-gradient(90deg, rgba(212,160,23,.22), rgba(212,160,23,.04));
  color: #fff; border-right-color: var(--accent); font-weight: 700;
}
.admin-menu a.active svg { opacity: 1; color: var(--accent); }

/* Mobile topbar */
.admin-topbar {
  position: sticky; top: 0; z-index: 150; display: flex; align-items: center; gap: .75rem;
  background: linear-gradient(90deg, #0b3a25, #0f5132); color: #fff;
  padding: .65rem 1rem; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.admin-burger {
  background: rgba(255,255,255,.12); border: none; color: #fff; cursor: pointer;
  display: inline-flex; padding: 6px; border-radius: 8px;
}
.admin-topbar-title { font-weight: 700; font-family: 'Cairo', sans-serif; font-size: 1.05rem; }

/* Overlay */
.admin-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 990;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.admin-overlay.show { opacity: 1; visibility: visible; }

/* Main content */
.admin-main { padding: 1.1rem; min-height: 100vh; }
.admin-header {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: #fff; padding: .95rem 1.35rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 1.35rem; border: 1px solid var(--border);
}
.admin-header h1, .admin-title { font-size: 1.3rem; margin: 0; color: var(--primary); font-family: 'Cairo', sans-serif; }
.admin-user { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--text-mute); }
.admin-user .avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.admin-card {
  background: #fff; padding: 1.5rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 1.35rem; border: 1px solid var(--border);
}
.admin-card > h2:first-child, .admin-card > h3:first-child { margin-top: 0; color: var(--primary); }

/* Desktop */
@media (min-width: 992px) {
  .admin-sidebar { transform: none; box-shadow: -1px 0 0 rgba(0,0,0,.06); }
  .admin-main { margin-right: 250px; padding: 1.75rem 2rem; }
  .admin-topbar, .admin-overlay, .admin-sidebar-close { display: none !important; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: #fff;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
  transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--primary); font-family: 'Cairo', sans-serif; }
.stat-card-label { color: var(--text-soft); font-size: 0.9rem; }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
table.admin-table th, table.admin-table td {
  padding: 0.85rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
table.admin-table th { background: var(--bg-soft); font-weight: 700; }
table.admin-table tr:last-child td { border-bottom: none; }
.badge { padding: 0.25rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warn { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.875rem; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }

.setting-group {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.setting-group h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 0; }

.switch { position: relative; display: inline-block; width: 50px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #ccc; transition: .3s; border-radius: 26px;
}
.switch-slider::before {
  position: absolute; content: ""; height: 20px; width: 20px;
  right: 3px; top: 3px; background: white; transition: .3s; border-radius: 50%;
}
.switch input:checked + .switch-slider { background-color: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(-24px); }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeIn .6s var(--ease) both; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* ===== Performance helpers ===== */
img[loading="lazy"] { background: var(--bg-muted); }
.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-soft) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============ Hero Slider ============ */
.hero-slider { position: relative; overflow: hidden; min-height: 460px; }
.hero-slide {
  display: none; min-height: 460px; align-items: center;
  padding: 4rem 0; position: relative;
  background: linear-gradient(135deg, #0f5132 0%, #0a3a23 100%);
}
.hero-slide.active { display: flex; animation: slideFade .8s ease; }
@keyframes slideFade { from { opacity:.3; } to { opacity:1; } }
.hero-slide.slide-bg-1 { background: linear-gradient(135deg, #0f5132, #0a3a23); }
.hero-slide.slide-bg-2 { background: linear-gradient(135deg, #1e3a5f, #0f2340); }
.hero-slide.slide-bg-3 { background: linear-gradient(135deg, #14543a, #0d3325); }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(212,160,23,.18), transparent 45%);
  pointer-events: none;
}
.hero-slide .hero-content { position: relative; z-index: 2; color: #fff; text-align: center; }
.hero-slide h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); margin: 1rem 0; line-height: 1.3; }
.hero-slide p { color: rgba(255,255,255,.9); font-size: clamp(1rem,2vw,1.25rem); max-width: 640px; margin: 0 auto 1.5rem; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color:#fff; border:none;
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; cursor: pointer;
  z-index: 3; transition: background .2s; backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--gold, #d4a017); }
.hero-prev { right: 16px; } .hero-next { left: 16px; }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.hero-dot {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; cursor: pointer;
  padding: 0; position: relative; display: inline-flex; align-items: center; justify-content: center;
}
.hero-dot::after {
  content: ''; width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,.45); transition: all .2s;
}
.hero-dot.active::after { background: var(--gold, #d4a017); width: 28px; border-radius: 6px; }
.btn-light { background: #fff; color: var(--primary); border: none; }
.btn-light:hover { background: var(--gold, #d4a017); color: #fff; }

/* ============ Reviews ============ */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }
.review-card {
  background: #fff; border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s; position: relative;
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.review-stars { color: var(--gold, #d4a017); font-size: 1.1rem; letter-spacing: 2px; margin-bottom: .75rem; }
.review-stars-empty { color: #e0e0e0; }
.review-text { color: var(--text-soft); line-height: 1.9; margin-bottom: 1.25rem; }
.review-author { display: flex; align-items: center; gap: .75rem; }
.review-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #0a3a23);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem;
}
.review-author strong { display: block; color: var(--text); }
.review-author small { color: var(--text-mute); }

/* ============ Articles sidebar (latest) ============ */
.articles-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 992px) { .articles-layout { grid-template-columns: 1fr 320px; } }
.sidebar-widget { background: #fff; border:1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.sidebar-widget h3 { font-size: 1.1rem; margin-bottom: 1rem; padding-bottom: .65rem; border-bottom: 2px solid var(--gold, #d4a017); color: var(--primary); }
.latest-item { display: flex; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.latest-item:last-child { border-bottom: none; }
.latest-thumb { width: 64px; height: 50px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.latest-item a { color: var(--text); font-weight: 600; font-size: .92rem; line-height: 1.5; }
.latest-item a:hover { color: var(--primary); }

/* ============ Prev / Next ============ */
.article-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 2.5rem 0; flex-wrap: wrap; }
.article-nav a {
  flex: 1; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; transition: all .2s; display: block;
}
.article-nav a:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.article-nav small { color: var(--text-mute); display: block; margin-bottom: .35rem; }
.article-nav strong { color: var(--text); font-size: .98rem; }
.article-nav .nav-next { text-align: left; }
.article-nav .nav-prev { text-align: right; }

/* ============ Article internal links + FAQ ============ */
.article-body .related-links { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.article-body .related-links li a {
  display: block; background: var(--bg-soft, #f4f7f5); border-right: 4px solid var(--gold, #d4a017);
  padding: .85rem 1.1rem; border-radius: 8px; color: var(--primary); font-weight: 600; transition: all .2s;
}
.article-body .related-links li a:hover { background: #eef4f0; transform: translateX(-4px); }
.article-body h3 { margin: 1.4rem 0 .5rem; color: var(--primary); font-size: 1.15rem; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body a:hover { color: var(--gold, #d4a017); }

/* ============ Latest articles vertical list ============ */
.latest-list {
  display: grid; grid-template-columns: 1fr; gap: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); max-width: 900px; margin: 0 auto;
}
@media (min-width: 768px) { .latest-list { grid-template-columns: 1fr 1fr; } }
.latest-list-item {
  display: flex; align-items: center; gap: .65rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: 600; transition: all .18s; font-size: .98rem;
}
.latest-list-item svg { color: var(--gold, #d4a017); flex-shrink: 0; }
.latest-list-item:hover { background: var(--bg-soft, #f4f7f5); color: var(--primary); padding-right: 1.6rem; }
.latest-list-item span { line-height: 1.5; }
@media (min-width: 768px) {
  .latest-list-item:nth-child(odd) { border-left: 1px solid var(--border); }
}

/* ============ Trust bar ============ */
.trust-bar { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); padding: 2.5rem 0; }
.trust-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4,1fr); } }
.trust-item { text-align: center; color: #fff; }
.trust-num { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; color: var(--gold, #d4a017); line-height: 1; }
.trust-label { margin-top: .4rem; font-size: .95rem; color: rgba(255,255,255,.92); }

/* ============ Gallery ============ */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1.25rem; }
.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background:#fff; position: relative; }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption { padding: .85rem 1rem; }
.gallery-item figcaption strong { display: block; color: var(--text); }
.gallery-item figcaption span { display: block; color: var(--text-mute); font-size: .85rem; margin-top: .2rem; }

/* ============ Quote form ============ */
.quote-section { background: var(--bg-soft, #f4f7f5); }
.quote-form-wrap { background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.quote-form .form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 600px) { .quote-form .form-row { grid-template-columns: 1fr 1fr; } }
.quote-form .form-group { margin-bottom: 1rem; }
.quote-success { text-align: center; background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 1.5rem; box-shadow: var(--shadow); }
.quote-success h2 { color: var(--primary); margin: .5rem 0; }

/* ============ Page hero (inner pages) ============ */
.page-hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color:#fff; padding: 3rem 0; text-align: center; }
.page-hero h1 { color:#fff; margin-bottom: .5rem; }
.page-hero p { color: rgba(255,255,255,.9); }

/* ============ Admin: collapsible settings + nav sections ============ */
details.set-group { border:1px solid var(--border); border-radius: 10px; margin-bottom: 1rem; background:#fff; overflow: hidden; }
details.set-group > summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; color: var(--primary); list-style: none; display:flex; justify-content:space-between; align-items:center; background: var(--bg-soft,#f4f7f5); }
details.set-group > summary::-webkit-details-marker { display:none; }
details.set-group > summary::after { content: '▾'; transition: transform .2s; }
details.set-group[open] > summary::after { transform: rotate(180deg); }
details.set-group .set-group-body { padding: 1.25rem; }
.admin-nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.45); padding: 1rem 1.25rem .35rem; font-weight: 700; }

/* ============================================================
   MOBILE HARDENING — الصفحة الرئيسية + كل صفحات لوحة التحكم
   ============================================================ */
@media (max-width: 600px) {
  .section { padding: 2.5rem 0; }
  .section-header { margin-bottom: 2rem; }
  .section-title { font-size: 1.4rem; }
  .section-subtitle { font-size: .98rem; }
  .container { padding: 0 1rem; }
  /* الهيرو */
  .hero-slider, .hero-slide { min-height: 420px; }
  .hero-slide h1 { font-size: 1.6rem; }
  .hero-badge { font-size: .8rem; }
  .hero-cta { flex-direction: column; gap: .6rem; width: 100%; }
  .hero-cta .btn { width: 100%; }
  .hero-arrow { width: 34px; height: 34px; }
  /* الشبكات تصبح عمود واحد */
  .services-grid, .articles-grid, .reviews-grid, .gallery-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .service-card { padding: 1.5rem 1.25rem; }
  /* النموذج */
  .quote-form .form-row { grid-template-columns: 1fr; }
  .quote-form-wrap { padding: 1.25rem; }
  /* منع أي تجاوز أفقي */
  img, table, pre, iframe { max-width: 100%; }
}
@media (max-width: 991px) {
  /* كل صفحات لوحة التحكم على الجوال */
  .admin-main { padding: 1rem; }
  .admin-card { overflow-x: auto; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .admin-header h1, .admin-title { font-size: 1.25rem; }
  .admin-main .form-row,
  .admin-main [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .admin-table th, .admin-table td { white-space: nowrap; }
  .admin-card .btn, .admin-card .btn-sm { margin-bottom: .25rem; }
  .set-group-body { padding: 1rem; }
  .stat-cards, .dashboard-stats { grid-template-columns: 1fr 1fr !important; }
}

/* روابط داخلية تلقائية داخل المقال */
.article-body a.auto-link { color: var(--primary-light); border-bottom: 1px dashed var(--primary-light); font-weight: 600; }
.article-body a.auto-link:hover { color: var(--primary); border-bottom-style: solid; }

/* ============================================================
   إصلاح شامل للصفحة الرئيسية على الهاتف (حتى 768px)
   ============================================================ */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  /* الشريط العلوي */
  .top-bar { font-size: .78rem; }
  .top-bar-inner { flex-wrap: wrap; gap: .25rem .75rem; padding-top: .35rem; padding-bottom: .35rem; }
  .top-bar-contact { gap: .5rem; min-width: 0; }
  .top-link { font-size: .78rem; }
  /* الترويسة */
  .header-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .6rem; padding-bottom: .6rem; }
  .site-logo img { max-height: 52px; width: auto; }
  .logo-mark { width: 34px; height: 34px; font-size: .85rem; }
  .logo-name { font-size: .95rem; line-height: 1.25; }
  .header-actions { gap: .4rem; }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: none; padding: 6px; cursor: pointer; }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--primary); border-radius: 2px; }
  /* الهيرو */
  .hero-slider, .hero-slide { min-height: 400px; }
  .hero-slide { padding: 2.5rem 0; }
  .hero-slide .hero-content { padding: 0 1rem; }
  .hero-slide h1 { font-size: 1.55rem; }
  .hero-slide p { font-size: 1rem; }
  .hero-cta { display: flex; flex-direction: column; gap: .6rem; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-arrow { width: 32px; height: 32px; font-size: 1.1rem; }
  .hero-prev { right: 6px; } .hero-next { left: 6px; }
  /* الأقسام والشبكات */
  .section { padding: 2.5rem 0; }
  .section-header { margin-bottom: 1.75rem; }
  .section-title { font-size: 1.45rem; }
  .services-grid, .articles-grid, .reviews-grid, .gallery-grid, .articles-layout { grid-template-columns: 1fr !important; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .latest-list { grid-template-columns: 1fr !important; }
  .quote-form .form-row { grid-template-columns: 1fr; }
  .quote-form-wrap { padding: 1.25rem; }
  /* منع أي عنصر من تجاوز عرض الشاشة */
  .container { padding-left: 1rem; padding-right: 1rem; }
  img, iframe, table, video, pre { max-width: 100% !important; height: auto; }
  /* العناصر العائمة لا تغطي المحتوى */
  .social-side { bottom: 88px; }
  .whatsapp-float { width: 50px; height: 50px; bottom: 16px; right: 16px; }
}

/* ===== Loading Skeleton ===== */
.skeleton { position: relative; overflow: hidden; background: #eceff1; border-radius: 8px; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  transform: translateX(-100%); animation: skel 1.3s infinite;
}
@keyframes skel { 100% { transform: translateX(100%); } }
.skeleton-text { height: 14px; margin: 8px 0; }
.skeleton-card { height: 180px; }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }

/* ===== Accessibility (WCAG) ===== */
.skip-link {
  position: absolute; right: 8px; top: -60px; z-index: 9999;
  background: var(--primary-dark, #0f5132); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 8px; transition: top .2s;
}
.skip-link:focus { top: 0; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #d4a017; outline-offset: 2px; border-radius: 4px;
}
/* تقليل إزاحة التخطيط (CLS): حجز مساحة الصور قبل تحميلها */
.service-card img, .article-card img, .gallery-item img, .post-thumb img {
  aspect-ratio: 16 / 10; object-fit: cover; width: 100%; height: auto;
}
