/* ===== Ayubisoft — Navy · Blue · Orange Mesh Theme ===== */

/* ---- Variables ---- */
:root {
  --primary:      #C9963F;
  --primary-rgb:  201,150,63;
  --secondary-rgb:28,24,21;
  --primary-dark: #A9782A;
  --primary-light:#FBF3E4;
  --primary-mid:  #E0B463;
  --gradient:     linear-gradient(135deg,#C9963F 0%,#E0B463 60%,#A9782A 100%);

  --secondary:      #1C1815;
  --secondary-dark: #0F0C0A;
  --secondary-light:#F3F1EF;
  --gradient-brand: linear-gradient(120deg,#1C1815 0%,#4a3f30 55%,#C9963F 100%);

  --bg:           #ffffff;
  --bg-alt:       #FAF8F5;
  --bg-card:      #ffffff;
  --text:         #1c1815;
  --text-muted:   #6b6258;
  --border:       #ece7df;
  --border-soft:  #f5f2ed;
  --border-gold:  rgba(var(--primary-rgb),0.25);

  --shadow-sm:    0 1px 3px rgba(var(--secondary-rgb),0.07);
  --shadow:       0 6px 20px rgba(var(--secondary-rgb),0.08);
  --shadow-lg:    0 16px 50px rgba(var(--secondary-rgb),0.12);
  --shadow-gold:  0 4px 20px rgba(var(--primary-rgb),0.22);

  --nav-bg:       #ffffff;
  --nav-border:   #f5f2ed;

  --radius:       14px;
  --radius-lg:    22px;
  --radius-full:  999px;
  --transition:   all 0.25s ease;

  /* compat aliases used in PHP */
  --gold:         var(--primary);
  --gold-dark:    var(--primary-dark);
  --gold-light:   var(--primary-light);
  --gold-gradient:var(--gradient);
  --white:        var(--bg);
  --off-white:    var(--bg-alt);
  --dark:         var(--text);
  --dark2:        var(--bg-alt);
  --gray:         var(--text-muted);
}

[data-theme="dark"] {
  --bg:           #0d0b09;
  --bg-alt:       #17130f;
  --bg-card:      #1f1a15;
  --text:         #f2ece2;
  --text-muted:   #94a3b8;
  --border:       #2b241d;
  --border-soft:  #221c17;
  --border-gold:  rgba(var(--primary-rgb),0.18);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.30);
  --shadow:       0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:    0 10px 40px rgba(0,0,0,0.45);
  --shadow-gold:  0 4px 20px rgba(var(--primary-rgb),0.14);
  --nav-bg:       #17130f;
  --nav-border:   #2b241d;
}

/* ===== Metric-compatible font fallback (reduces CLS from Poppins swap) ===== */
@font-face {
  font-family: 'PoppinsFallback';
  src: local('Arial'), local('Helvetica Neue');
  size-adjust: 107%;
  ascent-override: 95%;
  descent-override: 32%;
  line-gap-override: 0%;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', 'PoppinsFallback', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(var(--secondary-rgb),0.05) 0%, transparent 35%),
    radial-gradient(circle at 88% 106%, rgba(var(--primary-rgb),0.045) 0%, transparent 35%);
  background-repeat: no-repeat;
  line-height: 1.7;
  overflow-x: hidden;
  font-size: 15px;
  transition: background-color 0.3s, color 0.3s;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 15% -10%, rgba(var(--secondary-rgb),0.13) 0%, transparent 40%),
    radial-gradient(circle at 85% 108%, rgba(var(--primary-rgb),0.09) 0%, transparent 40%);
}
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(1.75rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 5vw, 2.2rem); }
h3 { font-size: clamp(0.95rem, 3vw, 1.15rem); }
p  { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.75; }
a  { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }

/* ===== Loader ===== */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s, visibility 0.4s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-bar {
  width: 80px; height: 3px; background: var(--border-soft);
  border-radius: 4px; margin: 12px auto 0; overflow: hidden;
}
.loader-progress {
  height: 100%; background: var(--gradient); border-radius: 4px;
  animation: loadProgress 0.7s ease forwards;
}
@keyframes loadProgress { from{width:0} to{width:100%} }

/* ===== Container ===== */
/* Mobile-first: starts narrow, expands */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 480px) { .container { padding: 0 1.25rem; } }
@media (min-width: 640px) { .container { padding: 0 1.75rem; } }
@media (min-width: 992px) { .container { padding: 0 2.5rem; } }

