/* =========================================
   فرهور ترسیم وستا — استایل فرانت
   ========================================= */

/* ===== متغیرها ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --bg-alt: #f0f4f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #5eead4;
  --primary-soft: #ccfbf1;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --danger: #e11d48;
  --success: #10b981;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow: 0 4px 20px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.12);
  --shadow-glow: 0 20px 60px rgba(13,148,136,.25);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --transition-slow: .6s cubic-bezier(.22,1,.36,1);
  --header-h: 72px;
  --container: 1200px;
}

[data-theme="dark"] {
  --bg: #0a0e14;
  --bg-soft: #121821;
  --bg-alt: #161d29;
  --surface: #1a2230;
  --text: #e6edf3;
  --text-soft: #94a3b8;
  --border: #2a3446;
  --primary: #2dd4bf;
  --primary-dark: #14b8a6;
  --primary-light: #5eead4;
  --primary-soft: #134e4a;
  --accent: #fbbf24;
  --accent-soft: #78350f;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow: 0 4px 20px rgba(0,0,0,.4);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.6);
  --shadow-glow: 0 20px 60px rgba(45,212,191,.2);
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ===== Preloader ===== */
.preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-spinner {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Scroll progress ===== */
.scroll-progress {
  position: fixed; top: 0; right: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9998;
  transition: width .1s linear;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 1000;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--primary);
  flex-shrink: 0;
}
.logo img { height: 42px; width: auto; }
.logo-mark {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 800;
  box-shadow: 0 4px 12px rgba(13,148,136,.3);
}
.logo-text {
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  gap: 4px;
}
.main-nav a {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: all var(--transition);
  position: relative;
}
.main-nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.main-nav a.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

.header-actions { display: flex; gap: 8px; align-items: center; }

.btn-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid; place-items: center;
  transition: all var(--transition);
}
.btn-icon:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

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

/* Hamburger */
.hamburger {
  width: 22px; height: 16px;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hamburger span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all var(--transition);
}
.menu-toggle.open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open .hamburger span:nth-child(2) { opacity: 0; }
.menu-toggle.open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-toggle { display: none; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: var(--header-h);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 60%),
    radial-gradient(circle at 15% 80%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 50%);
  z-index: 0;
}
[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45,212,191,.15), transparent 60%),
    radial-gradient(circle at 15% 80%, rgba(251,191,36,.08), transparent 50%);
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center;
  padding: 40px 0 100px;
  max-width: 900px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}
[data-theme="dark"] .hero-badge { color: var(--primary-light); }
.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.02em;
}
.typewriter::after {
  content: '|';
  color: var(--primary);
  animation: blink 1s step-start infinite;
  margin-right: 4px;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-soft);
  margin-bottom: 36px;
  max-width: 620px;
  margin-left: auto; margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-lg { padding: 15px 34px; font-size: 1rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(13,148,136,.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(13,148,136,.45);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  background: var(--primary-soft);
}

/* آمار هیرو */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 640px;
  margin: 0 auto;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}
.stat-label {
  font-size: .85rem;
  color: var(--text-soft);
  margin-top: 4px;
}

/* اسکرول ایندیکیتور */
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 2px solid var(--text-soft);
  border-radius: 14px;
  opacity: .6;
}
.hero-scroll span {
  display: block;
  width: 4px; height: 8px;
  background: var(--text-soft);
  border-radius: 2px;
  margin: 6px auto;
  animation: scrollDown 1.5s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ===== Sections ===== */
.home-section {
  padding: 100px 0;
}
.home-section-alt { background: var(--bg-soft); }
.section-head {
  text-align: center;
  margin-bottom: 60px;
}
.section-label {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -.01em;
}
.section-desc {
  color: var(--text-soft);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.section-cta {
  text-align: center;
  margin-top: 48px;
}

/* ===== Page transitions ===== */
#app { flex: 1; min-height: 60vh; }
.page-section { display: none; }
.page-section.active {
  display: block;
  animation: fadeUp .6s cubic-bezier(.22,1,.36,1);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }

/* ===== Skeleton ===== */
.skeleton-card {
  height: 320px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Projects Grid ===== */
.projects-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-slow);
  cursor: pointer;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.project-img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-soft);
}
.project-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.22,1,.36,1);
}
.project-card:hover .project-img-wrap img { transform: scale(1.08); }
.project-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.6) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-img-wrap::after { opacity: 1; }
.project-meta {
  position: absolute;
  bottom: 12px; left: 12px;
  z-index: 2;
  display: flex; gap: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
}
.project-card:hover .project-meta {
  opacity: 1;
  transform: translateY(0);
}
.project-meta span {
  background: rgba(255,255,255,.9);
  color: #0f172a;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.project-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.project-body .meta {
  color: var(--text-soft);
  font-size: .85rem;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.project-body .meta svg { opacity: .6; }
.project-body p {
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 1.7;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== Services preview ===== */
.services-preview {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all var(--transition-slow);
  text-align: right;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-slow);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid; place-items: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: all var(--transition);
}
[data-theme="dark"] .service-icon { color: var(--primary-light); }
.service-card:hover .service-icon {
  background: var(--primary);
  color: #fff;
  transform: rotate(-6deg) scale(1.05);
}
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.75;
}

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(251,191,36,.2), transparent 50%);
}
.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.cta-inner p { opacity: .9; }
.cta-banner .btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.cta-banner .btn-primary:hover { background: var(--accent); color: #0f172a; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 70px 0 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.footer-desc {
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.85;
  max-width: 340px;
}
.footer-col h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}
.footer-links, .footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  color: var(--text-soft);
  font-size: .9rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--primary); transform: translateX(-3px); }
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 1.6;
}
.footer-contact svg { flex-shrink: 0; margin-top: 3px; color: var(--primary); }
.footer-contact a { transition: color var(--transition); }
.footer-contact a:hover { color: var(--primary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: .85rem;
  flex-wrap: wrap;
}
.footer-admin-link {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  transition: all var(--transition);
  opacity: .6;
}
.footer-admin-link:hover {
  opacity: 1;
  background: var(--border);
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-glow);
  z-index: 900;
  transition: all var(--transition);
  animation: fadeIn .3s ease;
}
.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--primary-dark);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  font-weight: 500;
  font-size: .9rem;
  animation: slideInLeft .3s ease;
  max-width: 340px;
}
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Page title (داخل صفحات) ===== */
.page-hero {
  background: var(--bg-soft);
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%);
}
.page-hero-content { position: relative; }
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero p {
  color: var(--text-soft);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ===== About page ===== */
.about-content {
  padding: 80px 0;
}
.about-text {
  font-size: 1rem;
  line-height: 2;
  color: var(--text);
}
.about-text h2, .about-text h3 {
  margin: 32px 0 12px;
  color: var(--primary);
  font-weight: 700;
}
.about-text p { margin-bottom: 16px; color: var(--text-soft); }
.about-text ul, .about-text ol { margin: 16px 24px; color: var(--text-soft); }
.about-text li { margin-bottom: 6px; }
.about-text img { border-radius: var(--radius); margin: 20px 0; }
.about-text blockquote {
  border-right: 4px solid var(--primary);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
}

/* ===== Filters ===== */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 10px 22px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13,148,136,.3);
}

