/* ==========================================================================
   شرکت هیراد پارس - استایل اصلی
   طراحی رسمی، مینیمال و ریسپانسیو - RTL
   ========================================================================== */

/* ---------- فونت ---------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- توابع طراحی ---------- */
:root {
  --navy-950: #060F23;
  --navy-900: #0A1B3D;
  --navy-800: #0E2A5C;
  --navy-700: #13356E;
  --accent: #1E6FE0;
  --accent-strong: #1559B8;
  --accent-soft: #EAF2FE;
  --accent-glow: rgba(30, 111, 224, .16);
  --ink: #0F1E3C;
  --body-c: #46536D;
  --muted: #66748E;
  --line: #E7EBF3;
  --line-strong: #D6DEEC;
  --bg: #FFFFFF;
  --bg-soft: #F5F8FD;
  --danger: #DC2626;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(10, 27, 61, .06);
  --shadow-md: 0 12px 32px -12px rgba(10, 27, 61, .16);
  --shadow-lg: 0 24px 56px -20px rgba(10, 27, 61, .28);
  --ease: cubic-bezier(.22, .8, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: 'Vazirmatn', 'Vazir', Tahoma, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--body-c);
  font-size: 16px;
  line-height: 1.8;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.lock { overflow: hidden; }

main { flex: 1; }

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
strong { color: var(--ink); }

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

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

/* اسکرول‌بار سفارشی */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: #C6D0E0;
  border-radius: 8px;
  border: 2px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- ابزارهای کمکی ---------- */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.container {
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: -60px;
  inset-inline-start: 16px;
  background: var(--navy-900);
  color: #fff;
  padding: .6rem 1.1rem;
  border-radius: 0 0 12px 12px;
  z-index: 200;
  font-weight: 700;
  font-size: .9rem;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 0; }

.grad {
  background: linear-gradient(90deg, var(--accent) 0%, #3D9BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.5;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn .icon { width: 1.1em; height: 1.1em; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(30, 111, 224, .55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(30, 111, 224, .65);
}
.btn-primary:active { transform: translateY(0); }

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

.btn-white {
  background: #fff;
  color: var(--navy-800);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .4); }

.btn-ghost-light {
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .7);
  transform: translateY(-2px);
}

.btn-lg { padding: .9rem 1.9rem; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: .5rem 1.05rem; font-size: .88rem; border-radius: 10px; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: .65; cursor: not-allowed; transform: none !important; }

/* ---------- بخش‌ها ---------- */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: .85rem;
  padding: .38rem 1.05rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: .8rem;
}
.section-head p { color: var(--muted); font-size: 1.02rem; }

.section-head-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: start;
  margin-bottom: 48px;
}
.section-head-row h2 { margin-bottom: 0; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: .88rem;
  transition: color .2s;
}
.card-link .icon { width: 1em; height: 1em; transition: transform .25s var(--ease); }
.card-link:hover { color: var(--accent); }
.card-link:hover .icon { transform: translateX(-4px); }

/* ---------- انیمیشن ظهور (فقط وقتی جاوااسکریپت فعال است محتوا برای انیمیشن پنهان می‌شود) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- هدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s, background .3s;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 6px 24px -12px rgba(10, 27, 61, .18);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 78px;
  transition: height .3s var(--ease);
}
.site-header.scrolled .header-inner { height: 66px; }

.brand { display: inline-flex; align-items: center; gap: .75rem; }
.brand-logo { width: 46px; height: 46px; flex-shrink: 0; }
.site-header.scrolled .brand-logo { width: 40px; height: 40px; }
.brand-logo { transition: width .3s var(--ease), height .3s var(--ease); }
.brand-text strong {
  display: block;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.5;
}
.brand-text small {
  display: block;
  color: var(--muted);
  font-size: .6rem;
  letter-spacing: .14em;
  font-weight: 600;
}

.main-nav { margin-inline: auto; }
.main-nav ul { display: flex; gap: .3rem; }
.main-nav a {
  position: relative;
  display: block;
  padding: .5rem .85rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--body-c);
  border-radius: 10px;
  transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--accent-strong); background: var(--accent-soft); }
.main-nav a.active { color: var(--accent-strong); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  inset-inline: .9rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #3D9BFF);
}

.header-actions { display: flex; align-items: center; gap: .7rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: border-color .2s, color .2s;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent-strong); }
.nav-toggle .icon { width: 22px; height: 22px; }

/* ---------- منوی کشویی موبایل ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 36, .5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  z-index: 75;
}
.drawer-overlay.show { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: #fff;
  z-index: 80;
  transform: translateX(105%);
  transition: transform .38s var(--ease);
  box-shadow: -24px 0 60px -24px rgba(10, 27, 61, .35);
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
}
.drawer.open { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.drawer-close:hover { color: var(--ink); border-color: var(--accent); }

.drawer-nav { padding: .8rem 0; flex: 1; overflow-y: auto; }
.drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem .5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color .2s, padding-inline-start .25s var(--ease);
}
.drawer-nav a:last-child { border-bottom: none; }
.drawer-nav a:hover { color: var(--accent-strong); padding-inline-start: .8rem; }

.drawer-cta { padding-top: 1rem; display: grid; gap: .8rem; }
.drawer-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 700;
  color: var(--accent-strong);
  padding: .55rem;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: .95rem;
}

/* ---------- هیرو ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
  opacity: .55;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 320px at 12% 8%, rgba(30, 111, 224, .13), transparent 70%),
    radial-gradient(520px 340px at 88% 22%, rgba(61, 155, 255, .11), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: .85rem;
  padding: .45rem 1.05rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.hero-badge .icon { color: var(--accent); width: 1em; height: 1em; }

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 1.1rem;
}
.hero-sub {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.9rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2rem; }

.hero-visual { position: relative; }
.hero-visual::before {
  content: '';
  position: absolute;
  inset-inline-end: -20px;
  top: -20px;
  width: 62%;
  height: 55%;
  border-radius: 24px;
  background: var(--accent-soft);
  transform: rotate(3deg);
  z-index: 0;
}
.hero-visual-frame {
  position: relative;
  z-index: 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
}
.hero-visual-frame img { width: 100%; height: auto; aspect-ratio: 7 / 5; object-fit: cover; }

.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .7rem;
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .7rem 1rem;
  box-shadow: var(--shadow-md);
  /* انیمیشن شناؤری و backdrop-filter حذف شد: بازرندر دائمی بلور باعث لرزش متن می‌شد */
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.float-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.float-card-1 { top: -22px; inset-inline-start: -26px; }
.float-card-2 { bottom: 26px; inset-inline-end: -24px; }