/* ===== Topbar — hidden on mobile ===== */
.topbar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
  font-size: 0.77rem;
  display: none;
}
@media (min-width: 768px) { .topbar { display: block; } }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.topbar-left { display: flex; align-items: center; gap: 1.5rem; }
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }
.topbar a { color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.3rem; }
.topbar a:hover { color: var(--primary-dark); }
.topbar-left a i { color: var(--primary); font-size: 0.72rem; }
.topbar-right a {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 0.65rem;
}
.topbar-right a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: none;
  transition: box-shadow 0.3s, background 0.3s;
}
.navbar.scrolled {
  box-shadow: 0 2px 24px rgba(var(--secondary-rgb),0.08);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
[data-theme="dark"] .navbar.scrolled { background: rgba(23,19,15,0.85); }
.navbar .container {
  display: flex; align-items: center;
  height: 58px; gap: 0.4rem;
}
@media (min-width: 768px) { .navbar .container { height: 64px; gap: 0.5rem; } }

/* Brand */
.navbar-brand { flex-shrink: 0; display: flex; align-items: center; gap: 0.45rem; text-decoration: none; }
.navbar-brand .logo-img { height: 34px; width: auto; }
@media (min-width: 480px) { .navbar-brand .logo-img { height: 38px; } }
.navbar-brand .brand-name {
  font-size: 0.92rem; font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  white-space: nowrap; letter-spacing: -0.01em;
}
@media (min-width: 360px) { .navbar-brand .brand-name { font-size: 1rem; } }

/* Desktop nav links — hidden until 992px */
.nav-links {
  display: none;
  list-style: none;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
@media (min-width: 992px) { .nav-links { display: flex; } }
.nav-links li a {
  display: block; padding: 0.4rem 0.9rem;
  font-weight: 500; font-size: 0.875rem; color: var(--text-muted);
  border-radius: var(--radius-full); white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-links li a:hover  { color: var(--text); }
.nav-links li a.active { color: var(--primary-dark); background: rgba(var(--primary-rgb),0.1); font-weight: 600; }

/* Nav actions — hidden until 992px */
.nav-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
@media (min-width: 992px) { .nav-actions { display: flex; } }

/* Dark toggle */
.dark-toggle {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1.5px solid var(--border); background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--text-muted); transition: var(--transition);
}
.dark-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.7rem; border-radius: 10px;
  border: 1.5px solid var(--border); background: transparent;
  font-family: 'Poppins', 'PoppinsFallback', sans-serif; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; color: var(--text-muted);
  transition: var(--transition); white-space: nowrap;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.lang-btn i { font-size: 0.55rem; opacity: 0.6; }
.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 140px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
  z-index: 300; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: var(--transition);
}
.lang-switcher.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.85rem; font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); transition: background 0.15s, color 0.15s;
}
.lang-dropdown a:hover  { background: var(--bg-alt); color: var(--primary); }
.lang-dropdown a.active { color: var(--primary); font-weight: 700; background: rgba(var(--primary-rgb),0.07); }

/* Mobile controls — margin-inline-start:auto pushes to far end (right LTR, left RTL) */
.mobile-controls {
  margin-inline-start: auto;
  display: flex; align-items: center; gap: 0.35rem;
}
@media (min-width: 992px) { .mobile-controls { display: none; } }

/* Hamburger */
.nav-toggle {
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; cursor: pointer;
  width: 36px; height: 36px;
  display: flex; flex-direction: column; gap: 4px;
  justify-content: center; align-items: center;
  transition: var(--transition);
}
.nav-toggle:hover { border-color: var(--primary); background: var(--primary-light); }
.nav-toggle span {
  display: block; width: 17px; height: 2px;
  background: var(--text); border-radius: 2px; transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile dark toggle */
.nav-dark-mobile {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1.5px solid var(--border); background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--text-muted); transition: var(--transition);
}
.nav-dark-mobile:hover { border-color: var(--primary); color: var(--primary); }

/* Overlay */
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 998; backdrop-filter: blur(3px);
}
.nav-overlay.open { display: block; }