/* ===== Branches ===== */
.branches-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.branch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.branch-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: var(--primary-soft);
  border-radius: 0 0 0 80px;
  transition: all var(--transition-slow);
}
.branch-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.branch-card:hover::before {
  width: 120px; height: 120px;
  background: var(--primary);
}
.branch-city {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.branch-city::before { content: '📍'; font-size: 1.1rem; }
.branch-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.branch-info div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 1.7;
}
.branch-info svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 4px;
}
.branch-info a { transition: color var(--transition); }
.branch-info a:hover { color: var(--primary); }
.branch-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--primary);
  font-weight: 600;
  font-size: .88rem;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--primary-soft);
  transition: all var(--transition);
}
.branch-map-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== Structure ===== */
.structure-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  transition: all var(--transition-slow);
}
.member-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.member-photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 18px;
  object-fit: cover;
  border: 4px solid var(--primary-soft);
  transition: all var(--transition);
}
.member-card:hover .member-photo {
  border-color: var(--primary);
  transform: scale(1.05);
}
.member-photo-placeholder {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid; place-items: center;
  font-size: 2.5rem;
  border: 4px solid var(--primary-soft);
}
[data-theme="dark"] .member-photo-placeholder { color: var(--primary-light); }
.member-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.member-role {
  color: var(--text-soft);
  font-size: .88rem;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.contact-info {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}
.contact-info::before {
  content: '';
  position: absolute;
  top: -50px; left: -50px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.contact-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  position: relative;
}
.contact-info-item {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  position: relative;
}
.contact-info-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  display: grid; place-items: center;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
}
.contact-info-body { flex: 1; }
.contact-info-body strong {
  display: block;
  font-size: .85rem;
  opacity: .85;
  font-weight: 500;
  margin-bottom: 2px;
}
.contact-info-body span, .contact-info-body a {
  font-size: .98rem;
  font-weight: 600;
  color: #fff;
}
.contact-info-body a:hover { text-decoration: underline; }

.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow);
}
.contact-form-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact-form-card > p {
  color: var(--text-soft);
  font-size: .92rem;
  margin-bottom: 28px;
}

/* ===== Forms ===== */
.form-row {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
  position: relative;
}
.form-group label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-group label .req { color: var(--danger); }
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .95rem;
  color: var(--text);
  transition: all var(--transition);
  width: 100%;
}
.form-group textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.7;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
}
.form-group.error input,
.form-group.error textarea {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 5%, var(--bg-soft));
}
.form-error {
  color: var(--danger);
  font-size: .8rem;
  margin-top: 6px;
  display: none;
}
.form-group.error .form-error { display: block; }

.btn-submit {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  position: relative;
}
.btn-submit.loading {
  color: transparent !important;
  pointer-events: none;
}
.btn-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ===== Lightbox ===== */
.lightbox-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn .25s ease;
  direction: rtl;
}
@keyframes fadeIn { from { opacity: 0; } }
.lightbox-box {
  width: 100%; max-width: 1000px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #0a0e14;
  border-radius: var(--radius);
  overflow: hidden;
  animation: scaleIn .3s cubic-bezier(.22,1,.36,1);
}
@keyframes scaleIn {
  from { transform: scale(.94); opacity: 0; }
}
.lightbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #fff;
}
.lightbox-head h3 {
  font-size: 1rem;
  font-weight: 600;
}
.lightbox-close {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 1rem;
  transition: all var(--transition);
}
.lightbox-close:hover { background: var(--danger); }

