/*
Theme Name: Homa Tech
Theme URI: https://homa-group.ir
Author: گروه فناوری هما
Description: قالب اختصاصی گروه فناوری هما (نسخه کاملاً متغیر - بدون هاردکد)
Version: 1.4
Text Domain: homa
*/

/* --------------------------------------------
   RESET & GLOBAL
--------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------
   CSS VARIABLES (DARK MODE DEFAULT)
--------------------------------------------- */
:root {
  /* Core colors */
 --bg: #1c1a18;
--surf: #252220;
--surface2: #2f2b28;

  /* Borders */
  --border: rgba(255, 255, 255, 0.07);
  --border-dim: rgba(255, 255, 255, 0.05);

  /* Typography */
  --text: #F1EEE8;
  --muted: #A9A39A;
  --subtle: #6F6B65;
  --text-secondary: #DDD7CE;

  /* Brand Accent */
--cyan: #D17A16;
--gold: #A95F16;

  /* Raw colors */
  --color-black: #0F0F0F;
  --color-white: #F5F1E8;

  --color-dark-bg: #121212;
  --color-dark-header: #1B1B1B;
  --color-dim-gray: #4B4B4B;
  --color-green-accent: #6B746D;

  --color-error: #FF5F57;

  /* RGB versions */
  --color-cyan-rgb: 224, 138, 30;
  --color-gold-rgb: 183, 106, 27;
  --color-white-rgb: 245, 241, 232;
  --color-black-rgb: 15, 15, 15;

  /* Glow & overlays */
  --overlay-cyan-glow: rgba(224, 138, 30, 0.05);
  --overlay-cyan-dim: rgba(224, 138, 30, 0.03);

  --overlay-gold-dim: rgba(183, 106, 27, 0.10);

  --overlay-white-015: rgba(255, 255, 255, 0.015);
  --overlay-white-02: rgba(255, 255, 255, 0.02);
  --overlay-white-035: rgba(255, 255, 255, 0.035);
  --overlay-white-07: rgba(255, 255, 255, 0.07);

  --overlay-cyan-003: rgba(224, 138, 30, 0.025);
  --overlay-cyan-015: rgba(224, 138, 30, 0.10);
  --overlay-cyan-030: rgba(224, 138, 30, 0.12);
  --overlay-cyan-035: rgba(224, 138, 30, 0.18);

  --overlay-gold-035: rgba(183, 106, 27, 0.18);

  /* Components */
  --nav-bg: rgba(22, 22, 22, 0.82);
  --accent-dim: rgba(224, 138, 30, 0.08);

  --terminal-dim: #8A847B;
}
/* --------------------------------------------
   BASE & BODY
--------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', 'Inter', 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  direction: rtl;
}

/* Dot grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, var(--overlay-white-07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 20%, black 0%, transparent 100%);
  pointer-events: none;
}

/* Noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

/* All main content layers above pseudo-elements */
nav,
.hero,
.marquee-section,
.container,
.cta-section,
footer,
.page-hero,
.inner-page,
.blog-grid-section,
.single-post-section,
.projects-grid-section,
.project-single-section,
.about-section {
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4,
.nav-logo,
.stat-num,
.stat-number {
  font-family: 'Space Grotesk', 'Vazirmatn', sans-serif;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* --------------------------------------------
   NAVIGATION (FIXED) - CLEAN VERSION
--------------------------------------------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  width: 100%;
  height: 76px;
  box-sizing: border-box;
}

/* ===== LOGO ===== */
.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  height: 76px;
}

/* استایل برای لوگوی سفارشی وردپرس */
.nav-logo .custom-logo {
  height: 48px;
  width: auto;
  display: block;
}

/* استایل برای لوگوی پیش‌فرض */
.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
  transform:translateY(-12px);
}

/* رنگ لوگو همرنگ برند (نارنجی) */
.nav-logo .custom-logo,
.nav-logo-img {
  filter: brightness(0) saturate(100%) invert(48%) sepia(93%) saturate(1242%) hue-rotate(346deg) brightness(96%) contrast(91%);
  transition: filter 0.2s ease;
}

body.light-mode .nav-logo .custom-logo,
body.light-mode .nav-logo-img {
  filter: brightness(0) saturate(100%) invert(48%) sepia(93%) saturate(1242%) hue-rotate(346deg) brightness(96%) contrast(91%);
}

/* ===== MENU LINKS ===== */
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 76px;
}

.nav-links li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 76px;
}

.nav-links a {
  color: var(--subtle);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  height: 76px;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links .current-menu-item a {
  color: var(--cyan);
}

/* ===== RIGHT SIDE ACTIONS ===== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
  height: 76px;
}

/* دکمه تم */
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Courier New', 'Space Grotesk', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  color: var(--cyan);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.theme-toggle:hover {
  background: var(--surface2);
}

/* دکمه CTA */
.nav-cta {
  background: var(--cyan);
  color: var(--color-black);
  padding: 8px 24px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.nav-cta:hover {
  opacity: 0.85;
}

/* ===== SEARCH DESKTOP ===== */
.nav-search-desktop {
  display: block;
}

.nav-search-form-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 6px 16px;
}

.nav-search-form-desktop input {
  background: transparent;
  border: none;
  padding: 6px 0;
  color: var(--text);
  font-size: 13px;
  width: 150px;
  font-family: inherit;
}

.nav-search-form-desktop input:focus {
  outline: none;
}

.nav-search-form-desktop input::placeholder {
  color: var(--subtle);
}

.nav-search-form-desktop button {
  background: transparent;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
}

.nav-search-form-desktop button:hover {
  color: var(--text);
}

/* ===== SEARCH MOBILE ===== */
.nav-search-mobile {
  display: none;
  /* position: relative;  ← این خط را حذف یا کامنت کنید */
}

.nav-search-toggle {
  background: transparent;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-search-toggle:hover {
  color: var(--cyan);
}

.nav-search-form-mobile {
  /* این باکس دیگر به دکمه کوچک متصل نیست، بلکه به نوار nav متصل می‌شود */
  position: absolute;
  right: 16px;                 /* فاصله از لبه راست صفحه */
  top: calc(100% + 6px);      /* دقیقاً زیر نوار منو */
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 200;
  width: min(320px, calc(100vw - 32px)); /* حداکثر 320px، در موبایل با حاشیه 16px از دو طرف */
  backdrop-filter: blur(12px);
}

.nav-search-form-mobile.active {
  display: flex;
}

.nav-search-form-mobile input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 8px 16px;
  color: var(--text);
  font-size: 13px;
}