/* Mobile drawer */
.nav-menu {
  position: fixed; top: 0; right: -100%; height: 100dvh;
  width: min(300px, 85vw);
  background: var(--bg-card); z-index: 999;
  display: flex; flex-direction: column;
  box-shadow: -6px 0 40px rgba(0,0,0,0.12);
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.nav-menu.open { right: 0; }
.nav-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-soft);
}
.nav-menu-header .logo-img { height: 32px; }
.nav-menu-close {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid var(--border); background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.85rem; transition: var(--transition);
}
.nav-menu-close:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
.nav-menu-links { list-style: none; padding: 0.6rem; flex: 1; }
.nav-menu-links li a {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.65rem 0.85rem; border-radius: 10px;
  font-weight: 500; font-size: 0.9rem; color: var(--text-muted);
  transition: background 0.15s, color 0.15s; margin-bottom: 0.1rem;
}
.nav-menu-links li a i { width: 16px; text-align: center; color: var(--primary); font-size: 0.82rem; }
.nav-menu-links li a:hover  { background: var(--bg-alt); color: var(--text); }
.nav-menu-links li a.active { background: rgba(var(--primary-rgb),0.1); color: var(--primary-dark); font-weight: 600; }
.nav-menu-footer {
  padding: 0.9rem 1.25rem; border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.nav-menu-footer .lang-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.nav-menu-footer .lang-chip {
  padding: 0.25rem 0.7rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--border); font-size: 0.76rem;
  font-weight: 600; color: var(--text-muted); cursor: pointer;
  text-decoration: none; transition: var(--transition);
}
.nav-menu-footer .lang-chip:hover,
.nav-menu-footer .lang-chip.active { border-color: var(--primary); color: var(--primary-dark); background: rgba(var(--primary-rgb),0.1); }
.nav-menu-footer .dm-row { display: flex; align-items: center; justify-content: space-between; }
.nav-menu-footer .dm-label { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }

/* ===== Section — mobile-first padding ===== */
.section { padding: 3rem 0; }
@media (min-width: 640px)  { .section { padding: 4rem 0; } }
@media (min-width: 992px)  { .section { padding: 5rem 0; } }
.section-alt { background: var(--bg-alt); }

.section-header { text-align: center; margin-bottom: 2.25rem; }
@media (min-width: 640px) { .section-header { margin-bottom: 3rem; } }

.section-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(var(--primary-rgb),0.1); color: var(--primary-dark);
  padding: 0.22rem 0.85rem; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; margin-bottom: 0.75rem;
  border: 1px solid rgba(var(--primary-rgb),0.22);
}
.section-tag::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  background: var(--primary); border-radius: 50%;
}
.section-header h2 { margin-bottom: 0.65rem; }
.section-header p  { max-width: 560px; margin: 0 auto; font-size: 0.92rem; }
.gold-line {
  display: block; width: 40px; height: 3px;
  background: var(--gradient); border-radius: 4px; margin: 0.9rem auto 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.4rem; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.875rem;
  cursor: pointer; border: 2px solid transparent;
  transition: var(--transition); white-space: nowrap;
  font-family: 'Poppins', 'PoppinsFallback', sans-serif; letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--gradient); color: #fff; box-shadow: var(--shadow-gold);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.35) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform 0.6s ease;
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-2px); color: #fff; }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary-dark); }
.btn-outline:hover { background: var(--gradient); color: #fff; border-color: transparent; transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); border-color: rgba(255,255,255,0.3); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-lg { padding: 0.72rem 1.8rem; font-size: 0.93rem; }
.btn-sm { padding: 0.32rem 0.85rem; font-size: 0.78rem; }

/* ===== Hero — mobile-first ===== */
.hero {
  padding: 4rem 0 2.5rem;
  position: relative; overflow: hidden;
  background: var(--bg);
}
@media (min-width: 992px) {
  .hero { padding: 5.5rem 0 4rem; min-height: 92vh; display: flex; align-items: center; }
}
/* Dot-grid */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.5; pointer-events: none;
}
/* Mesh glow — orange top-right, blue bottom-left */
.hero::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 88% 4%, rgba(var(--primary-rgb),0.14) 0%, transparent 40%),
    radial-gradient(circle at 6% 96%, rgba(var(--secondary-rgb),0.10) 0%, transparent 42%);
}
[data-theme="dark"] .hero::before { opacity: 0.15; }
[data-theme="dark"] .hero::after  {
  background:
    radial-gradient(circle at 88% 4%, rgba(var(--primary-rgb),0.10) 0%, transparent 40%),
    radial-gradient(circle at 6% 96%, rgba(var(--secondary-rgb),0.14) 0%, transparent 42%);
}

.hero-content { position: relative; z-index: 1; }

/* Single column on mobile → two columns on desktop */
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.25rem; align-items: center; }
@media (min-width: 992px) { .hero-grid { grid-template-columns: 55% 1fr; gap: 4rem; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(var(--primary-rgb),0.08); border: 1px solid rgba(var(--primary-rgb),0.2);
  color: var(--primary-dark); padding: 0.28rem 0.85rem;
  border-radius: var(--radius-full); font-size: 0.76rem; font-weight: 600;
  margin-bottom: 1rem;
}
.hero-badge .dot {
  width: 6px; height: 6px; background: var(--primary);
  border-radius: 50%; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(1.3)} }

