/* جلوگیری از تغییر dir توسط i18n library */
html, body {
  direction: ltr !important;
}

/* فقط محتوای متنی فارسی RTL بشه */
[lang="fa"] .text-content,
.rtl-text {
  direction: rtl;text-align: right;
  font-family: 'Vazir', sans-serif; /* یا هر فونت فارسی */
}





nav, footer { direction: ltr !important; }


:root {
  font-size: clamp(11px, 1.1vw, 10px);
}

.hero-logo {
  width: 800px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}


@font-face {
  font-family: 'Delta';
  src: url('fonts/delta.ttf') format('truetype');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* همون فونت Delta، ولی برای بازه‌ی حروف لاتین از فایل delta2 استفاده می‌کنه
   این‌جوری وقتی جایی نوشته font-family: 'Delta'، خودکار برای فارسی از delta.ttf
   و برای انگلیسی از delta2.ttf استفاده میشه، بدون نیاز به کلاس یا تغییر دستی */
@font-face {
  font-family: 'Delta';
  src: url('fonts/delta2.ttf') format('truetype');
  unicode-range: U+0000-024F, U+0300-036F;
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Delta2 مستقل هم نگه داشته میشه، برای جاهایی که صراحتاً فقط فونت لاتین می‌خوان */
@font-face {
  font-family: 'Delta2';
  src: url('fonts/delta2.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body:not(.fa) *:not(i):not([class*="fa-"]):not(.fa-solid):not(.fa-brands):not(.fa-regular) {
  font-family: 'Delta', sans-serif !important;
}

i,
[class*="fa-"] {
  font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands' !important;
  font-weight: 900;
}



/* Remove ALL @import url('https://fonts.googleapis.com/...') lines */

:root {
  --font-main: 'Delta', sans-serif;
}

* {
  font-family: var(--font-main);
}

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

:root {
  --bg:          #080808;
  --bg2:         #0d0d0d;
  --bg3:         #111111;
  --surface:     #161616;
  --surface2:    #1c1c1c;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --white:       #ffffff;
  --gray:        #888888;
  --gray2:       #555555;
  --accent:      #005aff;
  --accent2:     #0040c0;
  --accent-glow: rgba(0,90,255,0.25);
  --pd:          #3b82f6;
  --pd-glow:     rgba(59,130,246,0.2);
  --medic:       #22c55e;
  --medic-glow:  rgba(34,197,94,0.2);
  --crime:       #ef4444;
  --crime-glow:  rgba(239,68,68,0.2);
  --font:        'Inter', sans-serif;
  --font-delta:  'Delta', 'Inter', sans-serif;
  --font-fa: 'Tahoma', 'Arial', sans-serif;
  --radius:      12px;
  --radius-lg:   20px;
  --trans:       0.3s ease;
  --trans-slow:  0.6s ease;
}

html { scroll-behavior: smooth; }
/* Prevent horizontal overflow in RTL */
html, body {
  background: #0d0d0d;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  transition: opacity 0.25s ease, filter 0.25s ease;
  
}


body {
  overflow-x: hidden;
  max-width: 100%;
}





nav {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  left: 0;
  right: 0;
}


body.lang-transition {
  opacity: 0;
  filter: blur(6px);
}

/* Highlight active language on button */
#langToggle .lang-en,
#langToggle .lang-fa,
.lang-toggle .lang-en,
.lang-toggle .lang-fa {
  transition: color 0.3s, font-weight 0.3s;
  color: rgba(255,255,255,0.45);
}

body:not(.fa) #langToggle .lang-en,
body.fa #langToggle .lang-fa,
body:not(.fa) .lang-toggle .lang-en,
body.fa .lang-toggle .lang-fa {
  color: #005aff !important;
  font-weight: bold;
}


img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb {
  background: #005aff;
  border-radius: 8px;
  border: 2px solid #0a0a0a;
}
::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}
/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: #005aff #0a0a0a;
}

/* ===========================
   BUTTONS
=========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--accent2);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all var(--trans);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: transparent;
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border: 1px solid var(--border2);
  transition: all var(--trans);
  cursor: pointer;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===========================
   SECTION
   /* ===========================
   SECTION HEADERS
=========================== */
.sec-header {
  text-align: center;
  margin-bottom: 4rem;
}

.sec-tag {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(0,90,255,0.1);
  border: 1px solid rgba(0,90,255,0.3);
  border-radius: 50px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.sec-header h2 {
  font-family: var(--font-delta);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sec-header p {
  color: var(--gray);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}


.logo-delta2 {
  color: var(--accent);
}

.logo-community2 {
  color: var(--white);
  margin-left: 0.3rem;
}

/* ========== NAVBAR ========== */

.nav-logo-link {
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.nav-logo-link:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

.nav-logo-link:active {
  transform: scale(0.97);
}


.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  background: transparent;
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(209, 127, 251, 0.12);
  padding: 0.7rem 0;
}


.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  cursor: default;
}

.nav-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}


.logo-community {
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: #1e1825;
}

.logo-delta {
  font-size: 1rem;
  font-weight: 800;
  color: #005aff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-cta {
  margin-left: 0.6rem;
  background: #005aff;
  color: #0a0a0a !important;
  padding: 0.48rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.nav-cta:hover {
  color: #0a0a0a !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209, 127, 251, 0.4);
  filter: brightness(1.15);
}


/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: rgba(10, 10, 26, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0.4rem;
    transition: right 0.35s ease;
    border-left: 1px solid rgba(212, 175, 55, 0.1);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    width: 100%;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
    padding: 0.65rem 1rem;
  }
}


/* ===========================
   HERO
=========================== */

/* PRIMARY */

.hero .btn-primary {
  border-color: rgba(0,90,255,0.45);

  background:
    linear-gradient(
      135deg,
      rgba(0,90,255,0.20),
      rgba(0,90,255,0.08)
    );

  box-shadow:
    0 0 0 1px rgba(0,90,255,0.15),
    0 0 30px rgba(0,90,255,0.22);
}

.hero .btn-primary:hover {
  background:
    linear-gradient(
      135deg,
      rgba(0,90,255,0.34),
      rgba(0,90,255,0.14)
    );

  box-shadow:
    0 0 0 1px rgba(0,90,255,0.25),
    0 0 40px rgba(0,90,255,0.34);
}

/* GHOST */

.hero .btn-ghost {
  border-color: rgba(255,255,255,0.12);
}

.hero .btn-ghost:hover {
  border-color: rgba(0,90,255,0.45);

  background: rgba(0,90,255,0.08);
}




.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,8,8,0.65) 0%,
    rgba(8,8,8,0.55) 40%,
    rgba(8,8,8,0.80) 80%,
    rgba(8,8,8,1)   100%
  );
  z-index: 1;
}

