/* ==========================================================================
   elegant.css — لایه‌ی طراحی مدرن (بعد از style.css بارگذاری می‌شود)
   فقط ظاهر را ارتقا می‌دهد؛ ساختار و جاوااسکریپت سایت دست‌نخورده می‌ماند.
   ========================================================================== */

/* ---------- ۱) توکن‌های رنگ و سایه ---------- */
:root {
  --bg: #f3f9f7;
  --white: #ffffff;
  --card: #ffffff;
  --soft: #f6fbf9;
  --ink: #0d2b2c;
  --muted: #5f7b77;
  --line: #e0eee9;
  --green: #0c9e83;
  --green-dark: #07705e;
  --mint: #e4f5ef;
  --grad: linear-gradient(135deg, #0fb394 0%, #0a8f7a 55%, #0b7a8a 100%);
  --grad-text: linear-gradient(120deg, #0fb394, #0b7a8a);
  --shadow: 0 24px 60px -24px rgba(9, 70, 58, 0.22);
  --shadow-sm: 0 8px 24px -12px rgba(9, 70, 58, 0.18);
  --ring: 0 0 0 4px rgba(15, 179, 148, 0.18);
  --radius: 24px;
  --radius-sm: 16px;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

body.dark-mode {
  --bg: #081011;
  --white: #0e1a1b;
  --card: #111f20;
  --soft: #132324;
  --ink: #ecf8f4;
  --muted: #94b0a8;
  --line: #223a3a;
  --green: #35d0a8;
  --green-dark: #5be5c2;
  --mint: #12332d;
  --grad: linear-gradient(135deg, #2fd1a8 0%, #12a58a 60%, #0f8c9c 100%);
  --grad-text: linear-gradient(120deg, #5be5c2, #3fb7d0);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 4px rgba(53, 208, 168, 0.22);
}

/* ---------- ۲) پایه ---------- */
html { -webkit-text-size-adjust: 100%; }

body {
  font-size: 15px;
  line-height: 1.95;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* نور محیطی پس‌زمینه */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 36rem at 90% -10%, rgba(15, 179, 148, 0.13), transparent 60%),
    radial-gradient(48rem 30rem at -10% 35%, rgba(11, 122, 138, 0.10), transparent 60%);
}
body.dark-mode::before {
  background:
    radial-gradient(60rem 36rem at 90% -10%, rgba(53, 208, 168, 0.10), transparent 60%),
    radial-gradient(48rem 30rem at -10% 35%, rgba(63, 183, 208, 0.08), transparent 60%);
}

::selection { background: rgba(15, 179, 148, 0.28); }

a, button, input, textarea { -webkit-tap-highlight-color: transparent; }

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

/* اسکرول‌بار */
html { scrollbar-width: thin; scrollbar-color: var(--green) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--green) 55%, transparent); border-radius: 10px; border: 2px solid var(--bg); }

.container { width: min(1360px, calc(100% - 64px)); }

/* ---------- ۳) هدر ---------- */
.top-line { height: 3px; background: var(--grad); }

.header {
  background: color-mix(in srgb, var(--white) 78%, transparent);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: 0 10px 30px -22px rgba(9, 70, 58, 0.35);
}
body.dark-mode .header { background: rgba(10, 20, 21, 0.78); }

.nav { min-height: 78px; }

.brand-mark { border-radius: 14px; box-shadow: var(--shadow-sm); }
.brand-text strong { font-size: 15px; font-weight: 800; }
.brand-text small { font-size: 11px; color: var(--muted); }

@media (min-width: 851px) {
  nav { gap: 4px; }
  nav a {
    padding: 8px 15px;
    font-size: 13.5px;
    font-weight: 600;
    border: 0;
    border-radius: 999px;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
  }
  nav a:hover { background: var(--mint); color: var(--green-dark); }
  nav a.active { background: var(--mint); color: var(--green-dark); font-weight: 800; }
}

.header-btn {
  background: var(--grad);
  color: #fff;
  border: 0;
  padding: 11px 22px;
  font-size: 13px;
  box-shadow: 0 12px 24px -10px rgba(12, 158, 131, 0.6);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.header-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -10px rgba(12, 158, 131, 0.7); }

.theme-toggle, .menu-toggle { background: var(--white); box-shadow: var(--shadow-sm); }
.theme-toggle:hover { background: var(--grad); }

/* منوی موبایل */
@media (max-width: 850px) {
  nav.is-open {
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
  }
  nav.is-open a { font-size: 15px; }
}

/* ---------- ۴) دکمه‌ها ---------- */
.btn {
  font-size: 14px;
  font-weight: 800;
  padding: 14px 28px;
  gap: 14px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn > span { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover > span { transform: translateX(-5px); }

.btn-primary {
  background: var(--grad);
  box-shadow: 0 16px 30px -12px rgba(12, 158, 131, 0.65);
}
.btn-primary:hover { background: var(--grad); filter: brightness(1.06); box-shadow: 0 20px 34px -12px rgba(12, 158, 131, 0.75); }

.btn-outline { background: color-mix(in srgb, var(--white) 70%, transparent); backdrop-filter: blur(8px); }
.btn-outline:hover { background: var(--mint); }

.btn-light { font-weight: 800; padding: 14px 28px; border-radius: 999px; box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.5); transition: transform 0.3s var(--ease); }
.btn-light:hover { transform: translateY(-3px); }

/* ---------- ۵) هیرو ---------- */
.hero {
  margin-top: 28px;
  min-height: 500px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    radial-gradient(40rem 24rem at 100% 0%, rgba(15, 179, 148, 0.16), transparent 60%),
    var(--hero-gradient);
  box-shadow: var(--shadow);
  position: relative;
}
.hero-copy { padding: 64px 60px; position: relative; z-index: 1; }

.eyebrow {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 12px;
  background: color-mix(in srgb, var(--white) 75%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.eyebrow i { box-shadow: 0 0 0 4px rgba(15, 179, 148, 0.22); animation: ef-pulse 2.4s ease-in-out infinite; }

.hero h1 { font-size: clamp(34px, 3.8vw, 58px); line-height: 1.5; letter-spacing: -1px; margin: 22px 0; }
.hero h1 em,
h2 em {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-copy p { font-size: 15.5px; line-height: 2.1; max-width: 540px; margin-bottom: 32px; }

.founder-card { border-radius: 0; }
.founder-badge { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

.hero-stats { background: color-mix(in srgb, var(--white) 70%, transparent); backdrop-filter: blur(14px); gap: 16px; padding: 20px; }
.stat {
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--grad); color: #fff; font-size: 22px; }
.stat strong { font-size: 24px; font-weight: 900; }
.stat small { font-size: 12.5px; }

/* ---------- ۶) تیتر سکشن‌ها ---------- */
.section { padding-top: 40px; }
.section-head { margin-bottom: 38px; }
.kicker {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  background: var(--mint);
  border-radius: 999px;
}
.section-head h2, .showcase-copy h2 { font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -0.5px; }
.section-head p { font-size: 14px; line-height: 2.1; }
.more-link {
  font-size: 13px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  transition: all 0.25s var(--ease);
}
.more-link:hover { background: var(--mint); border-color: var(--green); transform: translateX(-3px); }

/* ---------- ۷) کارت‌ها ---------- */
.service-card,
.bot-card,
.review-card,
.blog-card,
.nb-cat,
.nb-stat,
.license-card,
.achievement-card,
.bot-desc-item {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
}
.service-card:hover,
.bot-card:hover,
.review-card:hover,
.blog-card:hover,
.nb-cat:hover,
.license-card:hover,
.achievement-card:hover,
.bot-desc-item:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  box-shadow: var(--shadow);
}

/* خدمات */
.service-card { padding: 32px 28px; }
.service-card h3 { font-size: 18px; font-weight: 800; margin: 14px 0 8px; }
.service-card p { font-size: 13.5px; line-height: 2; }
.service-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  font-size: 26px;
  box-shadow: 0 14px 26px -12px rgba(12, 158, 131, 0.7);
  overflow: hidden;
}
.service-icon img { width: 100%; height: 100%; object-fit: cover; }
.service-card-clickable { cursor: pointer; }
.service-full-description { font-size: 13px; color: var(--muted); }

/* ربات‌ها (اسلایدر: ابعاد کارت‌ها را تغییر نمی‌دهیم تا اندازه‌گیری JS سالم بماند) */
.bot-card h3 { font-size: 16px; font-weight: 800; }
.bot-card p { font-size: 12.5px; color: var(--muted); }
.bot-card img { filter: drop-shadow(0 8px 14px rgba(9, 70, 58, 0.18)); transition: transform 0.35s var(--ease); }
.bot-card:hover img { transform: scale(1.1) rotate(-3deg); }

/* بانک شماره */
.nb-stat { text-align: center; padding: 26px 18px; }
.nb-stat strong { font-size: 28px; font-weight: 900; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.nb-stat span { font-size: 13px; color: var(--muted); }
.nb-cat strong { font-size: 14.5px; }
.nb-cat small { font-size: 12.5px; color: var(--muted); }
.nb-icon { font-size: 30px; }
.nb-subtitle { font-size: 18px; font-weight: 800; }

.numberbank-custom {
  border-radius: var(--radius);
  background: var(--grad);
  color: #fff;
  box-shadow: 0 30px 60px -28px rgba(12, 158, 131, 0.75);
}
.numberbank-custom h3, .numberbank-custom p { color: #fff; }
.numberbank-custom .btn-primary { background: #fff; color: var(--green-dark); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.45); }

/* نظرات */
.review-card { padding: 28px; }
.review-card > p { font-size: 14px; line-height: 2.1; }
.review-stars { color: #f5b301; letter-spacing: 3px; font-size: 16px; }
.review-avatar { background: var(--grad); color: #fff; box-shadow: 0 10px 20px -10px rgba(12, 158, 131, 0.7); }
.review-author strong { font-size: 14.5px; }
.review-author small { font-size: 12px; }
.review-media { border-radius: var(--radius-sm); overflow: hidden; }
.review-media img, .review-media video { transition: transform 0.5s var(--ease); }
.review-media:hover img, .review-media:hover video { transform: scale(1.05); }

/* درباره‌ی ما (صفحه اصلی) */
.about-preview-text p { font-size: 15px; line-height: 2.2; }
.about-preview-image { border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
.about-preview-badge { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.about-stats strong { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ---------- ۸) وبلاگ ---------- */
.blog-card { overflow: hidden; }
.blog-image { overflow: hidden; }
.blog-image img, .blog-image video { transition: transform 0.7s var(--ease); }
.blog-card:hover .blog-image img, .blog-card:hover .blog-image video { transform: scale(1.07); }
.blog-content h3 { font-size: 17px; line-height: 1.9; }
.blog-content p { font-size: 13.5px; color: var(--muted); }
.blog-meta { font-size: 12px; color: var(--muted); }
.blog-link { color: var(--green-dark); font-weight: 800; font-size: 13px; }
.blog-full-content { font-size: 16.5px; line-height: 2.3; }
.blog-full-content img, .blog-full-content video { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

.blog-search { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 34px; }
.blog-search input[type="search"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 14px 20px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.blog-search input[type="search"]:focus { border-color: var(--green); box-shadow: var(--ring); }
.empty-note { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- ۹) تماس و فرم‌ها ---------- */
.contact-inner {
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.contact-info { background: linear-gradient(150deg, #0d2b2c 0%, #0a4a46 100%); }
.contact-info h2 { font-size: clamp(24px, 2.4vw, 32px); }
.contact-list li { font-size: 14px; }
.ci { background: rgba(255, 255, 255, 0.1); border-radius: 12px; }

.contact-form-wrap h3 { font-size: 22px; font-weight: 800; }
.contact-form label, .lead-field label { font-size: 13px; font-weight: 700; color: var(--ink); }

.contact-form input,
.contact-form textarea,
.lead-field input,
.lead-field textarea {
  width: 100%;
  padding: 14px 18px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.contact-form input:focus,
.contact-form textarea:focus,
.lead-field input:focus,
.lead-field textarea:focus {
  background: var(--white);
  border-color: var(--green);
  box-shadow: var(--ring);
}
.contact-form input::placeholder, .lead-field input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

/* پاپ‌آپ مشاوره */
.lead-overlay { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lead-modal {
  border-radius: 30px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55);
  animation: ef-pop 0.45s var(--ease) both;
}
.lead-header h3 { font-size: 19px; line-height: 1.9; }
.lead-badge { background: var(--mint); color: var(--green-dark); border-radius: 999px; }
.lead-close { transition: transform 0.25s var(--ease), background-color 0.25s; }
.lead-close:hover { transform: rotate(90deg); }

/* پیام‌های سیستم (موفق/خطا) */
.django-messages {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(92%, 460px);
  display: grid;
  gap: 10px;
  pointer-events: none;
}
.dj-msg {
  pointer-events: auto;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  border-radius: 16px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.45);
  animation: ef-toast 0.5s var(--ease) both, ef-toast-out 0.5s ease 6s forwards;
}
.dj-msg-error { background: linear-gradient(135deg, #e5484d, #c02f3b); }

/* ---------- ۱۰) فوتر ---------- */
.footer { background: color-mix(in srgb, var(--white) 85%, transparent); backdrop-filter: blur(10px); }
.footer-links { font-size: 13px; gap: 8px 22px; flex-wrap: wrap; }
.socials a {
  width: 40px; height: 40px;
  font-size: 17px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), background-color 0.25s, color 0.25s;
}
.socials a:hover { transform: translateY(-3px); background: var(--green); color: #fff; }
.socials img { display: block; }
.footer-bottom { font-size: 12.5px; }

/* ---------- ۱۱) صفحه‌ی ربات، درباره‌ی ما، نظرات ---------- */
.bot-intro-image, .about-page-image { border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
.bot-intro h1 { font-size: clamp(30px, 3.4vw, 48px); }
.bot-intro p { font-size: 15px; line-height: 2.1; }
.bot-desc-item { padding: 24px; }
.bot-desc-item strong { font-size: 16px; }
.bot-desc-item p { font-size: 13.5px; color: var(--muted); }
.bot-cta { border-radius: 34px; background: var(--grad); box-shadow: 0 34px 70px -30px rgba(12, 158, 131, 0.8); }
.reviews-page-head h1, .about-page-hero h1 { letter-spacing: -0.5px; }

/* ---------- ۱۲) انیمیشن‌ها ---------- */
.reveal { transition-duration: 0.8s; transition-timing-function: var(--ease); }

@keyframes ef-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(15, 179, 148, 0.22); } 50% { box-shadow: 0 0 0 9px rgba(15, 179, 148, 0); } }
@keyframes ef-pop { from { opacity: 0; transform: translateY(24px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ef-toast { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes ef-toast-out { to { opacity: 0; transform: translateY(-10px); visibility: hidden; } }

/* ---------- ۱۳) ریسپانسیو ---------- */
@media (max-width: 1100px) {
  .container { width: min(1360px, calc(100% - 40px)); }
  .hero-copy { padding: 48px 38px; }
}

@media (max-width: 850px) {
  .hero { border-radius: 26px; min-height: 0; }
  .hero-copy { padding: 34px 24px 38px; }
  .hero h1 { font-size: clamp(28px, 8vw, 38px); }
  .hero-copy p { font-size: 14.5px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .section-head h2 { font-size: 26px; }
  .contact-inner, .bot-cta { border-radius: 26px; }
  .contact-info { padding: 36px 26px; }
}

@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .container { width: calc(100% - 28px); }
  .nav { min-height: 70px; gap: 12px; }
  .brand-text small { display: none; }
  .header-btn { padding: 10px 16px; }
  .btn { padding: 13px 22px; }
  .stat { padding: 14px 16px; }
  .service-card, .review-card { padding: 24px 20px; }
  .django-messages { top: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   تصویر هیرو: پر شدن کامل کارت (دسکتاپ + موبایل)
   ========================================================================== */
.founder-card { min-height: 520px; background: #0b1c1c; }
.founder-slider, .founder-slide { position: absolute; inset: 0; width: 100%; height: 100%; }
/* در حالت <picture> تصویر داخلی باید خودش کارت را پر کند */
.founder-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.founder-slide.active img,
img.founder-slide.active { animation: ef-kenburns 22s ease-in-out infinite alternate; }

@media (max-width: 850px) {
  .founder-card {
    order: -1;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 4 / 4.4;
  }
  .founder-card img,
  .founder-slide,
  .founder-slide img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center 18% !important;
  }
}
@media (max-width: 480px) {
  .founder-card { aspect-ratio: 1 / 1.12; }
}

/* ==========================================================================
   انیمیشن‌های بیشتر
   ========================================================================== */
@keyframes ef-kenburns { from { transform: scale(1); } to { transform: scale(1.09) translate3d(-1.2%, -1%, 0); } }
@keyframes ef-rise     { from { opacity: 0; transform: translateY(34px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes ef-fade-left{ from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: none; } }
@keyframes ef-fade-right{from { opacity: 0; transform: translateX(-46px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ef-float    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ef-shimmer  { to { background-position: 200% center; } }
@keyframes ef-blob     { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.12); } 66% { transform: translate(-30px, 24px) scale(0.94); } }
@keyframes ef-sheen    { from { transform: translateX(130%) skewX(-20deg); } to { transform: translateX(-130%) skewX(-20deg); } }
@keyframes ef-spin-slow{ to { transform: rotate(360deg); } }

/* ورود پله‌ای هیرو */
.hero .eyebrow     { animation: ef-rise 0.8s var(--ease) 0.10s both; }
.hero h1           { animation: ef-rise 0.9s var(--ease) 0.25s both; }
.hero-copy p       { animation: ef-rise 0.9s var(--ease) 0.40s both; }
.hero-actions      { animation: ef-rise 0.9s var(--ease) 0.55s both; }
.founder-card      { animation: ef-fade-right 1.1s var(--ease) 0.2s both; }
.hero-stats .stat  { animation: ef-rise 0.8s var(--ease) both; }
.hero-stats .stat:nth-child(1) { animation-delay: 0.70s; }
.hero-stats .stat:nth-child(2) { animation-delay: 0.82s; }
.hero-stats .stat:nth-child(3) { animation-delay: 0.94s; }
.header            { animation: ef-rise 0.7s var(--ease) both; }

/* عنوان‌های گرادیانی که می‌درخشند */
.hero h1 em, h2 em {
  background-size: 220% auto;
  background-image: linear-gradient(110deg, var(--green-dark) 0%, #19c9a6 30%, #1aa0c0 55%, #19c9a6 80%, var(--green-dark) 100%);
  animation: ef-shimmer 6s linear infinite;
}

/* حباب‌های متحرک پشت هیرو */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(46px);
  pointer-events: none;
}
.hero::before { width: 260px; height: 260px; top: -70px; right: 34%; background: rgba(15, 179, 148, 0.28); animation: ef-blob 14s ease-in-out infinite; }
.hero::after  { width: 220px; height: 220px; bottom: 60px; right: 6%; background: rgba(26, 160, 192, 0.20); animation: ef-blob 18s ease-in-out infinite reverse; }
.hero-copy, .founder-card, .hero-stats { position: relative; z-index: 1; }
.founder-card { z-index: 1; }

/* برق روی دکمه‌های اصلی */
.btn-primary, .header-btn { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after, .header-btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 46%;
  left: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(130%) skewX(-20deg);
  z-index: -1;
  pointer-events: none;
}
.btn-primary:hover::after, .header-btn:hover::after { animation: ef-sheen 0.9s var(--ease); }
.pulse-glow { animation: ef-glow 2.6s ease-in-out infinite; }
@keyframes ef-glow { 0%, 100% { box-shadow: 0 16px 30px -12px rgba(12, 158, 131, 0.6); } 50% { box-shadow: 0 16px 44px -6px rgba(12, 158, 131, 0.95); } }

/* آیکن‌ها و لوگو */
.brand-mark { transition: transform 0.5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.stat-icon, .service-icon { transition: transform 0.45s var(--ease); }
.stat:hover .stat-icon, .service-card:hover .service-icon { transform: rotate(-8deg) scale(1.12); }
.float-anim-slow { animation: ef-float 7s ease-in-out infinite; }
.nb-icon { display: inline-block; transition: transform 0.4s var(--ease); }
.nb-cat:hover .nb-icon { transform: translateY(-4px) scale(1.2) rotate(-6deg); }

/* درخشش دنبال‌کننده‌ی ماوس روی کارت‌ها (با elegant.js) */
.service-card, .nb-cat, .nb-stat, .bot-desc-item, .achievement-card, .license-card { position: relative; overflow: hidden; }
.service-card::before, .nb-cat::before, .nb-stat::before, .bot-desc-item::before, .achievement-card::before, .license-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(15, 179, 148, 0.16), transparent 60%);
  transition: opacity 0.35s;
}
.service-card:hover::before, .nb-cat:hover::before, .nb-stat:hover::before, .bot-desc-item:hover::before, .achievement-card:hover::before, .license-card:hover::before { opacity: 1; }
.service-card > *, .nb-cat > *, .nb-stat > *, .bot-desc-item > *, .achievement-card > *, .license-card > * { position: relative; z-index: 1; }

/* ورود پله‌ای کارت‌ها هنگام اسکرول (کلاس‌ها را elegant.js می‌گذارد) */
.ef-pre { opacity: 0; transform: translateY(34px) scale(0.97); }
.ef-in  { animation: ef-rise 0.8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }

/* نوار پیشرفت اسکرول */
.ef-progress {
  position: fixed;
  top: 0; right: 0;
  height: 3px;
  width: 100%;
  transform-origin: right center;
  transform: scaleX(0);
  background: var(--grad);
  z-index: 1002;
  pointer-events: none;
}

/* دکمه‌ی برگشت به بالا */
.ef-top {
  position: fixed;
  left: 22px; bottom: 22px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 16px 30px -10px rgba(12, 158, 131, 0.7);
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  z-index: 900;
}
.ef-top.show { opacity: 1; transform: none; pointer-events: auto; }
.ef-top:hover { transform: translateY(-4px) scale(1.06); }

/* هدر هنگام اسکرول فشرده‌تر می‌شود */
.header.is-scrolled .nav { min-height: 64px; }
.header .nav { transition: min-height 0.35s var(--ease); }
.header.is-scrolled { box-shadow: 0 14px 34px -18px rgba(9, 70, 58, 0.5); }

@media (max-width: 850px) {
  .hero::before, .hero::after { opacity: 0.6; }
  .ef-top { left: 14px; bottom: 14px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .ef-pre { opacity: 1; transform: none; }
}



/* =========================================================
   MOBILE ONLY FIX — HERO STAT CARDS
   دسکتاپ عمداً تحت تأثیر این اصلاح قرار نمی‌گیرد.
   ========================================================= */
@media (max-width: 768px) {
  .hero > .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    padding: 12px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .hero > .hero-stats > .stat {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 104px !important;
    box-sizing: border-box !important;
    padding: 10px 6px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .hero > .hero-stats > .stat > .stat-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    flex: 0 0 34px !important;
    font-size: 17px !important;
    border-radius: 11px !important;
  }

  .hero > .hero-stats > .stat > div {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }

  .hero > .hero-stats > .stat strong {
    display: block !important;
    font-size: clamp(12px, 3.2vw, 15px) !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .hero > .hero-stats > .stat small {
    display: block !important;
    font-size: clamp(8px, 2.2vw, 10px) !important;
    line-height: 1.7 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

/* موبایل (تا ۶۰۰px): سه باکس هم‌اندازه، آیکن بالا و متن زیرش — فقط موبایل */
@media (max-width: 600px) {
  .hero > .hero-stats {
    align-items: stretch !important;
    grid-auto-rows: 1fr !important;
  }

  .hero > .hero-stats > .stat {
    flex-direction: column !important;
    gap: 6px !important;
    height: 100% !important;
    min-height: 112px !important;
    padding: 12px 5px !important;
    text-align: center !important;
  }

  .hero > .hero-stats > .stat > div {
    flex: 0 1 auto !important;
    width: 100% !important;
  }

  .hero > .hero-stats > .stat strong {
    font-size: clamp(13px, 3.6vw, 16px) !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
  }

  .hero > .hero-stats > .stat small {
    font-size: clamp(9.5px, 2.5vw, 11.5px) !important;
    line-height: 1.6 !important;
  }
}

@media (max-width: 390px) {
  .hero > .hero-stats {
    gap: 6px !important;
    padding: 9px !important;
  }

  .hero > .hero-stats > .stat {
    flex-direction: column !important;
    gap: 5px !important;
    min-height: 108px !important;
    padding: 9px 4px !important;
  }

  .hero > .hero-stats > .stat > .stat-icon {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    flex-basis: 31px !important;
    font-size: 15px !important;
  }

  .hero > .hero-stats > .stat strong {
    font-size: 13px !important;
  }

  .hero > .hero-stats > .stat small {
    font-size: 9.5px !important;
  }
}