.hero h1 { margin-bottom: 0.9rem; }
.hero h1 span {
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: 0.95rem; margin-bottom: 1.6rem; max-width: 480px; }
@media (min-width: 992px) { .hero p { font-size: 1rem; margin-bottom: 2rem; } }

/* CTA buttons — stack on mobile, row on small+ */
.hero-btns { display: flex; flex-direction: column; gap: 0.7rem; }
.hero-btns .btn { width: 100%; justify-content: center; }
@media (min-width: 480px) {
  .hero-btns { flex-direction: row; flex-wrap: wrap; }
  .hero-btns .btn { width: auto; }
}

/* Hero stats row */
.hero-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.hero-meta-item .num {
  font-size: 1.4rem; font-weight: 800; display: block;
  font-variant-numeric: tabular-nums;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-meta-item .lbl { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* Hero visual card */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-card {
  background: rgba(255,255,255,0.72); border-radius: 22px;
  padding: 1.4rem; width: 100%; max-width: 340px;
  border: 1px solid rgba(255,255,255,0.6); box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
[data-theme="dark"] .hero-card {
  background: rgba(31,26,21,0.55); border-color: rgba(255,255,255,0.08);
}
@media (min-width: 480px) { .hero-card { padding: 1.75rem; max-width: 380px; } }
.hero-visual::before {
  content: '';
  position: absolute; inset: -30px; border-radius: 30px;
  background:
    radial-gradient(circle at 30% 20%, rgba(var(--secondary-rgb),0.16), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(var(--primary-rgb),0.16), transparent 55%);
  pointer-events: none;
}
.hero-card-logo { text-align: center; margin-bottom: 1.2rem; }
.hero-card-logo img { width: 64px; height: auto; margin: 0 auto; }
@media (min-width: 480px) { .hero-card-logo img { width: 72px; } }
.hero-stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.65rem; }
.hero-stat {
  text-align: center; padding: 0.7rem 0.4rem;
  background: var(--bg-alt); border-radius: 10px; border: 1px solid var(--border);
}
.hero-stat .num {
  font-size: 1.35rem; font-weight: 800; display: block;
  font-variant-numeric: tabular-nums;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stat .label { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; }

/* Floating badges — hidden on mobile, show on 640px+ */
.hero-float { display: none; }
@media (min-width: 640px) {
  .hero-float {
    display: flex; position: absolute;
    background: var(--bg-card); border-radius: 10px; padding: 0.55rem 0.85rem;
    box-shadow: var(--shadow); align-items: center; gap: 0.5rem;
    font-size: 0.74rem; font-weight: 600; white-space: nowrap; color: var(--text);
    animation: float 3s ease-in-out infinite; border: 1px solid var(--border);
  }
  .hero-float i { color: var(--primary); }
  .hero-float-1 { top: -14px; left: -10px; }
  .hero-float-2 { bottom: -14px; right: -10px; animation-delay: 1.5s; }
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }

/* ===== Services grid — horizontal cards ===== */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2,1fr); } }

.service-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; align-items: flex-start; gap: 1rem;
  border: 1px solid var(--border); transition: var(--transition);
  position: relative; overflow: hidden;
}
@media (min-width: 480px) { .service-card { padding: 1.5rem; } }
/* Accent bar on the inline-start edge */
.service-card::before {
  content: ''; position: absolute;
  inset-inline-start: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gradient); border-radius: 0 3px 3px 0;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.3s ease;
}
.service-card:hover { border-color: var(--border-gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.service-card:hover::before { transform: scaleY(1); }

.service-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: rgba(var(--primary-rgb),0.09); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(var(--primary-rgb),0.18); transition: var(--transition);
}
@media (min-width: 480px) { .service-icon { width: 52px; height: 52px; } }
.service-card:hover .service-icon { background: var(--gradient); border-color: transparent; box-shadow: var(--shadow-gold); }
.service-icon i { font-size: 1.15rem; color: var(--primary); transition: var(--transition); }
.service-card:hover .service-icon i { color: #fff; }

.service-body { flex: 1; min-width: 0; }
.service-body h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.service-body p  { font-size: 0.83rem; margin-bottom: 0.75rem; line-height: 1.6; }
.service-body .btn { margin-top: 0.25rem; }

/* ===== Feature cards (centered, for Why/About sections) ===== */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 480px) { .feature-cards { grid-template-columns: repeat(2,1fr); } }

.feature-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 1.25rem 1rem; text-align: center;
  border: 1px solid var(--border); transition: var(--transition);
}
.feature-card:hover { border-color: var(--border-gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px;
  background: rgba(var(--primary-rgb),0.09); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.85rem;
  border: 1px solid rgba(var(--primary-rgb),0.18);
}
.feature-icon i { font-size: 1.15rem; color: var(--primary); }
.feature-card h3 { font-size: 0.9rem; margin-bottom: 0.3rem; }
.feature-card p  { font-size: 0.79rem; margin: 0; line-height: 1.55; }

/* ===== Portfolio ===== */
.filter-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; }
.filter-btn {
  padding: 0.32rem 0.9rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--border); background: transparent;
  font-size: 0.78rem; font-weight: 500; cursor: pointer;
  transition: var(--transition); font-family: 'Poppins', 'PoppinsFallback', sans-serif; color: var(--text-muted);
}
.filter-btn.active, .filter-btn:hover { background: var(--gradient); border-color: transparent; color: #fff; }

.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 576px) { .portfolio-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 992px) { .portfolio-grid { grid-template-columns: repeat(3,1fr); } }