.nav-search-form-mobile input:focus {
  outline: none;
  border-color: var(--cyan);
}

.nav-search-form-mobile button {
  background: var(--cyan);
  border: none;
  border-radius: 40px;
  padding: 8px 16px;
  color: var(--color-black);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;      /* یا flex */
  align-items: center;       /* وسط‌چین عمودی */
  justify-content: center;   /* وسط‌چین افقی */
  font-size: 16px;           /* اندازه فلش رو هم اگر خواستید تنظیم کنید */
  line-height: 1;            /* جلوگیری از جابجایی ناخواسته */
  height: 38px;              /* ارتفاع ثابت برای یکدستی (اختیاری) */
  min-width: 38px;           /* عرض حداقل برای دکمه گرد (اختیاری) */
}

/* --------------------------------------------
   BUTTONS
--------------------------------------------- */
.btn-primary {
  background: var(--cyan);
  color: var(--color-black);
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  color: var(--color-black);
}

.btn-ghost {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.btn-ghost:hover {
  color: var(--text);
}
.btn-ghost::after {
  content: '←';
  transition: transform 0.2s;
}
.btn-ghost:hover::after {
  transform: translateX(4px);
}

.btn-gold {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}
.btn-gold:hover {
  background: var(--gold);
  color: var(--color-black);
}

/* --------------------------------------------
   MARQUEE SECTION
--------------------------------------------- */
.marquee-section {
  width: 100%;
  background: transparent;
}
.marquee-wrapper {
  background: var(--overlay-white-015);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
  backdrop-filter: blur(10px);

}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
  animation: scrollMarquee 50s linear infinite;
  will-change: transform;
}
.marquee-track span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--cyan);
  opacity: 0.6;
  animation: softPulse 3s ease-in-out infinite;
}

@keyframes scrollMarquee {
  from { transform: translateX(50%); }
  to { transform: translateX(0); }
}
@keyframes softPulse {
  0% { opacity: 0.2; transform: scale(0.9); }
  50% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0.2; transform: scale(0.9); }
}
.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* --------------------------------------------
   UTILITY & LAYOUT
--------------------------------------------- */
.container {
  width: 100%;
}
.section {
  padding: 60px 0;
}
.section-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-right: 80px;
}
.section-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 32px;
  padding-right: 80px;
}

/* --------------------------------------------
   CTA SECTION
--------------------------------------------- */
.cta-section {
  padding: 60px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  background: var(--surf);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-left h2 {
  font-family: 'Space Grotesk', 'Vazirmatn', sans-serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.cta-left h2 .cy { color: var(--cyan); }
.cta-left p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.cta-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cta-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-contact-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.cta-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--subtle);
}
.cta-contact-item i {
  color: var(--cyan);
  font-size: 16px;
}

/* --------------------------------------------
   FOOTER
--------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}
.footer-logo span { color: var(--cyan); }
footer p {
  font-size: 11px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--cyan);
}

/* --------------------------------------------
   PAGE HERO
--------------------------------------------- */
.page-hero {
  padding: 140px 80px 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 50% 60% at 80% 50%, var(--overlay-cyan-dim) 0%, transparent 70%);
}
.page-hero-inner {
  position: relative;
  z-index: 1;
}
.page-hero-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 16px;
}
.page-hero h1 .cy { color: var(--cyan); }
.page-hero p {
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}

/* --------------------------------------------
   PROJECT DOT ANIMATION
--------------------------------------------- */
.proj-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.proj-dot::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: var(--overlay-cyan-035);
  border-radius: 50%;
  animation: projectPulse 1.5s infinite;
}
.proj-dot.go-dot {
  background: var(--gold);
}
.proj-dot.go-dot::before {
  background: var(--overlay-gold-035);
}
@keyframes projectPulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* --------------------------------------------
   HERO SECTION
--------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 80px 80px;
  position: relative;
  width: 100%;
  
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 40%, var(--overlay-cyan-glow) 0%, transparent 70%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(var(--overlay-white-015) 1px, transparent 1px), linear-gradient(90deg, var(--overlay-white-015) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}
.hero-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  width: 100%;
  flex-wrap: wrap;
}
.hero-content {
  flex: 1;
  max-width: 500px;
  text-align: right;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--overlay-cyan-015);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero h1 {
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--cyan); }
.hero h1 .dim { color: var(--color-dim-gray); }
.hero p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-terminal {
  flex: 0.7;
  min-width: 340px;
  max-width: 420px;
}
.terminal {
  background: var(--color-dark-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--color-dark-header);
  border-bottom: 1px solid var(--border);
}
.tdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-body {
  padding: 16px;
  font-family: 'Courier New', monospace;
  direction: ltr;
  text-align: left;
}
.tl {
  font-size: 11px;
  color: var(--terminal-dim);
  line-height: 1.8;
}
.tl .cy { color: var(--cyan); }
.tl .go { color: var(--gold); }
.tl .gr { color: var(--color-green-accent); }
.t-cursor {
  display: inline-block;
  width: 7px;
  height: 11px;
  background: var(--cyan);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Hero stats (default absolute) */
.hero-stats {
  position: absolute;
  left: 80px;
  bottom: 80px;
  z-index: 1;
  display: flex;
  gap: 48px;
}
.stat {
  text-align: left;
}
.stat-num {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
}
.stat-num span { color: var(--cyan); }
.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

/* --------------------------------------------
   SERVICES TWO COLUMN
--------------------------------------------- */
.services-two-column {
  padding: 0 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.service-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}
.service-item::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.4s ease;
}
.service-item:hover::after {
  width: 100%;
}
.service-item:nth-child(odd) {
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}
.service-item:nth-child(even) {
  padding-right: 2rem;
}
.service-item:hover {
  background: var(--overlay-white-02);
}
.service-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.service-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  transition: left 0.3s ease;
  z-index: -1;
  opacity: 0.1;
}
.service-item:hover .service-icon {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}
.service-item:hover .service-icon::before {
  left: 0;
}
.service-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
  letter-spacing: -0.3px;
}
.service-content p {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
}