.float-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
}
.float-icon.alt { background: #E9F9F1; color: #149460; }
.float-icon .icon { width: 20px; height: 20px; }
.float-text { display: flex; flex-direction: column; }
.float-text .num { font-weight: 800; font-size: 17px; line-height: 26px; color: var(--ink); }
.float-text small { color: var(--muted); font-size: 12px; line-height: 18px; }

/* ---------- خدمات ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  height: 0;
  width: 3px;
  background: linear-gradient(var(--accent), #3D9BFF);
  transition: height .35s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.service-card:hover::before { height: 100%; }

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.service-icon .icon { width: 26px; height: 26px; }
.service-card:hover .service-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.06);
}

.service-card h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .55rem;
}
.service-card p { font-size: .92rem; color: var(--muted); margin-bottom: 1.05rem; }

/* ---------- درباره ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3.5rem;
  align-items: center;
}
.about-visual { position: relative; order: 2; }
.about-visual::before {
  content: '';
  position: absolute;
  inset-inline-end: -18px;
  bottom: -18px;
  width: 55%;
  height: 55%;
  border-radius: 24px;
  background: var(--accent-soft);
  z-index: 0;
}
.about-visual img {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.about-copy h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 1.1rem;
}
.about-copy > p { margin-bottom: 1rem; font-size: .98rem; }

.about-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem 1.6rem;
  margin-top: 1.7rem;
}
.about-points li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--body-c);
}
.about-points .icon { color: var(--accent); width: 1.15em; height: 1.15em; margin-top: 5px; }

/* ---------- چرا هیراد پارس ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.why-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.1rem 1.5rem;
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.why-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  margin: 0 auto 1.2rem;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.why-icon .icon { width: 28px; height: 28px; }
.why-card:hover .why-icon { background: var(--accent); color: #fff; transform: scale(1.06); }
.why-card h3 { font-size: 1.02rem; font-weight: 800; color: var(--ink); margin-bottom: .5rem; }
.why-card p { font-size: .87rem; color: var(--muted); line-height: 1.85; }

/* ---------- پروژه‌ها ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease);
}
.project-card:hover .project-media img { transform: scale(1.05); }

.project-cat {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: rgba(8, 26, 56, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .3rem .85rem;
  border-radius: 999px;
}

.project-body { padding: 1.4rem 1.5rem 1.55rem; }
.project-body h3 {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .5rem;
  line-height: 1.6;
}
.project-body p {
  font-size: .9rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tags span {
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: .2rem .65rem;
}

.projects-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  max-width: 820px;
  margin: 2.4rem auto 0;
  padding: .95rem 1.4rem;
  background: var(--accent-soft);
  border: 1px dashed rgba(30, 111, 224, .35);
  border-radius: 14px;
  font-size: .88rem;
  line-height: 1.8;
  color: #3D5A8F;
}
.projects-note .icon { color: var(--accent); width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* ---------- فراخوان اقدام ---------- */
.cta-band { padding-top: 0; }
.cta-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, var(--navy-900) 0%, #123877 60%, #1559B8 125%);
  border-radius: 26px;
  padding: 2.9rem 3.2rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 30px 60px -30px rgba(10, 27, 61, .55);
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 100% at 15% 100%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 15% 100%, black 20%, transparent 75%);
}
.cta-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 240px at 90% 10%, rgba(61, 155, 255, .28), transparent 70%);
}
.cta-copy, .cta-actions { position: relative; z-index: 1; }
.cta-copy h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: .55rem;
  line-height: 1.55;
}
.cta-copy p { color: rgba(255, 255, 255, .78); font-size: 1rem; }
.cta-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