.portfolio-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); transition: var(--transition);
}
.portfolio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-gold); }
.portfolio-img {
  height: 175px; overflow: hidden; position: relative;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 480px) { .portfolio-img { height: 195px; } }
.portfolio-img-placeholder { font-size: 2.4rem; color: var(--primary); opacity: 0.5; }
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.portfolio-card:hover .portfolio-img img { transform: scale(1.04); }
.portfolio-overlay {
  position: absolute; inset: 0; background: rgba(var(--primary-rgb),0.9);
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  opacity: 0; transition: var(--transition);
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay a,
.portfolio-overlay .overlay-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: 1.5px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.9rem; transition: var(--transition);
  cursor: pointer;
}
.portfolio-overlay a:hover,
.portfolio-overlay .overlay-btn:hover { background: #fff; color: var(--primary); }
.portfolio-body { padding: 1rem; }
.portfolio-cat {
  font-size: 0.68rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.3rem;
}
.portfolio-body h3 { font-size: 0.9rem; margin-bottom: 0.35rem; }
.portfolio-body p  { font-size: 0.79rem; margin-bottom: 0.6rem; }
.portfolio-tech { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.tech-tag {
  font-size: 0.64rem; background: var(--bg-alt);
  color: var(--text-muted); padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full); border: 1px solid var(--border);
}

/* ===== Stats ===== */
.stats-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 3rem 0; position: relative; overflow: hidden;
}
@media (min-width: 640px) { .stats-section { padding: 3.5rem 0; } }
@media (min-width: 992px) { .stats-section { padding: 4rem 0; } }
.stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; position: relative; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4,1fr); gap: 2rem; } }
.stat-item { text-align: center; }
.stat-item i { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--primary); opacity: 0.9; display: block; }
.stat-item .num {
  font-size: clamp(1.7rem, 5vw, 2.8rem); font-weight: 800; display: block;
  font-variant-numeric: tabular-nums;
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.1; margin-bottom: 0.25rem;
}
.stat-item .label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
@media (min-width: 768px) {
  .stat-item:not(:last-child) { border-right: 1px solid var(--border); }
}

/* ===== Testimonials ===== */
.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(2,1fr); } }
.testimonial-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 1.4rem; border: 1px solid var(--border); transition: var(--transition);
}
@media (min-width: 480px) { .testimonial-card { padding: 1.75rem; } }
.testimonial-card:hover { box-shadow: var(--shadow); border-color: var(--border-gold); }
.quote-icon {
  font-size: 1.6rem; color: var(--secondary); opacity: 0.28;
  margin-bottom: 0.6rem; display: block; line-height: 1; font-family: Georgia, serif;
}
.stars { color: var(--primary); margin-bottom: 0.65rem; font-size: 0.8rem; letter-spacing: 1px; }
.testimonial-text { color: var(--text-muted); margin-bottom: 1.1rem; font-size: 0.87rem; line-height: 1.75; }
.testimonial-author { display: flex; align-items: center; gap: 0.8rem; padding-top: 0.9rem; border-top: 1px solid var(--border-soft); }
.author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.88rem; flex-shrink: 0;
}
.author-info .name { font-weight: 600; font-size: 0.86rem; margin-bottom: 0; color: var(--text); }
.author-info .pos  { font-size: 0.72rem; color: var(--primary); }