.hero-flashlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle 220px at 50% 50%, transparent 0%, rgba(0,0,0,0.72) 100%);
  transition: background 0.05s linear;
}

.hero-halo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 220px;
  background: radial-gradient(ellipse at bottom, rgba(0,90,255,0.18) 0%, transparent 70%);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 800px;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-delta);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 4px;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.ht-delta {
  display: block;
  background: linear-gradient(135deg, var(--accent) 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(0,90,255,0.4));
}

.ht-community {
  display: block;
  color: var(--white);
  font-size: 0.45em;
  letter-spacing: 12px;
  margin-top: 0.3rem;
}

.hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

/* HERO STATS */
.hero-stats {
  position: absolute;
  bottom: 6.5rem;   /* was 5rem */
  left: 56%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2.5rem;  /* slightly more horizontal padding */
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
  white-space: nowrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
}

.stat-item i {
  font-size: 1.4rem;
  color: var(--accent);
}

.stat-text p {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 0.1rem;
}

.stat-num-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat-num {
  font-family: var(--font-delta);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat-plus {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border2);
  flex-shrink: 0;
}

/* SCROLL DOWN */
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollBounce 1.5s ease infinite;
}




/* ===========================
   FEATURES SECTION (fix class name)
=========================== */
.features-section {
  padding: 7rem 0;
  background: var(--bg2);
  position: relative;
}