/* --------------------------------------------
   PROJECTS TABLE (archive style)
--------------------------------------------- */
.projects-table-wrapper {
  padding: 0 24px;
  overflow-x: auto;
}
.projects-table {
  width: 100%;
  border-collapse: collapse;
  direction: rtl;
  min-width: 680px;
}
.projects-table th {
  text-align: right;
  padding: 12px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.projects-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.proj-dot-cell {
  width: 28px;
  padding-right: 0;
}
.proj-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  width: 70px;
  white-space: nowrap;
}
.proj-tech {
  font-size: 10px;
  color: var(--gold);
  font-family: monospace;
  direction: ltr;
  text-align: left;
  white-space: normal;
  width: 180px;
}
.proj-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
}
.proj-desc {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}
.proj-arrow a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  transition: transform 0.2s, color 0.2s;
}
.proj-arrow a:hover {
  color: var(--text);
  transform: translateX(-3px);
}
.projects-table tr:hover td {
  background: var(--overlay-white-02);
}

/* --------------------------------------------
   SINGLE PROJECT (VERSION 3 - STORY MODE)
--------------------------------------------- */

.project-single-section {
  padding-top: 100px;
}

/* Hero جدید */
.project-hero-v2 {
  position: relative;
  padding: 120px 80px 80px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
}
.project-hero-v2 .project-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 50%, var(--overlay-cyan-dim) 0%, transparent 70%);
  z-index: 0;
}
.project-hero-v2 .project-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}
.project-badge-subtle {
  display: inline-block;
  background: var(--accent-dim);
  border: 1px solid var(--overlay-cyan-015);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--cyan);
  border-radius: 40px;
  margin-bottom: 24px;
  opacity: 0.7;
}
.project-quote {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 20px auto 0;
  font-style: normal;
  border-right: 3px solid var(--cyan);
  padding-right: 20px;
  text-align: right;
}
.project-subtitle {
  max-width: 720px;
  margin: 20px auto 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

/* گالری گرید */
/* گالری ماسونری ساده - بدون افکت بزرگ شدن */
.project-gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 60px 80px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.gallery-masonry-item {
    background: var(--surface2);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    /* حذف transform و transition */
}
.gallery-masonry-item img {
    width: 100%;
    height: 240px;        /* ارتفاع ثابت برای یکدستی */
    object-fit: cover;    /* تصویر کل کادر را پر می‌کند (کمی برش می‌خورد ولی یکدست می‌شود) */
    display: block;
    transition: none;     /* بدون هیچ انیمیشن */
}
/* در هاور هیچ تغییری نکنیم */
.gallery-masonry-item:hover img {
    opacity: 1;           /* بدون تغییر */
}

/* مودال ساده لایت‌باکس */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}
.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    left: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    font-family: monospace;
    background: none;
    border: none;
}
.lightbox-close:hover {
    color: var(--cyan);
}
.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ccc;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    width: fit-content;
    margin: 0 auto;
    border-radius: 40px;
    font-size: 13px;
}
/* دکمه‌های قبلی و بعدی لایت‌باکس */

/* Responsive */


/* Responsive */
@media (max-width: 680px) {
    .project-gallery-masonry {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 16px;
    }
    .gallery-masonry-item img {
        height: 200px;   /* در موبایل کمی کمتر */
    }
}


@media (max-width: 900px) {
    .project-gallery-masonry {
        padding: 40px 40px;
    }
}
.project-single-image {
  padding: 60px 80px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: var(--bg);
}
.project-single-image img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 0 auto;
}
/* داستان پروژه */
.project-story-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}
.story-block {
  margin-bottom: 56px;
}
.story-block h2 {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: var(--text);
}
.story-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}
.result-block {
  background: var(--surf);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  margin: 48px 0;
}
.result-block h2 {
  margin-bottom: 16px;
}

/* فناوری‌ها با توضیح */
.tech-note {
  margin: 40px 0 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tech-note-text {
  font-size: 0.8rem;
  color: var(--subtle);
  margin-bottom: 16px;
  text-align: center;
}
.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.tech-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.75rem;
  color: var(--gold);
}

/* باکس اطلاعات پروژه (نوار افقی - شامل فیلدهای قدیمی) */
.project-info-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 32px;
  margin: 48px 0 0px;
}
.info-item {
  flex: 1;
  text-align: center;
}
.info-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--subtle);
  margin-bottom: 8px;
}
.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* CTA پایانی جدید */
.project-bottom-cta-v2 {
  text-align: center;
  padding: 80px 24px;
  background: var(--surf);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.project-bottom-cta-v2 h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.project-bottom-cta-v2 p {
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 900px) {
  .project-hero-v2 {
    padding: 100px 40px 60px;
  }
  .project-gallery-grid {
    padding: 40px 40px;
    gap: 16px;
  }
  .project-single-image {
    padding: 40px 40px;
  }
}
@media (max-width: 680px) {
  .project-gallery-grid {
    grid-template-columns: 1fr;
    padding: 30px 24px;
  }
  .project-info-bar {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .project-hero-v2 {
    padding: 80px 24px 50px;
  }
  .story-block h2 {
    font-size: 1.5rem;
  }
  .result-block {
    padding: 20px;
  }
}
/* پروژه‌های دیگر (بیشتر از نیکد) - با تصاویر بزرگتر */
.related-projects-simple {
    max-width: 900px;
    margin: 16px auto 48px;   /* فاصله از بالا کم، از پایین زیاد */
    padding: 0 24px;
}
.related-projects-simple-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--cyan);
    text-transform: uppercase;
    margin-bottom: 20px;
    border-right: 2px solid var(--cyan);
    padding-right: 12px;
}
.related-projects-simple-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.related-project-simple-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-dim);
    text-decoration: none;
    transition: all 0.2s;
}
.related-project-simple-item:hover {
    border-bottom-color: var(--cyan);
    background: var(--overlay-white-015);
    padding-right: 8px;
}
.related-project-simple-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.related-project-simple-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.related-project-simple-cat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan);
    background: var(--accent-dim);
    padding: 4px 12px;
    border-radius: 30px;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
}
.related-project-simple-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}
.related-project-simple-arrow {
    color: var(--cyan);
    font-size: 1.1rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.related-project-simple-item:hover .related-project-simple-arrow {
    transform: translateX(-4px);
}

@media (max-width: 600px) {
    .related-projects-simple {
        margin: 12px auto 32px;
    }
    .related-project-simple-thumb {
        width: 48px;
        height: 48px;
    }
    .related-project-simple-cat {
        min-width: 55px;
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    .related-project-simple-name {
        font-size: 0.85rem;
    }
}

/* --------------------------------------------
   PROJECTS ARCHIVE (GRID)
--------------------------------------------- */
.projects-archive-section {
  padding: 60px 80px 100px;
}
.projects-filter {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--cyan);
  color: var(--color-black);
  border-color: var(--cyan);
}
.load-more-container {
    text-align: center;
    margin: 48px 0 20px;
}


/*دکمه */
.load-more-container {
    text-align: center;
    margin: 48px 0 20px;
}
.load-more-btn {
    background: var(--cyan);
    color: var(--color-black);
    padding: 10px 28px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Vazirmatn', 'Inter', 'Space Grotesk', sans-serif;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.load-more-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    gap: 12px;
    color: var(--color-black);
}
.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* فیلترهای صفحه آرشیو پروژه‌ها*/
/* ============================================
   فیلتر موبایل (شیت با جستجو و چک‌باکس مینیمال)
============================================ */

/* دکمه بازکننده شیت (با آیکون ذره‌بین هدر) */
.filter-mobile-trigger {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Vazirmatn', 'Inter', 'Space Grotesk', sans-serif;
    margin-bottom: 24px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.filter-mobile-trigger:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}
.filter-mobile-trigger svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    vertical-align: middle;
}