/* ===== Team ===== */
.team-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (min-width: 768px) { .team-grid { grid-template-columns: repeat(4,1fr); } }
.team-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  text-align: center; transition: var(--transition);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-gold); }
.team-photo {
  height: 155px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
@media (min-width: 480px) { .team-photo { height: 175px; } }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-avatar-ph {
  width: 65px; height: 65px; border-radius: 50%;
  background: var(--gradient); display: flex; align-items: center;
  justify-content: center; font-size: 1.6rem; font-weight: 700; color: #fff;
}
.team-body { padding: 0.9rem; }
.team-body h3 { font-size: 0.87rem; margin-bottom: 0.15rem; }
.team-body .position { font-size: 0.72rem; color: var(--primary); font-weight: 600; margin-bottom: 0.5rem; }
.team-body p { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.team-links a { color: var(--text-muted); margin: 0 0.25rem; font-size: 0.8rem; }
.team-links a:hover { color: var(--primary); }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 992px) { .contact-grid { grid-template-columns: 1fr 1.6fr; } }
.contact-info-item { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 1.4rem; }
.contact-icon {
  width: 42px; height: 42px; background: rgba(var(--primary-rgb),0.08);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1px solid rgba(var(--primary-rgb),0.15);
}
.contact-icon i { font-size: 0.9rem; color: var(--primary); }
.contact-info-item h4 { font-size: 0.83rem; margin-bottom: 0.15rem; color: var(--text); }
.contact-info-item p  { font-size: 0.83rem; margin: 0; }
.contact-info-item a:hover { color: var(--primary); }
.contact-form .form-group { margin-bottom: 0.9rem; }
.contact-form .form-row { display: grid; gap: 0.9rem; }
@media (min-width: 576px) { .contact-form .form-row { grid-template-columns: 1fr 1fr; } }
.form-control {
  width: 100%; padding: 0.68rem 0.95rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Poppins', 'PoppinsFallback', sans-serif; font-size: 0.88rem;
  background: var(--bg-card); color: var(--text);
  transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.08); }
textarea.form-control { resize: vertical; min-height: 105px; }
.form-control::placeholder { color: var(--text-muted); opacity: 0.55; }
.form-alert { padding: 0.65rem 0.9rem; border-radius: var(--radius); margin-bottom: 0.85rem; font-size: 0.83rem; display: none; }
.form-alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.form-alert.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== Page Hero ===== */
.page-hero {
  background: var(--bg-alt);
  padding: 4rem 0 2.25rem; text-align: center;
  position: relative; overflow: hidden;
}
@media (min-width: 640px) { .page-hero { padding: 5rem 0 2.75rem; } }
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.6; pointer-events: none;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 88% 4%, rgba(var(--primary-rgb),0.14) 0%, transparent 40%),
    radial-gradient(circle at 6% 96%, rgba(var(--secondary-rgb),0.06) 0%, transparent 42%);
}
[data-theme="dark"] .page-hero::before { opacity: 0.15; }
.page-hero h1 { color: var(--text); margin-bottom: 0.5rem; position: relative; font-size: clamp(1.6rem, 5vw, 2.8rem); }
.page-hero h1 span { color: var(--primary); }
.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 0.4rem; position: relative; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); font-size: 0.82rem; }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb span { color: var(--primary-dark); font-size: 0.82rem; }
.breadcrumb .sep { color: var(--border); }

/* ===== CTA ===== */
.cta-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0; text-align: center; position: relative; overflow: hidden;
}
@media (min-width: 640px) { .cta-section { padding: 4.5rem 0; } }
@media (min-width: 992px) { .cta-section { padding: 5rem 0; } }
.cta-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 12% 15%, rgba(var(--primary-rgb),0.16) 0%, transparent 45%),
    radial-gradient(circle at 88% 90%, rgba(var(--secondary-rgb),0.06) 0%, transparent 48%);
}
.cta-section h2 { color: var(--text); margin-bottom: 0.85rem; position: relative; }
.cta-section p {
  color: var(--text-muted); margin-bottom: 1.75rem;
  max-width: 540px; margin-left: auto; margin-right: auto; position: relative;
  font-size: 0.92rem;
}
.cta-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 992px) { .about-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .about-grid.about-grid-full { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; } }
.about-img-wrap { position: relative; }
.about-img-main {
  width: 100%; border-radius: var(--radius-lg);
  background: var(--bg-alt); aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.about-img-main img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-lg) - 2px); }