.lightbox-img-wrap {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 16px;
  min-height: 300px;
}
.lightbox-img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  animation: fadeIn .3s ease;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.8rem;
  backdrop-filter: blur(6px);
  transition: all var(--transition);
  display: grid; place-items: center;
  line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,.3); transform: translateY(-50%) scale(1.08); }
.lightbox-nav.prev { right: 16px; }
.lightbox-nav.next { left: 16px; }

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  background: rgba(255,255,255,.03);
  scrollbar-width: thin;
}
.lightbox-thumbs img {
  width: 70px; height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: .55;
  transition: all var(--transition);
  flex-shrink: 0;
}
.lightbox-thumbs img:hover { opacity: 1; }
.lightbox-thumbs img.active {
  border-color: var(--primary);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0; left: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav a {
    padding: 14px 18px;
    font-size: 1rem;
  }
  .menu-toggle { display: grid; }

  .hero { min-height: auto; padding: 100px 0 80px; }
  .hero-content { padding: 20px 0 60px; }
  .hero-stats { gap: 24px; padding-top: 32px; }
  .home-section { padding: 70px 0; }
  .section-head { margin-bottom: 40px; }

  .cta-inner { text-align: center; justify-content: center; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero-title { font-size: 1.8rem; }
  .hero-sub { font-size: .95rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .stat { padding: 8px 0; }
  .stat-num { font-size: 1.8rem; }

  .projects-grid, .services-preview, .branches-grid, .structure-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact-form-card, .contact-info { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .back-to-top { bottom: 16px; left: 16px; width: 42px; height: 42px; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }

  .lightbox-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .lightbox-nav.prev { right: 8px; }
  .lightbox-nav.next { left: 8px; }
  .lightbox-thumbs img { width: 54px; height: 40px; }
}

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

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .back-to-top, .toast, .hero-scroll,
  .hero-cta, .section-cta, .cta-banner, .lightbox-overlay, .filters-bar {
    display: none !important;
  }
  body { color: #000; background: #fff; }
  .page-section { display: block !important; page-break-before: always; }
}

/* =========================================
   Logo Adjustments (Light & Dark Theme)
   ========================================= */

/* --- هدر --- */
.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: filter 0.3s ease, opacity 0.3s ease;
  /* تم روشن: تیره کردن خطوط طوسی لوگو */
  filter: brightness(0.2) contrast(1.2); 
}

[data-theme="dark"] .logo img {
  /* تم تاریک: سفید کردن خطوط */
  filter: brightness(0) invert(1);
}

/* --- فوتر --- */
.footer-brand img {
  height: 180px;
  width: auto;
  object-fit: contain;
  transition: filter 0.3s ease;
  filter: brightness(0.2) contrast(1.2);
}

[data-theme="dark"] .footer-brand img {
  filter: brightness(0) invert(1);
}

/* --- ریسپانسیو --- */
@media (max-width: 900px) {
  .logo img { height: 42px; }
  .footer-brand img { height: 50px; }
}

@media (max-width: 640px) {
  .logo img { height: 36px; }
  .footer-brand img { height: 70px; }
}

/* =========================================
   SVG & Font Awesome Icon Rendering
   ========================================= */

/* آیکون‌های داخل .service-icon (کارت خدمات) */
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  transition: all var(--transition);
}

[data-theme="dark"] .service-icon {
  color: var(--primary-light);
}

/* --- SVG --- */
.service-icon > svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* --- Font Awesome --- */
.service-icon > i {
  font-size: 26px;
  line-height: 1;
  display: block;
  color: currentColor;
}

/* --- Emoji --- */
.service-icon > span {
  font-size: 26px;
  line-height: 1;
  display: block;
}

/* Hover */
.service-card:hover .service-icon {
  background: var(--primary);
  color: #fff;
  transform: rotate(-6deg) scale(1.05);
}

/* ===== About Text (Justified) ===== */
.about-text {
  font-size: 1rem;
  line-height: 2.1;
  color: var(--text);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  max-width: 820px;
  margin: 0 auto;
}
.about-text h2,
.about-text h3 {
  margin: 32px 0 12px;
  color: var(--primary);
  font-weight: 700;
  text-align: right;
}
.about-text h2:first-child,
.about-text h3:first-child { margin-top: 0; }
.about-text p {
  margin-bottom: 16px;
  color: var(--text-soft);
  text-align: justify;
}
.about-text ul,
.about-text ol {
  margin: 16px 24px;
  color: var(--text-soft);
  text-align: right;
}
.about-text li { margin-bottom: 6px; }
.about-text img {
  border-radius: var(--radius);
  margin: 20px auto;
  display: block;
}
.about-text blockquote {
  border-right: 4px solid var(--primary);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-align: right;
  font-style: italic;
}
.about-text a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.about-text strong { color: var(--text); font-weight: 700; }

/* ===== Section with Image (Layout) ===== */
.section-with-image {
  display: grid;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 0;
}
.section-with-image.layout-image-right {
  grid-template-columns: 1fr 1fr;
}
.section-with-image.layout-image-left {
  grid-template-columns: 1fr 1fr;
}
.section-with-image.layout-image-left .section-image-wrap {
  order: -1;
}
.section-with-image.layout-image-top,
.section-with-image.layout-image-bottom {
  grid-template-columns: 1fr;
}
.section-with-image.layout-image-bottom .section-text {
  order: -1;
}

/* تصویر */
.section-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  background: var(--bg-soft);
}
.section-image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, color-mix(in srgb, var(--primary) 30%, transparent));
  z-index: 1;
  pointer-events: none;
}
.section-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.22,1,.36,1);
  display: block;
}
.section-image-wrap:hover img {
  transform: scale(1.05);
}