/* ---------- فوتر ---------- */
.site-footer {
  background: var(--navy-950);
  color: #A9B6CE;
  margin-top: auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding: 62px 0 44px;
}
.site-footer .brand-text strong { color: #fff; }
.site-footer .brand-text small { color: #7E90AE; }
.footer-about {
  font-size: .9rem;
  color: #8CA0BF;
  line-height: 1.95;
  margin: 1.1rem 0 1.4rem;
}
.socials { display: flex; gap: .6rem; }
.socials a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  display: grid;
  place-items: center;
  color: #AFC0DC;
  transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.socials a .icon { width: 17px; height: 17px; }
.socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.15rem;
  position: relative;
  padding-bottom: .6rem;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #3D9BFF);
}
.footer-col ul li { margin-bottom: .6rem; }
.footer-col ul a {
  color: #9DACc6;
  color: #9DACC6;
  font-size: .9rem;
  transition: color .2s, padding-inline-start .25s var(--ease);
}
.footer-col ul a:hover { color: #fff; padding-inline-start: .3rem; }

.contact-item {
  display: flex;
  gap: .7rem;
  margin-bottom: .85rem;
  font-size: .88rem;
  line-height: 1.8;
  color: #9DACC6;
}
.contact-item .icon { color: #6EA8FF; width: 17px; height: 17px; margin-top: 6px; }
.contact-item a:hover { color: #fff; }

.contact-note {
  margin-top: 1.3rem;
  padding: .8rem 1rem;
  font-size: .78rem;
  line-height: 1.85;
  color: #8CA0BF;
  background: rgba(255, 255, 255, .05);
  border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 1.3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: #7E90AE;
}

/* ---------- مودال تماس ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 36, .6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s, visibility .28s;
}
.modal-backdrop.show { opacity: 1; visibility: visible; }

.modal {
  background: #fff;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  position: relative;
  transform: translateY(18px) scale(.97);
  transition: transform .3s var(--ease);
  max-height: calc(100svh - 2rem);
  overflow-y: auto;
}
.modal-backdrop.show .modal { transform: none; }

.modal h3 { font-size: 1.3rem; font-weight: 800; color: var(--ink); margin-bottom: .4rem; }
.modal-sub { color: var(--muted); font-size: .92rem; margin-bottom: 1.4rem; }

.modal-close {
  position: absolute;
  top: 1.1rem;
  inset-inline-end: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  transition: color .2s, border-color .2s, background .2s;
}
.modal-close:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.modal-close .icon { width: 18px; height: 18px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 700; color: var(--ink); }
.field label b { color: var(--danger); font-weight: 700; }
.field input, .field textarea {
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  padding: .66rem .9rem;
  font-size: .92rem;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-glow);
}
.field textarea { min-height: 110px; resize: vertical; }
.field .error { color: var(--danger); font-size: .76rem; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .error { display: block; }

/* ---------- توست ---------- */
.toast {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translate(-50%, 18px);
  background: var(--navy-900);
  color: #fff;
  padding: .85rem 1.35rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .92rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  box-shadow: 0 18px 44px -12px rgba(5, 15, 36, .55);
  max-width: min(92vw, 460px);
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast.success .icon { color: #4ADE80; }
.toast.error .icon { color: #F87171; }

/* ---------- دکمه بازگشت به بالا ---------- */
.scroll-top {
  position: fixed;
  bottom: 1.4rem;
  inset-inline-start: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s, border-color .2s;
  box-shadow: var(--shadow-md);
}
.scroll-top.show { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { border-color: var(--accent); }
.scroll-top .icon { width: 19px; height: 19px; }

/* ---------- صفحه وضعیت (به‌زودی / 404) ---------- */
.page-status { padding: 96px 0 120px; }
.status-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.8rem 2.2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.status-icon {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  margin: 0 auto 1.4rem;
}
.status-icon .icon { width: 38px; height: 38px; }
.status-card h1 { font-size: 1.45rem; font-weight: 800; color: var(--ink); margin-bottom: .7rem; }
.status-card p { color: var(--muted); font-size: .95rem; line-height: 1.9; margin-bottom: 1.7rem; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1120px) {
  .hero-grid { gap: 2.2rem; }
  .about-grid { gap: 2.5rem; }
}

@media (max-width: 1024px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }

  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.6rem; }
  .hero-sub { max-width: none; }
  .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .float-card-1 { inset-inline-start: -10px; }
  .float-card-2 { inset-inline-end: -10px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 2.2rem; }
}

@media (max-width: 900px) {
  .cta-card { flex-direction: column; text-align: center; padding: 2.5rem 1.8rem; }
  .cta-actions { justify-content: center; }
}

@media (max-width: 860px) {
  .section { padding: 66px 0; }
  .section-head { margin-bottom: 42px; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2.8rem; }
  .about-visual { max-width: 520px; margin: 0 auto; width: 100%; }
}

@media (max-width: 640px) {
  .container { width: min(1200px, 100% - 2rem); }

  .header-inner { height: 64px; gap: 1rem; }
  .brand-logo { width: 40px; height: 40px; }
  .header-actions .btn span { display: none; }
  .header-actions .btn { padding: .55rem .7rem; }

  .hero h1 { font-size: 1.7rem; }
  .hero-cta .btn { flex: 1; min-width: 140px; }
  .float-card-1 { top: -16px; }
  .float-card-2 { bottom: 14px; }
  .float-text .num { font-size: 15px; line-height: 23px; }
  .float-text small { font-size: 11px; line-height: 17px; }
  .float-icon { width: 34px; height: 34px; border-radius: 9px; }

  .services-grid { grid-template-columns: 1fr; }
  .about-points { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; padding: 48px 0 36px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .status-card { padding: 2.2rem 1.4rem; }

  .scroll-top { inset-inline-start: 1rem; bottom: 1rem; }
}

/* ---------- حالت چاپ: همه عناصر بدون انیمیشن و کاملاً نمایان ---------- */
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .site-header, .scroll-top, .toast, .drawer, .drawer-overlay, .modal-backdrop { display: none !important; }
  body { background: #fff !important; }
}

/* ==========================================================================
   مرحله دوم: صفحات داخلی (درباره ما، خدمات، پروژه‌ها، تماس با ما)
   ========================================================================== */

/* ---------- هیرو صفحات داخلی ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 55%, #1559B8 130%);
  padding: 72px 0 66px;
  color: #fff;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 75% 90% at 50% 0%, black 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 90% at 50% 0%, black 25%, transparent 78%);
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 260px at 88% 10%, rgba(61, 155, 255, .25), transparent 70%),
    radial-gradient(420px 240px at 8% 90%, rgba(30, 111, 224, .2), transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.55;
  margin-bottom: .8rem;
}
.grad-light {
  background: linear-gradient(90deg, #7CB8FF 0%, #3D9BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero > .container > p {
  max-width: 44rem;
  color: rgba(255, 255, 255, .78);
  font-size: 1.02rem;
  line-height: 1.95;
}
.page-hero .breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.3rem;
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: .4rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.page-hero .breadcrumb a { color: rgba(255, 255, 255, .85); transition: color .2s; }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero .breadcrumb .icon { width: 1em; height: 1em; opacity: .7; }
.page-hero .breadcrumb span { color: #fff; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero-actions .icon { width: 1.1em; height: 1.1em; }

/* ---------- مرکزچین کردن لینک‌های ادامه ---------- */
.center-link { display: flex; justify-content: center; margin-top: 1.9rem; }
.about-more { margin-top: 1.7rem; }

/* ---------- مأموریت، چشم‌انداز و نگاه ما ---------- */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.mv-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 1.9rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  overflow: hidden;
}
.mv-card::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #3D9BFF);
  transition: width .35s var(--ease);
}
.mv-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.mv-card:hover::after { width: 100%; }
.mv-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.mv-icon .icon { width: 26px; height: 26px; }
.mv-card:hover .mv-icon { background: var(--accent); color: #fff; transform: scale(1.06); }
.mv-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .6rem;
}
.mv-card p { font-size: .92rem; color: var(--muted); line-height: 1.9; }

/* ---------- فرایند همکاری ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.process-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.process-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.process-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: 1.1rem;
}
.process-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.6px rgba(30, 111, 224, .55);
  letter-spacing: -.02em;
}
.process-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  transition: background .3s, color .3s;
}
.process-icon .icon { width: 22px; height: 22px; }
.process-card:hover .process-icon { background: var(--accent); color: #fff; }
.process-card h3 {
  font-size: .98rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .5rem;
}
.process-card p { font-size: .85rem; color: var(--muted); line-height: 1.85; }

/* ---------- جزئیات خدمات (صفحه خدمات) ---------- */
.service-details { display: grid; gap: 2rem; }
.service-detail {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 2.6rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.6rem 2.8rem;
  scroll-margin-top: 110px;
  transition: box-shadow .3s, border-color .3s;
}
.service-detail:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.service-detail.rev .service-visual { order: 2; }

.service-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 4;
  border-radius: 18px;
  background:
    radial-gradient(320px 200px at 85% 15%, rgba(61, 155, 255, .22), transparent 70%),
    linear-gradient(135deg, var(--navy-900) 0%, #123877 70%, #1559B8 125%);
  overflow: hidden;
}
.service-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 38px 38px;
}
.service-visual-icon {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .45);
  transition: transform .35s var(--ease);
}
.service-visual-icon .icon { width: 42px; height: 42px; }
.service-detail:hover .service-visual-icon { transform: scale(1.07); }
.service-visual-num {
  position: absolute;
  inset-inline-start: 1.2rem;
  top: .9rem;
  z-index: 1;
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .55);
  letter-spacing: .08em;
  direction: ltr;
}

.service-detail-body h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .7rem;
  line-height: 1.55;
}
.service-detail-body > p {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 1.3rem;
}
.service-points { display: grid; gap: .65rem; margin-bottom: 1.7rem; }
.service-points li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--body-c);
  line-height: 1.8;
}
.service-points .icon {
  color: var(--accent);
  width: 1.15em;
  height: 1.15em;
  margin-top: 4px;
  flex-shrink: 0;
}
.service-detail-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- صفحه تماس با ما ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 2.4rem;
  align-items: start;
}
.contact-info-col { display: grid; gap: 1.1rem; }
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem 1.6rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.info-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background .3s, color .3s;
}
.info-icon .icon { width: 24px; height: 24px; }
.info-card:hover .info-icon { background: var(--accent); color: #fff; }
.info-body h3 {
  font-size: .95rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .25rem;
}
.info-body p { font-size: .92rem; color: var(--body-c); line-height: 1.85; }
.info-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .45rem;
  font-size: .84rem;
  font-weight: 700;
  color: var(--accent-strong);
  transition: color .2s;
}
.info-link .icon { width: 1em; height: 1em; transition: transform .25s var(--ease); }
.info-link:hover { color: var(--accent); }
.info-link:hover .icon { transform: translateX(-4px); }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.4rem 2.5rem;
  box-shadow: var(--shadow-md);
}
.form-card .kicker { margin-bottom: .9rem; }
.form-card h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .5rem;
}
.form-card .form-sub {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.form-card .form-grid { gap: 1.15rem; }

/* ---------- ریسپانسیو صفحات داخلی ---------- */
@media (max-width: 1120px) {
  .service-detail { padding: 2.1rem 2rem; gap: 2rem; }
}

@media (max-width: 1024px) {
  .page-hero { padding: 52px 0 50px; }
  .mv-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(3, 1fr); }
  .service-detail { grid-template-columns: 1fr; gap: 1.8rem; }
  .service-detail.rev .service-visual { order: 0; }
  .service-visual { max-width: 460px; width: 100%; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .service-detail { padding: 1.7rem 1.4rem; }
  .service-detail-actions .btn { flex: 1; min-width: 140px; }
  .form-card { padding: 1.8rem 1.4rem; }
}

@media (max-width: 480px) {
  .page-hero h1 { font-size: 1.55rem; }
  .hero-actions .btn { flex: 1; min-width: 140px; }
  .process-grid { grid-template-columns: 1fr; }
  .info-card { padding: 1.2rem 1.2rem; }
}


/* ==========================================================================
   مرحله سوم: بخش مقالات
   ========================================================================== */

/* ---------- فیلتر موضوعی ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: center;
  margin-bottom: 2.6rem;
}
.chip {
  padding: .45rem 1.15rem;
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 700;
  color: var(--body-c);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  transition: color .2s, background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px -8px rgba(30, 111, 224, .55);
}

/* ---------- شبکه و کارت مقاله ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.article-card.hidden { display: none; }

.article-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
}
.article-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease);
}
.article-card:hover .article-media img { transform: scale(1.05); }

.article-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem 1.5rem 1.5rem;
}
.article-meta-top {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .7rem;
  font-size: .78rem;
}
.article-cat {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 700;
  padding: .18rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.article-dot { width: 4px; height: 4px; border-radius: 50%; background: #C4CFE2; }
.article-date { color: var(--muted); font-weight: 600; }

.article-body h3 {
  font-size: 1.03rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: .55rem;
}
.article-body h3 a { transition: color .2s; }
.article-body h3 a:hover { color: var(--accent-strong); }
.article-body > p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.9;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.article-read {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.article-read .icon { width: 1.05em; height: 1.05em; }
.article-foot .card-link { font-size: .85rem; }

.articles-empty {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 0 1rem;
  font-size: .95rem;
}

/* ---------- صفحه جزئیات مقاله ---------- */
.article-section { padding-top: 56px; }
.article-container { max-width: 860px; }

.article-cover {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.6rem;
}
.article-cover img {
  width: 100%;
  aspect-ratio: 1344 / 768;
  object-fit: cover;
}

.article-prose h2 {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--ink);
  margin: 2.2rem 0 .9rem;
  line-height: 1.6;
  position: relative;
  padding-inline-start: 1.05rem;
}
.article-prose h2:first-child { margin-top: 0; }
.article-prose h2::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: .45rem;
  bottom: .45rem;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--accent), #3D9BFF);
}
.article-prose p {
  font-size: .98rem;
  color: var(--body-c);
  line-height: 2.05;
  margin-bottom: 1rem;
}
.article-prose ul { margin: 0 0 1.2rem; display: grid; gap: .6rem; }
.article-prose li {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .93rem;
  font-weight: 600;
  color: var(--body-c);
  line-height: 1.9;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .7rem 1rem;
}
.article-prose li .icon {
  color: var(--accent);
  width: 1.15em;
  height: 1.15em;
  margin-top: 4px;
  flex-shrink: 0;
}