.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}/* ===== JOBS / CHOOSE YOUR PATH ===== */
#jobs {
  background: #0a0a0a;
  padding: 0;
  overflow: hidden;
}

.jobs-header {
  text-align: center;
  padding: 80px 20px 60px;
}

.jobs-header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #fff;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.jobs-header h2 span {
  color: #005aff;
  font-size: 0.7em;
  letter-spacing: 1px;font-weight: 400;
}

.jobs-header p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: #aaa;
  letter-spacing: 1px;
}

.job-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  position: relative;
}

.job-row.reverse {
  direction: rtl;
}
.job-row.reverse > * {
  direction: ltr;
}

.job-image {
  position: relative;
  overflow: hidden;
}

.job-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s ease;
}

.job-row:hover .job-image img {
  transform: scale(1.05);
}

.job-content {
  background: #111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 5vw, 80px) clamp(30px, 5vw, 70px);
  position: relative;
}

.job-content::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #005aff, transparent);
}

.job-row.reverse .job-content::before {
  left: auto;
  right: 0;
}

.job-content h3 {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.fa-title {
  display: block;
  font-size: 0.65em;
  color: #005aff;
  font-weight: 400;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.job-content p {
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 32px;
}

.fa-text {
  color: #999;
  font-size: 0.92em;
  line-height: 2;
  display: block;
}

.job-btn {
  display: inline-block;
  padding: 12px 28px;
  background: #005aff;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 3px;
  align-self: flex-start;
  border: none;
  outline: none;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.job-btn:hover {
  background: #b85fe0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209, 127, 251, 0.4);
}

.job-row + .job-row {
  border-top: 1px solid #1a1a1a;
}

/* Responsive */
@media (max-width: 900px) {
  .job-row,
  .job-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    min-height: auto;
  }
  .job-image { height: 280px; }
  .job-row.reverse .job-content::before {
    left: 0;
    right: auto;
  }
}

@media (max-width: 480px) {
  .job-image { height: 220px; }
}

/* ===========================
   RTL FIXES
=========================== */

/* Nav underline */
.nav-link::after {
  left: auto;
  right: auto;
  inset-inline-start: 0;
}

/* Logo spacing */
.logo-community {
  margin-inline-start: 0.3rem;
  margin-left: 0;
}

/* Lang toggle position */
body.fa .lang-toggle {
  right: auto;
  left: 2rem;
}

/* Job image badge */
.job-img-badge {
  position: absolute;
  bottom: 1rem;
  inset-inline-start: 1rem;
  left: auto;
  right: auto;
}

/* Reverse job row in RTL: image goes to the right */
body.fa .job-row {
  direction: rtl;
}

/* Footer bottom RTL */
body.fa .footer-bottom {
  flex-direction: row-reverse;
}

/* Footer top RTL */
body.fa .footer-top {
  text-align: right;
}

/* برند فوتر (DELTA ROLEPLAY + توضیح) همیشه مثل انگلیسی چپ‌چین بمونه،
   هم موقعیتش هم متنش، دقیقاً مثل حالت انگلیسی */
body.fa .footer-brand {
  direction: ltr;
  text-align: left;
}

body.fa .socials {
  justify-content: flex-start;
}

/* Steps RTL */
body.fa .steps {
  direction: rtl;
  text-align: right;
}

/* Connect box RTL */
body.fa .connect-box {
  direction: rtl;
}

/* Server card RTL */
body.fa .server-card-header {
  direction: rtl;
}

body.fa .server-tags {
  justify-content: flex-start;
}

/* ===========================
   REVEAL ANIMATION (shared)
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE — update for new class names
=========================== */
@media (max-width: 1024px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .feat-grid { grid-template-columns: 1fr; }

  .job-row,
  .job-row.reverse {
    grid-template-columns: 1fr;
    transform: translateY(30px);
    gap: 2rem;
  }

  .job-row.reverse .job-img {
    order: -1;
  }
}




/* ===========================
   FEATURES
=========================== */
.features {
  padding: 7rem 0;
  background: var(--bg2);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.feat-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease var(--d), transform 0.6s ease var(--d);
}

.feat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  opacity: 0;
  transition: opacity var(--trans);
}

.feat-card:hover {
  border-color: rgba(0,90,255,0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.feat-card:hover::before { opacity: 1; }

.feat-icon {
  width: 52px;
  height: 52px;
  background: rgba(0,90,255,0.1);
  border: 1px solid rgba(0,90,255,0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all var(--trans);
}

.feat-icon i {
  font-size: 1.3rem;
  color: var(--accent);
}

.feat-card:hover .feat-icon {
  background: rgba(0,90,255,0.2);
  box-shadow: 0 0 20px rgba(0,90,255,0.2);
}

.feat-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--white);
}

.feat-card p {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.7;
}

/* ===========================
   JOBS
=========================== */
.jobs {
  padding: 7rem 0;
  background: #0d0d0d;
}

.job-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;

  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.7s ease;
  background: #0d0d0d;
}

.job-row.job-reverse {
  transform: translateX(50px);
}

.job-row.visible {
  opacity: 1;
  transform: translateX(0);
}

.job-row:last-child { margin-bottom: 0; }

/* Job Image */
.job-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.job-img-wrap img {
  transition: transform 0.6s ease;
}

.job-img-wrap:hover img { transform: scale(1.05); }

.job-img-tint {
  position: absolute;
  inset: 0;
  opacity: 0.3;
}

.pd-tint    { background: linear-gradient(135deg, var(--pd), transparent); }
.medic-tint { background: linear-gradient(135deg, var(--medic), transparent); }
.crime-tint { background: linear-gradient(135deg, var(--crime), transparent); }

.job-img-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

body.fa .job-img-badge { left: auto; right: 1rem; }

.job-img-badge i { font-size: 0.9rem; }

/* Job Info */
.job-label {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pd-label    { background: rgba(59,130,246,0.15);  color: var(--pd);    border: 1px solid rgba(59,130,246,0.3); }
.medic-label { background: rgba(34,197,94,0.15);   color: var(--medic); border: 1px solid rgba(34,197,94,0.3); }
.crime-label { background: rgba(239,68,68,0.15);   color: var(--crime); border: 1px solid rgba(239,68,68,0.3); }

.job-info h3 {
  font-family: var(--font-delta);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.job-info p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.job-perks {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.job-perks li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.job-perks li i {
  font-size: 0.65rem;
  color: var(--accent);
}

.btn-job {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all var(--trans);
  border: 2px solid;
}

.pd-btn    { color: var(--pd);    border-color: var(--pd);    background: rgba(59,130,246,0.08); }
.medic-btn { color: var(--medic); border-color: var(--medic); background: rgba(34,197,94,0.08); }
.crime-btn { color: var(--crime); border-color: var(--crime); background: rgba(239,68,68,0.08); }

.pd-btn:hover    { background: var(--pd);    color: #fff; box-shadow: 0 8px 30px var(--pd-glow);    transform: translateY(-2px); }
.medic-btn:hover { background: var(--medic); color: #fff; box-shadow: 0 8px 30px var(--medic-glow); transform: translateY(-2px); }
.crime-btn:hover { background: var(--crime); color: #fff; box-shadow: 0 8px 30px var(--crime-glow); transform: translateY(-2px); }

/* ===========================
   CONNECT
=========================== */
.connect {
  padding: 7rem 0;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}

.connect-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,90,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.connect-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  color: white;
}

.connect-left .sec-tag { margin-bottom: 1rem; }

.connect-left h2 {
  font-family: var(--font-delta);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: white;
}

.connect-left > p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  color: white;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.step-num {
  font-family: var(--font-delta);
  font-size: 2rem;
  font-weight: 700;
  color: rgba(0,90,255,0.25);
  line-height: 1;
  min-width: 48px;
  transition: color var(--trans);
}

.step:hover .step-num { color: var(--accent); }

.step-text h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-text p {
  font-size: 0.85rem;
  color: var(--gray);
}

.btn-connect {
  font-size: 1rem;
  padding: 0.9rem 2.5rem;
}

/* Server Card */
.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--trans);
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), #60a5fa);
}

.server-card:hover {
  border-color: rgba(0,90,255,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}

.server-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.server-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray2);
}

.server-dot.online {
  background: var(--medic);
  box-shadow: 0 0 8px var(--medic);
  animation: pulse 2s ease infinite;
}

.server-name {
  font-family: var(--font-delta);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.server-ip {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: monospace;
  margin-bottom: 1.5rem;
}

.server-stats-mini { margin-bottom: 1.5rem; }

.mini-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.mini-num {
  font-family: var(--font-delta);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}

.mini-label {
  font-size: 0.85rem;
  color: var(--gray);
}

.server-bar-wrap { width: 100%; }

.server-bar {
  width: 100%;
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

.server-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), #60a5fa);
  border-radius: 3px;
  width: 0;
  transition: width 1.5s ease;
}

.server-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.server-tags span {
  padding: 0.25rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--gray);
}

.btn-card-join {
  width: 100%;
  padding: 0.85rem;
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 5rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 300px;
  background: radial-gradient(ellipse at bottom, rgba(0,90,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .footer-logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--gray);
  font-size: 0.875rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.socials {
  display: flex;
  gap: 0.75rem;
}

.socials a {
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.95rem;
  transition: all var(--trans);
}

.socials a:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-links a {
  display: block;
  color: var(--gray);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  transition: color var(--trans);
}

.footer-links a:hover { color: var(--accent); }

.footer-discord h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
  color: #005aff;
}

.footer-discord p {
  color: var(--gray);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(88,101,242,0.15);
  border: 1px solid rgba(88,101,242,0.35);
  color: #7289da;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(88,101,242,0.3);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.3); }
.footer-bottom-links { display: flex; gap: 1.5rem;  }
.footer-bottom-links a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: #005aff; }






    .footer-glow {
      position: absolute;
      top: 0; left: 50%;
      transform: translateX(-50%);
      width: 600px; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(0,90,255,0.4), transparent);
      box-shadow: 0 0 40px 10px rgba(0,90,255,0.08);
    }

    .footer-links h4 {
      letter-spacing: 0.14em;
      color: #005aff;
      text-transform: uppercase;
      margin-bottom: 1.2rem;
    }
    .footer-links a {
      display: block;
      color: rgba(255,255,255,0.45);
      text-decoration: none;
      margin-bottom: 0.65rem;
      transition: color 0.2s, padding-left 0.2s;
    }
    .footer-links a:hover { color: #005aff; padding-left: 4px; }






/* ===========================
   LANGUAGE TOGGLE
=========================== */
.lang-toggle,
#langToggle {
  position: fixed;
  right: 2rem;
  left: auto !important;
  top: 90%;
  transform: translateY(-90%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 90, 255, 0.12) !important;
  border: 1px solid rgba(0, 90, 255, 0.45) !important;
  border-radius: 50px;
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
  box-shadow: 0 4px 20px rgba(0, 90, 255, 0.25) !important;
}
.lang-toggle:hover,
#langToggle:hover {
  background: rgba(0, 90, 255, 0.22) !important;
  border-color: #005aff !important;
  box-shadow: 0 6px 24px rgba(0, 90, 255, 0.4) !important;
}

body.fa .lang-toggle {
  right: 2rem !important;
  left: auto !important;
}

body.fa .lang-toggle { right: auto; left: 2rem; }

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(10px); opacity: 0.3; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--medic); }
  50%       { box-shadow: 0 0 16px var(--medic), 0 0 30px var(--medic); }
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-stats {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    margin: 0 auto !important;
    width: fit-content !important;
  }


