/* ============================================================
   وب‌سایت شخصی امیر احسان رمزی — استایل اصلی
   سبک: Warm Minimalism + Editorial Typography + Modern SaaS
   ============================================================ */

/* ---------- متغیرها ---------- */
:root {
  /* پالت کرم/بژ گرم */
  --bg: #faf6ef;
  --bg-soft: #f3ede2;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --ink-faint: #8a857d;
  --line: rgba(28, 25, 23, 0.10);
  --line-strong: rgba(28, 25, 23, 0.18);

  /* اکسانت — بنفش */
  --accent: #7c5cbf;
  --accent-strong: #62449c;
  --accent-soft: rgba(124, 92, 191, 0.10);
  --accent-grad: linear-gradient(135deg, #8e6ad9 0%, #6a3fb3 100%);
  --gold: #b9a6ea;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(28, 25, 23, 0.16);
  --shadow-lg: 0 24px 60px -20px rgba(28, 25, 23, 0.22);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --font-fa: "Vazirmatn", "Inter", Tahoma, sans-serif;
  --font-en: "Inter", "Vazirmatn", system-ui, sans-serif;
  --font-display: "Fraunces", "Vazirmatn", Georgia, serif;

  --header-h: 78px;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #171310;
  --bg-soft: #1f1a15;
  --bg-card: #221d18;
  --bg-elevated: #2a241e;
  --ink: #f2ede6;
  --ink-soft: #b6aea3;
  --ink-faint: #847c72;
  --line: rgba(242, 237, 230, 0.10);
  --line-strong: rgba(242, 237, 230, 0.20);
  --accent: #a48ae0;
  --accent-strong: #b79ef0;
  --accent-soft: rgba(164, 138, 224, 0.14);
  --accent-grad: linear-gradient(135deg, #a48ae0 0%, #6a3fb3 100%);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- ریست ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-fa);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--bg);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: clip;
}

html[lang^="en"] body { font-family: var(--font-en); }

h1, h2, h3, h4 { line-height: 1.35; font-weight: 800; letter-spacing: -0.01em; }
p { color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* جلوگیری از سرریز شدن متن‌های طولانی */
h1, h2, h3, h4, h5, h6, p, a, li, span, strong, b, em, label, figcaption { overflow-wrap: break-word; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- ابزارها ---------- */
.container { margin-top: 40px; max-width: var(--container); margin-inline: auto; padding-inline: 24px; min-width: 0; }
/* جلوگیری از سرریز شدن آیتم‌های گرید/فلکس */
.hero-copy, .about-text, .section-head, .cta-inner, .hosting-content,
.article-content, .post-body, .portfolio-body, .cert-body, .service,
.skill, .highlight, .sidebar-box, .contact-form-card, .footer-about { min-width: 0; }

.skip-link {
  position: absolute; top: -60px; inset-inline-start: 16px; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* چشم‌ابرو */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--accent); border-radius: 2px; }

/* ---------- مسیر صفحه (Breadcrumb) ---------- */
.breadcrumbs { margin-bottom: 26px; }
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-faint);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--line-strong); flex-shrink: 0;
}
.breadcrumbs a { color: var(--ink-soft); transition: color 0.25s, background 0.25s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--accent); font-weight: 700; }
html[dir="ltr"] .breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

.section { padding: 96px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-title { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; margin-top: 14px; }
html[lang^="en"] .section-title { font-family: var(--font-display); font-weight: 600; }
.section-desc { margin-top: 14px; font-size: 15.5px; }

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: var(--radius-full);
  font-weight: 700; font-size: 14.5px; line-height: 1.2;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
  will-change: transform;
}
.btn i { font-size: 13px; transition: transform 0.3s var(--ease); }
html[dir="rtl"] .btn:hover i.fa-arrow-left { transform: translateX(-4px); }
html[dir="ltr"] .btn:hover i.fa-arrow-left { transform: translateX(4px); }
html[dir="ltr"] .btn:hover i.fa-arrow-right { transform: translateX(4px); }

.btn-primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 8px 22px -8px rgba(124, 92, 191, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(124, 92, 191, 0.6); }
.btn-primary:active { transform: translateY(0); }

.btn-outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { color: var(--accent); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ---------- پیش‌بارگذار ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-grad); color: #fff;
  font-size: 30px; font-weight: 900;
  animation: preloaderPulse 1.6s var(--ease) infinite;
}
.preloader-bar { width: 120px; height: 3px; border-radius: 4px; background: var(--line); overflow: hidden; }
.preloader-bar i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 4px; animation: preloaderSlide 1.1s var(--ease) infinite; }