.article-tags { margin-top: 1.8rem; }

.article-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--line-strong);
  font-size: .9rem;
  color: var(--muted);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.05rem;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent-strong);
  transition: border-color .2s, background .2s, color .2s;
}
.share-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.share-btn .icon { width: 1.05em; height: 1.05em; }

/* ---------- متای هیرو مقاله ---------- */
.article-chip {
  display: inline-flex;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .95rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.article-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.7rem;
  margin-top: 1.3rem;
  font-size: .86rem;
  color: rgba(255, 255, 255, .75);
}
.article-hero-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.article-hero-meta .icon { width: 1.1em; height: 1.1em; color: #7CB8FF; }

/* ---------- ریسپانسیو مقالات ---------- */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .articles-grid { grid-template-columns: 1fr; }
  .filter-bar { justify-content: flex-start; }
  .article-section { padding-top: 40px; }
  .article-prose h2 { font-size: 1.15rem; }
  .article-cover { margin-bottom: 2rem; }
}

/* ==========================================================================
   مرحله چهارم: صفحه فناوری‌ها
   ========================================================================== */

/* ---------- کارت اصول انتخاب فناوری ---------- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.principle-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.principle-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.principle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 1.15rem;
}
.principle-icon .icon { width: 1.55rem; height: 1.55rem; }
.principle-card h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .55rem;
}
.principle-card p { font-size: .89rem; line-height: 1.95; }

/* ---------- بلوک دستهٔ فناوری ---------- */
.tech-category {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 1.9rem;
  transition: box-shadow .3s, border-color .3s;
}
.tech-category:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.tech-category:last-of-type { margin-bottom: 0; }