.stat-sep {
  width: 60px;
  height: 1px;
}

.stat-item {
  padding: 0;
  width: 100%;
  justify-content: center;
}

.job-row,
.job-row.job-reverse {
  grid-template-columns: 1fr;
  transform: translateY(30px);
  gap: 2rem;
}

.job-row.job-reverse .job-img-wrap {
  order: -1;
}

.connect-box {
  grid-template-columns: 1fr;
  gap: 3rem;
}

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

.footer-bottom {
  flex-direction: column;
  text-align: center;
}

.features-grid {
  grid-template-columns: 1fr;
}
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2.8rem, 15vw, 5rem);
  }

  .ht-community {
    letter-spacing: 6px;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .lang-toggle {
    bottom: 1rem;
    right: 1rem;
  }

  body.fa .lang-toggle {
    right: auto;
    left: 1rem;
  }
}

/* ── Scroll Character Button ─────────────────────────── */
.scroll-char {
  position: fixed;
  bottom: 2rem;  /* increase this */
  left: 32px;
  width: 50px;
  z-index: 999;
  cursor: pointer;
  transition:
    bottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.4s ease,
    filter 0.3s ease;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

.scroll-char.visible {
  bottom: 6rem;  /* adjust this value */
  opacity: 1;
  pointer-events: all;
}


.scroll-char:hover {
  filter: drop-shadow(0 0 5px rgba(0, 90, 255, 0.85)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
  bottom: 6rem; /* or whatever your current value is */
}


.scroll-char:active {
  bottom: 7rem;  /* adjust this value */
  transition: bottom 0.1s ease;
}

.scroll-char img {
  width: 100%;
  height: auto;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .scroll-char {
    width: 110px;
    left: 16px;
  }
}

@media (max-width: 480px) {
  .scroll-char {
    width: 85px;
    left: 10px;
  }
}

/* ========== STORY HERO SECTION ========== */
.story-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.85) 0%, rgba(18, 18, 20, 0.9) 100%),
              url('your-image-path.jpg') center/cover no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  padding: 5rem 0 3rem;
}