/* شیت (Drawer) */
.filter-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 20px 20px 30px;
    z-index: 1001;
    transition: bottom 0.3s ease-out;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.filter-drawer.open {
    bottom: 0;
}

/* هدر شیت */
.filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-dim);
}
.filter-drawer-title {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Space Grotesk', 'Vazirmatn', sans-serif;
    color: var(--text);
}
.filter-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    padding: 0;
}

/* باکس جستجو */
.filter-drawer-search {
    margin-bottom: 20px;
}
.filter-drawer-search input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 13px;
    direction: rtl;
}
.filter-drawer-search input:focus {
    outline: none;
    border-color: var(--cyan);
}

/* لیست چک‌باکس‌ها (مینیمال، بدون پس‌زمینه) */
.filter-drawer-buttons {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.filter-drawer-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    color: var(--text);
    cursor: pointer;
    transition: color 0.2s;
}
.filter-drawer-checkbox:hover {
    color: var(--cyan);
}
/* چک‌باکس سفارشی (مربع توخالی) */
.filter-drawer-checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}
.filter-drawer-checkbox input:checked {
    border-color: var(--cyan);
}
.filter-drawer-checkbox input:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: var(--cyan);
    line-height: 1;
}
.filter-drawer-checkbox:hover input {
    border-color: var(--cyan);
}

/* دکمه اعمال فیلتر (مینیمال) */
.filter-drawer-actions {
    border-top: 1px solid var(--border-dim);
    padding-top: 16px;
}
.filter-apply-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-apply-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* پس‌زمینه محو (overlay) */
.filter-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: none;
}
.filter-drawer-overlay.open {
    display: block;
}

/* نمایش دکمه موبایل در viewportهای کوچک */
@media (max-width: 768px) {
    .projects-filter {
        display: none;
    }
    .filter-mobile-trigger {
        display: flex;
    }
}

/* فیلتر دسکتاپ (دکمه‌های چند انتخابی) */
.desktop-filter-wrapper {
    margin-bottom: 48px;
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    border-radius: 12px;
}
.desktop-filter-search {
    flex-shrink: 0;
    width: 240px;
}
.desktop-filter-search input {
    width: 100%;
    padding: 8px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 40px;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 13px;
    direction: rtl;
    color: var(--text);        /* ← اضافه شود */

}
.desktop-filter-search input:focus {
    outline: none;
    border-color: var(--cyan);
}
.desktop-filter-buttons {
    flex: 1;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan) var(--border-dim);
}
.desktop-filter-buttons::-webkit-scrollbar {
    height: 4px;
}
.desktop-filter-multi-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    border-radius: 40px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.desktop-filter-multi-btn.active {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(209, 122, 22, 0.08);
}
.desktop-filter-multi-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}
@media (max-width: 768px) {
    .desktop-filter-wrapper { display: none; }
}
@media (min-width: 769px) {
    .filter-mobile-trigger { display: none !important; }
}
/* --------------------------------------------
   BLOG GRID
--------------------------------------------- */
.blog-grid-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}
.blog-grid {
  display: block;
}
.blog-card {
  display: flex;
  flex-direction: row;
  gap: 28px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
  transition: all 0.2s ease;
}
.blog-card:hover {
  transform: translateX(-4px);
  border-bottom-color: var(--overlay-cyan-030);
}
.blog-card-image {
  flex: 0 0 140px;
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface2);
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-content {
  flex: 1;
  padding: 0;
}
.blog-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 8px;
}
.blog-card-meta a {
  color: var(--muted);
  text-decoration: none;
}
.blog-card-meta a:hover {
  color: var(--cyan);
}
.blog-card-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.blog-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.blog-card-title a:hover {
  color: var(--cyan);
}
.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--subtle);
  margin-bottom: 12px;
}
.blog-card-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.blog-card-link:hover {
  gap: 8px;
}