/* متن */
.section-text {
  text-align: justify;
  text-justify: inter-word;
}
.section-text h2,
.section-text h3 {
  text-align: right;
}

/* بدون تصویر (فقط متن) */
.section-with-image.layout-text-only {
  grid-template-columns: 1fr;
  max-width: 820px;
}
.section-with-image.layout-text-only .section-image-wrap {
  display: none;
}

/* حالت تصویر بالا/پایین — ابعاد بهتر */
.section-with-image.layout-image-top .section-image-wrap,
.section-with-image.layout-image-bottom .section-image-wrap {
  aspect-ratio: 16/9;
  max-height: 500px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .section-with-image {
    grid-template-columns: 1fr !important;
    gap: 32px;
    padding: 40px 0;
  }
  .section-with-image .section-image-wrap {
    order: 0 !important;
    aspect-ratio: 16/9;
  }
  .section-with-image.layout-image-left .section-image-wrap {
    order: 0;
  }
  .section-with-image.layout-image-bottom .section-text {
    order: 0;
  }
}

/* =========================================
   Modern Home Page Design
   ========================================= */

/* --- هیرو (Hero) --- */
.hero {
  position: relative;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary) 15%, var(--bg)) 0%, var(--bg) 70%);
  overflow: hidden;
  padding: 120px 0 100px;
}
[data-theme="dark"] .hero {
  background: radial-gradient(circle at 50% 0%, rgba(45,212,191,0.15) 0%, var(--bg) 70%);
}

/* هاله‌های رنگی در پس‌زمینه هیرو */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  opacity: 0.6;
}
.hero::before {
  background: var(--primary);
  top: -100px; left: -100px;
}
.hero::after {
  background: var(--accent);
  bottom: -100px; right: -100px;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* متن هیرو */
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  font-weight: 900 !important;
  letter-spacing: -2px;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-soft);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* دکمه‌های هیرو با افکت درخشش */
.hero-cta .btn {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: 100px;
  box-shadow: 0 10px 30px -10px rgba(13,148,136,0.5);
}
.hero-cta .btn-outline {
  box-shadow: none;
  border: 2px solid var(--border);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .hero-cta .btn-outline {
  background: rgba(255,255,255,0.05);
}

/* آمار هیرو به صورت کارت‌های شیشه‌ای */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 60px;
  border-top: none !important;
}
.hero-stats .stat {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 24px 40px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}
[data-theme="dark"] .hero-stats .stat {
  background: rgba(26, 32, 41, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}
.hero-stats .stat:hover {
  transform: translateY(-5px);
}
.hero-stats .stat-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

/* --- عناوین بخش‌ها --- */
.section-head {
  margin-bottom: 50px;
  text-align: center;
}
.section-label {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
[data-theme="dark"] .section-label {
  background: rgba(45, 212, 191, 0.1);
  color: var(--primary-light);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem) !important;
  font-weight: 800 !important;
  color: var(--text);
}

/* --- کارت‌های پروژه (مدرن) --- */
.project-card {
  border-radius: 24px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  box-shadow: 0 4px 20px -5px rgba(0,0,0,0.05) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 20px 40px -10px rgba(13, 148, 136, 0.2) !important;
  border-color: var(--primary) !important;
}
.project-img-wrap {
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  aspect-ratio: 16/10;
}
.project-img-wrap img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.project-card:hover .project-img-wrap img {
  transform: scale(1.08);
}
.project-body {
  padding: 24px !important;
}
.project-body h3 {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
}

/* --- کارت‌های خدمات (مدرن) --- */
.service-card {
  border-radius: 24px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  padding: 36px 28px !important;
  box-shadow: 0 4px 20px -5px rgba(0,0,0,0.05) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--primary), var(--accent)) !important;
  transform: scaleX(0) !important;
  transform-origin: right !important;
  transition: transform 0.4s ease !important;
}
.service-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 40px -10px rgba(13, 148, 136, 0.15) !important;
}
.service-card:hover::before {
  transform: scaleX(1) !important;
}
.service-icon {
  width: 64px !important;
  height: 64px !important;
  border-radius: 20px !important;
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 24px !important;
  transition: all 0.4s ease !important;
}
.service-card:hover .service-icon {
  background: var(--primary) !important;
  color: #fff !important;
  transform: scale(1.1) rotate(-5deg) !important;
}
.service-card h3 {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
}

/* --- بنر CTA پایین صفحه --- */
.cta-banner {
  border-radius: 32px !important;
  margin: 60px 24px !important;
  padding: 80px 40px !important;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  box-shadow: 0 20px 50px -10px rgba(13, 148, 136, 0.4) !important;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  border-radius: 50%;
}
.cta-inner h2 {
  font-size: 2.2rem !important;
  font-weight: 800 !important;
}
.cta-banner .btn-primary {
  background: #fff !important;
  color: var(--primary-dark) !important;
  border-radius: 100px !important;
  font-weight: 700 !important;
  padding: 16px 40px !important;
}

/* تأخیر برای کارت‌ها */
.projects-grid .project-card:nth-child(1) { transition-delay: 0.1s; }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.2s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.3s; }
.projects-grid .project-card:nth-child(4) { transition-delay: 0.4s; }
.projects-grid .project-card:nth-child(5) { transition-delay: 0.5s; }
.projects-grid .project-card:nth-child(6) { transition-delay: 0.6s; }