.tech-cat-head {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.45rem 1.8rem;
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 70%, var(--navy-700) 130%);
  position: relative;
  overflow: hidden;
}
.tech-cat-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(120deg, black 20%, transparent 80%);
  -webkit-mask-image: linear-gradient(120deg, black 20%, transparent 80%);
  pointer-events: none;
}
.tech-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #7CB8FF;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.tech-cat-icon .icon { width: 1.6rem; height: 1.6rem; }
.tech-cat-head > div { position: relative; z-index: 1; }
.tech-cat-head h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .18rem;
}
.tech-cat-head p { font-size: .85rem; color: rgba(255, 255, 255, .72); line-height: 1.75; }

/* ---------- کارت‌های آیتم فناوری ---------- */
.tech-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  padding: 1.6rem 1.8rem 1.8rem;
}
.tech-item {
  display: flex;
  gap: .95rem;
  align-items: flex-start;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.05rem 1.1rem;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, background .25s;
}
.tech-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 10px 24px -12px rgba(30, 111, 224, .38);
}
.tech-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 .5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #7CB8FF;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .4px;
  flex-shrink: 0;
  direction: ltr;
  unicode-bidi: isolate;
}
.tech-item-body h4 {
  font-size: .94rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .3rem;
}
.tech-item-body p { font-size: .81rem; line-height: 1.85; }

/* ---------- استانداردهای توسعه ---------- */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.standard-card {
  display: flex;
  gap: 1.05rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.standard-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.standard-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  flex-shrink: 0;
}
.standard-icon .icon { width: 1.35rem; height: 1.35rem; }
.standard-body h3 {
  font-size: .98rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .4rem;
}
.standard-body p { font-size: .86rem; line-height: 1.9; }