@keyframes preloaderPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes preloaderSlide { 0% { transform: translateX(-120%);} 100% { transform: translateX(320%);} }

/* نوار پیشرفت اسکرول */
.scroll-progress {
  position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0%;
  background: var(--accent-grad); z-index: 1500; border-radius: 0 4px 4px 0;
}

/* ---------- سربرگ ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  height: var(--header-h);
  background: rgba(250, 246, 239, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: height 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
[data-theme="dark"] .site-header { background: rgba(23, 19, 16, 0.82); }
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(124, 92, 191, 0.6);
}
.brand-code { font-family: var(--font-en); font-weight: 800; font-size: 14px; letter-spacing: 0.02em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-weight: 900; font-size: 16.5px; }
html[lang^="en"] .brand-name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.brand-tag { font-size: 11px; color: var(--ink-faint); font-weight: 500; }

.main-nav { display: flex; align-items: center; gap: 8px; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; display: block; padding: 9px 14px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  border-radius: var(--radius-full);
  transition: color 0.25s, background 0.25s;
}
.nav-link span { position: relative; }
.nav-link span::after {
  content: ""; position: absolute; bottom: -6px; inset-inline-start: 0;
  width: 0; height: 2px; background: var(--accent); border-radius: 2px;
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--ink); }
html[dir="rtl"] .nav-link:hover span::after, html[dir="ltr"] .nav-link:hover span::after { width: 100%; }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.nav-link.active span::after { width: 100%; }

.header-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: var(--radius-full);
  display: grid; place-items: center; font-size: 15.5px;
  color: var(--ink-soft); border: 1px solid var(--line);
  background: var(--bg-card);
  transition: all 0.25s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }

/* منوی سه‌نقطه (دسکتاپ) */
.header-more { position: relative; }
.more-toggle { display: grid; }
.more-menu {
  position: absolute; top: calc(100% + 12px); inset-inline-end: 0;
  min-width: 210px; padding: 8px;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  z-index: 950;
}
.more-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.more-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 700; color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.more-item:hover { background: var(--accent-soft); color: var(--accent); }
.more-item i { width: 18px; text-align: center; color: var(--accent); font-size: 15px; }
.more-item b {
  margin-inline-start: auto; font-size: 11px; font-weight: 800; color: var(--ink-faint);
  border: 1px solid var(--line); padding: 2px 8px; border-radius: var(--radius-full);
}
.more-item span { flex: 1; text-align: start; }

/* ابزار منوی موبایل (فقط در موبایل نمایش داده می‌شود) */
.nav-tools { display: none; }

/* همبرگر */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; }
.hamburger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* پوشش منوی موبایل */
.nav-overlay {
  position: fixed; inset: 0; top: var(--header-h);
  background: rgba(15, 12, 10, 0.55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
  z-index: 890;
}
body.nav-open .nav-overlay { opacity: 1; visibility: visible; pointer-events: auto; }

.nav-cta-mobile { display: none; }

/* تایپوگرافی سربرگ بزرگ */
.display-title {
  font-size: clamp(34px, 6vw, 66px);
  font-weight: 900; letter-spacing: -0.02em; line-height: 1.15;
}
html[lang^="en"] .display-title { font-family: var(--font-display); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset-inline-start: -180px; top: -180px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -140px; bottom: -200px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 166, 234, 0.16) 0%, transparent 65%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }

.hero-welcome { font-size: 15px; font-weight: 600; color: var(--ink-faint); margin-bottom: 10px; }
.hero-name { margin-bottom: 8px; }
.hero-role-line { font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; color: var(--accent); min-height: 1.5em; }
.type-caret { display: inline-block; width: 3px; height: 1em; background: var(--accent); vertical-align: -0.1em; margin-inline-start: 4px; animation: caretBlink 1s steps(1) infinite; border-radius: 2px; }
@keyframes caretBlink { 50% { opacity: 0; } }

.hero-text { margin-top: 20px; max-width: 540px; font-size: 16px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 52px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-sm); overflow: hidden; max-width: 560px; }
.stat { padding: 22px 26px; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; inset-block: 20%; inset-inline-start: 0; width: 1px; background: var(--line); }
.stat-num { font-size: clamp(26px, 3vw, 34px); font-weight: 900; color: var(--ink); line-height: 1.2; }
html[lang^="en"] .stat-num { font-family: var(--font-display); font-weight: 700; }
.stat-num .unit { font-size: 0.62em; color: var(--accent); margin-inline-start: 2px; }
.stat-label { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; font-weight: 500; }