/* =========================================
   Grids for Home Page
   ========================================= */

/* شبکه پروژه‌ها (۳ ستونه در دسکتاپ) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* شبکه خدمات (۳ ستونه در دسکتاپ) */
.services-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* ریسپانسیو برای موبایل و تبلت */
@media (max-width: 768px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: 1fr; /* در موبایل تک‌ستونه می‌شوند */
    gap: 20px;
  }
}

/* =========================================
   Home Grids
   ========================================= */

/* تنظیمات مشترک برای هر دو شبکه */
.projects-grid, 
.services-preview {
  display: grid !important;
  gap: 30px !important;
  margin-bottom: 40px !important;
  width: 100% !important;
}

/* گرید ۳ ستونه برای دسکتاپ */
@media (min-width: 992px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* گرید ۲ ستونه برای تبلت */
@media (min-width: 768px) and (max-width: 991px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* گرید ۱ ستونه برای موبایل */
@media (max-width: 767px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: 1fr !important;
  }
}

/* اطمینان از اینکه کارت‌ها فضای خود را به درستی پر می‌کنند */
.service-card, 
.project-card {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

/* =========================================
   Home Grids (Responsive & Standardized)
   ========================================= */

/* تنظیمات مشترک برای هر دو شبکه */
.projects-grid, 
.services-preview {
  display: grid !important;
  gap: 24px !important; /* فاصله استاندارد بین کارت‌ها */
  margin-bottom: 40px !important;
  width: 100% !important;
}

/* گرید ۳ ستونه برای دسکتاپ (حداقل عرض کارت ۳۰۰ پیکسل) */
@media (min-width: 1024px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  }
}

/* گرید ۲ ستونه برای تبلت */
@media (min-width: 768px) and (max-width: 1023px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* گرید ۱ ستونه برای موبایل */
@media (max-width: 767px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: 1fr !important;
  }
}

/* ===== استانداردسازی کارت‌های پروژه ===== */
.project-card {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important; /* جلوگیری از کشیدگی */
  border-radius: 20px !important;
  overflow: hidden !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 15px -5px rgba(0,0,0,0.05) !important;
  transition: all 0.3s ease !important;
}

.project-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 15px 30px -10px rgba(13, 148, 136, 0.15) !important;
  border-color: var(--primary) !important;
}

/* نسبت ابعاد تصویر پروژه: ۱۶ به ۱۰ (عرض بیشتر از ارتفاع) */
.project-img-wrap {
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
  position: relative !important;
  background: var(--bg-soft);
}

.project-img-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s ease !important;
}

.project-card:hover .project-img-wrap img {
  transform: scale(1.05) !important;
}

.project-body {
  padding: 20px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

.project-body h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
  color: var(--text) !important;
}

.project-body p {
  color: var(--text-soft) !important;
  font-size: 0.9rem !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  /* محدود کردن متن به ۲ خط برای جلوگیری از کشیدگی کارت */
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ===== استانداردسازی کارت‌های خدمات ===== */
.service-card {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 280px !important; /* حداقل ارتفاع برای یکدست شدن */
  padding: 30px 24px !important;
  border-radius: 20px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 15px -5px rgba(0,0,0,0.05) !important;
  transition: all 0.3s ease !important;
  text-align: right !important;
}

.service-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 15px 30px -10px rgba(13, 148, 136, 0.15) !important;
  border-color: var(--primary) !important;
}

.service-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 16px !important;
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  display: grid !important;
  place-items: center !important;
  font-size: 1.5rem !important;
  margin-bottom: 20px !important;
}

.service-icon svg {
  width: 28px !important;
  height: 28px !important;
}

.service-card h3 {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  color: var(--text) !important;
}

.service-card p {
  color: var(--text-soft) !important;
  font-size: 0.9rem !important;
  line-height: 1.8 !important;
  margin: 0 !important;
  /* محدود کردن متن به ۳ خط */
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* =========================================
   Home Grids (Modern 3-Column Layout)
   ========================================= */

/* تنظیمات کانتینر اصلی شبکه */
.projects-grid, 
.services-preview {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 24px !important;
  margin: 0 auto 40px auto !important;
  width: 100% !important;
}

/* اگر می‌خواهید در دسکتاپ حتماً ۳ ستون باشد */
@media (min-width: 992px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* برای موبایل ۱ ستون */
@media (max-width: 767px) {
  .projects-grid, 
  .services-preview {
    grid-template-columns: 1fr !important;
  }
}

/* ===== استایل کارت‌ها ===== */
.project-card, 
.service-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important; /* پر کردن فضای ستون خودش */
  max-width: 100% !important;
  height: 100% !important; /* ارتفاع یکسان برای همه کارت‌های یک ردیف */
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
  transition: all 0.3s ease !important;
}

.project-card:hover, 
.service-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 15px 30px rgba(13, 148, 136, 0.15) !important;
  border-color: var(--primary) !important;
}

/* تصویر پروژه */
.project-img-wrap {
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
}
.project-img-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* متن پروژه */
.project-body {
  padding: 20px !important;
  flex: 1 !important;
}

/* کارت خدمات */
.service-card {
  padding: 30px 24px !important;
  text-align: right !important;
}

/* محدود کردن متن‌ها */
.project-body p, 
.service-card p {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: var(--text-soft) !important;
}