/* ---------- ریسپانسیو فناوری‌ها ---------- */
@media (max-width: 1024px) {
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-items { grid-template-columns: repeat(2, 1fr); }
  .standards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .principles-grid { grid-template-columns: 1fr; }
  .tech-items { grid-template-columns: 1fr; padding: 1.2rem 1.2rem 1.4rem; }
  .tech-cat-head { padding: 1.2rem 1.2rem; }
  .tech-cat-icon { width: 46px; height: 46px; border-radius: 12px; }
  .tech-cat-icon .icon { width: 1.35rem; height: 1.35rem; }
  .tech-cat-head h3 { font-size: 1rem; }
  .standards-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   مرحله پنجم: صفحه فرصت‌های شغلی
   ========================================================================== */

/* ---------- معرفی فرهنگ کاری ---------- */
.career-intro {
  max-width: 760px;
  margin: 0 auto 3.2rem;
  text-align: center;
}
.career-intro h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.5;
  margin: 1rem 0 .9rem;
}
.career-intro p {
  color: var(--body-c);
  font-size: 1rem;
  line-height: 2.1;
}

/* ---------- شبکه مزایای همکاری ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

/* ---------- آکاردئون موقعیت‌های شغلی ---------- */
.jobs-list {
  display: grid;
  gap: 1.1rem;
  max-width: 920px;
  margin-inline: auto;
}
.job-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow .3s, border-color .3s;
}
.job-item:hover { border-color: var(--line-strong); }
.job-item.open {
  box-shadow: var(--shadow-md);
  border-color: rgba(30, 111, 224, .45);
}
.job-head {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  width: 100%;
  padding: 1.15rem 1.5rem;
  text-align: start;
}
.job-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  flex-shrink: 0;
}
.job-icon .icon { width: 1.4rem; height: 1.4rem; }
.job-title { flex: 1; min-width: 0; }
.job-title h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .45rem;
  line-height: 1.6;
}
.job-meta { display: flex; flex-wrap: wrap; gap: .45rem .6rem; }
.job-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: .18rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.job-tag .icon { width: 1em; height: 1em; }
.job-tag.alt {
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.job-tag.alt .icon { color: var(--accent); }
.job-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  flex-shrink: 0;
  transition: background .25s, color .25s, border-color .25s;
}
.job-chevron .icon {
  width: 1.05rem;
  height: 1.05rem;
  transform: rotate(-90deg);
  transition: transform .3s var(--ease);
}
.job-item.open .job-chevron {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.job-item.open .job-chevron .icon { transform: rotate(0deg); }

/* پنل بازشونده */
.job-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.job-item.open .job-panel { grid-template-rows: 1fr; }
.job-panel-clip { overflow: hidden; min-height: 0; }
.job-panel-body {
  padding: .4rem 1.5rem 1.5rem;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s ease, transform .3s var(--ease);
}
.job-item.open .job-panel-body {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .35s ease .15s, transform .35s var(--ease) .15s;
}
.job-excerpt {
  font-size: .92rem;
  line-height: 2;
  color: var(--body-c);
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: .85rem 1.1rem;
  margin-bottom: 1.2rem;
}
.job-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
}
.job-req h4 {
  font-size: .88rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .7rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.job-req h4::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), #3D9BFF);
  flex-shrink: 0;
}
.job-req ul { display: grid; gap: .55rem; }
.job-req li {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  font-size: .85rem;
  font-weight: 600;
  color: var(--body-c);
  line-height: 1.85;
}
.job-req li .icon {
  color: var(--accent);
  width: 1.1em;
  height: 1.1em;
  margin-top: 4px;
  flex-shrink: 0;
}
.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  padding-top: .3rem;
}

/* فاصله کارت دعوت عمومی پس از فهرست */
.job-invite { margin-top: 3rem; }

/* ---------- فشرده‌سازی منوی دسکتاپ در عرض‌های میانی (۸ آیتم) ---------- */
@media (min-width: 1025px) and (max-width: 1280px) {
  .main-nav a { padding: .5rem .55rem; font-size: .88rem; }
  .main-nav ul { gap: .15rem; }
}

/* ---------- ریسپانسیو فرصت‌های شغلی ---------- */
@media (max-width: 1024px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .job-head { padding: 1rem 1.1rem; gap: .8rem; }
  .job-icon { width: 44px; height: 44px; border-radius: 11px; }
  .job-icon .icon { width: 1.25rem; height: 1.25rem; }
  .job-title h3 { font-size: .93rem; }
  .job-chevron { width: 32px; height: 32px; }
  .job-panel-body { padding: .3rem 1.1rem 1.3rem; }
  .job-cols { grid-template-columns: 1fr; gap: 1.1rem; }
  .career-intro { margin-bottom: 2.4rem; }
}

/* ==========================================================================
   پنل مدیریت - مرحله ششم
   ========================================================================== */

.admin-body { background: var(--bg-soft); color: var(--ink); }