/* تصویر Hero */
.hero-visual { position: relative; justify-self: center; width: min(100%, 380px); }
.hero-photo-frame {
  position: relative; border-radius: 28px; overflow: hidden;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/4.7;
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.hero-photo-frame:hover img { transform: scale(1.04); }
.hero-photo-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20,15,10,0.25)); }

.hero-photo-frame::before {
  content: ""; position: absolute; inset: -12px; z-index: -1; border-radius: 36px;
  background: conic-gradient(from 180deg, transparent 0 40%, var(--accent) 42% 48%, transparent 50% 100%);
  opacity: 0.5; animation: frameSpin 14s linear infinite;
}
@keyframes frameSpin { to { transform: rotate(360deg); } }

.hero-badge {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: var(--radius-full);
  background: var(--bg-elevated); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  font-size: 7px; font-weight: 700;
  animation: floatY 5s ease-in-out infinite;
}
.hero-badge i { color: var(--accent); font-size: 15px; }
.hero-badge.b1 { top: 20px; inset-inline-start: -34px; }
.hero-badge.b2 { bottom: 30px; inset-inline-end: -30px; animation-delay: 1.6s; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* اسکرول‌نشان */
.scroll-hint {
  position: absolute; bottom: 20px; inset-inline-start: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 20px;
  display: none; justify-content: center; padding-top: 7px;
}
html[dir="ltr"] .scroll-hint { transform: translateX(50%); }
.scroll-hint i { width: 3px; height: 8px; background: var(--accent); border-radius: 3px; animation: wheelDrop 1.6s ease-in-out infinite; }
@keyframes wheelDrop { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- بخش تیکه‌های درباره (مارکی) ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--bg-soft); overflow: hidden; padding: 16px 0; }
.ticker-track { display: flex; gap: 0; width: max-content; animation: tickerMove 30s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 14px; padding-inline: 28px; font-size: 14px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.ticker-item i { color: var(--accent); font-size: 12px; }
@keyframes tickerMove { to { transform: translateX(-50%); } }
html[dir="rtl"] .ticker-track { animation-direction: reverse; }

/* ---------- کارت‌ها ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }

/* هایلایت‌های درباره */
.highlights { display: flex; flex-direction: column; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.highlight { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.highlight-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 18px; color: var(--accent);
  background: var(--accent-soft);
}
.highlight strong { font-size: 14.5px; display: block; }

/* ---------- درباره / معرفی ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-text p + p { margin-top: 16px; }
.about-sign { margin-top: 24px; font-family: var(--font-display); font-size: 20px; font-style: italic; color: var(--accent); }
html[lang^="en"] .about-sign { font-size: 17px; }

/* تایم‌لاین */
.timeline { position: relative; padding-inline-start: 34px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 8px; width: 2px; background: linear-gradient(180deg, var(--accent), var(--line) 70%); border-radius: 2px; }
.timeline-item { position: relative; padding-bottom: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; top: 7px; inset-inline-start: -30px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-card); border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.timeline-year { display: inline-block; font-size: 12.5px; font-weight: 800; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-full); padding: 3px 14px; margin-bottom: 8px; }
.timeline-item h4 { font-size: 16.5px; margin-bottom: 6px; }
.timeline-item p { font-size: 14px; }

/* ---------- مهارت‌ها ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skill { padding: 20px 24px; }
.skill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.skill-name { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14.5px; }
.skill-name i { color: var(--accent); width: 20px; text-align: center; }
.skill-level { font-size: 12.5px; font-weight: 800; color: var(--ink-faint); }
html[lang^="en"] .skill-level { font-family: var(--font-en); }
.skill-bar { height: 6px; background: var(--bg-soft); border-radius: var(--radius-full); overflow: hidden; }
.skill-bar i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--accent-grad); width: 0; transition: width 1.2s var(--ease); }

/* ---------- خدمات ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { padding: 30px 26px; position: relative; overflow: hidden; }
.service::after { content: ""; position: absolute; inset-inline-end: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent-soft); opacity: 0; transition: opacity 0.35s; }
.service:hover::after { opacity: 1; }
.service-icon {
  width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; font-size: 21px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s;
}
.service:hover .service-icon { background: var(--accent-grad); color: #fff; transform: translateY(-4px) rotate(-4deg); }
.service h3 { font-size: 17px; margin-bottom: 10px; }
.service p { font-size: 14px; }

/* ---------- هاستینگ بنر ---------- */
.hosting-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #241c36 0%, #2d2150 55%, #3a2a63 100%);
  border-radius: var(--radius-lg); padding: 60px;
  color: #f4ede3;
  box-shadow: var(--shadow-lg);
}
.hosting-banner::before {
  content: ""; position: absolute; inset-inline-end: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(164, 138, 224, 0.35) 0%, transparent 65%);
}
.hosting-banner::after {
  content: "\f233"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; bottom: -30px; inset-inline-end: 40px; font-size: 150px; opacity: 0.07; color: #fff;
}
.hosting-content { position: relative; z-index: 1; max-width: 640px; }
.hosting-banner .eyebrow { color: var(--gold); }
.hosting-banner .eyebrow::before { background: var(--gold); }
.hosting-title { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; color: #fff; margin-top: 14px; }
.hosting-desc { color: rgba(244, 237, 227, 0.78); margin-top: 14px; font-size: 15px; }
.hosting-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hosting-features span { font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); }
.hosting-actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-light { background: #f4ede3; color: #2b2119; }
.btn-light:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,0.5); }
.btn-glass { background: rgba(255,255,255,0.08); color: #f4ede3; border-color: rgba(255,255,255,0.25); }
.btn-glass:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }

/* ---------- نمونه‌کارها ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  padding: 9px 22px; border-radius: var(--radius-full); font-size: 13.5px; font-weight: 700;
  color: var(--ink-soft); border: 1.5px solid var(--line); background: var(--bg-card);
  transition: all 0.25s var(--ease);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(124,92,191,0.6); }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.portfolio-card { overflow: hidden; display: flex; flex-direction: column; }
.portfolio-thumb { position: relative; /*aspect-ratio: 16/10.5;*/ overflow: hidden; background: var(--bg-soft); }
.portfolio-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.portfolio-card:hover .portfolio-thumb img { transform: scale(1.07); }
.portfolio-thumb .thumb-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent);
}
.portfolio-thumb .thumb-fallback::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--line-strong) 1px, transparent 1px); background-size: 22px 22px; opacity: 0.4; }
.portfolio-thumb .thumb-fallback i { position: relative; z-index: 1; }
.portfolio-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.portfolio-cat { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.portfolio-body h3 { font-size: 17.5px; margin-bottom: 8px; }
.portfolio-body p { font-size: 13.5px; flex: 1; }
.portfolio-tech { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tech-chip { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--bg-soft); border: 1px solid var(--line); padding: 3px 11px; border-radius: var(--radius-full); }
.portfolio-link { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.portfolio-link i { transition: transform 0.3s var(--ease); }
html[dir="rtl"] .portfolio-card:hover .portfolio-link i { transform: translateX(-4px); }
html[dir="ltr"] .portfolio-card:hover .portfolio-link i { transform: translateX(4px); }

.center-actions { text-align: center; margin-top: 48px; }

/* ---------- سوالات متداول (FAQ) ---------- */
.faq-item { padding: 22px 26px; margin-bottom: 14px; }
.faq-item summary {
  cursor: pointer; font-weight: 800; font-size: 15.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::-moz-list-bullet { list-style: none; }
.faq-chevron { color: var(--accent); font-size: 13px; transition: transform 0.3s var(--ease); flex-shrink: 0; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-item p { margin-top: 14px; font-size: 14.5px; }

/* ---------- CTA ---------- */
.cta-band { position: relative; overflow: hidden; padding: 72px 0; }
.cta-inner {
  position: relative; text-align: center; max-width: 720px; margin-inline: auto;
  padding: 64px 48px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.cta-inner::before {
  position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px;
  background: var(--accent-grad); border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
html[dir="ltr"] .cta-inner::before { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.cta-title { font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; }
html[lang^="en"] .cta-title { font-family: var(--font-display); font-weight: 600; }
.cta-desc { margin-top: 14px; font-size: 15px; }
.cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ---------- مقالات ---------- */
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.06); }
.post-thumb .thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent); }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; padding: 20px 24px 0; font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta i { color: var(--accent); }
.post-body { padding: 14px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-body h3 { font-size: 10px; margin-bottom: 8px; line-height: 1.6; }
.post-body h3 a:hover { color: var(--accent); }
.post-body p { font-size: 10px; flex: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.post-foot { padding: 0 24px 24px; display: flex; align-items: center; justify-content: space-between; }
.read-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* بلاگ: چیدمان دوستونه */
.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.blog-sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 24px; }
.sidebar-box { padding: 24px; }
.sidebar-box h3 { font-size: 15.5px; display: flex; align-items: center; gap: 9px; }
.sidebar-box h3 i { color: var(--accent); }
.sidebar-list li { margin-bottom: 4px; }
.sidebar-list a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: all 0.2s; }
.sidebar-list a:hover { color: var(--accent); background: var(--accent-soft); }
.sidebar-list a span:last-child { font-size: 11.5px; color: var(--ink-faint); }
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { font-size: 12px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line); border-radius: var(--radius-full); padding: 5px 13px; transition: all 0.2s; }
.tag-chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* جستجو */
.search-form { position: relative; }
.search-form input {
  width: 100%; padding: 13px 44px 13px 18px; border-radius: var(--radius-full);
  border: 1.5px solid var(--line); background: var(--bg-card); font-size: 14px;
  transition: border-color 0.25s;
}
html[dir="rtl"] .search-form input { padding: 13px 18px 13px 44px; }
.search-form input:focus { outline: none; border-color: var(--accent); }
.search-form button { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 16px; color: var(--ink-faint); font-size: 15px; }

/* صفحه‌بندی */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.page-link {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: var(--ink-soft); border: 1.5px solid var(--line); background: var(--bg-card);
  transition: all 0.25s var(--ease);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.is-current { background: var(--accent-grad); color: #fff; border-color: transparent; }

/* ---------- مقاله (تک مطلب) ---------- */
.article-hero { padding: 56px 0 36px; }
.article-hero .breadcrumbs { margin-bottom: 22px; }
.article-title { font-size: clamp(26px, 4vw, 42px); font-weight: 900; line-height: 1.4; max-width: 860px; }
html[lang^="en"] .article-title { font-family: var(--font-display); font-weight: 600; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; color: var(--ink-faint); font-size: 13px; font-weight: 600; }
.article-meta span { display: inline-flex; align-items: center; gap: 7px; }
.article-meta i { color: var(--accent); }
.article-cover { margin-top: 32px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.article-cover img { height: auto; width: 100%; aspect-ratio: 21/9; object-fit: cover; }

.article-layout { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: start; padding-bottom: 80px; }
.article-content { font-size: 15.5px; }
.article-content p { margin-bottom: 18px; color: var(--ink-soft); }
.article-content ul { margin-bottom: 18px; }
.article-content ul li { position: relative; padding-inline-start: 22px; margin-bottom: 8px; color: var(--ink-soft); }
.article-content ul li::before { content: ""; position: absolute; top: 11px; inset-inline-start: 0; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); opacity: 0.85; }
.article-content h2, .article-content h3 { margin: 30px 0 14px; }
.article-content h2 { font-size: 23px; }
.article-content h3 { font-size: 19px; }
.article-content img { border-radius: var(--radius); margin: 24px 0; }
.article-content blockquote {
  border-inline-start: 4px solid var(--accent); background: var(--accent-soft);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0; font-weight: 600; color: var(--ink);
}
html[dir="ltr"] .article-content blockquote { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

/* نوار پیشرفت مطالعه */
.reading-progress-wrap { position: sticky; top: var(--header-h); z-index: 5; height: 3px; background: transparent; }
.reading-progress-wrap i { display: block; height: 100%; width: 0%; background: var(--accent-grad); border-radius: 4px; }

/* اشتراک‌گذاری */
.share-box { display: flex; align-items: center; gap: 10px; margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.share-box span { font-size: 13.5px; font-weight: 700; color: var(--ink-faint); margin-inline-end: 6px; }
.share-btn { width: 42px; height: 42px; border-radius: var(--radius-full); display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-card); color: var(--ink-soft); transition: all 0.25s var(--ease); font-size: 15px; }
.share-btn:hover { color: #fff; border-color: transparent; transform: translateY(-3px); }
.share-btn.tg:hover { background: #2aabee; }
.share-btn.wa:hover { background: #25d366; }
.share-btn.copy:hover { background: var(--accent); }

/* جعبه نویسنده */
.author-box { display: flex; gap: 20px; padding: 26px; margin-top: 26px; }
.author-avatar {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-soft);
    display: flex;
    place-items: center;
    color: var(--accent);
    font-size: 22px;
    justify-content: center;
}
.author-avatar img { width: 70px; height: 70px; object-fit: cover; }
.author-box h4 { font-size: 16px; }
.author-box p { font-size: 13.5px; margin-top: 6px; }

/* ---------- مدارک ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cert-card { overflow: hidden; cursor: zoom-in; }
.cert-thumb { aspect-ratio: 4/2.9; overflow: hidden; background: var(--bg-soft); position: relative; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.cert-card:hover .cert-thumb img { transform: scale(1.06); }
.cert-thumb .zoom-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,15,10,0.35); opacity: 0; transition: opacity 0.3s; color: #fff; font-size: 22px; }
.cert-card:hover .zoom-hint { opacity: 1; }
.cert-body { padding: 20px 22px 24px; }
.cert-body h3 { font-size: 15.5px; margin-bottom: 6px; }
.cert-body p { font-size: 13px; }
.cert-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.cert-cat { font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-full); padding: 4px 13px; }
.cert-date { font-size: 12px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; }

/* حالت خالی */
.empty-state { text-align: center; padding: 70px 30px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty-state i { font-size: 44px; color: var(--accent); opacity: 0.7; }
.empty-state h3 { margin-top: 18px; font-size: 18px; }
.empty-state p { margin-top: 8px; font-size: 14px; }

/* ---------- تماس ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.contact-card { padding: 22px; display: flex; flex-direction: column; gap: 6px; transition: all 0.3s var(--ease); }
.contact-card:hover { transform: translateY(-4px); }
.contact-card i { font-size: 20px; color: var(--accent); }
.contact-card .c-label { font-size: 12px; color: var(--ink-faint); font-weight: 700; margin-top: 8px; }
.contact-card .c-value { font-size: 12.5px; font-weight: 700; word-break: break-word; }
.contact-card a.c-value:hover { color: var(--accent); }

.contact-form-card { padding: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.form-group label em { color: var(--accent); font-style: normal; }
.form-control {
  padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg); font-size: 14.5px; width: 100%;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-hint { font-size: 12px; color: var(--ink-faint); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.map-wrap { margin-top: 24px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); line-height: 0; }
.map-wrap iframe { width: 100%; height: 380px; border: 0; }

/* ---------- 404 ---------- */
.error-page { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: 80px 24px; position: relative; overflow: hidden; }
.error-page::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--line-strong) 1px, transparent 1px); background-size: 26px 26px; opacity: 0.35; }
.error-code { font-family: var(--font-en); font-size: clamp(90px, 18vw, 190px); font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--accent); position: relative; }
.error-code::after { content: "404"; position: absolute; inset: 0; color: var(--accent); opacity: 0.12; transform: translate(8px, 8px); }
.error-terminal {
  display: inline-flex; align-items: center; gap: 12px; margin: 28px auto 14px;
  font-family: var(--font-en); font-size: 13.5px; font-weight: 600;
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 12px; padding: 12px 22px;
  color: var(--ink-soft); box-shadow: var(--shadow-sm);
}
.error-terminal .prompt { color: var(--accent); }
.error-terminal .blink { animation: caretBlink 1s steps(1) infinite; color: var(--accent); }
.error-actions { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- فوتر ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-top: 72px; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; top: -140px; inset-inline-start: -140px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%); pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 56px; position: relative; }
.footer-about { font-size: 13.5px; margin-top: 16px; max-width: 320px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-chip { width: 42px; height: 42px; border-radius: var(--radius-full); display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-card); color: var(--ink-soft); font-size: 16px; transition: all 0.3s var(--ease); }
.social-chip:hover { color: #fff; background: var(--accent-grad); border-color: transparent; transform: translateY(-3px); box-shadow: 0 10px 20px -8px rgba(124,92,191,0.55); }

.footer-title { font-size: 15px; margin-bottom: 18px; position: relative; padding-bottom: 12px; }
.footer-title::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 13.5px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 8px; transition: color 0.25s, transform 0.25s; }
.footer-links a i { font-size: 10px; color: var(--accent); }
.footer-links a:hover { color: var(--accent); }
html[dir="rtl"] .footer-links a:hover { transform: translateX(-4px); }
html[dir="ltr"] .footer-links a:hover { transform: translateX(4px); }

.footer-contact li { margin-bottom: 14px; }
.footer-contact a, .footer-contact .contact-line { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-soft); transition: color 0.25s; }
.footer-contact i { color: var(--accent); width: 16px; text-align: center; }
.footer-contact a:hover { color: var(--accent); }

.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.copyright { font-size: 13px; color: var(--ink-faint); }
.footer-links-inline { display: flex; gap: 22px; }
.footer-links-inline a { font-size: 13px; color: var(--ink-faint); transition: color 0.25s; }
.footer-links-inline a:hover { color: var(--accent); }

/* ---------- دکمه بازگشت به بالا ---------- */
.back-to-top {
  position: fixed; bottom: 26px; inset-inline-end: 26px; z-index: 800;
  width: 48px; height: 48px; border-radius: var(--radius-full);
  display: grid; place-items: center; font-size: 16px; color: #fff;
  background: var(--accent-grad); box-shadow: 0 12px 26px -8px rgba(124, 92, 191, 0.6);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: all 0.35s var(--ease);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: calc(var(--header-h) + 12px); left: 50%;
  transform: translate(-50%, -14px);
  z-index: 1200; display: flex; align-items: center; gap: 10px;
  background: var(--bg-elevated); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-full); padding: 13px 24px; font-size: 7px; font-weight: 700;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transition: all 0.4s var(--ease);
  max-width: 92vw;
}
.toast i { color: #22c55e; font-size: 17px; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* قفل اسکرول هنگام باز بودن منوی موبایل */
body.nav-open { overflow: hidden; }

/* ---------- اسکرول‌بار سفارشی ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8e6ad9, #6a3fb3);
  border-radius: 999px; border: 3px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-strong); }
html { scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-soft); }

/* ---------- Tooltip ---------- */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 10px); inset-inline-start: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600;
  padding: 6px 13px; border-radius: 8px; white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all 0.25s var(--ease); z-index: 60;
}
html[dir="ltr"] [data-tooltip]::after { transform: translateX(50%) translateY(4px); }
[data-tooltip]:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
html[dir="ltr"] [data-tooltip]:hover::after { transform: translateX(50%) translateY(0); }

