/* =========================================================
   المتغيرات العامة (الألوان، الخطوط، المسافات)
   ========================================================= */
:root {
  --navy-900: #0a1f2e;
  --navy-800: #0f2a3d;
  --navy-700: #163a52;
  --navy-600: #1f4d6b;
  --gold-500: #c8a24a;
  --gold-400: #d9b865;
  --gold-100: #f6eedb;
  --ivory:    #faf8f3;
  --white:    #ffffff;
  --ink:      #1b2733;
  --muted:    #5d6b78;
  --line:     #e6e1d6;
  --danger:   #c0392b;
  --success:  #1e8a5a;
  --wa:       #25d366;

  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(15, 42, 61, .06);
  --shadow:    0 12px 34px rgba(15, 42, 61, .10);
  --shadow-lg: 0 24px 60px rgba(15, 42, 61, .18);

  --font: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --line-height: 1.85;
  --nav-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* الخط والارتفاع للغات اللاتينية */
html[lang="it"],
html[lang="en"] {
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --line-height: 1.7;
}

/* =========================================================
   إعادة الضبط والأساسيات
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: var(--line-height);
  color: var(--ink);
  background: var(--ivory);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: opacity .3s ease;
}
.i18n-pending body { opacity: 0; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

::selection { background: var(--gold-400); color: var(--navy-900); }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =========================================================
   الأزرار
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .85rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
[dir="rtl"] .icon-send { transform: scaleX(-1); } /* اتجاه أيقونة الإرسال للعربية */

.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: 0 8px 22px rgba(200, 162, 74, .35);
}
/* لمعة خفيفة عند المرور */
.btn-primary::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: -60%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  transition: inset-inline-start .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(200, 162, 74, .45); }
.btn-primary:hover::after { inset-inline-start: 130%; }

.btn-ghost {
  border-color: rgba(255, 255, 255, .35);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }

.btn-block { width: 100%; }