/* ---------- صفحه ورود ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 1.5rem;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(30, 111, 224, .14), transparent 60%),
    radial-gradient(900px 480px at 10% 110%, rgba(30, 111, 224, .1), transparent 55%),
    var(--navy-950);
}
.login-card {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 2.2rem 2rem 1.8rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-bottom: 1.6rem; }
.login-brand-name { font-weight: 900; font-size: 1.15rem; color: var(--navy-900); }
.login-brand-en { font-size: .72rem; letter-spacing: .3em; color: var(--muted); direction: ltr; }
.login-title {
  display: flex; align-items: center; gap: .55rem;
  font-size: 1.18rem; font-weight: 800; color: var(--navy-900);
  margin-bottom: .5rem;
}
.login-title .icon { width: 22px; height: 22px; color: var(--accent); }
.login-sub { color: var(--muted); font-size: .88rem; line-height: 1.9; margin-bottom: 1.3rem; }
.login-alert {
  display: flex; align-items: flex-start; gap: .6rem;
  background: #FEF2F2; color: #B91C1C;
  border: 1px solid #FECACA; border-radius: 12px;
  padding: .75rem .9rem; font-size: .85rem; line-height: 1.8;
  margin-bottom: 1.1rem;
}
.login-alert .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: .15rem; }
.login-alert.in-card { margin: 0 0 1.2rem; }
.login-ok {
  display: flex; align-items: flex-start; gap: .6rem;
  background: #F0FDF4; color: #15803D;
  border: 1px solid #BBF7D0; border-radius: 12px;
  padding: .75rem .9rem; font-size: .85rem; line-height: 1.8;
  margin-bottom: 1.1rem;
}
.login-ok .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: .15rem; }
.login-form .field { margin-bottom: 1.2rem; }
.login-btn { width: 100%; justify-content: center; }
.login-btn:disabled { opacity: .55; cursor: not-allowed; }
.login-foot {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
  font-size: .82rem;
}
.login-foot a { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent-strong); font-weight: 700; }
.login-foot a:hover { color: var(--accent); }
.login-foot .icon { width: 15px; height: 15px; }
.login-sec { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.login-sec .icon { width: 15px; height: 15px; }
.login-copy { color: rgba(255, 255, 255, .55); font-size: .78rem; }

/* ---------- چیدمان کلی پنل ---------- */
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
}
.admin-brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.15rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.admin-brand img { width: 40px; height: 40px; }
.admin-brand-text { display: flex; flex-direction: column; line-height: 1.5; }
.admin-brand-text strong { font-size: .95rem; font-weight: 800; }
.admin-brand-text small { font-size: .72rem; color: rgba(255, 255, 255, .55); }
.admin-side-close {
  margin-inline-start: auto;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  display: none;
  place-items: center;
  cursor: pointer;
}
.admin-side-close .icon { width: 16px; height: 16px; }

.admin-nav { flex: 1; padding: 1.05rem .85rem; display: flex; flex-direction: column; gap: .3rem; }
.admin-nav a {
  display: flex; align-items: center; gap: .7rem;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  font-size: .92rem; font-weight: 600;
  padding: .72rem .85rem;
  border-radius: 12px;
  transition: background .2s var(--ease), color .2s;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav a.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(30, 111, 224, .55);
}
.admin-nav a .icon { width: 19px; height: 19px; flex-shrink: 0; }
.admin-nav-badge {
  margin-inline-start: auto;
  background: #F43F5E;
  color: #fff;
  font-size: .72rem; font-weight: 800;
  min-width: 22px; height: 22px;
  border-radius: 999px;
  display: grid; place-items: center;
  padding: 0 .45rem;
}

.admin-side-foot { padding: .9rem .85rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: .25rem; }
.admin-side-foot a {
  display: flex; align-items: center; gap: .7rem;
  color: rgba(255, 255, 255, .68);
  text-decoration: none;
  font-size: .86rem; font-weight: 600;
  padding: .6rem .75rem;
  border-radius: 11px;
  transition: background .2s, color .2s;
}
.admin-side-foot a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-side-foot .icon { width: 17px; height: 17px; }
.admin-logout:hover { background: rgba(244, 63, 94, .16) !important; color: #FDA4AF !important; }

.side-dim {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6, 15, 35, .55);
  z-index: 55;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.side-dim.show { opacity: 1; visibility: visible; }

/* ---------- بخش اصلی ---------- */
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .9rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: .85rem 1.6rem;
}
.admin-burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  place-items: center;
  cursor: pointer;
}
.admin-burger .icon { width: 20px; height: 20px; }
.admin-page-title { font-size: 1.05rem; font-weight: 800; color: var(--navy-900); }
.admin-view-site {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--accent-strong);
  font-size: .85rem; font-weight: 700;
  text-decoration: none;
  padding: .5rem .85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s, color .2s, background .2s;
}
.admin-view-site:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.admin-view-site .icon { width: 15px; height: 15px; }

.admin-content { flex: 1; padding: 1.6rem; display: flex; flex-direction: column; gap: 1.4rem; }
.admin-footer {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  background: #fff;
}

/* ---------- خوش‌آمد ---------- */
.admin-welcome {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.2rem;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.admin-welcome::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
.admin-welcome h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: .4rem; }
.admin-welcome p { color: rgba(255, 255, 255, .78); font-size: .88rem; line-height: 1.9; max-width: 560px; }
.admin-welcome-actions { display: flex; flex-direction: column; gap: .6rem; position: relative; z-index: 1; }

/* ---------- کارت‌های آمار ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stat-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid; place-items: center;
  margin-bottom: .5rem;
}
.stat-icon .icon { width: 22px; height: 22px; }
.stat-accent { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); border-color: transparent; color: #fff; }
.stat-accent .stat-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.stat-accent .stat-label, .stat-accent .stat-link { color: rgba(255, 255, 255, .82); }
.stat-num { font-size: 1.75rem; font-weight: 900; line-height: 1.2; }
.stat-label { color: var(--muted); font-size: .84rem; font-weight: 600; }
.stat-link {
  position: absolute;
  inset-inline-end: 1.1rem; inset-block-start: 1.15rem;
  font-size: .76rem; font-weight: 700;
  color: var(--accent-strong);
  text-decoration: none;
  padding: .3rem .6rem;
  border-radius: 8px;
  background: var(--accent-soft);
}
.stat-accent .stat-link { background: rgba(255, 255, 255, .16); color: #fff; }
.stat-link:hover { background: var(--accent); color: #fff; }
.stat-accent .stat-link:hover { background: rgba(255, 255, 255, .3); }

/* ---------- کارت و جدول ---------- */
.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.admin-card-head h3 {
  display: flex; align-items: center; gap: .55rem;
  font-size: .98rem; font-weight: 800; color: var(--navy-900);
}
.admin-card-head .icon { width: 19px; height: 19px; color: var(--accent); }
.head-count {
  font-size: .74rem; font-weight: 700;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: .18rem .55rem;
  border-radius: 999px;
}
.admin-card-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--accent-strong); font-size: .84rem; font-weight: 700;
  text-decoration: none;
}
.admin-card-link:hover { color: var(--accent); }
.admin-card-link .icon { width: 15px; height: 15px; }