/* ---------- نورباکس ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(15, 12, 10, 0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease);
  padding: 40px;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-figure { max-width: min(1000px, 94vw); max-height: 86vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-figure img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lightbox-figure figcaption { color: #d8d0c5; font-size: 14px; margin-top: 16px; text-align: center; }
.lightbox-close, .lightbox-nav {
  position: absolute; width: 48px; height: 48px; border-radius: var(--radius-full);
  display: grid; place-items: center; color: #fff; font-size: 19px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.25s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent); }
.lightbox-close { top: 22px; inset-inline-end: 22px; }
.lightbox-prev { display: none; inset-inline-start: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { display: none; inset-inline-end: 20px; top: 50%; transform: translateY(-50%); }
body.lightbox-open { overflow: hidden; }

/* ---------- انیمیشن ظاهر شدن ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ---------- فوتر استیکی نیست، صفحات کوتاه ---------- */
/* ---------- Responsive ---------- */
/* ===== دیدگاه‌ها (کامنت) ===== */
.comments-section { padding: 72px 0 24px; }
.comments-head { margin-bottom: 26px; }
.comments-title {
  font-size: 23px; font-weight: 900;
  display: flex; align-items: center; gap: 11px; color: var(--ink);
}
.comments-title i { color: var(--accent); font-size: 21px; }
.comments-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 11px; border-radius: var(--radius-full);
  background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 800;
}
.comments-empty {
  color: var(--ink-faint); font-size: 15px; text-align: center;
  background: var(--bg-card); border: 1.5px dashed var(--line);
  border-radius: var(--radius); padding: 26px 20px; margin-bottom: 30px;
}
.comments-wrap { margin-bottom: 34px; }