/* =========================================================
   شريط التنقل
   ========================================================= */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), height .35s var(--ease);
}
.navbar.scrolled {
  background: rgba(10, 31, 46, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
  height: 66px;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* شعار Nova Creative (ملف images/logo-nova-creative.svg، دائماً من اليسار لليمين) */
.brand {
  display: inline-flex;
  align-items: center;
  direction: ltr;
  line-height: 0;
  flex-shrink: 0;
  border-radius: 10px;
}
.brand-logo {
  height: 44px;
  width: auto;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(200, 162, 74, .28), 0 6px 18px rgba(0, 0, 0, .25);
  transition: transform .4s var(--ease), height .35s var(--ease), box-shadow .4s var(--ease);
}
.brand:hover .brand-logo {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(200, 162, 74, .6), 0 10px 24px rgba(200, 162, 74, .25);
}
.navbar.scrolled .brand-logo { height: 40px; }

.nav-links {
  display: flex;
  gap: 1.8rem;
}
.nav-links a {
  position: relative;
  color: rgba(255, 255, 255, .78);
  font-weight: 500;
  padding-block: .4rem;
  white-space: nowrap;
  transition: color .25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  width: 0;
  height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
  transition: width .3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.nav-cta { padding: .6rem 1.4rem; font-size: .95rem; }

/* زر تغيير اللغة */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
}
.lang-switch button {
  min-width: 36px;
  height: 30px;
  padding-inline: .55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  font-family: "Inter", "Tajawal", sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.lang-switch button[lang="ar"] { font-family: "Tajawal", sans-serif; font-size: .95rem; }
.lang-switch button:hover { color: var(--white); }
.lang-switch button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   القسم الرئيسي (Hero)
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + 40px) 80px;
  background: radial-gradient(ellipse at 20% 0%, var(--navy-600) 0%, var(--navy-800) 45%, var(--navy-900) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .45;
}
.blob-1 {
  width: 420px; height: 420px;
  background: var(--gold-500);
  inset-block-start: -120px;
  inset-inline-end: -100px;
  opacity: .22;
  animation: drift 14s ease-in-out infinite alternate;
}
.blob-2 {
  width: 360px; height: 360px;
  background: #2f7bb0;
  inset-block-end: -120px;
  inset-inline-start: -80px;
  opacity: .3;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}
.pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 90%);
}
@keyframes drift {
  to { transform: translate(40px, 30px) scale(1.1); }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem 1rem;
  border-radius: 999px;
  background: rgba(200, 162, 74, .14);
  border: 1px solid rgba(200, 162, 74, .35);
  color: var(--gold-400);
  font-size: .92rem;
  font-weight: 500;
  margin-block-end: 1.4rem;
}
.eyebrow-mark { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; }

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  font-weight: 800;
  line-height: 1.35;
  margin-block-end: 1.3rem;
}
html[lang="it"] .hero h1,
html[lang="en"] .hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.highlight {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, .75);
  max-width: 34rem;
  margin-block-end: 2.2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* الصورة الشخصية */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
}
.avatar-ring {
  width: min(340px, 75vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  background: conic-gradient(from 180deg, var(--gold-500), transparent 40%, var(--gold-400) 70%, var(--gold-500));
  animation: spin 18s linear infinite;
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--navy-600), var(--navy-900));
  display: grid;
  place-items: center;
  animation: spin 18s linear infinite reverse;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* الصورة الشخصية داخل الدائرة */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 50%;
  transform: scale(1.12); /* يُخفي الإطار الذهبي المدمج في الصورة الأصلية */
}
/* حافة كحلية رفيعة وظل داخلي يفصل الصورة عن الإطار الذهبي */
.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px var(--navy-900), inset 0 0 30px rgba(0, 0, 0, .3);
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.floating-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .9rem 1.3rem;
  background: rgba(255, 255, 255, .95);
  color: var(--navy-800);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  line-height: 1.3;
  text-align: center;
  max-width: 170px;
  animation: float 5s ease-in-out infinite;
}
.floating-card strong { font-size: 1.6rem; font-weight: 800; color: var(--gold-500); }
.floating-card small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.card-a { inset-block-start: 12%; inset-inline-start: 0; }
.card-b { inset-block-end: 10%; inset-inline-end: 0; animation-delay: -2.5s; }
@keyframes float {
  50% { transform: translateY(-14px); }
}

.scroll-hint {
  position: absolute;
  inset-block-end: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 20px;
}
.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--gold-500);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { opacity: 0; transform: translateY(0); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* =========================================================
   عناصر الأقسام المشتركة
   ========================================================= */
.section { padding-block: 110px; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--gold-500);
  font-weight: 700;
  font-size: .95rem;
  margin-block-end: .8rem;
}
.section-tag::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section-tag.light { color: var(--gold-400); }

.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.4;
  color: var(--navy-800);
  margin-block-end: 1.2rem;
}
html[lang="it"] .section-title,
html[lang="en"] .section-title { line-height: 1.2; letter-spacing: -.015em; }

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}
.section-head .section-tag { justify-content: center; }
.section-sub { color: var(--muted); font-size: 1.1rem; }

/* شارة «مثال توضيحي» وملاحظة البيانات التجريبية */
.badge-demo {
  display: inline-flex;
  align-items: center;
  padding: .2rem .75rem;
  border-radius: 999px;
  background: rgba(10, 31, 46, .88);
  color: var(--gold-400);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.6;
  border: 1px solid rgba(200, 162, 74, .5);
  white-space: nowrap;
}
.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  max-width: 780px;
  margin: -1.5rem auto 2.4rem;
  padding: .85rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--gold-100);
  border: 1px dashed rgba(200, 162, 74, .7);
  color: var(--navy-800);
  font-size: .95rem;
  line-height: 1.6;
}
.demo-notice svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--gold-500); }

/* =========================================================
   من أنا
   ========================================================= */
.about { background: var(--ivory); }

.about-inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 4.5rem;
  align-items: center;
}