.about-badge-wrap {
  position: absolute; bottom: -14px; right: -8px;
  background: var(--gradient); color: #fff;
  padding: 0.75rem 1.1rem; border-radius: 12px; text-align: center;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb),0.35);
}
.about-badge-wrap .num  { font-size: 1.6rem; font-weight: 800; display: block; }
.about-badge-wrap .text { font-size: 0.66rem; font-weight: 600; }
.value-list { list-style: none; }
.value-list li {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.45rem 0; border-bottom: 1px solid var(--border-soft);
  font-size: 0.88rem; color: var(--text);
}
.value-list li:last-child { border-bottom: none; }
.value-list li i { color: var(--primary); font-size: 0.78rem; flex-shrink: 0; }

/* ===== Process ===== */
.process-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 480px)  { .process-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 992px)  { .process-grid { grid-template-columns: repeat(4,1fr); } }
.process-step { text-align: center; padding: 1.25rem 0.9rem; position: relative; }
.process-step::after {
  content: ''; position: absolute; top: 28px; right: -50%;
  width: 100%; height: 1px; background: var(--border); display: none;
}
@media (min-width: 992px) { .process-step:not(:last-child)::after { display: block; } }
.step-num {
  width: 56px; height: 56px; background: var(--gradient);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: #fff;
  margin: 0 auto 0.9rem; box-shadow: var(--shadow-gold);
}
.process-step h3 { font-size: 0.9rem; margin-bottom: 0.3rem; }
.process-step p { font-size: 0.79rem; }

/* ===== Footer ===== */
.footer { background: #15110b; color: rgba(255,255,255,0.7); }
[data-theme="dark"] .footer { background: #0c0906; }
.footer-top { padding: 3rem 0 2rem; }
@media (min-width: 640px)  { .footer-top { padding: 3.5rem 0 2.5rem; } }
@media (min-width: 992px)  { .footer-top { padding: 4rem 0 2.5rem; } }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 576px)  { .footer-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 992px)  { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.footer-logo { height: 38px; margin-bottom: 0.85rem; }
.footer-about p { font-size: 0.82rem; color: rgba(255,255,255,0.45); line-height: 1.75; }
.footer-social { display: flex; gap: 0.45rem; margin-top: 1.1rem; }
.footer-social a {
  width: 30px; height: 30px; background: rgba(255,255,255,0.05);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; transition: var(--transition); border: 1px solid rgba(255,255,255,0.07);
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: 0.86rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.45); font-size: 0.8rem;
  display: flex; align-items: center; gap: 0.38rem;
  transition: color 0.2s, padding 0.2s;
}
.footer-col ul li a:hover { color: var(--primary-mid); padding-inline-start: 4px; }
.footer-col ul li a i { font-size: 0.58rem; color: var(--primary-mid); flex-shrink: 0; }
.footer-contact-list li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  color: rgba(255,255,255,0.45); font-size: 0.8rem; margin-bottom: 0.7rem;
}
.footer-contact-list li i { color: var(--primary-mid); margin-top: 0.28rem; flex-shrink: 0; }
.footer-contact-list li a { color: rgba(255,255,255,0.45); }
.footer-contact-list li a:hover { color: var(--primary-mid); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding: 1.1rem 0; text-align: center; }
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.76rem; margin: 0; }
.footer-bottom a { color: var(--primary-mid); }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999;
  width: 38px; height: 38px; background: var(--gradient);
  color: #fff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-gold); opacity: 0; visibility: hidden;
  transition: var(--transition); font-size: 0.8rem;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); color: #fff; }