.story-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.08;
  pointer-events: none; /* جلوگیری از تداخل با کلیک روی دکمه‌ها */
}

.hex-shape {
  position: absolute;
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(0, 90, 255, 0.12), rgba(147, 51, 234, 0.06));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  filter: blur(60px);
  animation: float 8s ease-in-out infinite;
}

.hex-left {
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.hex-right {
  bottom: -150px;
  right: -100px;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(5deg); }
}

.story-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.story-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: 'Delta2', sans-serif;
}

.story-subtitle {
  display: block;
  background: linear-gradient(90deg, #0040c0, #005aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin-top: 0.3rem;
}

.story-text {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin: 1.5rem auto 2rem;
  max-width: 650px;
  font-family: 'Delta2', sans-serif;
}

.story-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn-story-primary {
  background: transparent;
  color: #0040c0;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 2px solid #0040c0;
  font-family: 'Delta2', sans-serif;
  display: inline-block;
  text-align: center;
}

.btn-story-primary:hover {
  background: #0040c0;
  color: #0a0a0a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 90, 255, 0.4);
}

.btn-story-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.85rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.25);
  font-family: 'Delta2', sans-serif;
  display: inline-block;
  text-align: center;
}

.btn-story-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.story-update {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Delta2', sans-serif;
  margin-top: 1rem;
}