.about-image { position: relative; isolation: isolate; }
/* إطار ذهبي مزاح خلف الصورة لإحساس بالعمق */
.about-image::before {
  content: "";
  position: absolute;
  inset-block: 26px -18px;
  inset-inline: 26px -18px;
  border: 2px solid rgba(200, 162, 74, .55);
  border-radius: var(--radius-lg);
  z-index: -1;
}
/* صورة المؤسس: إطار كحلي سميك بخط ذهبي رفيع */
.image-frame {
  position: relative;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
  border: 1px solid rgba(200, 162, 74, .35);
  box-shadow: var(--shadow-lg);
}
.image-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(200, 162, 74, .6);
  border-radius: calc(var(--radius-lg) - 5px);
  pointer-events: none;
  z-index: 1;
}
.photo-clip {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 12px);
  background: var(--navy-900);
}
.about-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 875; /* نسبة الصورة نفسها: لا يُقصّ أي جزء منها */
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.about-image:hover .about-photo { transform: scale(1.04); }

.experience-badge {
  position: absolute;
  inset-block-end: -28px;
  inset-inline-end: -28px;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.1rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  line-height: 1.35;
}
.experience-badge strong { font-size: 2.6rem; font-weight: 800; color: var(--gold-500); line-height: 1; }
.experience-badge span { color: var(--navy-800); font-weight: 700; font-size: .95rem; }

.about-text p { color: var(--muted); margin-block-end: 1rem; }

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-block: 1.8rem 2.4rem;
}
.skills li {
  padding: .45rem 1.1rem;
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--navy-800);
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid rgba(200, 162, 74, .3);
}

/* نقاط القوة */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  padding-block-start: 2rem;
  border-block-start: 1px solid var(--line);
}
.highlight-item { display: flex; flex-direction: column; gap: .7rem; }
.hl-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy-800);
  color: var(--gold-400);
}
.hl-icon svg { width: 22px; height: 22px; }
.highlight-item > span:last-child { color: var(--navy-800); font-weight: 700; font-size: .95rem; line-height: 1.5; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-block-start: 2rem;
  border-block-start: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1.2;
}
.stat strong::after { content: "+"; color: var(--gold-500); }
.stat span { color: var(--muted); font-size: .95rem; }

/* =========================================================
   الخدمات
   ========================================================= */
.services { background: var(--white); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s, background .35s;
}
.service-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-500));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
[dir="ltr"] .service-card::before { transform-origin: left; }
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: transparent;
  background: var(--white);
}
.service-card:hover::before { transform: scaleX(1); }

.service-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-800);
}
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.service-card:hover .service-media img { transform: scale(1.06); }

.service-content {
  position: relative;
  padding: 2.4rem 1.8rem 2rem;
  flex: 1;
}

.service-icon {
  position: absolute;
  inset-block-start: -31px;
  inset-inline-start: 1.8rem;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--navy-800);
  color: var(--gold-400);
  border: 4px solid var(--ivory);
  transition: background .35s, color .35s, transform .35s var(--ease), border-color .35s;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card:hover .service-icon {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--white);
  transform: rotate(-6deg);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.45;
  margin-block-end: .6rem;
}
.service-card p { color: var(--muted); font-size: 1rem; }

/* =========================================================
   أعمالي ومشاريعي
   ========================================================= */
.portfolio { background: var(--ivory); }

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-block-end: 2.5rem;
}
.filter-btn {
  padding: .5rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--navy-800);
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.filter-btn:hover { border-color: var(--gold-500); transform: translateY(-2px); }
.filter-btn.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-card.is-hidden { display: none; }
.project-card.fade-in { animation: pop .45s var(--ease); }

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gold-100);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.project-card:hover .project-media img { transform: scale(1.06); }
.project-media .badge-demo {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
  padding: 1.4rem 1.5rem 1.6rem;
}
.project-cat { color: var(--gold-500); font-weight: 700; font-size: .85rem; }
.project-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--navy-800); line-height: 1.4; }
.project-body p { color: var(--muted); font-size: .97rem; line-height: 1.7; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-block-start: .2rem; }
.tags li {
  padding: .15rem .6rem;
  border-radius: 6px;
  background: var(--ivory);
  border: 1px solid var(--line);
  color: var(--navy-700);
  font-family: "Inter", sans-serif;
  font-size: .76rem;
  font-weight: 500;
  direction: ltr;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  align-self: flex-start;
  margin-block-start: auto;
  padding-block-start: .8rem;
  color: var(--navy-800);
  font-weight: 700;
  transition: color .25s;
}
.project-link svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
[dir="rtl"] .project-link svg { transform: scaleX(-1); }
.project-link:hover { color: var(--gold-500); }
.project-link:hover svg { transform: translate(2px, -2px); }
[dir="rtl"] .project-link:hover svg { transform: scaleX(-1) translate(2px, -2px); }
.project-link.disabled { color: var(--muted); cursor: default; opacity: .75; }