.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comment-item { list-style: none; }
.comment-children {
  margin: 14px 0 0; padding-inline-start: 20px;
  margin-inline-start: 12px; border-inline-start: 2px solid var(--line);
}
.comment-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; transition: border-color 0.25s, box-shadow 0.25s;
}
.comment-card:hover { box-shadow: var(--shadow-sm); border-color: var(--accent-soft); }
.comment-card.is-admin {
  border-color: rgba(124, 92, 191, 0.4);
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.07), transparent 62%);
}
.comment-head { display: flex; align-items: flex-start; gap: 12px; }
.comment-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 17px;
  background: var(--accent-soft); color: var(--accent);
}
.comment-card.is-admin .comment-avatar { background: var(--accent-grad); color: #fff; }
.comment-user { display: flex;
    flex-direction: column;
    align-items: flex-start; flex: 1; min-width: 0; }
.comment-user strong { font-size: 14.5px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-badge {
  font-size: 10.5px; font-weight: 800; padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--accent-grad); color: #fff; letter-spacing: 0.3px;
}
.comment-user time { display: none; font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.comment-votes { display: flex; align-items: center; gap: 6px; flex: none; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: var(--radius-full);
  border: 1px solid var(--line); background: var(--bg-elevated);
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  cursor: pointer; transition: all 0.2s var(--ease);
}
.vote-btn i { font-size: 12.5px; }
.vote-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.vote-btn.up.is-voted { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.vote-btn.down.is-voted { background: rgba(207, 71, 71, 0.12); border-color: #cf4747; color: #cf4747; }
.vote-btn[disabled] { cursor: default; opacity: 0.75; transform: none; }
.comment-body { margin-top: 14px; font-size: 14.5px; line-height: 2.05; color: var(--ink-soft); word-break: break-word; }
.comment-foot { margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; }
.reply-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--ink-faint);
  background: none; border: none; cursor: pointer; padding: 4px 2px; transition: color 0.2s;
}
.reply-btn:hover { color: var(--accent); }

.comment-form-card {
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 30px; box-shadow: var(--shadow-sm);
}
.comment-form-title { font-size: 18px; font-weight: 900; color: var(--ink); margin-bottom: 4px; }
.comment-form-note { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 18px; }
.comment-form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.comment-field { margin-bottom: 14px; }
.comment-field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 7px; }
.comment-field label .req { color: #cf4747; }
.comment-field input, .comment-field textarea {
  width: 100%; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-card); color: var(--ink); font-size: 14px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
.comment-field input:focus, .comment-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.comment-required-note { font-size: 12px; color: var(--ink-faint); }
.comment-replying {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--accent-soft); border: 1px dashed var(--accent); color: var(--accent);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.comment-replying b { font-weight: 900; }
.comment-cancel-reply {
  background: none; border: none; color: var(--ink-faint); font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.comment-cancel-reply:hover { color: #cf4747; }
.comment-form[data-busy="1"] button[type="submit"] { opacity: 0.6; pointer-events: none; }

@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .hosting-banner::after { display: none; font-size: 90px; right: 15px;}
  .scroll-hint {display: none;}
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; width: min(100%, 300px); }
  .hero-badge.b1 { inset-inline-start: 154px; }
  .hero-badge.b2 { inset-inline-end: 13px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }

  /* منوی موبایل: کشوی کناری (مثل قبل) */
  .site-header, [data-theme="dark"] .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hamburger { display: flex; }
  .btn-order { display: none; }
  .more-toggle { display: none; }

  .main-nav {
    height: 100vh;
    position: fixed; top: var(--header-h); inset-inline-end: 0;
    width: 100%; background: var(--bg-elevated);
    border-inline-start: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    flex-direction: column; align-items: flex-start;
    padding: 28px 26px; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 900;
  }
  html[dir="rtl"] .main-nav { transform: translateX(-100%); }
  .main-nav.open, html[dir="rtl"] .main-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: stretch; width: 100%; gap: 4px; }
  .nav-link { padding: 13px 16px; font-size: 15.5px; border-radius: 12px; }
  .nav-tools {
    display: flex; flex-direction: column; gap: 10px; width: 100%;
    margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line);
  }
  .nav-tool {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 13px 14px; border-radius: 12px;
    font-size: 14px; font-weight: 700; color: var(--ink-soft);
    border: 1px solid var(--line); background: var(--bg-card);
    transition: all 0.25s;
  }
  .nav-tool:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
  .nav-tool i { color: var(--accent); font-size: 16px; }
  .nav-tool b { font-size: 11px; font-weight: 800; color: var(--ink-faint); }
  .nav-tool span { flex: 1; text-align: start; }
  .nav-cta-mobile { display: block; width: 100%; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
  .nav-cta-mobile .btn { width: 100%; }
}

@media (max-width: 720px) {
  .section { padding: 68px 0; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .portfolio-grid, .cert-grid, .skills-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .hosting-banner { padding: 40px 28px; }
  .cta-inner { padding: 48px 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-stats { margin-top: 150px; margin-bottom: 60px; grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 16px 10px; }
  .hero { padding: 56px 0 48px; }
  .article-layout { gap: 24px; }
  .comment-form-row { grid-template-columns: 1fr; }
  .comment-form-card { padding: 22px 18px; }
  .comment-children { padding-inline-start: 12px; margin-inline-start: 8px; }
  .comment-votes { gap: 4px; }
  .vote-btn { padding: 5px 9px; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .cta-actions .btn { flex: 1; }
}

/* ---------- حرکات کاسته‌شده ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