/* =========================================
   NEW FLEXBOX LAYOUT (Override Everything)
   ========================================= */

/* --- کانتینر پروژه‌ها --- */
#featuredProjects {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 30px !important;
  justify-content: center !important;
  width: 100% !important;
  margin-bottom: 40px !important;
}

#featuredProjects .project-card {
  flex: 0 0 calc(33.333% - 20px) !important; /* ۳ ستونه در دسکتاپ */
  max-width: calc(33.333% - 20px) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--surface) !important;
  border-radius: 20px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
  overflow: hidden !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

#featuredProjects .project-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 15px 30px rgba(13, 148, 136, 0.15) !important;
  border-color: var(--primary) !important;
}

#featuredProjects .project-img-wrap {
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  flex-shrink: 0 !important;
}

#featuredProjects .project-img-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

#featuredProjects .project-body {
  padding: 24px !important;
  flex: 1 !important;
}

#featuredProjects .project-body p {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* --- کانتینر خدمات --- */
#servicesPreview {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 30px !important;
  justify-content: center !important;
  width: 100% !important;
  margin-bottom: 40px !important;
}

/* استایل جدید برای کارت خدمات */
#servicesPreview .service-card-modern {
  flex: 0 0 calc(33.333% - 20px) !important; /* ۳ ستونه در دسکتاپ */
  max-width: calc(33.333% - 20px) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--surface) !important;
  border-radius: 20px !important;
  padding: 32px 24px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

#servicesPreview .service-card-modern:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 15px 30px rgba(13, 148, 136, 0.15) !important;
  border-color: var(--primary) !important;
}

#servicesPreview .service-icon-modern {
  width: 56px !important;
  height: 56px !important;
  border-radius: 16px !important;
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 20px !important;
}

#servicesPreview .service-icon-modern svg {
  width: 28px !important;
  height: 28px !important;
}

#servicesPreview .service-card-modern h3 {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
}

#servicesPreview .service-card-modern p {
  color: var(--text-soft) !important;
  font-size: 0.92rem !important;
  line-height: 1.8 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* --- ریسپانسیو (تبلت و موبایل) --- */
@media (max-width: 991px) {
  #featuredProjects .project-card,
  #servicesPreview .service-card-modern {
    flex: 0 0 calc(50% - 15px) !important; /* ۲ ستونه */
    max-width: calc(50% - 15px) !important;
  }
}

@media (max-width: 767px) {
  #featuredProjects .project-card,
  #servicesPreview .service-card-modern {
    flex: 0 0 100% !important; /* ۱ ستونه */
    max-width: 100% !important;
  }
}

/* =========================================
   Modern Services Cards (Center Aligned)
   ========================================= */

/* --- کارت خدمات مدرن --- */
#servicesPreview .service-card-modern {
  flex: 0 0 calc(33.333% - 20px) !important;
  max-width: calc(33.333% - 20px) !important;
  margin: 0 !important;
  
  /* چیدمان و وسط‌چین کردن */
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  
  /* ظاهر مدرن */
  background: var(--surface) !important;
  border-radius: 24px !important;
  padding: 40px 24px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 20px -5px rgba(0,0,0,0.05) !important;
  position: relative !important;
  overflow: hidden !important;
  
  /* انیمیشن پایه */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 1;

  cursor: pointer !important;
}

/* --- افکت هاور (Hover) --- */
#servicesPreview .service-card-modern:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 20px 40px -10px rgba(13, 148, 136, 0.2) !important;
  border-color: var(--primary) !important;
}

/* خط رنگی بالای کارت هنگام هاور */
#servicesPreview .service-card-modern::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--primary), var(--accent)) !important;
  transform: scaleX(0) !important;
  transform-origin: right !important;
  transition: transform 0.4s ease !important;
  z-index: 2;
}
#servicesPreview .service-card-modern:hover::before {
  transform: scaleX(1) !important;
}

/* هاله نوری پس‌زمینه هنگام هاور */
#servicesPreview .service-card-modern::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle at 50% 0%, var(--primary-soft) 0%, transparent 70%) !important;
  opacity: 0 !important;
  transition: opacity 0.4s ease !important;
  z-index: -1 !important;
}
#servicesPreview .service-card-modern:hover::after {
  opacity: 1 !important;
}

/* --- آیکون خدمات --- */
#servicesPreview .service-icon-modern {
  width: 72px !important;
  height: 72px !important;
  border-radius: 20px !important;
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  display: grid !important;
  place-items: center !important;
  margin-bottom: 24px !important;
  
  /* انیمیشن آیکون */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; /* جهش فنری */
}

#servicesPreview .service-card-modern:hover .service-icon-modern {
  background: var(--primary) !important;
  color: #fff !important;
  transform: scale(1.1) rotate(-6deg) !important;
  box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.4) !important;
}

#servicesPreview .service-icon-modern svg {
  width: 32px !important;
  height: 32px !important;
  transition: all 0.4s ease !important;
}

/* --- عنوان و متن --- */
#servicesPreview .service-card-modern h3 {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  margin-bottom: 12px !important;
  color: var(--text) !important;
  transition: color 0.3s ease !important;
}

#servicesPreview .service-card-modern:hover h3 {
  color: var(--primary) !important;
}

#servicesPreview .service-card-modern p {
  color: var(--text-soft) !important;
  font-size: 0.95rem !important;
  line-height: 1.8 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin: 0 !important;
}