.empty-state { text-align: center; color: var(--muted); padding: 2rem 0; }

/* =========================================================
   آراء العملاء
   ========================================================= */
.testimonials { background: var(--white); }

.testimonials-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 2rem 1.8rem 1.8rem;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s;
}
.testimonial:hover { transform: translateY(-6px); box-shadow: var(--shadow); background: var(--white); }
.testimonial::after {
  content: "\201D";
  position: absolute;
  inset-block-start: .2rem;
  inset-inline-end: 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.5rem;
  line-height: 1;
  color: var(--gold-500);
  opacity: .2;
  pointer-events: none;
}

/* ظهور فوري للبطاقات مع حركة دخول قصيرة (دون انتظار التمرير) */
.testimonial.t-enter { animation: tEnter .6s var(--ease) both; }
@keyframes tEnter { from { opacity: 0; transform: translateY(14px); } }

/* عبارة صغيرة توضح أن الآراء نماذج */
.demo-notice.demo-note-small {
  display: block;
  max-width: 640px;
  margin: -2.2rem auto 2rem;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: .82rem;
  font-style: italic;
  text-align: center;
}
.demo-note-small svg {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin: 0;
  margin-inline-end: .35rem;
  vertical-align: -3px;
  color: var(--gold-500);
}

.t-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.stars { display: flex; gap: 2px; direction: ltr; }
.stars span { display: block; width: 18px; height: 18px; }
.stars svg { width: 100%; height: 100%; }
.stars .on { color: var(--gold-500); }
.stars .off { color: var(--line); }

.testimonial blockquote { flex: 1; }
.testimonial blockquote p { color: var(--ink); font-size: 1rem; line-height: 1.8; }

.t-author {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}
.t-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-600), var(--navy-900));
  color: var(--gold-400);
  font-weight: 800;
  border: 2px solid var(--gold-400);
}
.t-avatar img { width: 100%; height: 100%; object-fit: cover; }
.t-author strong { display: block; color: var(--navy-800); line-height: 1.35; }
.t-author small { color: var(--muted); font-size: .85rem; }

/* =========================================================
   تواصل معي
   ========================================================= */
.contact {
  position: relative;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: var(--white);
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: var(--gold-500);
  filter: blur(120px);
  opacity: .12;
  inset-block-start: -200px;
  inset-inline-start: -150px;
}

.contact-inner {
  position: relative;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.contact .section-title { color: var(--white); }
.contact-info > p { color: rgba(255, 255, 255, .72); margin-block-end: 2.2rem; }

.contact-list { display: grid; gap: 1.3rem; }
.contact-list li { display: flex; align-items: center; gap: 1rem; }
.ci-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--gold-400);
}
.ci-icon svg { width: 22px; height: 22px; }
.contact-list small { display: block; color: rgba(255, 255, 255, .55); font-size: .85rem; line-height: 1.4; }
.contact-list a,
.contact-list span:not(.ci-icon) { font-weight: 500; color: var(--white); }
.contact-list a:hover { color: var(--gold-400); }

.contact-form {
  background: var(--white);
  color: var(--ink);
  padding: 2.4rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.form-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-800);
  margin-block-end: 1.4rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.form-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 5px var(--gold-100);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.field { margin-block-end: 1.1rem; }