/* --------------------------------------------
   PROJECT CTA BOX (used in blog)
--------------------------------------------- */
.project-cta-box {
  background: linear-gradient(135deg, var(--surf) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  margin: 40px 0;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.project-cta-box:hover {
  transform: translateY(-4px);
  border-color: var(--overlay-cyan-030);
}
.project-cta-box h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.project-cta-box p {
  font-size: 15px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.cta-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan);
  color: var(--color-black);
  padding: 12px 28px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.cta-project-btn:hover {
  gap: 12px;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* --------------------------------------------
   PAGINATION
--------------------------------------------- */
.pagination-wrapper {
  margin-top: 60px;
  text-align: center;
}
.nav-links.pagination {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.pagination-wrapper .nav-links {
  position: static;
  transform: none;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 60px;
}
.pagination-wrapper .page-numbers {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  transition: all 0.2s ease;
}
.pagination-wrapper .page-numbers.current,
.pagination-wrapper .page-numbers:hover {
  background: var(--cyan);
  color: var(--color-black);
  border-color: var(--cyan);
}

/* --------------------------------------------
   SINGLE POST
--------------------------------------------- */
.single-post-section {
  padding-top: 120px;
}
.single-post-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
  text-align: center;
}
.single-post-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  color: var(--subtle);
  font-size: 12px;
}
.single-post-title {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -3px;
  margin-bottom: 28px;
  word-break: break-word;
  hyphens: auto;
}
.single-post-subtitle {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.9;
  font-size: 16px;
}
.single-post-image {
  max-width: 1000px;
  margin: 0 auto 60px;
  padding: 0 24px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface2);
}
.single-post-image img {
  width: 100%;
  height: 420px;          /* ارتفاع ثابت برای همه تصاویر */
  object-fit: cover;      /* تصویر کل فضا را پر می‌کند (کمی برش می‌خورد) */
  display: block;
}
.single-post-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.single-post-content {
  font-size: 17px;
  line-height: 2.2;
  color: var(--text-secondary);
}
.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
  margin: 60px 0 24px;
  line-height: 1.3;
}
.single-post-content p {
  margin-bottom: 28px;
}
.single-post-content ul,
.single-post-content ol {
  margin-bottom: 28px;
  padding-right: 24px;
}
.single-post-content li {
  margin-bottom: 12px;
}
.single-post-content img {
  max-width: 100%;
  height: auto;
  margin: 48px 0;
}
.single-post-cta {
  background: linear-gradient(135deg, var(--overlay-cyan-dim) 0%, var(--surface2) 100%);
  border-right: 4px solid var(--cyan);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 48px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  transition: all 0.2s;
}
.single-post-cta-icon {
  font-size: 48px;
  flex-shrink: 0;
}
.single-post-cta-text {
  flex: 1;
}
.single-post-cta-text h3 {
  font-size: 24px;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.single-post-cta-text p {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.single-post-cta-text .cta-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan);
  color: var(--color-black);
  padding: 10px 24px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.single-post-cta-text .cta-project-btn:hover {
  gap: 12px;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* --------------------------------------------
   RELATED POSTS
--------------------------------------------- */
.related-posts {
  padding: 60px 80px 100px;
  border-top: 1px solid var(--border);
}
.related-posts h2 {
  font-size: 28px;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.related-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s;
  overflow: hidden;
}
.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--overlay-cyan-030);
}
.related-card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  text-decoration: none;
}
.related-card-link img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.related-card-info {
  flex: 1;
}
.related-card-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px 0;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.2s;
}
.related-card:hover .related-card-info h3 {
  color: var(--cyan);
}
.related-card-excerpt {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------
   ABOUT PAGE
--------------------------------------------- */
.about-main {
  padding: 60px 80px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.about-main-grid {
  display: grid;
  grid-template-columns: 1fr 0.6fr;
  gap: 60px;
  align-items: start;
}
.about-main-text h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  color: var(--text);
}
.about-main-text p {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 20px;
  font-size: 16px;
}
.about-main-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stat-card {
  background: var(--surf);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: 12px;
  transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
}
.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.2;
  margin-bottom: 8px;
  font-family: 'Vazirmatn', 'Space Grotesk', monospace;
  font-feature-settings: "ss02";
  letter-spacing: 0;
}
.about-contact-form-row {
  padding: 40px 80px 80px;
  background: var(--bg);
}
.about-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-form-compact {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}
.about-form-compact h3 {
  font-size: 26px;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.about-form-compact p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}
.about-form-compact .form-group {
  margin-bottom: 18px;
}
.about-form-compact input,
.about-form-compact textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  text-align: right;
  direction: rtl;
}
.about-form-compact input:focus,
.about-form-compact textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.about-form-compact textarea {
  resize: vertical;
}
.about-form-compact .form-submit {
  text-align: left;
}
.about-form-compact button {
  background: var(--cyan);
  padding: 10px 28px;
  font-size: 14px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  font-family: 'Vazirmatn', 'Inter', 'Space Grotesk', sans-serif;
  font-weight: 700;
}
.about-form-compact button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.about-contact-cards-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  transition: all 0.2s;
}
.contact-card:hover {
  border-color: var(--cyan);
  transform: translateX(-3px);
}
.contact-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  flex-shrink: 0;
}
.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-detail strong {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--cyan);
  text-transform: uppercase;
}
.contact-detail span {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.contact-message {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface2);
  border-radius: 8px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  direction: rtl;
  animation: fadeSlide 0.3s ease;
}
.contact-message__indicator {
  width: 6px;
  height: auto;
  align-self: stretch;
  background: var(--cyan);
}
.contact-message--success .contact-message__indicator {
  background: var(--cyan);
}
.contact-message--error .contact-message__indicator {
  background: var(--color-error);
}
.contact-message__text {
  flex: 1;
  padding: 14px 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
/* --------------------------------------------
   TIMELINE (ABOUT PAGE) - نسخه با فاصله عمودی
--------------------------------------------- */
.about-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}
.timeline-item {
    position: relative;
    padding: 0.5rem 0 0.5rem 1rem;
    /* فاصله از خط عمودی با استفاده از padding-right */
    transition: all 0.2s ease;
}
/* خط عمودی با فاصله از متن */
.timeline-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.2s, transform 0.2s;
}
/* هاور: خط برجسته‌تر و کمی حرکت به چپ (برای حس فاصله) */
.timeline-item:hover::before {
    background: var(--cyan);
    transform: translateX(-3px);
}
/* آیتم اکتیو (۱۴۰۵) - خط با رنگ طلایی و پررنگ‌تر */
.timeline-item.current::before {
    background: var(--gold);
    width: 3px;
    box-shadow: 0 0 6px rgba(183, 106, 27, 0.4);
}
.timeline-item.current:hover::before {
    background: var(--gold);
    transform: translateX(-3px);
}

.timeline-year {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1.3;
    padding-right: 0.75rem; /* فاصله داخلی از خط عمودی */
}
.timeline-year span {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--subtle);
    margin-right: 0.5rem;
}
.timeline-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 0.25rem;
    padding-right: 0.75rem; /* هماهنگ با سال */
}
/* رنگ سال و توضیحات برای آیتم جاری */
.timeline-item.current .timeline-year {
    color: var(--gold);
}
.timeline-item.current .timeline-year span {
    color: var(--gold);
}
.timeline-item.current .timeline-desc {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .about-timeline {
        gap: 1rem;
    }
    .timeline-item {
        padding-right: 0.5rem;
    }
    .timeline-year {
        font-size: 1.1rem;
        padding-right: 0.5rem;
    }
    .timeline-desc {
        font-size: 0.8rem;
        padding-right: 0.5rem;
    }
    .timeline-item::before {
        width: 1.5px;
    }
}