/* RTL Support for Persian */
body.fa .story-hero {
  direction: rtl;
}

body.fa .story-title,
body.fa .story-subtitle,
body.fa .story-text,
body.fa .story-update {
  direction: rtl;
  text-align: center;
  font-family: 'Delta', 'Delta2', sans-serif;
}

body.fa .story-buttons {
  direction: rtl;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .story-hero {
    min-height: 55vh;
    padding: 4rem 0 2.5rem;
  }

  .story-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .story-subtitle {
    font-size: 1.9rem;
    line-height: 1.3;
  }

  .story-text {
    font-size: 0.95rem;
    margin: 1.2rem auto 1.8rem;
    padding: 0 1rem;
  }

  .story-buttons {
    flex-direction: column;
    width: 100%;
    align-items: center; /* تراز کردن دکمه‌ها در وسط محور عمودی */
    gap: 0.8rem;
  }

  .btn-story-primary,
  .btn-story-secondary {
    padding: 0.8rem 1.6rem;
    font-size: 0.85rem;
    width: 100%;
    max-width: 280px;
    margin: 0 auto; /* اطمینان از قرارگیری دقیق در مرکز */
    box-sizing: border-box;
  }

  .hex-shape {
    width: 200px;
    height: 200px;
    filter: blur(40px); /* کاهش بلور در موبایل برای بهبود عملکرد رندرینگ */
  }
  
  .hex-left {
    top: -80px;
    left: -80px;
  }

  .hex-right {
    bottom: -80px;
    right: -80px;
  }
}