.field label {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  color: var(--navy-800);
  margin-block-end: .45rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .85rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  font-size: 1rem;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
[dir="rtl"] .field input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b78' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  background-size: 18px;
  padding-inline-end: 2.8rem;
  cursor: pointer;
}
[dir="ltr"] .field select { background-position: right 1rem center; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(200, 162, 74, .18);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--danger); }
.field .error {
  display: block;
  min-height: 1.2em;
  color: var(--danger);
  font-size: .85rem;
  margin-block-start: .3rem;
  line-height: 1.4;
}

.link-btn {
  display: block;
  margin: .9rem auto 0;
  border: 0;
  background: none;
  color: var(--navy-600);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--gold-500); }

.form-note {
  margin-block-start: .9rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.6;
  text-align: center;
}

.form-status {
  margin-block-start: 1.1rem;
  padding: .95rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
  animation: pop .4s var(--ease);
}
.form-status.success { background: #e7f6ee; color: var(--success); }
.form-status.info    { background: var(--gold-100); color: var(--navy-800); }
.form-status.error   { background: #fbeaea; color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

.btn.loading { pointer-events: none; opacity: .75; }

/* =========================================================
   التذييل
   ========================================================= */
.footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, .6);
  /* مساحة سفلية حتى لا تغطي الأزرار العائمة (واتساب والعودة للأعلى) المحتوى */
  padding-block: 2rem 6rem;
  border-block-start: 1px solid rgba(255, 255, 255, .06);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer .brand-logo { height: 48px; }
.footer-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem 1rem;
  font-size: .95rem;
}
.footer-founder {
  color: var(--gold-400);
  font-weight: 500;
}

.socials { display: flex; gap: .7rem; }
.socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .75);
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { background: var(--gold-500); color: var(--navy-900); transform: translateY(-3px); }

/* زر العودة للأعلى */
.back-to-top {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-start: 24px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--navy-900);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  z-index: 90;
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }

/* زر واتساب العائم */
.wa-float {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-end: 24px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wa);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(37, 211, 102, .4);
  z-index: 95;
  transition: transform .3s var(--ease);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--wa);
  z-index: -1;
  animation: waPulse 2.6s ease-out infinite;
}
.wa-float:hover { transform: scale(1.08); }
.wa-tip {
  position: absolute;
  inset-inline-end: calc(100% + 12px);
  padding: .4rem .85rem;
  border-radius: 8px;
  background: var(--navy-900);
  color: var(--white);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
[dir="rtl"] .wa-tip { transform: translateX(-6px); }
.wa-float:hover .wa-tip,
.wa-float:focus-visible .wa-tip { opacity: 1; transform: none; }
@keyframes waPulse {
  0%   { transform: scale(1);   opacity: .5; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* =========================================================
   حركة الظهور عند التمرير
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
/* البطاقات تستخدم انتقالات hover بعد الظهور */
.service-card.reveal.visible,
.project-card.reveal.visible,
.testimonial.reveal.visible {
  transition: opacity .8s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s, background .35s;
}

/* =========================================================
   التجاوب: شاشات متوسطة (القائمة المنسدلة)
   ========================================================= */
@media (max-width: 1080px) {
  .menu-toggle { display: flex; z-index: 2; }
  .nav-links {
    position: fixed;
    inset-block: 0;
    right: 0;
    width: min(320px, 84vw);
    flex-direction: column;
    gap: .3rem;
    padding: calc(var(--nav-h) + 1.5rem) 1.8rem 2rem;
    background: var(--navy-900);
    box-shadow: -10px 0 40px rgba(0, 0, 0, .3);
    transform: translateX(110%);
    transition: transform .4s var(--ease);
    overflow-y: auto;
  }
  [dir="ltr"] .nav-links {
    right: auto;
    left: 0;
    box-shadow: 10px 0 40px rgba(0, 0, 0, .3);
    transform: translateX(-110%);
  }
  .nav-links.open,
  [dir="ltr"] .nav-links.open { transform: translateX(0); }
  .lang-switching .nav-links { transition: none; }
  .nav-links a { font-size: 1.15rem; padding-block: .9rem; border-block-end: 1px solid rgba(255, 255, 255, .07); }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--gold-400); }

  body.menu-open { overflow: hidden; }
  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99;
  }
  .navbar { z-index: 101; }
  .navbar.menu-active { background: var(--navy-900); }
}