/* --------------------------------------------
   باورهای ما (ABOUT PAGE) - نسخه کارتی مینیمال
--------------------------------------------- */
.about-beliefs {
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 60px 80px;
}
.about-beliefs-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.beliefs-title {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text);
    margin-bottom: 48px;
    text-align: center;
    position: relative;
}
.beliefs-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: var(--cyan);
    margin: 16px auto 0;
}
.beliefs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.belief-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: transparent;
    transition: border-color 0.2s ease;
}
.belief-item:hover {
    border-color: var(--cyan);
}
.belief-icon {
    font-size: 1.3rem;
    color: var(--cyan);
    opacity: 0.8;
    flex-shrink: 0;
    line-height: 1.4;
}
.belief-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}
@media (max-width: 768px) {
    .about-beliefs {
        padding: 48px 40px;
    }
    .beliefs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .belief-item {
        padding: 20px 24px;
    }
    .beliefs-title {
        font-size: 1.5rem;
        margin-bottom: 32px;
    }
}
@media (max-width: 480px) {
    .about-beliefs {
        padding: 40px 24px;
    }
    .belief-item {
        padding: 16px 20px;
    }
    .belief-text {
        font-size: 0.9rem;
    }
}


/* --------------------------------------------
   404 PAGE
--------------------------------------------- */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
  text-align: center;
}
.page-404-code {
  font-size: clamp(80px, 15vw, 220px);
  line-height: 1;
  color: var(--cyan);
  opacity: 0.15;
  font-weight: 700;
}
.page-404 h1 {
  font-size: 42px;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.page-404 p {
  color: var(--muted);
  margin-bottom: 32px;
}

/* --------------------------------------------
   MISC / UTILITIES
--------------------------------------------- */
.content-type-badge {
  display: inline-block;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 30px;
  margin-left: 8px;
  background: var(--overlay-white-07);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}
body.rtl .content-type-badge {
  margin-left: 0;
  margin-right: 8px;
}
.project-badge,
.post-badge {
  background: var(--overlay-gold-dim);
  color: var(--gold);
}
.nav-links .current-menu-item a {
  color: var(--text);
}
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Courier New', 'Space Grotesk', monospace;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 6px;
  transition: all 0.2s;
  color: var(--cyan);
  letter-spacing: 0.5px;
}
.theme-toggle:hover {
  background: var(--surface2);
  transform: translateY(-1px);
}
/* تنظیم فاصله بخش پروژه‌های اخیر در صفحه اصلی */
.home #projects .section {
    padding-top: 0;
}
/* اگر نیاز به فاصلهٔ دقیقاً برابر با فاصلهٔ مارکی تا خدمات دارید (1.2rem) */
.home #projects .section {
    padding-top: 1.2rem;
}

/* --------------------------------------------
   LIGHT MODE OVERRIDES
--------------------------------------------- */
body.light-mode {
  /* Base */
  --bg: #fcfcfb;
  --surf: #ffffff;
  --surface2: #f6f5f2;

  /* Borders */
  --border: rgba(25, 25, 25, 0.08);
  --border-dim: rgba(25, 25, 25, 0.05);

  /* Text */
  --text: #181818;
  --muted: #6d6a64;
  --subtle: #9b968f;
  --text-secondary: #42403c;

  /* Brand Accent */
--cyan: #D17A16;
--gold: #A95F16;

  /* Core */
  --color-black: #ffffff;
  --color-white: #181818;

  /* UI */
  --color-dark-bg: #f7f6f3;
  --color-dark-header: #efede8;
  --color-dim-gray: #8f8b84;

  /* RGB */
  --color-cyan-rgb: 217, 119, 6;
  --color-gold-rgb: 180, 83, 9;
  --color-white-rgb: 24, 24, 24;
  --color-black-rgb: 255, 255, 255;

  /* Overlays */
  --overlay-white-07: rgba(0, 0, 0, 0.05);
  --overlay-white-015: rgba(0, 0, 0, 0.015);
  --overlay-white-02: rgba(0, 0, 0, 0.02);
  --overlay-white-035: rgba(0, 0, 0, 0.035);

  --overlay-cyan-glow: rgba(217, 119, 6, 0.05);
  --overlay-cyan-dim: rgba(217, 119, 6, 0.03);

  --overlay-cyan-003: rgba(217, 119, 6, 0.025);
  --overlay-cyan-015: rgba(217, 119, 6, 0.10);
  --overlay-cyan-030: rgba(217, 119, 6, 0.12);
  --overlay-cyan-035: rgba(217, 119, 6, 0.18);

  --overlay-gold-dim: rgba(180, 83, 9, 0.10);
  --overlay-gold-035: rgba(180, 83, 9, 0.18);

  /* Components */
  --nav-bg: rgba(255, 255, 255, 0.82);
  --accent-dim: rgba(217, 119, 6, 0.08);

  --terminal-dim: #7b746c;

  --color-error: #dc2626;
}

body.light-mode .theme-toggle {
  color: var(--cyan);
}

body.light-mode .theme-toggle:hover {
  background: var(--surface2);
}

/* --------------------------------------------
   RESPONSIVE STYLES (UNIFIED)
--------------------------------------------- */

/* Tablet & small desktop */
@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .related-posts-grid { grid-template-columns: 1fr; }
}

/* تنظیم ناوبری برای تبلت (901px تا 1200px) */
@media (min-width: 901px) and (max-width: 1200px) {
  nav {
    padding: 0 40px;
    height: 70px;
  }
  .nav-logo {
    height: 70px;
  }
  .nav-logo .custom-logo,
  .nav-logo-img {
    height: 38px;
    transform: translateY(-3px);  /* یکسان برای تبلت */
  }
  .nav-links {
    gap: 28px;
    height: 70px;
  }
  .nav-links li {
    height: 70px;
  }
  .nav-links a {
    font-size: 13px;
    height: 70px;
  }
  .nav-actions {
    gap: 16px;
    height: 70px;
  }
  .nav-cta {
    padding: 6px 18px;
    font-size: 12px;
  }
  .theme-toggle {
    font-size: 10px;
    padding: 4px 10px;
  }
}