@media (max-width: 480px) {
  .story-hero {
    min-height: 50vh;
    padding: 3rem 0 2rem;
  }

  .story-title {
    font-size: 1.45rem;
  }

  .story-subtitle {
    font-size: 1.55rem;
  }

  .story-text {
    font-size: 0.85rem;
    line-height: 1.6;
  }
  
  .btn-story-primary,
  .btn-story-secondary {
    max-width: 240px; /* متناسب با عرض دستگاه‌های بسیار کوچک مانند iPhone SE */
  }
}


/* ==========================================================================
   hamon ke mire mainub
   ========================================================================== */

/* انیمیشن ورود از سمت راست */
@keyframes slideInFromRight {
  0% {
    transform: translateX(120px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.floating-return-bar {
  position: fixed;
  top: 82px;            /* کمی پایین‌تر از Navbar */
  right: 24px;          /* سمت راست صفحه */
  left: auto !important;
  z-index: 1001;        /* بالاتر از همه لایه‌ها */
  
  /* حالت اولیه: یک دایره فشرده */
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50px;
  box-sizing: border-box;

  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(209, 127, 251, 0.3);
  
  cursor: pointer;
  overflow: hidden;
  
  /* انیمیشن لود اولیه ورود از راست */
  animation: slideInFromRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  
  /* ترنزیشن روان تغییر اندازه و فیزیک دکمه */
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              transform 0.2s ease;
              
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6),
              0 0 12px rgba(0, 90, 255, 0.18),
              inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* افکت نور نئونی پشت دکمه */
.frb-glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle at center, rgba(0, 90, 255, 0.5), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

/* آیکون فلش دایره‌ای */
.frb-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #005aff;
  position: relative;
  z-index: 2;
  transition: all 0.35s ease;
}

.frb-icon svg {
  width: 17px;
  height: 17px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* متن MAIN HUB (مخفی در حالت عادی) */
.frb-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-delta, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  white-space: nowrap;
  
  /* ترنزیشن ظهور متن */
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* انیمیشن خط نوری دوره‌ای (Shimmer) */
.frb-shimmer {
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(209, 127, 251, 0.4) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: frbShimmerAnim 4.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 1;
}

@keyframes frbShimmerAnim {
  0% { left: -150%; }
  30%, 100% { left: 220%; }
}

/* ===========================
   HOVER STATE: تبدیل دایره به بیضی
=========================== */
.floating-return-bar:hover {
  width: 138px;          /* باز شدن عرض دکمه و تبدیل به کپسول/بیضی */
  border-color: rgba(209, 127, 251, 0.7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8),
              0 0 25px rgba(0, 90, 255, 0.45),
              inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.floating-return-bar:hover .frb-glow {
  opacity: 1;
}

.floating-return-bar:hover .frb-icon {
  color: #fff;
}

.floating-return-bar:hover .frb-icon svg {
  transform: translateX(-3px); /* تکان خوردن فلش به چپ برای ایجاد حس برگشت */
}

.floating-return-bar:hover .frb-text {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s; /* متن بعد از کمی باز شدن کپسول نمایان می‌شه */
}

.floating-return-bar:active {
  transform: scale(0.95);
}

/* ===========================
   MOBILE OPTIMIZATION
=========================== */
@media (max-width: 768px) {
  .floating-return-bar {
    top: 75px;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .frb-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .frb-icon svg {
    width: 15px;
    height: 15px;
  }

  .floating-return-bar:hover {
    width: 125px;
  }

  .frb-text {
    font-size: 0.75rem;
  }
}
/* تا اینجا */




/* Scroll to top button */
.scroll-top {
  position: fixed;
  left: 20px;
  bottom: 24px;
  z-index: 8000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #005aff);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 90, 255, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease;
}
.scroll-top.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 90, 255, 0.5);
}