/* =========================================================
   التجاوب: الأجهزة اللوحية
   ========================================================= */
@media (max-width: 1024px) {
  .services-grid,
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner,
  .contact-inner { gap: 3rem; }
}

@media (max-width: 900px) {
  /* آراء العملاء: عمودان، وكل البطاقات ظاهرة دون سحب */
  .testimonials-track { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
}
@media (max-width: 600px) {
  /* الهاتف: عمود واحد */
  .testimonials-track { grid-template-columns: 1fr; gap: 1rem; }
}

/* =========================================================
   التجاوب: الجوال
   ========================================================= */
@media (max-width: 768px) {
  :root { --nav-h: 66px; }
  body { font-size: 1rem; }
  .container { padding-inline: 16px; }
  .section { padding-block: 80px; }

  .nav-cta { display: none; }
  .nav-actions { gap: .4rem; }
  .brand-logo,
  .navbar.scrolled .brand-logo { height: 38px; }
  .footer .brand-logo { height: 44px; }
  .lang-switch button { min-width: 32px; height: 28px; padding-inline: .4rem; }

  /* البطل */
  .hero { padding-block: calc(var(--nav-h) + 30px) 90px; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: -1; min-height: 260px; }
  .avatar-ring { width: min(220px, 60vw); }
  .floating-card { padding: .6rem 1rem; max-width: 130px; }
  .floating-card strong { font-size: 1.25rem; }
  .floating-card small { font-size: .78rem; }
  .card-a { inset-inline-start: 0; }
  .card-b { inset-inline-end: 0; }
  .lead { margin-inline: auto; font-size: 1.05rem; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn { flex: 1 1 160px; }
  .scroll-hint { display: none; }

  /* من أنا */
  .about-inner { grid-template-columns: 1fr; gap: 3.5rem; }
  .about-image { max-width: 360px; margin-inline: auto; width: 100%; }
  .about-image::before { inset-block: 18px -12px; inset-inline: 18px -10px; }
  .image-frame { padding: 9px; }
  .photo-clip { border-radius: calc(var(--radius-lg) - 9px); }
  .experience-badge { inset-inline-end: -8px; inset-block-end: -22px; padding: .9rem 1.2rem; }
  .stats { gap: .5rem; text-align: center; }
  .highlights { grid-template-columns: 1fr; gap: .9rem; }
  .highlight-item { flex-direction: row; align-items: center; gap: .9rem; }

  /* الخدمات والمشاريع */
  .services-grid,
  .projects-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .service-content { padding: 2.3rem 1.4rem 1.6rem; }
  .service-icon { inset-inline-start: 1.4rem; }
  .filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-inline: -16px;
    padding: .2rem 16px .6rem;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; }
  .demo-notice { margin-block-start: -1.8rem; font-size: .9rem; }

  .testimonial { padding: 1.6rem 1.4rem 1.4rem; }

  /* تواصل */
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-form { padding: 1.6rem 1.2rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* التذييل: مساحة إضافية حتى لا تغطي الأزرار العائمة المحتوى */
  .footer { padding-block-end: 6rem; }
  .footer-inner { flex-direction: column; text-align: center; }

  .back-to-top { inset-block-end: 16px; inset-inline-start: 16px; width: 44px; height: 44px; }
  .wa-float { inset-block-end: 16px; inset-inline-end: 16px; width: 52px; height: 52px; }
  .wa-float svg { width: 27px; height: 27px; }
  .wa-tip { display: none; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.95rem; }
  .stat span { font-size: .82rem; }
  .brand-logo,
  .navbar.scrolled .brand-logo { height: 34px; }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