/* ===== Alerts ===== */
.alert {
  padding: 0.75rem 0.95rem; border-radius: var(--radius);
  margin-bottom: 1.1rem; font-size: 0.83rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===== Animations ===== */
.fade-in       { opacity:0; transform:translateY(18px); transition:opacity 0.5s ease,transform 0.5s ease; }
.fade-in.visible { opacity:1; transform:translateY(0); }
.fade-in-left  { opacity:0; transform:translateX(-18px); transition:opacity 0.5s ease,transform 0.5s ease; }
.fade-in-left.visible { opacity:1; transform:translateX(0); }
.fade-in-right { opacity:0; transform:translateX(18px); transition:opacity 0.5s ease,transform 0.5s ease; }
.fade-in-right.visible { opacity:1; transform:translateX(0); }

/* Phone numbers & emails: always render LTR (digits/symbols must not
   get reordered by the bidi algorithm when embedded in RTL text) */
a[href^="tel:"], a[href^="mailto:"] { direction: ltr; unicode-bidi: isolate; }

/* ===== Utilities ===== */
.text-center  { text-align:center; }
.text-gold    { color:var(--primary); }
.mb-0 { margin-bottom:0; }
.mt-2 { margin-top:2rem; }
.d-flex { display:flex; }
.align-center { align-items:center; }
.gap-1 { gap:1rem; }

/* =====================================================================
   RTL OVERRIDES — Dari / Pashto
   direction:rtl is inherited from <html dir="rtl"> and makes all
   flex-direction:row containers flow right-to-left automatically.
   Only positioning/visual fixes live here — no flex-direction:row-reverse
   on nav-links or nav-actions (those cancel the inherited direction).
   ===================================================================== */
[dir="rtl"] { font-family: 'Vazirmatn','Poppins','PoppinsFallback',sans-serif; text-align: right; }

/* Navbar — logo visual stays consistent */
[dir="rtl"] .navbar-brand  { flex-direction: row-reverse; }
[dir="rtl"] .lang-btn      { flex-direction: row-reverse; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }

/* Mobile drawer — slides from LEFT in RTL */
[dir="rtl"] .nav-menu {
  right: auto; left: -100%;
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 6px 0 40px rgba(0,0,0,0.12);
}
[dir="rtl"] .nav-menu.open       { left: 0; right: auto; }
[dir="rtl"] .nav-menu-header     { flex-direction: row-reverse; }
[dir="rtl"] .nav-menu-links li a { text-align: right; }

/* Service cards — accent bar on right edge, content reversed */
[dir="rtl"] .service-card::before { inset-inline-start: auto; inset-inline-end: 0; border-radius: 3px 0 0 3px; }
[dir="rtl"] .service-card  { text-align: right; }
[dir="rtl"] .service-body  { text-align: right; }

/* Feature cards */
[dir="rtl"] .feature-card { text-align: right; }
[dir="rtl"] .feature-icon { margin-inline-start: 0; margin-inline-end: auto; margin-left: auto; margin-right: 0; }

/* Hero */
[dir="rtl"] .hero-grid    { direction: rtl; }
[dir="rtl"] .hero-float-1 { left: auto; right: -10px; }
[dir="rtl"] .hero-float-2 { right: auto; left: -10px; }

/* Back to top */
[dir="rtl"] .back-to-top { right: auto; left: 1.25rem; }

/* About */
[dir="rtl"] .about-badge-wrap { right: auto; left: -8px; }

/* Process */
[dir="rtl"] .process-step::after { right: auto; left: -50%; transform: scaleX(-1); }

/* Portfolio */
[dir="rtl"] .portfolio-body { text-align: right; }

/* Testimonials */
[dir="rtl"] .testimonial-card   { text-align: right; }

/* Team */
[dir="rtl"] .team-body  { text-align: right; }
[dir="rtl"] .team-links { direction: ltr; }

/* Contact */
[dir="rtl"] .contact-info-item     { text-align: right; }
[dir="rtl"] .contact-info-item h4,
[dir="rtl"] .contact-info-item p   { text-align: right; }
[dir="rtl"] .form-control          { text-align: right; direction: rtl; }
[dir="rtl"] .contact-form .form-row { direction: rtl; }

/* Footer */
[dir="rtl"] .footer-grid            { direction: rtl; }
[dir="rtl"] .footer-col ul li a i   { transform: scaleX(-1); }
[dir="rtl"] .footer-contact-list li { text-align: right; }

/* Section headers & grids */
[dir="rtl"] .section-header     { direction: rtl; }
[dir="rtl"] .section-tag        { flex-direction: row-reverse; }
[dir="rtl"] .hero-meta          { border-top-color: var(--border); }
[dir="rtl"] .services-grid,
[dir="rtl"] .portfolio-grid,
[dir="rtl"] .testimonials-grid,
[dir="rtl"] .team-grid,
[dir="rtl"] .stats-grid,
[dir="rtl"] .feature-cards,
[dir="rtl"] .process-grid       { direction: rtl; }

/* .stat-item's divider uses a physical border-right, which doesn't follow
   the RTL-reversed item order — without this it strands a border on the
   outer-right edge and drops the divider between the two leftmost items. */
@media (min-width: 768px) {
  [dir="rtl"] .stat-item:not(:last-child) { border-right: none; border-left: 1px solid var(--border); }
}

/* Flip fade-in animation directions for RTL */
[dir="rtl"] .fade-in-left  { transform: translateX(18px); }
[dir="rtl"] .fade-in-right { transform: translateX(-18px); }
[dir="rtl"] .fade-in-left.visible,
[dir="rtl"] .fade-in-right.visible { transform: translateX(0); }

/* ===== Accessibility utility ===== */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