.table-wrap { overflow-x: auto; max-height: 70vh; overflow-y: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .87rem; min-width: 640px; }
.admin-table thead th {
  position: sticky; top: 0;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: .76rem; font-weight: 800;
  text-align: right;
  padding: .7rem .95rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  z-index: 1;
}
.admin-table tbody td {
  padding: .8rem .95rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--body-c);
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #F8FAFE; }
.cell-id { color: var(--muted); white-space: nowrap; }
.cell-name { font-weight: 700; color: var(--ink); white-space: nowrap; }
.cell-ltr { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.cell-email { display: block; font-size: .78rem; color: var(--muted); }
.cell-msg { min-width: 220px; max-width: 360px; }
.cell-msg p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.8;
  font-size: .84rem;
}
.cell-date { white-space: nowrap; font-size: .8rem; color: var(--muted); }
.cell-tech { font-size: .8rem; color: var(--muted); min-width: 150px; }
.cell-contact { min-width: 140px; }
.cell-actions { white-space: nowrap; }
.cell-actions .inline-form { display: inline-flex; margin-inline-end: .35rem; vertical-align: middle; }
.row-new { background: #FFF7ED; }
.row-new:hover { background: #FFEFDC !important; }

/* ---------- نشان وضعیت ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .74rem; font-weight: 800;
  padding: .28rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.badge.new { background: #FFF1E2; color: #C2590A; }
.badge.read { background: #EEF2F8; color: #46536D; }
.badge.archived { background: #F1F5F9; color: #64748B; }

.chip {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: .76rem; font-weight: 700;
  padding: .26rem .65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.proj-thumb {
  width: 64px; height: 42px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: block;
}
.proj-thumb.img-missing { visibility: hidden; }

/* ---------- دکمه‌های آیکونی ---------- */
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  display: inline-grid; place-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
  padding: 0;
}
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); background: #FEF2F2; }

/* ---------- فیلترها ---------- */
.filter-tabs {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.filter-tabs a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .52rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--body-c);
  font-size: .84rem; font-weight: 700;
  text-decoration: none;
  transition: border-color .2s, background .2s, color .2s;
}
.filter-tabs a:hover { border-color: var(--accent); color: var(--accent); }
.filter-tabs a.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(30, 111, 224, .5);
}
.tab-count {
  font-size: .72rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .1rem .5rem;
  color: var(--muted);
}
.filter-tabs a.active .tab-count { background: rgba(255, 255, 255, .2); border-color: transparent; color: #fff; }

/* ---------- نوار ابزار و راهنما ---------- */
.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.admin-toolbar-note { color: var(--muted); font-size: .85rem; line-height: 1.8; max-width: 640px; }
.admin-hint {
  display: flex; align-items: flex-start; gap: .55rem;
  color: var(--muted); font-size: .8rem; line-height: 1.8;
}
.admin-hint .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: .2rem; color: var(--accent); }

.admin-empty {
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  text-align: center;
  padding: 2.6rem 1.5rem;
  color: var(--muted);
}
.admin-empty .icon { width: 42px; height: 42px; color: var(--line-strong); }
.admin-empty p { font-size: .88rem; max-width: 420px; line-height: 1.9; }

/* ---------- فرم ---------- */
.form-card { padding-bottom: 1.4rem; }
.admin-form { padding: 1.3rem 1.25rem 0; }
.field-hint { color: var(--muted); font-size: .74rem; line-height: 1.7; }
.form-actions { display: flex; align-items: center; gap: .7rem; margin-top: .4rem; }

.notice-band {
  display: flex; align-items: flex-start; gap: .7rem;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  color: #92400E;
  font-size: .84rem;
  line-height: 1.9;
}
.notice-band .icon { width: 19px; height: 19px; flex-shrink: 0; margin-top: .15rem; }

/* ---------- خدمات مینی ---------- */
.services-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .9rem;
  padding: 1.2rem 1.25rem;
}
.service-mini {
  display: flex; align-items: flex-start; gap: .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .9rem 1rem;
  transition: border-color .2s;
}
.service-mini:hover { border-color: var(--accent); }
.service-mini-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid; place-items: center;
}
.service-mini-icon .icon { width: 19px; height: 19px; }
.service-mini strong { display: block; font-size: .86rem; color: var(--ink); margin-bottom: .25rem; }
.service-mini p {
  font-size: .78rem; color: var(--muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- وضعیت انتخاب ---------- */
.status-select {
  border: 1.5px solid var(--line-strong);
  border-radius: 9px;
  padding: .38rem .6rem;
  font-size: .8rem; font-weight: 700;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.status-select:hover, .status-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); outline: none; }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .services-mini-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .admin-sidebar {
    position: fixed;
    inset-inline-start: 0;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  [dir="rtl"] .admin-sidebar { transform: translateX(100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-side-close { display: grid; }
  .admin-burger { display: grid; }
  .side-dim { display: block; }
  .admin-content { padding: 1.1rem 1rem; }
  .admin-topbar { padding: .75rem 1rem; }
  .admin-footer { padding: .8rem 1rem; flex-direction: column; gap: .3rem; text-align: center; }
  .admin-welcome { flex-direction: column; }
  .admin-welcome-actions { flex-direction: row; width: 100%; }
}

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .services-mini-grid { grid-template-columns: 1fr; }
  .filter-tabs a { padding: .45rem .8rem; font-size: .8rem; }
  .form-grid { grid-template-columns: 1fr !important; }
  .admin-view-site span { display: none; }
  .cell-msg { max-width: 200px; }
}