@media (max-width: 1000px) {
  .cta-section {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 40px;
  }
  .hero-container { flex-direction: column; }
  .hero-terminal { max-width: 100%; width: 100%; }
  .projects-grid { display: flex; flex-direction: column; }
  .project-layout { grid-template-columns: 1fr; }
  .project-sidebar { order: -1; }
  .project-meta-card { position: relative; top: 0; }
  .about-main { padding: 50px 40px; }
  .about-main-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-contact-form-row { padding: 40px 40px 60px; }
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero-container { order: 1; }
  .hero-stats {
    order: 2;
    position: relative;
    left: auto;
    bottom: auto;
    justify-content: flex-end;
    margin-top: 30px;
    width: 100%;
    gap: 32px;
    flex-wrap: wrap;
  }
  .stat {
    text-align: right;
    white-space: nowrap;
  }
}

/* موبایل (تا 900px) */
@media (max-width: 900px) {
  nav {
    padding: 0 16px;
    height: 56px;
  }
  .nav-logo {
    height: 56px;
  }
  .nav-logo .custom-logo,
  .nav-logo-img {
    height: 28px;
    transform: translateY(-4px);  /* کمی بیشتر برای موبایل */
  }
  .nav-links {
    gap: 14px;
    height: 56px;
  }
  .nav-links li {
    height: 56px;
  }
  .nav-links a {
    font-size: 12px;
    height: 56px;
  }
  .nav-actions {
    gap: 8px;
    height: 56px;
  }
  .nav-cta {
    padding: 4px 10px;
    font-size: 11px;
  }
  .theme-toggle {
    font-size: 10px;
    padding: 3px 8px;
  }
  .nav-search-desktop { display: none; }
  .nav-search-mobile { display: block; }
  
  /* بقیه استایل‌ها */
  .section-label, .section-title { padding-right: 24px; }
  footer { padding: 24px; flex-direction: column; text-align: center; }
  .cta-section { padding: 40px 24px; }
  .page-hero { padding: 120px 24px 48px; }
  .hero {
    flex-direction: column;
    padding: 80px 24px 40px;
    min-height: auto;
    justify-content: flex-start;
  }
  .hero-container { gap: 1.5rem; margin-bottom: 0; }
  .hero-terminal { margin-bottom: 30px; }
  .hero-stats {
    position: relative;
    left: auto;
    bottom: auto;
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    margin-top: 0;
    flex-wrap: wrap;
  }
  .stat { text-align: center; white-space: nowrap; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 10px; }
  .services-two-column {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }
  .service-item:nth-child(odd) {
    border-left: none;
    padding-left: 0;
  }
  .service-item:nth-child(even) {
    padding-right: 0;
  }
  .projects-archive-section { padding: 40px 40px 80px; }
  .project-card { flex-direction: column; }
  .project-card-image { flex-basis: auto; height: 220px; }
  .project-card-content { padding: 24px; }
  .about-two-col { grid-template-columns: 1fr; gap: 32px; }
  .project-hero { padding: 60px 40px; }
  .project-layout { padding: 50px 40px; }
  .project-bottom-cta { padding: 60px 40px; }
  .related-posts { padding: 40px 40px 60px; }
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid-section, .related-posts { padding: 40px 24px 80px; }
  .single-post-title { letter-spacing: -1px; }
  .project-hero, .project-layout, .project-bottom-cta { padding: 40px 24px; }
  .project-title { letter-spacing: -1px; }
  .projects-archive-section { padding: 40px 24px 80px; }
  .project-card-content { padding: 22px; }
  .project-card-title { font-size: 22px; }
   .single-post-image img {
    height: 240px;
  }
}

