/* font-display: swap — جلوگیری از بلوک شدن رندر */
@font-face { font-family: 'Noto Sans Arabic'; font-display: swap; }
@font-face { font-family: 'Outfit'; font-display: swap; }

:root {
  /* ── Core brand ── */
  --primary: #07111F;
  --primary-mid: #0D1B2E;
  /* ── Burnished Gold (primary accent) ── */
  --gold: #2563EB;
  --gold-light: #60A5FA;
  --gold-dark: #1E40AF;
  --gold-glow: rgba(37,99,235,0.75);
  /* ── Steel Blue (secondary accent) ── */
  --blue: #4F46E5;
  --blue-light: #6366F1;
  --blue-muted: rgba(79,70,229,0.22);
  /* ── Semantic ── */
  --success: #16A34A;
  --success-bg: rgba(22,163,74,0.12);
  --warning: #D97706;
  --warning-bg: rgba(217,119,6,0.12);
  --error: #DC2626;
  --error-bg: rgba(220,38,38,0.12);
  /* ── Neutral aliases kept for compat ── */
  --accent-warm: #60A5FA;
  --accent-comp: #2E7DD4;
  /* ── Light palette ── */
  --bg-light: #EFF2F8;
  --card-light: #FFFFFF;
  --text-light: #0D1929;
  --text-muted-light: #3D5070;
  --border-light: #C8D3E0;
  /* ── Dark palette ── */
  --bg-dark: #07111F;
  --card-dark: #0D1B2E;
  --text-dark: #E2EAF4;
  --text-muted-dark: #7A90AB;
  --border-dark: #1A2D45;
  /* ── Shared ── */
  --radius: 18px;
  --radius-sm: 12px;
  --transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  --glow: 0 10px 28px rgba(0,0,0,0.18), 0 0 0 1px rgba(79,70,229,0.40);
  /* ── Default (light theme) ── */
  --bg: #EFF2F8;
  --card: #FFFFFF;
  --text: #0D1929;
  --text-muted: #3D5070;
  --border: #C8D3E0;
  --nav-bg: rgba(239,242,248,0.97);
  --nav-link-color: #0D1929;
  --hero-gradient: #05101E;
  --hero-h1-color: #ffffff;
  --hero-p-color: rgba(255,255,255,0.82);
  --hero-logo-bg: rgba(3,30,60,0.70);
  --hero-logo-border: rgba(37,99,235,0.92);
}

[data-theme="dark"] {
  --bg: #07111F;
  --card: #0D1B2E;
  --text: #E2EAF4;
  --text-muted: #7A90AB;
  --border: #1A2D45;
  --nav-bg: rgba(7,17,31,0.98);
  --nav-link-color: rgba(255,255,255,0.88);
  --hero-gradient: #05101E;
  --hero-h1-color: #ffffff;
  --hero-p-color: rgba(255,255,255,0.90);
  --hero-logo-bg: rgba(7,17,31,0.70);
  --hero-logo-border: rgba(37,99,235,0.95);
}

[data-theme="light"] {
  --bg: #EFF2F8;
  --card: #FFFFFF;
  --text: #0D1929;
  --text-muted: #3D5070;
  --border: #C8D3E0;
  --nav-bg: rgba(239,242,248,0.97);
  --nav-link-color: #0D1929;
  --hero-gradient: #ffffff;
  --hero-h1-color: #0D1929;
  --hero-p-color: rgba(13,25,41,0.78);
  --hero-logo-bg: rgba(37,99,235,0.22);
  --hero-logo-border: rgba(37,99,235,0.88);
}

/* ─── EN MONOGRAM LOGO ─── */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.logo-mark-wrap {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--card);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.14);
}

.logo-wrapper:hover .logo-mark-wrap {
  background: var(--card);
  box-shadow:
    inset 0 0 0 1px var(--gold),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.18);
  transform: translateY(-1.5px) scale(1.04);
}

.logo-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: filter 0.3s;
}

[data-theme="dark"] .logo-mark {
  filter: none;
}

[data-theme="dark"] .logo-wrapper:hover .logo-mark {
  filter: none;
}

[data-theme="light"] .logo-wrapper:hover .logo-mark {
  filter: none;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.logo-text-top {
  font-family: 'Outfit', sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(
    105deg,
    #0C8A80 0%, #0C8A80 30%,
    #60A5FA 46%, #99F6E4 50%,
    #60A5FA 54%, #0C8A80 70%, #0C8A80 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoShimmer 7s ease-in-out infinite;
}

.logo-text-bottom {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: #0C6B62;
  text-transform: uppercase;
}

/* ─── LOGO SHAKE ANIMATION ─── */
@keyframes logoShake {
  0%, 85%, 100% { transform: translateX(0) rotate(0deg); }
  87%  { transform: translateX(-3px) rotate(-8deg); }
  89%  { transform: translateX(3px) rotate(8deg); }
  91%  { transform: translateX(-3px) rotate(-6deg); }
  93%  { transform: translateX(3px) rotate(6deg); }
  95%  { transform: translateX(-2px) rotate(-4deg); }
  97%  { transform: translateX(2px) rotate(4deg); }
  99%  { transform: translateX(0) rotate(0deg); }
}

.logo-shake {
  display: inline-block;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  font-weight: 900;
  -webkit-text-stroke: 1px rgba(150,229,255,0.30);
  text-stroke: 1px rgba(150,229,255,0.30);
  text-shadow: none;
}

[data-theme="light"] .logo-shake {
  -webkit-text-stroke: 1px rgba(99,102,241,0.20);
  text-stroke: 1px rgba(99,102,241,0.20);
}

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

html { scroll-behavior: smooth; }
@media (max-width: 900px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans Arabic', sans-serif;
  font-weight: 300;
  direction: rtl;
  overflow-x: hidden;
}

body.ltr {
  direction: ltr;
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  text-rendering: optimizeLegibility;
}

body.ltr h1, body.ltr h2, body.ltr h3, body.ltr h4, body.ltr h5, body.ltr h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

body.ltr p, body.ltr li, body.ltr span, body.ltr a, body.ltr label, body.ltr input, body.ltr textarea, body.ltr button {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
}

/* ─── BODY TEXT ALIGNMENT ───
   Ragged-edge alignment (right for Persian, left for English) instead of
   justify: with mixed Persian/English/numeral text and no hyphenation,
   justify stretches word-spacing unevenly in narrow cards and looks worse
   than a clean ragged edge, which is the standard for web body text. */
p {
  text-align: right;
}
body.ltr p {
  text-align: left;
}
.modal-desc {
  text-align: right;
}
body.ltr .modal-desc {
  text-align: left;
}



/* ─── NAV ─── */
nav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(
    105deg,
    #2563EB   0%,
    #2563EB   35%,
    #99F6E4   48%,
    #ffffff   50%,
    #99F6E4   52%,
    #2563EB   65%,
    #2563EB   100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoShimmer 7s ease-in-out infinite;
  padding: 6px 14px;
  border-radius: 10px;
  transition: filter 0.3s;
  filter: drop-shadow(0 0 2px rgba(37,99,235,0.28));
}

.logo:hover {
  filter: drop-shadow(0 0 5px rgba(37,99,235,0.50));
  animation-play-state: paused;
}

[data-theme="light"] .logo {
  filter: drop-shadow(0 0 1px rgba(37,99,235,0.15));
}

[data-theme="light"] .logo:hover {
  filter: drop-shadow(0 0 3px rgba(37,99,235,0.25));
}

@keyframes logoShimmer {
  0%   { background-position: 200% center; }
  50%  { background-position: -10% center; }
  100% { background-position: 200% center; }
}

/* RTL logo: same shimmer but not flipped */
body:not(.ltr) .logo {
  unicode-bidi: normal;
  direction: ltr;
}


.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
  flex: 1;
  justify-content: center;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nav-links a {
  color: var(--nav-link-color);
  text-decoration: none;
  font-size: 0.80rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--gold);
  background: rgba(37,99,235,0.22);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: flex;align-items:center;justify-content:center;
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.12);
}

.btn-icon:hover {
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.15);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-lang {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 10px;
  border: none;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: 'Noto Sans Arabic', sans-serif;
  letter-spacing: 0.5px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 0;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.12);
}

.btn-lang:hover {
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.15);
  color: var(--gold);
  transform: translateY(-1px);
}

.lang-globe {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 0;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(37,99,235,0.55);
  opacity: 1;
  transition: var(--transition);
}
[data-theme="light"] .lang-globe {
  color: rgba(37,99,235,0.50);
  opacity: 1;
}
.btn-lang:hover .lang-globe {
  color: rgba(37,99,235,0.90);
}

.lang-flag {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.82rem;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.lang-text {
  position: relative;
  z-index: 1;
}


.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--card);
  transition: var(--transition);
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.12);
}

.hamburger:hover {
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1),
              opacity 0.3s ease,
              width 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--gold); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--gold); }

/* Mobile nav */
.mobile-menu {
  position: fixed;
  bottom: 88px; right: 12px; left: auto;
  transform: translateY(20px);
  width: min(256px, calc(100vw - 40px));
  z-index: 99;
  padding: 0 0 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1),
              transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: none;
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #EFF2F8;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(37,99,235,0.22);
}

[data-theme="dark"] .mobile-menu ul {
  background: #0D1B2E;
  border-color: rgba(37,99,235,0.88);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(37,99,235,0.46);
}

/* stagger slide-in per item */
.mobile-menu li {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  border: 1px solid rgba(37,99,235,0.54);
  border-radius: 9px;
}

/* ── باز شدن ── */
.mobile-menu.open li:nth-child(1) { opacity:1; transform:none; transition-delay: 0.000s; }
.mobile-menu.open li:nth-child(2) { opacity:1; transform:none; transition-delay: 0.020s; }
.mobile-menu.open li:nth-child(3) { opacity:1; transform:none; transition-delay: 0.040s; }
.mobile-menu.open li:nth-child(4) { opacity:1; transform:none; transition-delay: 0.060s; }
.mobile-menu.open li:nth-child(5) { opacity:1; transform:none; transition-delay: 0.080s; }
.mobile-menu.open li:nth-child(6) { opacity:1; transform:none; transition-delay: 0.100s; }
.mobile-menu.open li:nth-child(7) { opacity:1; transform:none; transition-delay: 0.120s; }
.mobile-menu.open li:nth-child(8) { opacity:1; transform:none; transition-delay: 0.140s; }
.mobile-menu.open li:nth-child(9) { opacity:1; transform:none; transition-delay: 0.160s; }
.mobile-menu.open li:nth-child(10) { opacity:1; transform:none; transition-delay: 0.180s; }
/* ── بسته شدن ── */
.mobile-menu:not(.open) li:nth-child(10) { transition-delay: 0.000s; }
.mobile-menu:not(.open) li:nth-child(9) { transition-delay: 0.016s; }
.mobile-menu:not(.open) li:nth-child(8) { transition-delay: 0.031s; }
.mobile-menu:not(.open) li:nth-child(7) { transition-delay: 0.047s; }
.mobile-menu:not(.open) li:nth-child(6) { transition-delay: 0.062s; }
.mobile-menu:not(.open) li:nth-child(5) { transition-delay: 0.078s; }
.mobile-menu:not(.open) li:nth-child(4) { transition-delay: 0.093s; }
.mobile-menu:not(.open) li:nth-child(3) { transition-delay: 0.109s; }
.mobile-menu:not(.open) li:nth-child(2) { transition-delay: 0.124s; }
.mobile-menu:not(.open) li:nth-child(1) { transition-delay: 0.140s; }
.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.mobile-menu a:hover {
  color: var(--gold);
  background: rgba(37,99,235,0.16);
}





/* ─── MOBILE BOTTOM BAR ─── */
.mobile-bottom-bar {
  display: none;
}

/* Contact popup above bar */
.bottom-contact-popup {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: max-content;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.22), 0 0 0 1px rgba(37,99,235,0.15);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4,0,0.2,1), transform 0.25s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="dark"] .bottom-contact-popup {
  background: rgba(5,12,28,0.97);
  border-color: rgba(37,99,235,0.50);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(37,99,235,0.35);
}

.bottom-contact-popup.open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.bottom-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.80rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34,1.56,0.64,1),
              background 0.18s, filter 0.18s;
}