/* --- ریسپانسیو --- */
@media (max-width: 991px) {
  #servicesPreview .service-card-modern {
    flex: 0 0 calc(50% - 15px) !important;
    max-width: calc(50% - 15px) !important;
  }
}

@media (max-width: 767px) {
  #servicesPreview .service-card-modern {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* =========================================
   Hero Image Slider Background
   ========================================= */

   .hero {
    position: relative;
    /* overflow: hidden; از قبل وجود دارد */
  }
  
  /* کانتینر تصاویر پس‌زمینه */
  .hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bg-soft);
  }
  
  /* لایه تصویر */
  .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 10s linear;
    transform: scale(1);
  }
  
  /* تصویر فعال */
  .hero-slide.active {
    opacity: 1;
    transform: scale(1.1); /* افکت زوم آهسته */
  }
  
  /* لایه تاریک برای خوانایی متن */
  .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* گرادیان تیره برای خوانایی متن */
    background: linear-gradient(to bottom, rgba(10,14,20,0.7) 0%, rgba(10,14,20,0.5) 50%, rgba(10,14,20,0.9) 100%);
  }
  
  [data-theme="light"] .hero-overlay {
    /* در حالت روشن هم کمی تیره باشد تا متن سفید دیده شود */
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%);
  }
  
  /* محتوای هیرو باید روی همه چیز باشد */
  .hero-content {
    position: relative;
    z-index: 2;
  }
  
  /* تنظیم رنگ متن‌ها روی پس‌زمینه تیره */
  .hero-title {
    color: #fff !important;
    background: none !important;
    -webkit-text-fill-color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  }
  .hero-sub {
    color: rgba(255,255,255,0.9) !important;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
  }
  .hero-badge {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(10px);
  }
  .hero-stats .stat-label { color: rgba(255,255,255,0.8) !important; }
  .hero-stats .stat-num { color: #fff !important; }
  .hero-stats .stat { border-color: rgba(255,255,255,0.2) !important; }

  /* =========================================
   Fix Hero Text Contrast
   ========================================= */

/* ۱. پررنگ‌تر کردن لایه تاریک روی عکس‌ها */
[data-theme="light"] .hero-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.8) 100%) !important;
}
[data-theme="dark"] .hero-overlay {
  background: linear-gradient(to bottom, rgba(10,14,20,0.8) 0%, rgba(10,14,20,0.6) 50%, rgba(10,14,20,0.9) 100%) !important;
}

/* ۲. سفید کردن متن عنوان با سایه */
.hero-title, 
.hero-title .typewriter {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

/* ۳. سفید کردن زیرعنوان و بج (Badge) */
.hero-sub {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8) !important;
}
.hero-badge {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

/* ۴. آمار: باکس شیشه‌ای (Glassmorphism) برای خوانایی کامل */
.hero-stats .stat {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 16px !important;
  padding: 16px 24px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

/* اعداد آمار */
.hero-stats .stat-num {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7) !important;
}

/* متن زیر اعداد آمار */
.hero-stats .stat-label {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7) !important;
}

/* ۵. دکمه‌ها: حفظ خوانایی */
.hero-cta .btn-primary {
  background: var(--primary) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 10px 30px -5px rgba(13, 148, 136, 0.6) !important;
}
.hero-cta .btn-outline {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px) !important;
}
.hero-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: #ffffff !important;
}

/* =========================================
   Fix Header Nav Visibility on Hero
   ========================================= */

/* در صفحه خانه (بدون اسکرول) منو باید سفید باشد */
.site-header:not(.scrolled) .main-nav a {
  color: #ffffff !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8) !important;
}
.site-header:not(.scrolled) .main-nav a:hover,
.site-header:not(.scrolled) .main-nav a.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

/* دکمه‌های هدر (تم و منو) در حالت شفاف */
.site-header:not(.scrolled) .btn-icon {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
}
.site-header:not(.scrolled) .btn-icon:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: #ffffff !important;
}

/* لوگو در حالت شفاف */
.site-header:not(.scrolled) .logo-text {
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

/* در حالت اسکرول شده (پس‌زمینه سفید)، رنگ منو تیره شود */
.site-header.scrolled .main-nav a {
  color: var(--text-soft) !important;
  text-shadow: none !important;
}
.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a.active {
  color: var(--primary) !important;
  background: var(--primary-soft) !important;
}
.site-header.scrolled .btn-icon {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: var(--surface) !important;
  backdrop-filter: none !important;
}

.site-header:not(.scrolled) .logo img {
  filter: brightness(0.2) contrast(1.2); /* تبدیل به سفید */
}

/* =========================================
   Fix Header Nav Visibility (Only on Home)
   ========================================= */

/* حالت شفاف و منوی سفید فقط در صفحه خانه */
body.is-home .site-header:not(.scrolled) .main-nav a {
  color: #ffffff !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8) !important;
}
body.is-home .site-header:not(.scrolled) .main-nav a:hover,
body.is-home .site-header:not(.scrolled) .main-nav a.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

body.is-home .site-header:not(.scrolled) .btn-icon {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
}
body.is-home .site-header:not(.scrolled) .btn-icon:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: #ffffff !important;
}