@media (max-width: 640px) {
  nav {
    padding: 0 12px;
    height: 54px;
  }
  .nav-logo {
    height: 54px;
  }
  .nav-logo .custom-logo,
  .nav-logo-img {
    height: 24px;
    transform: translateY(-5px);  /* بیشتر برای جبران SVG */
  }
  .nav-links {
    gap: 12px;
    height: 54px;
  }
  .nav-links li {
    height: 54px;
  }
  .nav-links a {
    font-size: 11px;
    height: 54px;
  }
  .nav-actions {
    gap: 8px;
    height: 54px;
  }
  .nav-cta {
    padding: 4px 8px;
    font-size: 10px;
  }
  .theme-toggle {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  /* بقیه استایل‌ها */
  .blog-grid-section { padding: 40px 16px 80px; }
  .blog-card {
    flex-direction: row;
    gap: 16px;
    padding: 20px 0;
  }
  .blog-card-image {
    flex: 0 0 90px;
    height: 90px;
  }
  .blog-card-title { font-size: 16px; margin-bottom: 4px; }
  .blog-card-meta { font-size: 10px; gap: 8px; }
  .blog-card-excerpt {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .blog-card-link { font-size: 11px; }
  .project-cta-box { padding: 24px 16px; margin: 24px 0; }
  .project-cta-box h3 { font-size: 20px; }
  .project-cta-box p { font-size: 13px; margin-bottom: 20px; }
  .cta-project-btn { padding: 8px 20px; font-size: 12px; }
  .related-posts { padding: 40px 24px 60px; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .related-card-link { gap: 12px; padding: 12px; }
  .related-card-link img { width: 70px; height: 70px; }
  .related-card-info h3 { font-size: 15px; }
  .single-post-cta { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 2px 16px 20px; gap: 12px; }
  .single-post-cta-text h3 { font-size: 20px; }
  .about-main { padding: 40px 24px; }
  .about-contact-form-row { padding: 30px 24px 50px; }
  .about-form-compact { padding: 24px; }
  .contact-card { padding: 16px 20px; }
  .stat-number { font-size: 32px; }
}

@media (max-width: 480px) {
  nav {
    padding: 0 10px;
    height: 52px;
  }
  .nav-logo {
    height: 52px;
  }
  .nav-logo .custom-logo,
  .nav-logo-img {
    height: 22px;
    transform: translateY(-5px);  /* ثابت با 640px */
  }
  .nav-links {
    gap: 10px;
    height: 52px;
  }
  .nav-links li {
    height: 52px;
  }
  .nav-links a {
    font-size: 10px;
    height: 52px;
  }
  .nav-actions {
    gap: 6px;
    height: 52px;
  }
  .nav-cta {
    padding: 3px 8px;
    font-size: 9px;
  }
  .theme-toggle {
    font-size: 10px;
    padding: 2px 5px;
  }
  
  .project-hero { padding: 30px 20px; }
  .project-badge { margin-bottom: 16px; }
  .project-title { font-size: clamp(28px, 7vw, 38px); margin-bottom: 16px; }
  .project-layout { padding: 30px 20px; }
  .project-tech-stack { gap: 8px; }
  .project-meta-card { padding: 20px; }
  .project-bottom-cta { padding: 30px 20px; }
}

@media (max-width: 400px) {
  .hero-actions { margin-top: 0; }
  .hero-terminal { margin-top: 0; margin-bottom: 20px; }
  .hero-stats {
    position: relative;
    left: auto;
    bottom: auto;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 0;
    width: 100%;
  }
  .stat { white-space: nowrap; text-align: right; }
  .stat-num { font-size: 24px; }
  .stat-label { font-size: 9px; margin-top: 2px; }
  
  nav {
    padding: 0 8px;
    height: 50px;
  }
  .nav-logo {
    height: 50px;
  }
  .nav-logo .custom-logo,
  .nav-logo-img {
    height: 20px;
    transform: translateY(-5px);  /* ثابت */
  }
  .nav-links {
    gap: 8px;
    height: 50px;
  }
  .nav-links li {
    height: 50px;
  }
  .nav-links a {
    font-size: 9px;
    height: 50px;
  }
  .nav-actions {
    gap: 5px;
    height: 50px;
  }
  .nav-cta {
    padding: 2px 6px;
    font-size: 8px;
  }
  .theme-toggle {
    font-size: 9px;
    padding: 2px 4px;
  }
}
/* --------------------------------------------
   MONITOR GRID (PROJECTS ARCHIVE) — CLEAN & FINAL
--------------------------------------------- */

.projects-archive-section {
    padding: 60px 80px 100px;
}

/* Stats cards (renamed to avoid conflict) */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
.archive-stat-card {
    background: var(--surf);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}
.archive-stat-card:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
    box-shadow: 0 0 12px rgba(209,122,22,0.4);
}
.archive-stat-card .stat-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--subtle);
    margin-bottom: 12px;
}
.archive-stat-card .stat-number {
    font-size: 42px;
    font-weight: 700;
    font-family: 'Vazirmatn', 'Inter', 'Space Grotesk', sans-serif ;
    color: var(--cyan);
    line-height: 1;
}
.archive-stat-card .stat-trend {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Monitor grid */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(365px, 1fr));
    gap: 32px;
    align-items: stretch;
}

/* Monitor card - flex column for sticky footer */
.monitor-card {
    display: flex ;
    flex-direction: column;
    height: 100% ;
    background: var(--surf);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    /* no padding-bottom here */
}

/* Force font on everything inside card */
.monitor-card,
.monitor-card * {
    font-family: 'Vazirmatn', 'Inter', 'Space Grotesk', sans-serif ;
}

.monitor-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(209,122,22,0.6);
}

/* Hex pattern */
.monitor-card:hover::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="30" height="30" fill="none" stroke="rgba(209,122,22,0.1)" stroke-width="1"><path d="M12 2L2 7v10l10 5 10-5V7l-10-5z"/></svg>');
    background-repeat: repeat;
    background-size: 28px;
    pointer-events: none;
    z-index: 0;
}

/* Moving light line (once) */
.monitor-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    transition: left 0.5s ease-out;
    pointer-events: none;
    z-index: 1;
}
.monitor-card:hover::after {
    left: 100%;
}

/* All content above pseudo-elements */
.card-header,
.project-card-excerpt,
.stats-row,
.tech-stack,
.card-footer {
    position: relative;
    z-index: 2;
}

/* Card header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 24px 12px;
    border-bottom: 1px solid var(--border-dim);
}
.card-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.card-title a {
    color: var(--text);
    text-decoration: none;
}
.card-title a:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(209,122,22,0.4);
}
.card-category {
    background: rgba(209,122,22,0.05);
    padding: 4px 12px;
    border-radius: 60px;
    font-size: 11px;
    font-weight: 600;
    color: var(--cyan);
    border: 1px solid var(--border-dim);
    white-space: nowrap;
}

/* Excerpt */
.project-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 12px 24px 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}

/* Stats row (four metrics) */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 24px 8px;
}
.metric {
    flex: 1;
    background: var(--surface2);
    border-radius: 16px;
    padding: 6px 12px;
    text-align: center;
}
.metric-label {
    font-size: 10px;
    letter-spacing: 0.3px;
    color: var(--subtle);
}
.metric-value {
      display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}

/* Tech stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px;
}
.tech-pill {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    color: var(--gold);
}

/* Card footer — will stick to bottom due to flex column */
.card-footer {
    margin-top: auto;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-dim);
    text-align: left;
}
.monitor-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}
.monitor-link:hover {
    gap: 12px;
    text-shadow: 0 0 8px rgba(209,122,22,0.4);
}

/* Responsive */
@media (max-width: 900px) {
    .projects-archive-section {
        padding: 40px 40px 80px;
    }
}
@media (max-width: 760px) {
    .projects-archive-section {
        padding: 40px 24px 80px;
    }
    .monitor-grid {
        grid-template-columns: 1fr;
    }
    .stats-row {
        flex-direction: column;
        gap: 8px;
    }
}
@media (max-width: 480px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Progress bar for digital maturity index */
.progress-area {
    padding: 12px 24px;
}
.ascii-bar {
    background: var(--surface2);
    padding: 8px 12px;
    border-radius: 12px;
    font-family: 'Vazirmatn', 'Inter', 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    direction: ltr;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bar-chars {
    letter-spacing: 2px;
    color: var(--cyan);
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 8px;
    flex: 2;
    font-size: 16px;
}
.bar-percent {
    color: var(--gold);
    font-weight: bold;
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
}
.bar-label {
    font-size: 10px;
    color: var(--subtle);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.5px;
}

@media (max-width: 760px) {
    .ascii-bar {
        align-items: stretch;
    }
}

.dmi-led {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    margin-left: 6px;
    box-shadow: 0 0 6px var(--cyan);
    animation: dmiPulse 1.2s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes dmiPulse {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}