.bottom-contact-popup.open .bottom-contact-item:nth-child(1) { opacity:1; transform:none; transition-delay:0.05s; }
.bottom-contact-popup.open .bottom-contact-item:nth-child(2) { opacity:1; transform:none; transition-delay:0.11s; }
.bottom-contact-popup.open .bottom-contact-item:nth-child(3) { opacity:1; transform:none; transition-delay:0.17s; }
.bottom-contact-popup.open .bottom-contact-item:nth-child(4) { opacity:1; transform:none; transition-delay:0.23s; }

.bottom-contact-item.tg { background: rgba(42,171,238,0.12); color: #2AABEE; border-color: rgba(42,171,238,0.25); }
.bottom-contact-item.wa { background: rgba(37,211,102,0.12); color: #25D366; border-color: rgba(37,211,102,0.25); }
.bottom-contact-item.ei { background: rgba(234,67,53,0.12);  color: #EA4335; border-color: rgba(234,67,53,0.25); }
.bottom-contact-item.ph { background: rgba(239,68,68,0.12);  color: #ef4444; border-color: rgba(239,68,68,0.25); }
.bottom-contact-item svg { flex-shrink: 0; }
.bottom-contact-item:hover { filter: brightness(1.18); }
.bottom-contact-item:active { transform: scale(0.96); }

/* Contact popup above bar */
.bottom-contact-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 8px;
  background: #EFF2F8;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(37,99,235,0.28);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
  margin-left: 10px;
}

[data-theme="dark"] .bottom-contact-popup {
  background: #0D1B2E;
  border-color: rgba(37,99,235,0.88);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(37,99,235,0.46);
}

/* ── فشار دکمه: بوردر ضخیم‌تر ── */
.btn-icon:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

.btn-lang:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

.hamburger:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

.btn-primary:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

.btn-outline:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

.mobile-bottom-btn:active {
  transform: scale(0.92);
}

.bottom-contact-item:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 2px 6px rgba(0,0,0,0.15);
  transform: scale(0.97);
}
[data-theme="dark"] .logo-mark-wrap {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 4px rgba(0,0,0,0.25);
}

[data-theme="light"] .logo-mark-wrap {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.75),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 4px rgba(0,0,0,0.07);
}

[data-theme="light"] .logo-wrapper:hover .logo-mark-wrap {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.07);
}

[data-theme="dark"] .btn-icon {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 4px rgba(0,0,0,0.25);
}

[data-theme="dark"] .btn-lang {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 4px rgba(0,0,0,0.25);
}

[data-theme="light"] .btn-lang {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.75),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 4px rgba(0,0,0,0.07);
}

[data-theme="light"] .btn-icon {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.75),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 4px rgba(0,0,0,0.07);
}

[data-theme="light"] .btn-icon:hover {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.07);
}

[data-theme="light"] .btn-lang:hover {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.07);
}

[data-theme="dark"] .hamburger {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.25);
}

[data-theme="dark"] .mobile-bottom-btn {
  /* dark theme handled via border-top on parent bar */
}

[data-theme="dark"] .btn-outline {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 4px rgba(0,0,0,0.25);
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-outline {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.75),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 4px rgba(0,0,0,0.07);
}

[data-theme="light"] .btn-detail {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.75),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 4px rgba(0,0,0,0.07);
}

[data-theme="light"] .btn-tech {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.75),
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 4px rgba(0,0,0,0.07);
}

[data-theme="dark"] .bottom-contact-item.tg,
[data-theme="dark"] .bottom-contact-item.wa,
[data-theme="dark"] .bottom-contact-item.ei,
[data-theme="dark"] .bottom-contact-item.ph {
  box-shadow: inset 0 0 0 1px rgba(37,99,235,1.00), 0 2px 8px rgba(0,0,0,0.2);
}

[data-theme="dark"] .mobile-menu li {
  border-color: rgba(37,99,235,0.93);
}

.bottom-contact-popup.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bottom-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.34,1.56,0.64,1),
              background 0.2s, box-shadow 0.2s, filter 0.2s;
}

.bottom-contact-popup.open .bottom-contact-item:nth-child(1) { opacity:1; transform:none; transition-delay:0.08s; }
.bottom-contact-popup.open .bottom-contact-item:nth-child(2) { opacity:1; transform:none; transition-delay:0.18s; }
.bottom-contact-popup.open .bottom-contact-item:nth-child(3) { opacity:1; transform:none; transition-delay:0.28s; }
.bottom-contact-popup.open .bottom-contact-item:nth-child(4) { opacity:1; transform:none; transition-delay:0.38s; }

.bottom-contact-item.tg { background: rgba(42,171,238,0.1); color: #2AABEE; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.93), 0 2px 8px rgba(0,0,0,0.1); }
.bottom-contact-item.wa { background: rgba(37,211,102,0.1); color: #25D366; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.93), 0 2px 8px rgba(0,0,0,0.1); }
.bottom-contact-item.ei { background: rgba(234,67,53,0.1);  color: #EA4335; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.93), 0 2px 8px rgba(0,0,0,0.1); }
.bottom-contact-item.ph { background: rgba(239,68,68,0.1);  color: #ef4444; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.93), 0 2px 8px rgba(0,0,0,0.1); }

.bottom-contact-item svg { flex-shrink: 0; width: 20px; height: 20px; }

.bottom-contact-item:hover { filter: brightness(1.15); }

@media (max-width: 900px) {
  /* Hide theme button from desktop nav on mobile */
  #themeBtn { display: none !important; }

  /* ─── MOBILE BOTTOM BAR — redesigned ─── */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--nav-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
    align-items: stretch;
    justify-content: space-around;
    padding-left: 4px;
    padding-right: 4px;
    direction: ltr;
  }

  .mobile-bottom-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 68px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.60rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: color 0.22s ease, transform 0.18s ease;
    position: relative;
    padding: 0 4px;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-btn::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 32px;
    height: 3px;
    background: var(--gold);
    border-radius: 0 0 3px 3px;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
  }

  .mobile-bottom-btn.active::before,
  .mobile-bottom-btn:focus-visible::before {
    transform: translateX(-50%) scaleX(1);
  }

  .mobile-bottom-btn.active,
  .mobile-bottom-btn:focus-visible {
    color: var(--gold);
  }

  .mobile-bottom-btn:active {
    transform: scale(0.92);
    color: var(--gold);
  }

  .mobile-bottom-btn svg,
  .mobile-bottom-btn .btn-icon-inner {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  }

  .mobile-bottom-btn.active svg,
  .mobile-bottom-btn.active .btn-icon-inner {
    transform: translateY(-1px);
  }

  /* Contact button — highlighted */
  .mobile-bottom-btn.contact-btn {
    color: var(--gold);
  }

  .mobile-bottom-btn.contact-btn svg {
    filter: drop-shadow(0 0 6px rgba(37,99,235,0.5));
  }

  .mobile-bottom-btn.contact-btn.open {
    color: var(--gold-light);
  }

  .mobile-bottom-btn.contact-btn.open svg {
    filter: drop-shadow(0 0 10px rgba(37,99,235,0.8));
    transform: rotate(20deg) scale(1.05);
  }

  /* Hamburger bars inside bottom bar */
  .bottom-hamburger-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
  }

  .bottom-hamburger-bars span {
    display: block;
    width: 18px; height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
                opacity 0.22s ease,
                width 0.22s ease;
    transform-origin: center;
  }

  .mobile-bottom-btn.menu-open .bottom-hamburger-bars span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .mobile-bottom-btn.menu-open .bottom-hamburger-bars span:nth-child(2) {
    opacity: 0; width: 0;
  }
  .mobile-bottom-btn.menu-open .bottom-hamburger-bars span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* mobile-menu needs display:block on mobile to appear */
  .mobile-menu { display: block; }

  /* hide old hamburger + float button on mobile */
  .hamburger { display: none !important; }
  /* hide desktop back-to-top since we have one in bar */
  .back-to-top { display: none !important; }

  /* push body content up so bottom bar doesn't overlap footer */
  body { padding-bottom: 90px; }
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--hero-gradient);
  position: relative;
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero {
    min-height: calc(100dvh - 68px);
    padding: 0 24px;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 100dvh !important;
    height: auto !important;
    padding: 0 16px !important;
    justify-content: center !important;
  }
}

/* ─── LIGHT THEME HERO AMBIENT GLOW ─── */
[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse 60% 50% at 22% 60%, rgba(37,99,235,0.06) 0%, transparent 70%);
}

/* ─── HERO BACKGROUND DEPTH ─── */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 22% 60%, rgba(37,99,235,0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero::after { content: none; }

/* ─── HERO BIG LOGO — hidden (minimal mode) ─── */
.hero-logo-icon { display: none; }

/* ─── HERO TAGLINE BADGE ─── */
.hero-tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(37,99,235,0.28);
  color: var(--gold-light);
  font-size: 0.80rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 32px;
  align-self: flex-start;
}

@media (max-width: 900px) {
  .hero-tagline-badge {
    align-self: center;
  }
}

@media (max-width: 600px) {
  .hero-tagline-badge {
    display: none !important;
  }
}

[data-theme="light"] .hero-tagline-badge {
  background: rgba(37,99,235,0.09);
  border-color: rgba(37,99,235,0.35);
  color: var(--gold-dark);
}

.hero-tagline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(37,99,235,0.8);
}

.hero-tagline-cursor {
  display: inline-block;
  color: var(--gold);
  font-weight: 300;
  margin-right: 1px;
  animation: taglineCursorBlink 0.8s step-end infinite;
}
@keyframes taglineCursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── HERO BACKGROUND: CONCENTRIC DIAMONDS ───
   لوزی‌های هم‌مرکز که از کوچک به بزرگ پشت سرهم قرار گرفته‌اند (بوردر و گلوی نارنجی گرم + هاله‌ی نرم پشت کانون مشترک).
   مرکز مشترک: گوشه‌ی سمت راست-پایین هیرو (فیزیکی، مستقل از RTL).
   هر لوزی یک مربع چرخیده‌ی ۴۵ درجه با بوردر و سایه‌ی مستقل است.
*/
.hero-grid {
  contain: layout paint;
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

.hg-diamond {
  position: absolute;
  right: -130px;
  bottom: -190px;
  width: var(--hgw);
  height: var(--hgw);
  transform: rotate(45deg);
  transform-origin: center center;
  border-radius: 4px;
  border: 1px solid transparent;
  /* فقط روی border-image (بدون background gradient و بدون z-index روی ۹۶ المان)
     چون هردوی اون‌ها هزینه‌ی پینت/کامپوزیت رو خیلی بالا می‌بردن و باعث افت سرعت و
     هنگ‌کردن صفحه می‌شدن. گرادیانت الان فقط روی لبه‌ست و خیلی زودتر (نزدیک نوک) محو
     می‌شه: پررنگ در نوک بالا، خیلی سریع کم‌رنگ به سمت پایین. */
  border-image: linear-gradient(to bottom, rgba(255,255,255, calc(var(--hgo) * 0.55 + 0.4)) 0%, rgba(255,255,255, 0) 30%) 1;
  background: transparent;
  /* box-shadow حذف شد: روی ۹۶ المان هم‌پوشان، محاسبه‌ی blur سایه‌ها سنگین‌ترین بخش پینت هدر بود */
  /* --hgo واقعی برای لوزی‌های بیرونی خیلی کم می‌شه (تا ۰.۰۴۵)، برای همین نوکشون تقریباً
     دیده نمی‌شد؛ این calc یه کف حداقلی (۰.۴) به رنگ نوک می‌ده تا نوک همه‌ی لوزی‌ها —
     چه داخلی چه بیرونی — واضح دیده بشه، و همچنان عمق نسبی حلقه‌ها هم حفظ بشه. */
}

/* لوزی اول (مرکزی‌ترین): پرشدگی قوی‌تر برای مشخص‌شدن کانون طرح، بدون افکت درخشش/سایه */
.hg-diamond:first-child {
  border-image: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0.25) 30%) 1;
  background: transparent;
}

[data-theme="light"] .hero-grid::before {
  background: radial-gradient(circle, rgba(37,99,235,0.16) 0%, rgba(37,99,235,0.05) 45%, transparent 72%);
}
[data-theme="light"] .hg-diamond {
  border-image: linear-gradient(to bottom, rgba(37,99,235, calc(var(--hgo) * 0.55 + 0.4)) 0%, rgba(37,99,235, 0) 30%) 1;
  background: transparent;
  /* box-shadow حذف شد، دلیل مشابه بالا */
}
[data-theme="light"] .hg-diamond:first-child {
  border-image: linear-gradient(to bottom, rgba(37,99,235,1) 0%, rgba(37,99,235,0.25) 30%) 1;
  background: transparent;
}