body.is-home .site-header:not(.scrolled) .logo-text {
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

body.is-home .site-header:not(.scrolled) .logo img {
  filter: brightness(0.2) contrast(1.2); /* اگر لوگو عکس است، سفید شود */
}

/* در صفحات دیگر (وقتی is-home نیست) هدر از ابتدا پس‌زمینه دارد */
body:not(.is-home) .site-header {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
}

body:not(.is-home) .site-header .main-nav a {
  color: var(--text-soft) !important;
  text-shadow: none !important;
}
body:not(.is-home) .site-header .main-nav a:hover,
body:not(.is-home) .site-header .main-nav a.active {
  color: var(--primary) !important;
  background: var(--primary-soft) !important;
}

body:not(.is-home) .site-header .btn-icon {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: var(--surface) !important;
}

body:not(.is-home) .site-header .logo img {
  filter: brightness(0.2) contrast(1.2) !important; /* لوگو در صفحات دیگر عادی */
}

/* در صفحات غیر از خانه، لوگو باید کاملاً عادی و بدون فیلتر باشد */
body:not(.is-home) .site-header .logo img {
  filter: brightness(0.2) contrast(1.2) !important; /* حذف هرگونه سفیدکنندگی */
  opacity: 1 !important;
}

/* در حالت تم تاریک، اگر لوگو تیره است، باید سفید شود تا دیده شود */
[data-theme="dark"] body:not(.is-home) .site-header .logo img {
  filter: brightness(0) invert(1) !important; /* سفید کردن در تم تاریک */
}

/* در صفحه خانه، لوگو در حالت شفاف (بدون اسکرول) سفید می‌شود */
body.is-home .site-header:not(.scrolled) .logo img {
  filter: brightness(0) invert(1) !important;
}

/* وقتی در صفحه خانه اسکرول شد، لوگو به حالت عادی برمی‌گردد (در تم روشن تیره، در تم تاریک سفید) */
body.is-home .site-header.scrolled .logo img {
  filter: brightness(0.2) contrast(1.2) !important;
  
}
[data-theme="dark"] body.is-home .site-header.scrolled .logo img {
  filter: brightness(0) invert(1) !important;
}

/* =========================================
   THE ULTIMATE LOGO FIX
   ========================================= */

/* ۱. حالت پیش‌فرض (تم روشن، همه صفحات) - لوگو باید کاملاً تیره باشد */
html body .site-header .logo img {
  filter: none !important;
  -webkit-filter: none !important;
  opacity: 1 !important;
}

/* ۲. تم تاریک - لوگو باید سفید شود */
[data-theme="dark"] html body .site-header .logo img {
  filter: brightness(0) invert(1) !important;
  -webkit-filter: brightness(0) invert(1) !important;
}

/* ۳. صفحه خانه (بدون اسکرول) - لوگو باید سفید شود */
html body.is-home .site-header:not(.scrolled) .logo img {
  filter: brightness(0) invert(1) !important;
  -webkit-filter: brightness(0) invert(1) !important;
}

/* ۴. صفحه خانه (با اسکرول) - لوگو باید تیره باشد (در تم روشن) */
html body.is-home .site-header.scrolled .logo img {
  filter: brightness(0.2) contrast(1.2) !important;
  -webkit-filter: brightness(0.2) contrast(1.2) !important;
}

/* ۵. صفحه خانه (با اسکرول در تم تاریک) - لوگو باید سفید باشد */
[data-theme="dark"] html body.is-home .site-header.scrolled .logo img {
  filter: brightness(0) invert(1) !important;
  -webkit-filter: brightness(0) invert(1) !important;
}

/* =========================================
   Filter Animation for Projects
   ========================================= */

/* کلاس مخفی کردن (به جای display: none از visibility و position استفاده می‌کنیم) */
.project-card.is-hidden {
  display: none !important;
}

/* انیمیشن ظاهر شدن (Fade + Slide Up) */
@keyframes cardFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* کلاس برای اعمال انیمیشن */
.project-card.is-animating {
  animation: cardFadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* =========================================
   FORCE VAZIRMATN FONT EVERYWHERE
   ========================================= */

/* اعمال فونت وزیرمتن به تمام تگ‌های HTML */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption, footer,
header, hgroup, menu, nav, output, ruby, section,
summary, time, mark, audio, video,
button, input, select, textarea {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif !important;
}

/* مخصوص متن‌هایی که ادمین در ادیتور (RayEditor) وارد کرده است */
.about-text *, 
.about-text,
.ck-content *,
.ck-content,
.ray-editor-content *,
.ray-editor-content,
article p,
article span {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif !important;
}

/* =========================================
   Social Media Links
   ========================================= */
   .social-links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
  }
  .social-links a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-soft);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
  }
  .social-links a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -5px rgba(13, 148, 136, 0.4);
  }
  .social-links svg {
    width: 22px;
    height: 22px;
  }

  /* =========================================
   Fix Font Awesome Icons in Home Services
   ========================================= */

/* استایل برای تگ i که Font Awesome از آن استفاده می‌کند */
#servicesPreview .service-icon-modern i,
#servicesPreview .service-icon-modern .fas,
#servicesPreview .service-icon-modern .fab {
  font-size: 32px !important;
  line-height: 1;
  display: inline-block;
  color: inherit; /* رنگ را از والد (primary-dark) می‌گیرد */
  transition: all 0.4s ease;
}

/* انیمیشن هاور برای آیکون‌های Font Awesome */
#servicesPreview .service-card-modern:hover .service-icon-modern i {
  transform: scale(1.1) rotate(-6deg);
}

/* اطمینان از اینکه SVG هم سایز درست دارد */
#servicesPreview .service-icon-modern svg {
  width: 32px !important;
  height: 32px !important;
}