@media (max-width: 900px) {
  .hg-diamond { right: -190px; bottom: -250px; }
}

@media (max-width: 600px) {
  .hg-diamond { right: -210px; bottom: -280px; }
  .hero-grid { opacity: 0.45; }
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 64px;
  padding-top: 120px;
  padding-bottom: 60px;
}

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    gap: 40px;
    padding-top: 96px;
    padding-bottom: 40px;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero-inner {
    padding-top: 80px !important;
    padding-bottom: 32px !important;
    gap: 32px !important;
    flex-direction: column !important;
    align-items: center !important;
  }
}

/* hero-content: text block */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  flex: 1;
  min-width: 0;
}

@media (max-width: 900px) {
  .hero-content {
    align-items: center;
    text-align: center;
    width: 100%;
  }
}

/* Right column: tech icon cards */
.hero-tech-grid {
  flex: 0 0 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

@media (max-width: 900px) {
  .hero-tech-grid {
    flex: none;
    width: 100%;
    max-width: 520px;
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .hero-tech-grid {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  font-weight: 800;
  color: var(--hero-h1-color);
  line-height: 1.32;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
  text-align: start;
  text-shadow: 0 2px 32px rgba(0,0,0,0.40);
}

@media (max-width: 900px) {
  .hero h1 {
    text-align: center;
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    letter-spacing: -1px;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: clamp(1.5rem, 6.2vw, 2rem) !important;
    margin-bottom: 14px !important;
    letter-spacing: -0.5px !important;
  }
}

.hero h1 span {
  background: linear-gradient(110deg, #60A5FA 0%, #ffffff 50%, #60A5FA 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: h1Shimmer 6s ease-in-out infinite;
  display: inline-block;
}

@keyframes h1Shimmer {
  0%, 15%   { background-position: 0% center; }
  50%       { background-position: 100% center; }
  85%, 100% { background-position: 0% center; }
}

[data-theme="light"] .hero h1 span {
  background: linear-gradient(110deg, #0C6B62 0%, #2563EB 50%, #0C6B62 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: h1Shimmer 6s ease-in-out infinite;
}

.hero p {
  font-size: 0.97rem;
  color: var(--hero-p-color);
  max-width: 480px;
  line-height: 2.05;
  margin-bottom: 36px;
  text-align: start;
  opacity: 0.90;
}
.hero p.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  max-width: 520px;
  line-height: 1.6;
  margin: -10px 0 16px;
  opacity: 1;
  letter-spacing: 0.1px;
}

@media (max-width: 900px) {
  .hero p {
    text-align: center;
    max-width: 540px;
  }
}

@media (max-width: 600px) {
  .hero p {
    font-size: 0.875rem !important;
    margin-bottom: 20px !important;
    line-height: 1.70 !important;
  }
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-btns {
    justify-content: center;
  }
}

.hero-btns .btn-primary,
.hero-btns .btn-outline {
  min-width: 0;
  width: 175px;
  height: 48px;
  justify-content: center;
  text-align: center;
  padding: 0 22px;
  font-size: 0.93rem;
  font-weight: 700;
  border-radius: 14px;
  box-sizing: border-box;
}

/* ─── PREMIUM BUTTON BORDERS ─── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 30px;
  background: var(--card);
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
  overflow: visible;
  border: 1px solid transparent;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.12);
  outline: none;
}

.btn-primary::after { content: none; }
.btn-primary::before { content: none; }
.btn-primary:hover::before { opacity: 0; }

.btn-primary:hover {
  transform: translateY(-2px);
  color: var(--gold);
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 18px rgba(37,99,235,0.50),
    0 4px 16px rgba(0,0,0,0.18);
}

.btn-primary:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

[data-theme="dark"] .btn-primary {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 4px rgba(0,0,0,0.25);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.12);
}

.btn-outline::before { content: none; }
.btn-outline:hover::before { background: none; }

.btn-outline:hover {
  color: var(--gold);
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 18px rgba(37,99,235,0.50),
    0 4px 16px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
}

@media (max-width: 900px) {
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    max-width: 100% !important;
  }
}

/* ── Tech icon cards ── */
.stat {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 14px 18px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  cursor: default;
}

@media (max-width: 600px) {
  .stat {
    padding: 16px 10px 14px !important;
    border-radius: 14px !important;
  }
}

.stat:hover {
  border-color: rgba(37,99,235,0.45);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
}

.stat-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 4px rgba(79,70,229,0.20));
  transition: filter 0.3s;
}

.stat-icon-wrap:hover {
  filter: drop-shadow(0 0 10px rgba(37,99,235,0.45));
}

.stat-sub {
  font-size: 0.68rem;
  color: var(--hero-p-color);
  margin-top: 3px;
  font-family: 'Noto Sans Arabic', sans-serif;
  letter-spacing: 0.3px;
  opacity: 0.80;
}

.stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}

.stat .lbl {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--hero-p-color);
  margin-top: 3px;
}

/* ─── SECTION ─── */
section {
  padding: 90px 24px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.25;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.75;
  margin: 0 auto 48px;
  font-weight: 500;
  text-align: center;
}
/* .lang-section keeps a fixed dark background in both themes (var(--primary)),
   but the generic .section-sub color swaps with the theme — this override keeps
   the paragraph readable in light mode too. */
.lang-section .section-sub { color: rgba(255,255,255,0.75) !important; }

/* پاراگراف‌های معرفی بخش «خدمات»، «هوش مصنوعی» و «بروکرها» بلندترند؛
   در دسکتاپ عرض بیشتری می‌گیرند تا شکسته‌بندی خط منظم شود */
@media (min-width: 901px) {
  .services-section .section-sub,
  .ai-section .section-sub,
  .brokers-section .section-sub {
    max-width: 860px;
  }
}

/* ─── SLIDER ─── */
.slider-section {
  background: var(--bg);
  padding: 80px 24px;
}

.slider-wrap {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.slider-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
}

.slide {
  display: none;
  padding: 48px 60px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity:0; transform:translateY(10px); }
  to { opacity:1; transform:translateY(0); }
}

.slide-icon {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(37,99,235,0.22);
  display: flex; align-items:center; justify-content:center;
  font-size: 2.6rem;
  margin: 0 auto 24px;
  border: 2px solid rgba(37,99,235,0.55);
}

.slide h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.slide p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 450px;
  margin: 0 auto 28px;
  line-height: 1.75;
  font-weight: 500;
}

.slide .btn-primary { font-size: 0.88rem; padding: 10px 22px; }

.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;align-items:center;justify-content:center;
  font-size: 1.2rem;
  transition: var(--transition);
  z-index: 5;
}

.slider-prev { right: -56px; }
.slider-next { left: -56px; }

.slider-prev:hover, .slider-next:hover {
  background: var(--gold);
  color: #07111F;
  border-color: var(--gold);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 100px;
  background: var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--gold);
  width: 24px;
}

/* ─── SERVICES GRID ─── */
.services-section { background: var(--bg); }

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

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transition: transform 0.35s;
  transform-origin: right;
}

.service-card:hover {
  border-color: rgba(79,70,229,0.65);
  transform: translateY(-6px);
  box-shadow: var(--glow);
}

.service-card:hover::before { transform: scaleX(1); transform-origin: left; }

.service-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(79,70,229,0.16);
  display: flex;align-items:center;justify-content:center;
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.service-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
  font-weight: 500;
  flex: 1;
}

.service-card .btn-detail {
  align-self: flex-start;
  margin-top: auto;
}

.btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  padding: 7px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.12);
}

.btn-detail::after {
  content: none;
}

.btn-detail:hover {
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.15);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-detail:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

[data-theme="dark"] .btn-detail {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 4px rgba(0,0,0,0.25);
}

/* ─── LANG CARDS ─── */
.lang-section { background: var(--primary); }

.lang-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1150px) {
  .lang-cards { grid-template-columns: 1fr 1fr; }
}

.lang-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.lang-card:hover {
  border-color: rgba(79,70,229,0.65);
  transform: translateY(-6px);
  background: rgba(79,70,229,0.10);
  box-shadow: var(--glow);
}

.lang-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(79,70,229,0.22);
  color: var(--blue-light);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.lang-card h3 { font-size: 1.2rem; font-weight: 600; color: #fff; margin-bottom: 10px; }
.lang-card p { font-size: 0.87rem; color: rgba(255,255,255,0.88); line-height: 1.7; margin-bottom: 16px; flex: 1; }
.lang-card .btn-code { align-self: flex-start; margin-top: auto; }

.lang-ref-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s, color 0.2s;
  margin-bottom: 16px;
  font-family: 'Noto Sans Arabic', sans-serif;
  letter-spacing: 0.2px;
}
.lang-ref-link::before {
  content: '↗';
  font-size: 0.7rem;
}
.lang-ref-link:hover {
  opacity: 1;
  color: var(--gold-light);
  text-decoration: underline;
}

.btn-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 10px;
  color: var(--gold);
  background: rgba(37,99,235,0.09);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.62),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 2px 8px rgba(37,99,235,0.28);
}

.btn-code::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 11px;
  background: linear-gradient(90deg,
    rgba(37,99,235,0.00) 0%,
    rgba(255,209,102,0.7) 40%,
    rgba(37,99,235,1.00) 60%,
    rgba(37,99,235,0.00) 100%
  );
  background-size: 200% 100%;
  background-position: -100% 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s, background-position 0.6s ease;
}

.btn-code:hover::before {
  opacity: 1;
  background-position: 100% 0;
}

.btn-code:hover {
  background: rgba(37,99,235,0.19);
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.00),
    0 4px 16px rgba(37,99,235,0.55);
  transform: translateY(-1px);
}

/* ─── AI MODELS ─── */
.ai-section { background: var(--bg); }

/* ─── AI PIPELINE STRIP — PREMIUM RESPONSIVE ─── */
.ai-pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
@media (max-width: 600px) {
  .ai-pipeline { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 380px) {
  .ai-pipeline { grid-template-columns: repeat(2, 1fr); }
}

.ai-pipe-step {
  position: relative; cursor: pointer; outline: none;
  text-align: center;
  padding: 14px 6px 12px;
  background: var(--card);
  border-inline-end: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  overflow: hidden;
}
.ai-pipe-step:last-child,
.ai-pipe-step:nth-child(6) { border-inline-end: none; }
@media (max-width: 600px) {
  .ai-pipe-step:nth-child(3) { border-inline-end: none; }
  .ai-pipe-step:nth-child(6) { border-inline-end: 1px solid var(--border); }
  .ai-pipe-step:nth-child(4),
  .ai-pipe-step:nth-child(5),
  .ai-pipe-step:nth-child(6) { border-bottom: none; }
}
@media (max-width: 380px) {
  .ai-pipe-step:nth-child(2n) { border-inline-end: none; }
  .ai-pipe-step:nth-child(3n),
  .ai-pipe-step:nth-child(6n) { border-inline-end: 1px solid var(--border); }
  .ai-pipe-step:nth-child(5),
  .ai-pipe-step:nth-child(6) { border-bottom: none; }
}

.ai-pipe-step::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(37,99,235,0.09);
  opacity: 0; transition: opacity 0.3s;
}
.ai-pipe-step.pipe-active::before { opacity: 1; }
.ai-pipe-step.pipe-active {
  border-color: rgba(37,99,235,0.5) !important;
  z-index: 2;
}

.pipe-icon-badge {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(37,99,235,0.08); border: 1px solid rgba(37,99,235,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), background 0.25s;
  position: relative; z-index: 1;
}
.ai-pipe-step.pipe-active .pipe-icon-badge {
  transform: scale(1.15) translateY(-2px);
  background: rgba(37,99,235,0.2);
}

.pipe-step-num {
  font-size: 0.56rem; font-weight: 700; letter-spacing: 0.8px;
  color: var(--gold); text-transform: uppercase;
  opacity: 0; transform: translateY(3px);
  transition: opacity 0.25s, transform 0.25s;
  position: relative; z-index: 1;
}
.ai-pipe-step.pipe-active .pipe-step-num { opacity: 1; transform: translateY(0); }

.pipe-label {
  font-size: 0.67rem; font-weight: 700; color: var(--text);
  display: block; position: relative; z-index: 1; line-height: 1.3;
}
.pipe-sub {
  font-size: 0.59rem; color: var(--text-muted);
  line-height: 1.35; position: relative; z-index: 1;
  text-align: center;
}

.pipe-active-dot {
  position: absolute; top: 5px; right: 5px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); opacity: 0; transition: opacity 0.2s;
}
.ai-pipe-step.pipe-active .pipe-active-dot {
  opacity: 1;
  animation: pipepulse 1.8s infinite;
}
@keyframes pipepulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,0.6); }
  70%  { box-shadow: 0 0 0 5px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

/* Progress bar */
.pipe-progress-wrap {
  height: 2px; background: var(--border);
  border-radius: 1px; margin: 8px 0 0; overflow: hidden;
}
.pipe-progress-fill {
  height: 100%; background: var(--gold);
  border-radius: 1px; width: 0%;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* Auto-advance timer bar inside active step */
.pipe-timer-bar {
  position: absolute; bottom: 0; left: 0;
  height: 2px; background: var(--gold);
  width: 0%; transition: none;
}
.ai-pipe-step.pipe-active .pipe-timer-bar {
  transition: width linear;
}

/* Detail panel */
.pipe-detail {
  margin: 10px 0 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
  min-height: 68px;
}
.pipe-detail.pipe-detail-visible { opacity: 1; transform: translateY(0); }
.pipe-detail-icon { font-size: 1.5rem; flex-shrink: 0; }
.pipe-detail-body { flex: 1; min-width: 0; }
.pipe-detail-title { font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.pipe-detail-desc { font-size: 0.74rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.pipe-detail-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pipe-detail-tag {
  font-size: 0.62rem; font-weight: 600; padding: 2px 8px;
  border-radius: 100px;
  background: rgba(37,99,235,0.09);
  color: var(--gold); border: 1px solid rgba(37,99,235,0.22);
}

/* Dot nav */
.pipe-step-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.pipe-step-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.pipe-step-dot.pipe-dot-active { background: var(--gold); transform: scale(1.5); }

[data-theme="light"] .ai-pipeline { border-color: #C8CDD8; }
[data-theme="light"] .ai-pipe-step { background: #fff; border-color: #C8CDD8; }
[data-theme="light"] .ai-pipe-step.pipe-active { border-color: rgba(99,102,241,0.5) !important; }
[data-theme="light"] .ai-pipe-step::before { background: rgba(99,102,241,0.07); }
[data-theme="light"] .pipe-detail { background: #fff; border-color: #C8CDD8; border-inline-start-color: #1E40AF; }
[data-theme="light"] .pipe-detail-tag { background: rgba(99,102,241,0.07); color: #1E40AF; border-color: rgba(99,102,241,0.16); }
[data-theme="light"] .pipe-icon-badge { background: rgba(99,102,241,0.07); border-color: rgba(99,102,241,0.13); }
[data-theme="light"] .ai-pipe-step.pipe-active .pipe-icon-badge { background: rgba(99,102,241,0.15); }

/* ─── LIGHT MODE ENHANCEMENTS ─── */
[data-theme="light"] .service-card {
  background: #FFFFFF;
  border-color: #C8D3E0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 0 0 0.5px rgba(0,0,0,0.04);
}
[data-theme="light"] .service-card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.10), 0 0 0 1px rgba(79,70,229,0.30);
}
[data-theme="light"] .section-label { color: #1E40AF; }
[data-theme="light"] .skill-tag {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.22);
  color: #1E40AF;
}
/* Blue complement for tech badges in light mode */
[data-theme="light"] .lang-section { background: #0C1A2E; }
[data-theme="light"] .portfolio-card {
  background: #FFFFFF;
  border-color: #C8D3E0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
[data-theme="light"] .portfolio-card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(79,70,229,0.22);
}
/* Dark card in dark mode — subtle border glow for depth */
[data-theme="dark"] .service-card {
  border-color: #1A2D45;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
[data-theme="dark"] .service-card:hover {
  border-color: rgba(79,70,229,0.55);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(79,70,229,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="dark"] .portfolio-card {
  border-color: #1A2D45;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
[data-theme="dark"] .portfolio-card:hover {
  border-color: rgba(79,70,229,0.6);
}
/* Pricing card improvements in dark */
[data-theme="dark"] .pricing-card {
  border-color: #1A2D45;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
[data-theme="dark"] .pricing-card.featured {
  border-color: rgba(37,99,235,0.75);
  box-shadow: 0 14px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
/* Blue complement: use on tech stack indicators */
[data-theme="light"] .btn-tech {
  color: #1A2B3C;
}
[data-theme="light"] .btn-tech:hover {
  color: #1E40AF;
}
/* ── Hero stats: موبایل ── */

/* ─── HERO MOBILE: single column ─── */
@media (max-width: 860px) {
  .hero-inner {
    padding-top: 96px;
    padding-bottom: 36px;
  }
  .hero-stats {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .hero {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    padding: 0 18px;
    justify-content: center;
  }
  .hero-inner {
    padding-top: 76px;
    padding-bottom: 24px;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
  }
  .hero-content {
    display: contents;
  }
  .hero h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 16px;
    line-height: 1.22;
    text-align: center;
    order: 1;
  }
  .hero-tech-grid {
    order: 2;
    margin-top: 0;
    width: 100%;
    flex: none;
    flex-shrink: 0;
  }
  .hero p {
    font-size: 0.9rem;
    line-height: 1.66;
    margin-bottom: 16px;
    max-width: 100%;
    text-align: center;
    order: 3;
  }
  .hero-btns {
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: center;
    margin-bottom: 0;
    order: 4;
  }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline {
    min-width: 0;
    width: auto;
    height: 48px;
    flex: 1;
    padding: 0 14px;
    font-size: 0.86rem;
    border-radius: 14px;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
  .hero-stats {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
  }
  .stat {
    padding: 10px 4px 8px !important;
    border-radius: 12px !important;
  }
  .stat-icon-wrap svg { width: 20px; height: 20px; }
  .stat-icon-wrap { margin-bottom: 4px; }
  .stat .lbl { font-size: 0.56rem; font-weight: 700; }
  .stat-sub { display: none; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 1.35rem; }
  .hero p  { font-size: 0.84rem; }
  .stat .lbl { font-size: 0.52rem; }
}

/* ── کاهش انیمیشن برای دسترسی‌پذیری ── */
@media (prefers-reduced-motion: reduce) {
  .hero-logo-icon,
  .hero-logo-icon::before,
  .hero-logo-icon::after,
  .hero-orbit,
  .hero-orbit2,
  .hero-orbit-dot,
  .hls-bar, .hls-bar-r, .hls-diag,
  .hls-e1, .hls-e2, .hls-e3 {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ai-pipe-step { animation: pipeSlideIn 0.45s both; }
  .ai-pipe-step:nth-child(1) { animation-delay: 0.04s; }
  .ai-pipe-step:nth-child(2) { animation-delay: 0.10s; }
  .ai-pipe-step:nth-child(3) { animation-delay: 0.16s; }
  .ai-pipe-step:nth-child(4) { animation-delay: 0.22s; }
  .ai-pipe-step:nth-child(5) { animation-delay: 0.28s; }
  .ai-pipe-step:nth-child(6) { animation-delay: 0.34s; }
  @keyframes pipeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ─── AI TABS ─── */
.ai-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.ai-tab {
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: 0.3px;
}
.ai-tab:hover { border-color: rgba(37,99,235,0.5); color: var(--gold); }
.ai-tab.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
[data-theme="light"] .ai-tab { background: #fff; border-color: #B8C9DC; color: #2C3E50; }
[data-theme="light"] .ai-tab.active { background: #2563EB; border-color: #2563EB; color: #fff; }

/* ─── AI GRID ─── */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.ai-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ai-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(79,70,229,0.55), transparent);
  opacity: 0;
  transition: var(--transition);
}
.ai-card:hover::before { opacity: 1; }
.ai-card:hover {
  border-color: rgba(79,70,229,0.55);
  transform: translateY(-3px);
}
.ai-card.new-card {
  border-color: rgba(0,187,100,0.4);
}
.ai-card.new-card::after {
  content: 'NEW';
  position: absolute;
  top: 12px; right: 12px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #00bb64;
  background: rgba(0,187,100,0.12);
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid rgba(0,187,100,0.3);
}

.ai-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(79,70,229,0.18);
  color: var(--blue-light);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.ai-tag.tag-rl { background: rgba(255,120,0,0.15); color: #12A398; }
.ai-tag.tag-gen { background: rgba(160,0,255,0.12); color: #8800cc; }
.ai-tag.tag-factor { background: rgba(0,160,100,0.12); color: #007a44; }
.ai-tag.tag-risk { background: rgba(200,0,50,0.12); color: #aa0028; }

[data-theme="light"] .ai-tag.tag-rl { background: rgba(255,120,0,0.12); color: #0B8177; }
[data-theme="light"] .ai-tag.tag-gen { background: rgba(140,0,220,0.1); color: #6600aa; }
[data-theme="light"] .ai-tag.tag-factor { background: rgba(0,140,80,0.1); color: #006035; }
[data-theme="light"] .ai-tag.tag-risk { background: rgba(180,0,40,0.1); color: #900022; }

.ai-card h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.ai-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; flex: 1; }

/* ─── AI COMPLEXITY BADGE ─── */
.ai-complexity {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.ai-complexity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
}
.ai-complexity-dot.filled { background: var(--gold); }
.ai-complexity-label {
  font-size: 0.65rem;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: auto;
}

[data-theme="light"] .ai-section { background: #EBF0F7; }
[data-theme="light"] .ai-card {
  background: #FFFFFF;
  border: 1px solid #B8C9DC;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
[data-theme="light"] .ai-card h3 { color: #0D1B2A; }
[data-theme="light"] .ai-card p { color: #2C3E50; }
[data-theme="light"] .ai-tag {
  background: rgba(99,102,241,0.12);
  color: #1E40AF;
}
[data-theme="light"] .ai-complexity-dot.filled { background: #1E40AF; }
[data-theme="light"] .ai-section .section-title { color: #0D1B2A; }
[data-theme="light"] .ai-section .section-label { color: #1E40AF; }
[data-theme="light"] .ai-section .section-sub { color: #2C3E50; }

/* ─── AI WORKFLOW BOX ─── */
.ai-workflow {
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(37,99,235,0.07) 0%, rgba(99,102,241,0.03) 100%);
  border: 1px solid rgba(37,99,235,0.22);
  border-radius: 18px;
}
.ai-workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.ai-workflow-step {
  text-align: center;
  padding: 16px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
}
.ai-workflow-step .step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(37,99,235,0.22);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.ai-workflow-step .step-title { font-size: 0.78rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ai-workflow-step .step-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.5; }
[data-theme="light"] .ai-workflow { background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(99,102,241,0.02) 100%); border-color: rgba(99,102,241,0.2); }
[data-theme="light"] .ai-workflow-step { background: #fff; border-color: #C0D0E0; }
[data-theme="light"] .ai-workflow-step .step-num { background: rgba(99,102,241,0.1); color: #1E40AF; }

.btn-tech {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  transition: var(--transition);
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 1px 4px rgba(0,0,0,0.12);
  letter-spacing: 0.2px;
  margin-top: auto;
}

.btn-tech::after {
  content: none;
}

.btn-tech:hover::after { transform: none; }
.btn-tech:hover {
  gap: 9px;
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 12px rgba(37,99,235,0.55),
    0 2px 8px rgba(0,0,0,0.15);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-tech:active {
  box-shadow:
    inset 0 0 0 2px rgba(37,99,235,1.00),
    0 0 8px rgba(37,99,235,0.50);
  transform: translateY(1px);
}

[data-theme="dark"] .btn-tech {
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 4px rgba(0,0,0,0.25);
}

/* ─── ABOUT ─── */
.about-section { background: var(--bg); }
.why-automate-section { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: center;
}

.about-avatar {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 900 / 506;
  border-radius: 24px;
  background: linear-gradient(135deg, #07111F, #0C2248);
  display: flex;align-items:center;justify-content:center;
  font-size: 5rem;
  border: 1.5px solid rgba(37,99,235,0.40);
  margin: 0 auto;
  overflow: hidden;
}

.about-info h2 { font-size: 1.8rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.about-info p { font-size: 0.93rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 24px; }

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.skill-tag {
  padding: 6px 14px;
  background: rgba(79,70,229,0.16);
  border: 1px solid rgba(79,70,229,0.45);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-light);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tl-item {
  display: flex;
  gap: 16px;
  padding-right: 16px;
  border-right: 2px solid var(--border);
  position: relative;
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1),
              transform 0.55s cubic-bezier(0.22,1,0.36,1);
}

body.ltr .tl-item {
  padding-right: 0;
  padding-left: 16px;
  border-right: none;
  border-left: 2px solid var(--border);
}

.tl-item.tl-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tl-item::before {
  content: '';
  position: absolute;
  right: -6px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

body.ltr .tl-item::before {
  right: auto;
  left: -6px;
}

.tl-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  min-width: 40px;
}

.tl-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── PROCESS SECTION ─── */
.process-section {
  background: var(--bg);
  padding: 100px 24px;
  position: relative;
  overflow: hidden;
}

.process-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.process-header {
  text-align: center;
  margin-bottom: 72px;
}

.process-steps {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

/* Vertical connecting line */
.process-steps::before {
  content: '';
  position: absolute;
  right: 38px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, var(--gold) 10%, var(--gold) 90%, transparent 100%);
  opacity: 0.25;
}

.process-step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 32px;
  position: relative;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1),
              transform 0.6s cubic-bezier(0.22,1,0.36,1);
}

.process-step.ps-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered delays */
.process-step:nth-child(1)  { transition-delay: 0.05s; }
.process-step:nth-child(2)  { transition-delay: 0.12s; }
.process-step:nth-child(3)  { transition-delay: 0.19s; }
.process-step:nth-child(4)  { transition-delay: 0.26s; }
.process-step:nth-child(5)  { transition-delay: 0.33s; }
.process-step:nth-child(6)  { transition-delay: 0.40s; }
.process-step:nth-child(7)  { transition-delay: 0.47s; }
.process-step:nth-child(8)  { transition-delay: 0.54s; }
.process-step:nth-child(9)  { transition-delay: 0.61s; }

.ps-number-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(37,99,235,0.40);
  background: var(--card);
  box-shadow: 0 0 0 0 rgba(37,99,235,0.00);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.process-step.ps-visible .ps-ring {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(37,99,235,0.54);
  animation: psRingPulse 2.8s ease-in-out infinite;
}

@keyframes psRingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.55); }
  50%       { box-shadow: 0 0 0 8px rgba(37,99,235,0.00); }
}

.ps-number {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  position: relative;
  z-index: 1;
  font-family: 'Noto Sans Arabic', sans-serif;
}

.ps-icon {
  font-size: 1.25rem;
  position: relative;
  z-index: 1;
}

.ps-content {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
  position: relative;
  overflow: hidden;
}

.ps-content::before {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.process-step:hover .ps-content {
  border-color: rgba(79,70,229,0.48);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12), 0 0 0 1px rgba(79,70,229,0.26);
  transform: translateX(-4px);
}

.process-step:hover .ps-content::before {
  opacity: 1;
}

.ps-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Guarantee box */
.process-guarantee {
  max-width: 860px;
  margin: 40px auto 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.28) 0%, rgba(37,99,235,0.05) 100%);
  border: 1px solid rgba(37,99,235,0.55);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.65s, transform 0.6s ease 0.65s;
}

.process-guarantee.ps-visible {
  opacity: 1;
  transform: translateY(0);
}

.pg-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(37,99,235,0.62));
}

.pg-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.pg-text p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.pg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.19);
  border: 1px solid rgba(37,99,235,0.46);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: 8px;
}

/* ─── CONTACT ─── */
.contact-section { background: var(--primary); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 { font-size: 1.8rem; font-weight: 600; color: #fff; margin-bottom: 14px; }
.contact-info p { font-size: 0.92rem; color: rgba(255,255,255,0.88); line-height: 1.8; margin-bottom: 32px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}

.contact-link:hover {
  border-color: rgba(37,99,235,0.62);
  color: var(--gold);
  background: rgba(37,99,235,0.08);
}

.contact-link-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(37,99,235,0.23);
  display: flex;align-items:center;justify-content:center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Form */
.contact-form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 36px 32px;
}

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

.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,0.93);
  margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  direction: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
  background: rgba(37,99,235,0.08);
}

.form-group select option {
  background: #fff;
  color: #1a1a1a;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.45); }

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-error {
  font-size: 0.75rem;
  color: #fc8181;
  margin-top: 4px;
  display: none;
}

.form-error.show { display: block; }

.form-success {
  text-align: center;
  padding: 24px;
  color: #68d391;
  font-size: 1rem;
  font-weight: 600;
  display: none;
}

/* ─── FOOTER ─── */
footer {
  background: #06090F;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 56px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo { font-size: 1.3rem; display: inline-block; margin-bottom: 12px; }
.footer-brand p { font-size: 0.83rem; color: rgba(255,255,255,0.95); line-height: 1.7; }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  margin-bottom: 14px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-size: 0.83rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.93); }

.social-links { display: flex; gap: 10px; }
.social-link {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  display: flex;align-items:center;justify-content:center;
  font-size: 0.85rem;
  transition: var(--transition);
}
.social-link:hover { border-color: var(--gold); color: var(--gold); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Wrapper handles positioning + close button */
.modal-wrap {
  position: relative;
  max-width: 480px;
  width: 100%;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s;
}

.modal-overlay.open .modal-wrap {
  transform: scale(1) translateY(0);
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  position: relative;
  max-height: 82vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(37,99,235,0.75) transparent;
}

.modal::-webkit-scrollbar {
  width: 5px;
}

.modal::-webkit-scrollbar-track {
  background: transparent;
}

.modal::-webkit-scrollbar-thumb {
  background: rgba(37,99,235,0.75);
  border-radius: 10px;
}

.modal::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

.modal-close {
  position: absolute;
  top: -14px;
  inset-inline-end: -14px;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(37,99,235,0.88);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;align-items:center;justify-content:center;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.88),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 2px 8px rgba(0,0,0,0.18);
  z-index: 10;
}

.modal-close:hover {
  color: var(--gold);
  background: var(--card);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold), 0 0 10px rgba(37,99,235,0.30);
  transform: scale(1.08);
}

.modal-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(37,99,235,0.22);
  border: 1px solid rgba(37,99,235,0.55);
  display: flex;align-items:center;justify-content:center;
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.modal h2 { font-size: 1.15rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.modal .modal-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 18px; white-space: pre-line; }
.modal .modal-desc br + br { display: block; content: ''; margin-top: 4px; }

.modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.meta-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
}

.meta-box .meta-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.meta-box .meta-val { font-size: 1.1rem; font-weight: 800; color: var(--gold); }

.code-block {
  background: var(--primary);
  border-radius: 10px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: #a8ff78;
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}


/* ─── HERO BUTTONS MOBILE ─── */
@media (max-width: 480px) {
  .hero-btns {
    gap: 10px;
  }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline {
    width: 148px;
    height: 44px;
    font-size: 0.84rem;
    padding: 0 14px;
    border-radius: 12px;
  }
}

/* ─── RESPONSIVE ─── */
/* Nav switches to the hamburger menu earlier than the general breakpoint below:
   with 11 nav items, .nav-links (flex-wrap:nowrap; overflow:hidden) silently
   clips items off-screen anywhere from ~901px to ~1270px instead of wrapping. */
@media (max-width: 1300px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .lang-cards { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .slide { padding: 36px 24px; }
  .slider-prev { right: auto; left: 0; top: auto; bottom: -52px; transform: none; }
  .slider-next { left: auto; right: 0; top: auto; bottom: -52px; transform: none; }
  .slider-wrap { padding-bottom: 70px; }
  .proglang-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .modal-meta { grid-template-columns: 1fr; }
  .hero { padding: 0 16px; }
  section { padding: 60px 20px; }
  .proglang-grid { grid-template-columns: 1fr; }

  body.ltr .stat + .stat { border-right: none !important; border-left: 1px solid rgba(37,99,235,0.3) !important; }
}

/* Scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Elements in the hero/nav area should never be invisible on load */
.hero .reveal,
nav .reveal {
  opacity: 1;
  transform: none;
}

/* ─── THEME ICON SVG ANIMATION ─── */
.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 22px;
  height: 22px;
}

.theme-icon svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34,1.4,0.64,1);
}

.ti-sun  { opacity: 1;  transform: translate(-50%,-50%) rotate(0deg) scale(1); color: var(--gold); }
.ti-moon { opacity: 0;  transform: translate(-50%,-50%) rotate(40deg) scale(0.7); }

[data-theme="dark"] .ti-sun  { opacity: 0;  transform: translate(-50%,-50%) rotate(-40deg) scale(0.7); }
[data-theme="dark"] .ti-moon { opacity: 1;  transform: translate(-50%,-50%) rotate(0deg) scale(1); color: var(--gold); }

.btn-icon:hover .ti-sun,
.btn-icon:hover .ti-moon { color: var(--gold); }

/* Mobile theme icon */
.btn-icon-inner { position: relative; }

.btn-icon-inner svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34,1.4,0.64,1);
}

.btn-icon-inner .ti-sun  { opacity: 1;  transform: translate(-50%,-50%) rotate(0deg) scale(1); }
.btn-icon-inner .ti-moon { opacity: 0;  transform: translate(-50%,-50%) rotate(40deg) scale(0.7); }

[data-theme="dark"] .btn-icon-inner .ti-sun  { opacity: 0;  transform: translate(-50%,-50%) rotate(-40deg) scale(0.7); }
[data-theme="dark"] .btn-icon-inner .ti-moon { opacity: 1;  transform: translate(-50%,-50%) rotate(0deg) scale(1); }

/* ─── PORTFOLIO ─── */
.portfolio-section { background: var(--bg); }

.portfolio-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: var(--card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
  box-shadow:
    inset 0 0 0 1px var(--border),
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 1px 4px rgba(0,0,0,0.1);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--gold);
  color: #07111F;
  border-color: transparent;
  box-shadow:
    0 0 0 1px rgba(37,99,235,1.00),
    0 0 16px rgba(37,99,235,0.62),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portfolio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  border-color: rgba(37,99,235,0.62);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.portfolio-thumb {
  height: 180px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.portfolio-thumb-ea { background: linear-gradient(135deg, #07111F, #0D2A4A); }
.portfolio-thumb-signal { background: linear-gradient(135deg, #0d2137, #1a4a2e); }
.portfolio-thumb-ai { background: linear-gradient(135deg, #1a0a2e, #3a1a6e); }
.portfolio-thumb-indicator { background: linear-gradient(135deg, #1a0f0a, #4a2a0e); }
.portfolio-thumb-risk { background: linear-gradient(135deg, #0a1a0a, #1a4a1a); }
.portfolio-thumb-copy { background: linear-gradient(135deg, #0a0a1a, #1a1a4a); }

.portfolio-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent 82%, rgba(0,0,0,0.38));
}

/* ─── Code preview (replaces portfolio screenshots) ─── */
.code-window {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,0.24);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.24);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.code-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.code-dot-r { background: #ff5f56; }
.code-dot-y { background: #ffbd2e; }
.code-dot-g { background: #27c93f; }

.code-window-file {
  margin-inline-start: 6px;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-window-body {
  margin: 0;
  padding: 12px 14px;
  overflow: hidden;
  flex: 1;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.65;
  color: #d4d9e0;
  text-align: left;
  direction: ltr;
  white-space: pre;
}

.code-window-body .tok-kw  { color: #c586c0; }
.code-window-body .tok-str { color: #ce9178; }
.code-window-body .tok-num { color: #b5cea8; }
.code-window-body .tok-com { color: #6a9955; font-style: italic; }

.portfolio-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(37,99,235,1.00);
  color: #07111F;
  z-index: 1;
}

.portfolio-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.portfolio-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
}

.portfolio-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.portfolio-tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(37,99,235,0.22);
  color: var(--gold);
  border: 1px solid rgba(37,99,235,0.50);
}

.portfolio-result {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.portfolio-result-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold);
}

.portfolio-result-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ─── PRICING ─── */
.pricing-section { background: var(--primary); }

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.pricing-toggle span {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.90);
}

.pricing-toggle span.active {
  color: var(--gold);
}

.toggle-switch {
  width: 48px; height: 26px;
  border-radius: 100px;
  background: rgba(37,99,235,0.46);
  border: 1px solid rgba(37,99,235,0.62);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gold);
  top: 2px;
  right: 2px;
  transition: var(--transition);
}

.toggle-switch.annual::after {
  right: auto;
  left: 2px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
}

.pricing-card.featured {
  background: rgba(37,99,235,0.28);
  border-color: rgba(37,99,235,0.62);
  transform: scale(1.03);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--gold);
  color: #07111F;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.pricing-price {
  margin-bottom: 8px;
}

.pricing-price .amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
}

.pricing-quote-badge {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  padding: 4px 0 2px;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.pricing-price .currency {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  margin-left: 4px;
}

.pricing-price .period {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.95);
}

.pricing-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 24px;
  line-height: 1.6;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.93);
}

.pricing-features li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-features li.no::before {
  content: '✕';
  color: rgba(255,255,255,0.70);
}

.pricing-features li.no {
  color: rgba(255,255,255,0.72);
}

/* ─── TESTIMONIALS ─── */
.testimonials-section { background: var(--bg); }

/* ─── TESTIMONIAL SLIDESHOW ─── */
.testimonial-slider-wrap {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.testimonial-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.testimonial-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.testimonial-card {
  min-width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px;
  position: relative;
  box-sizing: border-box;
  transition: border-color 0.3s;
  direction: ltr !important;
  text-align: left !important;
}

.testimonial-text,
.testimonial-stars,
.testimonial-author,
.author-name,
.author-role {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 28px;
  font-size: 6rem;
  color: var(--gold);
  opacity: 0.13;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

body.ltr .testimonial-card::before {
  right: auto;
  left: 28px;
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}

.testimonial-stars span { color: var(--gold); font-size: 0.9rem; }

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.author-avatar-1 { background: linear-gradient(135deg, #07111F, #0D2A4A); }
.author-avatar-2 { background: linear-gradient(135deg, #1a0a2e, #3a1a6e); }
.author-avatar-3 { background: linear-gradient(135deg, #0d2137, #1a4a2e); }
.author-avatar-4 { background: linear-gradient(135deg, #1a0f0a, #4a2a0e); }
.author-avatar-5 { background: linear-gradient(135deg, #0a1a0a, #1a4a1a); }
.author-avatar-6 { background: linear-gradient(135deg, #1a1a0a, #4a4a0e); }

.author-name {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text);
}

.author-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* nav arrows */
.testimonial-prev, .testimonial-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  z-index: 5;
}
.testimonial-prev { right: -56px; }
.testimonial-next { left: -56px; }
body.ltr .testimonial-prev { right: auto; left: -56px; }
body.ltr .testimonial-next { left: auto; right: -56px; }
.testimonial-prev:hover, .testimonial-next:hover {
  background: var(--gold);
  color: #07111F;
  border-color: var(--gold);
}

/* progress bar */
.testimonial-progress {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}
.testimonial-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 2px;
  width: 0%;
  transition: width linear;
}

/* dots */
.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.testimonial-dot {
  width: 8px; height: 8px;
  border-radius: 100px;
  background: var(--border);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  padding: 0;
}
.testimonial-dot.active {
  background: var(--gold);
  width: 24px;
}

@media (max-width: 860px) {
  .testimonial-prev, .testimonial-next { display: none; }
  .testimonial-card { padding: 28px 24px; }
}

/* ─── FAQ ─── */
.faq-section { background: var(--primary); }

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.faq-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.open {
  border-color: rgba(37,99,235,0.54);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
}

body.ltr .faq-question {
  text-align: left;
  flex-direction: row;
}

body.ltr .faq-question .faq-q-text {
  order: 1;
  text-align: left;
}

body.ltr .faq-question .faq-arrow {
  order: 2;
}

body.ltr .faq-answer-inner {
  text-align: left;
}

.faq-q-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}

.faq-arrow {
  color: var(--gold);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 20px 18px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.75;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
  margin-top: 0;
}

/* ─── PROGRESS BARS ─── */
.skills-progress {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.progress-item {}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
}

.progress-pct {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--gold);
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 100px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;align-items:center;justify-content:center;
  font-size: 1rem;
  z-index: 150;
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px var(--border),
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 4px 20px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  color: var(--gold);
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 0 16px rgba(37,99,235,0.46),
    0 4px 20px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* ─── TRUST BADGE STRIP ─── */
.trust-strip {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}

.trust-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0 20px;
  position: relative;
}

.trust-item + .trust-item::before {
  content: '·';
  position: absolute;
  right: 0;
  color: var(--border);
  font-size: 1.2rem;
  line-height: 1;
}

body.ltr .trust-item + .trust-item::before {
  right: auto;
  left: 0;
}

.trust-item-icon {
  display: none;
}

.trust-icon {
  color: var(--blue-light);
  font-size: 0.6rem;
  margin-left: 6px;
  flex-shrink: 0;
}

body.ltr .trust-icon {
  margin-left: 0;
  margin-right: 6px;
}

/* ─── BROKERS & EXCHANGES ─── */
.brokers-section { background: var(--bg); }

.brokers-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.broker-tab {
  padding: 9px 22px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
  box-shadow:
    inset 0 0 0 1px var(--border),
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 1px 4px rgba(0,0,0,0.1);
}

.broker-tab.active,
.broker-tab:hover {
  background: var(--gold);
  color: #07111F;
  border-color: transparent;
  box-shadow:
    0 0 0 1px rgba(37,99,235,1.00),
    0 0 18px rgba(37,99,235,0.62),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.brokers-table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.brokers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.brokers-table thead {
  background: linear-gradient(135deg, rgba(37,99,235,0.19), rgba(37,99,235,0.09));
  border-bottom: 2px solid rgba(37,99,235,0.46);
}

.brokers-table th {
  padding: 16px 18px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold);
  white-space: nowrap;
}

body.ltr .brokers-table th {
  text-align: left;
}

.brokers-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  line-height: 1.55;
}

.brokers-table tr:last-child td { border-bottom: none; }

.brokers-table tr:hover td {
  background: rgba(37,99,235,0.08);
}

.broker-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.broker-logo-box {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79,70,229,0.22), rgba(79,70,229,0.07));
  border: 1px solid rgba(79,70,229,0.42);
  display: flex;align-items:center;justify-content:center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,70,229,0.20);
}

.broker-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-iran {
  background: rgba(37,99,235,0.19);
  color: #2563EB;
  border: 1px solid rgba(37,99,235,0.55);
}

.badge-global {
  background: rgba(0,170,255,0.17);
  color: #A5B4FC;
  border: 1px solid rgba(0,170,255,0.35);
}

.badge-crypto {
  background: rgba(168,85,247,0.12);
  color: #c084fc;
  border: 1px solid rgba(168,85,247,0.25);
}

.badge-domestic {
  background: rgba(37,99,235,0.19);
  color: var(--gold);
  border: 1px solid rgba(37,99,235,0.55);
}

.broker-api-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
}

.broker-api-dot.yes { color: #2563EB; }
.broker-api-dot.no { color: #ef4444; }

.broker-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(37,99,235,0.09);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,0.46),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.broker-link:hover {
  background: rgba(37,99,235,0.22);
  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,1.00),
    0 3px 12px rgba(37,99,235,0.50);
  transform: translateY(-1px);
}

.broker-panel-hidden { display: none; }
.broker-panel-visible { display: block; }

.brokers-note {
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(37,99,235,0.09);
  border: 1px solid rgba(37,99,235,0.28);
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.brokers-note strong { color: var(--gold); }

/* ─── BROKER TABS MOBILE ─── */
@media (max-width: 900px) {
  .brokers-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .broker-tab {
    text-align: center;
    font-size: 0.8rem;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.4;
  }
}

@media (max-width: 600px) {
  .brokers-tabs {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .broker-tab {
    font-size: 0.75rem;
    padding: 9px 8px;
  }
}

/* ─── BROKER TABLE → CARD ON MOBILE ─── */
@media (max-width: 700px) {
  .brokers-table-wrap {
    border: none;
    background: transparent;
    border-radius: 0;
  }

  .brokers-table,
  .brokers-table thead,
  .brokers-table tbody,
  .brokers-table th,
  .brokers-table td,
  .brokers-table tr {
    display: block;
  }

  .brokers-table thead {
    display: none;
  }

  .brokers-table tbody tr {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 14px;
    padding: 16px;
    position: relative;
    transition: var(--transition);
  }

  .brokers-table tbody tr:hover {
    border-color: rgba(37,99,235,0.54);
  }

  .brokers-table td {
    border: none;
    padding: 6px 0;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  /* Name cell — full width, prominent */
  .brokers-table td:first-child {
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  .broker-name-cell {
    width: 100%;
  }

  /* Add label before each data cell */
  .brokers-table td:not(:first-child)::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 90px;
    flex-shrink: 0;
    padding-top: 2px;
  }

  /* Link cell alignment */
  .brokers-table td:last-child {
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
  }

  .broker-link {
    font-size: 0.82rem;
    padding: 7px 18px;
  }
}

/* Responsive additions */
@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .portfolio-thumb { height: 132px; }
  .code-window-file { font-size: 0.6rem; }
  .code-window-body { font-size: 0.58rem; line-height: 1.5; padding: 8px 9px; }
  .portfolio-badge {
    top: 6px; right: 6px;
    padding: 2px 7px;
    font-size: 0.58rem;
    max-width: calc(100% - 12px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .portfolio-body { padding: 10px; }
  .portfolio-body h3 {
    font-size: 0.76rem;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .portfolio-body p { display: none; }
  .portfolio-tags { display: none; }
  .portfolio-result { margin-top: 0; padding-top: 8px; gap: 6px; }
  .portfolio-result-num { font-size: 0.92rem; }
  .portfolio-result-lbl { font-size: 0.62rem; line-height: 1.25; }
  .trust-inner {
    gap: 8px 16px;
    justify-content: flex-start;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .trust-item {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
  .trust-item + .trust-item::before { display: none; }
  .trust-strip { padding: 12px 16px; }
}


/* ═══════════════════════════════════════════════════════
   LOT SIZE CALCULATOR
═══════════════════════════════════════════════════════ */

/* ─── FORGE DARK v23 — COLOR SYSTEM ENHANCEMENTS ─── */

/* Blue complement accent */
.tag-blue { background: rgba(67,56,202,0.14); color: #2E7DD4; border: 1px solid rgba(67,56,202,0.28); }
[data-theme="light"] .tag-blue { background: rgba(67,56,202,0.10); color: #3730A3; border-color: rgba(67,56,202,0.22); }

/* Semantic status badges */
.badge-success { background: rgba(22,163,74,0.12); color: #16A34A; border: 1px solid rgba(22,163,74,0.25); border-radius: 6px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700; }
.badge-warning { background: rgba(217,119,6,0.12);  color: #D97706; border: 1px solid rgba(217,119,6,0.25);  border-radius: 6px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700; }
.badge-error   { background: rgba(220,38,38,0.12);  color: #DC2626; border: 1px solid rgba(220,38,38,0.25);  border-radius: 6px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700; }
.badge-info    { background: rgba(67,56,202,0.12);  color: #2E7DD4; border: 1px solid rgba(67,56,202,0.25);  border-radius: 6px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700; }

/* Light mode global card depth */
[data-theme="light"] .slider-container { box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
[data-theme="light"] .ai-card { box-shadow: 0 2px 12px rgba(0,0,0,0.06); border-color: #C8D3E0; }
[data-theme="light"] .ai-card:hover { box-shadow: 0 8px 18px rgba(0,0,0,0.10), 0 0 0 1px rgba(79,70,229,0.28); }
[data-theme="light"] .ps-content { border-color: #C8D3E0; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
[data-theme="light"] .modal { box-shadow: 0 16px 48px rgba(0,0,0,0.12); }

/* Dark mode: subtle inner glow on featured pricing */
[data-theme="dark"] .pricing-card.featured {
  background: linear-gradient(160deg, rgba(37,99,235,0.13) 0%, rgba(37,99,235,0.06) 100%);
}

/* Nav hover in light mode */
[data-theme="light"] .nav-links a:hover { color: #1E40AF; background: rgba(99,102,241,0.10); }
[data-theme="light"] .section-title { color: #0F1118; }
[data-theme="light"] .about-info h2 { color: #0F1118; }

/* Improved text contrast in light mode */
[data-theme="light"] .section-sub { color: #4A5260; }
[data-theme="light"] .service-card p { color: #4A5260; }
[data-theme="light"] .slide p { color: #4A5260; }

/* Warm off-white sections in light mode */
[data-theme="light"] body { background: #EFF2F8; }
[data-theme="light"] .services-section,
[data-theme="light"] .about-section,
[data-theme="light"] .portfolio-section,
[data-theme="light"] .testimonials-section,
[data-theme="light"] .slider-section,
[data-theme="light"] .process-section { background: #EFF2F8; }
[data-theme="light"] .ai-section { background: #EDF0F5; }
[data-theme="light"] .faq-section { background: #EEF2F7; }

.faq-section .section-title { color: #ffffff; }
.faq-section .section-label { color: var(--gold); }
[data-theme="light"] .faq-section .section-title { color: #0D1929; }

[data-theme="light"] .faq-item {
  background: #FFFFFF;
  border: 1px solid #D0D8E8;
  box-shadow: 0 2px 8px rgba(55,48,163,0.07);
}

[data-theme="light"] .faq-item:hover {
  border-color: rgba(99,102,241,0.45);
  box-shadow: 0 4px 16px rgba(55,48,163,0.12);
}

[data-theme="light"] .faq-item.open {
  border-color: rgba(99,102,241,0.65);
  box-shadow: 0 4px 20px rgba(55,48,163,0.14);
}

[data-theme="light"] .faq-q-text {
  color: #0D1929;
}

[data-theme="light"] .faq-answer-inner {
  color: #3D5070;
  border-top: 1px solid #D0D8E8;
}

/* ===== Noto Sans Arabic: فارسی باریک و حرفه‌ای ===== */
body:not(.ltr) * { font-family: 'Noto Sans Arabic', sans-serif !important; }
body:not(.ltr) h1 { font-weight: 100 !important; letter-spacing: 0; }
body:not(.ltr) h2 { font-weight: 200 !important; }
body:not(.ltr) h3 { font-weight: 200 !important; }
body:not(.ltr) h4, body:not(.ltr) h5, body:not(.ltr) h6 { font-weight: 200 !important; }
body:not(.ltr) p, body:not(.ltr) li, body:not(.ltr) a { font-weight: 300 !important; }
body:not(.ltr) button, body:not(.ltr) .btn { font-weight: 400 !important; }
body:not(.ltr) label, body:not(.ltr) input, body:not(.ltr) textarea { font-weight: 300 !important; }
body:not(.ltr) .hero-title { font-weight: 100 !important; }
body:not(.ltr) .section-title { font-weight: 200 !important; }
body:not(.ltr) .nav-item, body:not(.ltr) .nav-link { font-weight: 300 !important; }

/* ===== Outfit English Font: Light & Large ===== */
body.ltr * { font-family: 'Outfit', sans-serif !important; }
body.ltr h1 { font-weight: 100 !important; letter-spacing: -0.03em; }
body.ltr h2 { font-weight: 200 !important; letter-spacing: -0.02em; }
body.ltr h3 { font-weight: 200 !important; }
body.ltr h4, body.ltr h5, body.ltr h6 { font-weight: 200 !important; }
body.ltr p, body.ltr li, body.ltr a { font-weight: 300 !important; }
body.ltr button, body.ltr .btn { font-weight: 400 !important; }
body.ltr label, body.ltr input, body.ltr textarea { font-weight: 300 !important; }
body.ltr .hero-title { font-weight: 100 !important; }
body.ltr .section-title { font-weight: 200 !important; }
body.ltr .nav-item, body.ltr .nav-link { font-weight: 300 !important; }

/* ═══════════════════════════════════════════════════════
   ─── AI MODEL DETAIL PAGE (SPA) ─────────────────────
   ═══════════════════════════════════════════════════════ */
#aiModelPage {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  animation: pageSlideIn 0.38s cubic-bezier(0.4,0,0.2,1) both;
}
#aiModelPage.page-open { display: block; }

@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page Nav ── */
.amp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.amp-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(37,99,235,0.38);
  transition: var(--transition);
  text-decoration: none;
}
.amp-nav-back:hover {
  background: rgba(37,99,235,0.1);
  border-color: var(--gold);
}
.amp-nav-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
}
.amp-nav-home:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(37,99,235,0.08);
}
.amp-nav-models {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
}
.amp-nav-models:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(37,99,235,0.08);
}
@media (max-width: 640px) {
  .amp-nav-home span { display: none; }
  .amp-nav-home { padding: 8px; }
  .amp-nav-models span { display: none; }
  .amp-nav-models { padding: 8px; }
}
.amp-nav-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  flex: 1;
}
.amp-nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.amp-breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.amp-breadcrumb span { color: var(--gold); }

/* ── Hero banner ── */
.amp-hero {
  background: linear-gradient(135deg, #05101E 0%, #0D1B2E 55%, #07111F 100%);
  padding: 60px 24px 52px;
  position: relative;
  overflow: hidden;
}
.amp-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.amp-hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.amp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.45);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.amp-hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}
.amp-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 18px;
}
.amp-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #60A5FA, #99F6E4, #60A5FA);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.amp-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 32px;
}
.amp-hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.amp-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 110px;
  text-align: center;
}
.amp-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.amp-stat-lbl {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-top: 5px;
}

/* ── Page Body Layout ── */
.amp-body {
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── Section Titles ── */
.amp-section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.amp-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.3;
}

/* ── Architecture Diagram ── */
.amp-arch {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.amp-arch::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(37,99,235,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Gate Blocks */
.amp-gates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.amp-gate {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.amp-gate::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.amp-gate:hover { border-color: rgba(37,99,235,0.5); transform: translateY(-2px); }
.amp-gate:hover::after { opacity: 1; }
.amp-gate-icon { font-size: 1.8rem; margin-bottom: 8px; }
.amp-gate-name { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.amp-gate-name-en { font-size: 0.72rem; color: var(--gold); font-family: 'Outfit', monospace; font-weight: 600; margin-bottom: 8px; }
.amp-gate-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }

/* LSTM Cell Flow */
.amp-cell-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  overflow-x: auto;
  padding-bottom: 8px;
}
.amp-cell-box {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.04));
  border: 1px solid rgba(37,99,235,0.35);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 90px;
}
.amp-cell-box-label { font-size: 0.7rem; color: var(--gold); font-weight: 700; }
.amp-cell-box-val { font-size: 0.82rem; color: var(--text); font-weight: 600; margin-top: 2px; font-family: 'Outfit', monospace; }
.amp-cell-arrow {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0.7;
}
.amp-cell-blue {
  background: linear-gradient(135deg, rgba(79,70,229,0.15), rgba(79,70,229,0.05));
  border-color: rgba(79,70,229,0.4);
}
.amp-cell-blue .amp-cell-box-label { color: var(--blue-light); }

/* ── Input/Output Spec ── */
.amp-io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.amp-io-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.amp-io-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.amp-io-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.amp-io-icon.inp { background: rgba(79,70,229,0.15); }
.amp-io-icon.out { background: rgba(37,99,235,0.15); }
.amp-io-title { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.amp-io-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.amp-io-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.amp-io-list li::before {
  content: '◆';
  font-size: 0.45rem;
  color: var(--gold);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── Code snippet ── */
.amp-code {
  background: #06090F;
  border: 1px solid #1A2D45;
  border-radius: var(--radius-sm);
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 40px;
  position: relative;
}
.amp-code-label {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(37,99,235,0.7);
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 4px;
  padding: 2px 8px;
}
.amp-code pre {
  margin: 20px 0 0;
  font-family: 'Outfit', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.75;
  color: #b4c5dc;
  white-space: pre;
  direction: ltr;
  text-align: left;
}
.amp-code .c-kw  { color: #60A5FA; }
.amp-code .c-fn  { color: #7DD3FC; }
.amp-code .c-str { color: #86EFAC; }
.amp-code .c-num { color: #FCA5A5; }
.amp-code .c-cm  { color: #4D6680; font-style: italic; }
.amp-code .c-cls { color: #99F6E4; }

/* ── Performance Metrics ── */
.amp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.amp-metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
}
.amp-metric-card:hover {
  border-color: rgba(79,70,229,0.42);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12), 0 0 0 1px rgba(79,70,229,0.24);
}
.amp-metric-val {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 6px;
}
.amp-metric-label { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }

/* ── Limitations ── */
.amp-limits {
  background: linear-gradient(135deg, rgba(220,38,38,0.07), rgba(220,38,38,0.02));
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.amp-limits-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  margin-bottom: 14px;
}
.amp-limit-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.amp-limit-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.83rem; color: var(--text-muted); line-height: 1.6;
}
.amp-limit-list li .amp-limit-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(220,38,38,0.15);
  border: 1px solid rgba(220,38,38,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem;
  color: #FC8181;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Use-case grid ── */
.amp-usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}
.amp-usecase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  transition: var(--transition);
}
.amp-usecase-card:hover { border-color: rgba(79,70,229,0.4); }
.amp-usecase-icon { font-size: 1.5rem; margin-bottom: 8px; }
.amp-usecase-title { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.amp-usecase-desc { font-size: 0.77rem; color: var(--text-muted); line-height: 1.6; }

/* ── CTA Banner ── */
.amp-cta {
  background: linear-gradient(135deg, rgba(37,99,235,0.25) 0%, rgba(37,99,235,0.06) 100%);
  border: 1px solid rgba(37,99,235,0.48);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  margin-bottom: 0;
}
.amp-cta h3 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.amp-cta p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 22px; }
.amp-cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Comparison Table ── */
.amp-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
  font-size: 0.83rem;
}
.amp-compare-table th {
  background: rgba(37,99,235,0.1);
  color: var(--text);
  font-weight: 700;
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: right;
}
body.ltr .amp-compare-table th {
  text-align: left;
}
.amp-compare-table td {
  padding: 10px 16px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.amp-compare-table tr:nth-child(even) td { background: rgba(37,99,235,0.03); }
.amp-compare-table tr:hover td { background: rgba(37,99,235,0.07); }
.amp-compare-table .amp-ct-highlight {
  color: var(--gold);
  font-weight: 600;
}
.amp-compare-table .tick { color: #60A5FA; font-size: 1rem; }
.amp-compare-table .cross { color: #FC8181; font-size: 1rem; }

/* ─── AI MODEL REFERENCES LIST ─── */
.amp-ref-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}
.amp-ref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.amp-ref-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.amp-ref-authors { font-size: 0.78rem; font-weight: 700; color: var(--gold); letter-spacing: 0.2px; }
.amp-ref-title { font-size: 0.92rem; font-weight: 600; color: var(--text); line-height: 1.5; }
.amp-ref-venue { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.amp-ref-link {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(37,99,235,0.4);
  border-radius: 100px;
  padding: 7px 16px;
  white-space: nowrap;
  transition: var(--transition);
}
.amp-ref-link:hover { background: var(--gold); color: #fff; }

/* ── Related Models ── */
.amp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 0;
}
.amp-related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.amp-related-card:hover {
  border-color: rgba(79,70,229,0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.10), 0 0 0 1px rgba(79,70,229,0.22);
}
.amp-related-icon { font-size: 1.5rem; }
.amp-related-tag { font-size: 0.68rem; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; }
.amp-related-title { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.amp-related-desc { font-size: 0.76rem; color: var(--text-muted); line-height: 1.55; }
.amp-related-arrow { margin-top: auto; color: var(--gold); font-size: 0.82rem; display: flex; align-items: center; gap: 4px; }

/* Divider */
.amp-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 40px 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .amp-gates { grid-template-columns: 1fr; }
  .amp-io-grid { grid-template-columns: 1fr; }
  .amp-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .amp-usecase-grid { grid-template-columns: 1fr; }
  .amp-related-grid { grid-template-columns: 1fr 1fr; }
  .amp-hero { padding: 40px 20px 36px; }
  .amp-body { padding: 36px 16px 60px; }
  .amp-cell-flow { flex-wrap: nowrap; }
}
@media (max-width: 480px) {
  .amp-related-grid { grid-template-columns: 1fr; }
  .amp-metrics-grid { grid-template-columns: 1fr 1fr; }
  .amp-hero-stats { gap: 12px; }
  .amp-stat-pill { min-width: 80px; padding: 10px 14px; }
}

/* ═══════════════════════════════════════════════════════
   ─── AI MODEL PAGES — MULTI-PAGE SPA EXTENSIONS ──────
   ═══════════════════════════════════════════════════════ */
/* Each model page shares #aiModelPage base rules but is
   addressed individually via .amp-page[data-model="x"] */
.amp-page { display: none; }
.amp-page.amp-page-active { display: block; }

/* ── Forest of Trees (Random Forest) ── */
.amp-forest {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}
.amp-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.55;
  transition: var(--transition);
}
.amp-tree.amp-tree-vote { opacity: 1; }
.amp-tree-icon { font-size: 1.6rem; }
.amp-tree-vote-lbl { font-size: 0.66rem; color: var(--text-muted); font-weight: 600; }
.amp-tree-vote-lbl.up { color: #60A5FA; }
.amp-tree-vote-lbl.down { color: #FC8181; }
.amp-forest-result {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold);
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

/* ── Feature Importance Bars ── */
.amp-fi-list { display: flex; flex-direction: column; gap: 14px; }
.amp-fi-row { display: flex; align-items: center; gap: 12px; }
.amp-fi-name { flex: 0 0 130px; font-size: 0.8rem; color: var(--text); font-weight: 600; font-family: 'Outfit', monospace; }
.amp-fi-track { flex: 1; height: 10px; border-radius: 6px; background: var(--border); overflow: hidden; }
.amp-fi-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.amp-fi-pct { flex: 0 0 48px; text-align: left; font-size: 0.78rem; font-weight: 700; color: var(--gold); }

/* ── Boosting Sequence (XGBoost) ── */
.amp-boost-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.amp-boost-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; min-width: 86px;
}
.amp-boost-step-num { font-size: 0.68rem; color: var(--gold); font-weight: 700; }
.amp-boost-step-err { font-size: 0.74rem; color: var(--text-muted); }
.amp-boost-arrow { color: var(--gold); font-size: 1rem; }

/* ── Network Layers (MLP / CNN) ── */
.amp-layers { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 10px 0; }
.amp-layer-col { display: flex; flex-direction: column; gap: 7px; align-items: center; }
.amp-layer-node {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(37,99,235,0.25); border: 1.5px solid var(--gold);
}
.amp-layer-node.out { background: rgba(52,211,153,0.25); border-color: #60A5FA; }
.amp-layer-lbl { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; text-align: center; }
.amp-layer-arrow { color: var(--border); font-size: 1.3rem; }

/* ── Factor Groups ── */
.amp-factor-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 12px; }
.amp-factor-group { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.amp-factor-group-title { font-size: 0.82rem; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.amp-factor-group-items { font-size: 0.74rem; color: var(--text-muted); line-height: 1.7; }

/* ── Attention Types Grid ── */
.amp-attn-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.amp-attn-type-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.amp-attn-type-icon { font-size: 1.4rem; margin-bottom: 8px; }
.amp-attn-type-name { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.amp-attn-type-desc { font-size: 0.77rem; color: var(--text-muted); line-height: 1.6; }

/* ── Attention Heatmap Strip ── */
.amp-heatmap-strip { display: flex; gap: 3px; margin-bottom: 10px; flex-wrap: wrap; }
.amp-heatmap-cell { width: 22px; height: 36px; border-radius: 4px; }

/* ── CNN Candle-to-Image ── */
.amp-cnn-pixels { display: flex; gap: 2px; align-items: flex-end; height: 80px; margin-bottom: 10px; justify-content: center; }
.amp-cnn-px { width: 8px; border-radius: 2px; }
.amp-cnn-px.up { background: #60A5FA; }
.amp-cnn-px.down { background: #FC8181; }

/* ── RL Loop (DDQN) ── */
.amp-rl-loop { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.amp-rl-node {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; min-width: 110px; text-align: center;
}
.amp-rl-node-icon { font-size: 1.5rem; }
.amp-rl-node-lbl { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.amp-rl-node-sub { font-size: 0.68rem; color: var(--text-muted); }
.amp-rl-arrow { color: var(--gold); font-size: 1.2rem; }

/* ── GAN (TimeGAN) ── */
.amp-gan-flow { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.amp-gan-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-radius: 12px; padding: 18px 20px; min-width: 120px; text-align: center;
  border: 1px solid var(--border); background: var(--card);
}
.amp-gan-box.gen { border-color: rgba(52,211,153,0.5); }
.amp-gan-box.disc { border-color: rgba(252,129,129,0.5); }
.amp-gan-icon { font-size: 1.5rem; }
.amp-gan-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.amp-gan-sub { font-size: 0.68rem; color: var(--text-muted); }

/* ── Autoencoder Funnel ── */
.amp-ae-funnel { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.amp-ae-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.amp-ae-bars { display: flex; gap: 3px; align-items: flex-end; height: 56px; }
.amp-ae-bar { width: 7px; background: var(--gold); border-radius: 2px; opacity: 0.8; }
.amp-ae-lbl { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

/* ── Hierarchical Dendrogram (HRP) ── */
.amp-dendro { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.amp-dendro-row { display: flex; align-items: center; gap: 8px; }
.amp-dendro-line { height: 2px; background: var(--gold); border-radius: 2px; }
.amp-dendro-asset { font-size: 0.72rem; color: var(--text); font-family: 'Outfit', monospace; flex: 0 0 64px; }

@media (max-width: 768px) {
  .amp-rl-loop, .amp-gan-flow { flex-direction: column; }
  .amp-rl-arrow { transform: rotate(90deg); }
}
/* ═══════════════════════════════════════════════════════
   END AI MODEL DETAIL PAGE
   ═══════════════════════════════════════════════════════ */

        .hero-code-line {
          font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
          font-size: 0.82rem;
          color: var(--gold);
          opacity: 0.88;
          direction: ltr;
          text-align: left;
          margin: -4px 0 20px;
          min-height: 1.3em;
          letter-spacing: 0.2px;
        }
        .hero-code-line-prompt { color: rgba(255,255,255,0.30); margin-inline-end: 8px; }
        .hero-code-line-cursor { display: inline-block; margin-inline-start: 2px; animation: heroCodeBlink 1s steps(1) infinite; color: var(--blue); }
        @keyframes heroCodeBlink { 50% { opacity: 0; } }
        @media (max-width: 600px) { .hero-code-line { text-align: center; font-size: 0.74rem; } }
      

@media(max-width:700px){.seo-article-grid{grid-template-columns:1fr!important;}}

/* ═══════════════════════════════════════════════════════
   ─── SERVICE PAGES (v18) — standalone, content-first ───
   Reuses the .amp-* design system; adds only what is missing.
   ═══════════════════════════════════════════════════════ */
#aiModelPage.svc-static { display: block; position: static; inset: auto; z-index: auto; overflow: visible; animation: none; min-height: 100vh; }
.svc-article { display: block; }
.svc-article .amp-nav-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-article .amp-breadcrumb a { color: var(--gold); text-decoration: none; }
.svc-article .amp-breadcrumb a:hover { text-decoration: underline; }
body.ltr .svc-article .amp-usecase-title,
body.ltr .svc-article .amp-gate-name,
body.ltr .svc-article .amp-related-title,
body.ltr .svc-article .svc-step-t { font-weight: 700; letter-spacing: 0; }
.svc-article .amp-related-title { font-size: 1rem; color: var(--text); }
.svc-article .amp-gate-name { font-size: 0.95rem; color: var(--text); }

.svc-sec { margin: 0 0 56px; padding: 0; scroll-margin-top: 84px; }
.svc-article strong { font-weight: 700; color: var(--text); }
.svc-article .amp-arch { margin-bottom: 8px; padding: 28px 24px; }
.svc-article .amp-gates { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 0; }
.svc-p { font-size: 0.95rem; line-height: 1.85; color: var(--text-muted); margin-bottom: 16px; max-width: 860px; }
.svc-small { font-size: 0.8rem; line-height: 1.7; color: var(--text-muted); margin: 0 0 28px; max-width: 860px; }
.svc-article .svc-p a, .svc-article .svc-small a, .svc-article .svc-faq-a a, .svc-article .amp-usecase-desc a,
.svc-article .amp-limit-list a, .svc-article .amp-compare-table a, .svc-article .svc-author a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.svc-article code { font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.svc-p code, .svc-small code, .svc-faq-a code, .amp-usecase-desc code, .amp-limit-list code, .amp-compare-table code, .svc-steps code, .amp-gate-desc code {
  background: rgba(37,99,235,0.12); border-radius: 4px; padding: 1px 6px; font-size: 0.86em; color: var(--text); }
.svc-article .amp-code { overflow-x: auto; }
.svc-article .amp-code pre, .svc-article .amp-code pre code { font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; }
.svc-article .amp-code pre code { font-size: inherit; background: none; padding: 0; color: inherit; }

/* Quick answer + on-this-page */
.svc-answer { background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.03)); border: 1px solid rgba(37,99,235,0.35); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); padding: 22px 26px; margin-bottom: 26px; }
.svc-answer-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.svc-answer p { font-size: 1.02rem; line-height: 1.8; color: var(--text); margin: 0; }
.svc-toc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 40px; font-size: 0.78rem; color: var(--text-muted); }
.svc-toc a { padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; background: var(--card); transition: var(--transition); }
.svc-toc a:hover, .svc-toc a:focus-visible { border-color: var(--gold); color: var(--gold); }

/* Numbered steps */
.svc-steps { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 8px 0 8px; padding: 0; }
.svc-steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.svc-step-n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: rgba(37,99,235,0.15); border: 1px solid rgba(37,99,235,0.5); color: var(--gold); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.svc-step-t { font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.svc-steps p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; margin: 0; }

/* Tables */
.svc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 10px; }
.svc-table-wrap .amp-compare-table { min-width: 580px; margin-bottom: 8px; }
.amp-compare-table th.svc-rowh { background: rgba(37,99,235,0.05); color: var(--text); font-weight: 700; }
.amp-compare-table td { line-height: 1.65; }

/* List boxes: reuse .amp-limits; add success / info variants */
.amp-limits.svc-ok { background: linear-gradient(135deg, rgba(22,163,74,0.08), rgba(22,163,74,0.02)); border-color: rgba(22,163,74,0.28); }
.amp-limits.svc-ok .amp-limit-dot { background: rgba(22,163,74,0.15) !important; border-color: rgba(22,163,74,0.4) !important; color: #4ADE80 !important; }
.amp-limits.svc-info { background: linear-gradient(135deg, rgba(37,99,235,0.09), rgba(37,99,235,0.02)); border-color: rgba(37,99,235,0.3); }
.amp-limits.svc-info .amp-limit-dot { background: rgba(37,99,235,0.15) !important; border-color: rgba(37,99,235,0.45) !important; color: var(--gold-light) !important; }
.svc-article .amp-limit-list li { font-size: 0.87rem; }

/* Terms */
.svc-terms .amp-metric-val { font-size: 1.15rem; line-height: 1.3; }

/* FAQ */
.svc-faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.svc-faq-item summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; font-size: 0.95rem; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.svc-faq-item summary::-webkit-details-marker { display: none; }
.svc-faq-item summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--gold); flex: 0 0 auto; }
.svc-faq-item[open] summary::after { content: '–'; }
.svc-faq-item summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.svc-faq-a { padding: 0 20px 18px; }
.svc-faq-a p { font-size: 0.9rem; line-height: 1.85; color: var(--text-muted); margin: 0; }

/* CTA, author, footer */
.svc-cta h2 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.svc-cta .amp-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.svc-author { margin-top: 36px; padding: 18px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); font-size: 0.85rem; line-height: 1.75; color: var(--text-muted); }
.svc-author strong { color: var(--text); }
.svc-footer { max-width: 1060px; margin: 0 auto; padding: 36px 24px 52px; border-top: 1px solid var(--border); }
.svc-footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-bottom: 24px; }
.svc-footer-h { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.svc-footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 6px 20px; }
.svc-footer-links.svc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.svc-footer-links a { font-size: 0.83rem; color: var(--text-muted); text-decoration: none; }
.svc-footer-links a:hover, .svc-footer-links a[aria-current="page"] { color: var(--gold); }
.svc-risk { font-size: 0.78rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 10px; max-width: 900px; }
.svc-copy { font-size: 0.78rem; color: var(--text-muted); }
.svc-copy a { color: var(--gold); text-decoration: none; }

@media (max-width: 720px) {
  .svc-footer-grid { grid-template-columns: 1fr; }
  .svc-footer-links.svc-cols { grid-template-columns: 1fr; }
  .svc-answer { padding: 18px 18px; }
  .svc-article .amp-breadcrumb { display: none; }
  .svc-steps li { padding: 14px; gap: 12px; }
}

/* homepage service cards: link to the dedicated page (also present in pages that embed the section) */
.service-card .service-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: auto; }
.service-card .service-actions .btn-detail { margin-top: 0; }
.service-card .btn-page { font-size: 0.8rem; font-weight: 700; color: var(--gold); text-decoration: none; padding: 2px 2px; border-bottom: 1px solid transparent; transition: var(--transition); }
.service-card .btn-page:hover, .service-card .btn-page:focus-visible { color: var(--gold-light); border-bottom-color: var(--gold-light); }
