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

/* ===== DARK THEME (default) ===== */
:root {
  --bg: #0d0d0d;
  --bg2: #111111;
  --bg3: #161616;
  --bg4: #1c1c1c;
  --border: #222222;
  --border2: #2a2a2a;
  --text: #e8e8e8;
  --text2: #999999;
  --text3: #666666;
  --accent: #c8a96e;
  --accent2: #a08050;
  --white: #ffffff;
  /* Psychology palette */
  --indigo: #6c63ff;
  --indigo2: #4f46e5;
  --teal: #2dd4bf;
  --teal2: #14b8a6;
  --deep-blue: #0f3460;
  --glow-gold: rgba(200,169,110,0.15);
  --glow-indigo: rgba(108,99,255,0.15);
  --glow-teal: rgba(45,212,191,0.15);
  --font-fa: 'Vazirmatn', sans-serif;
  --font-en: 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ===== LIGHT THEME ===== */
body.light-mode {
  --bg: #f8f7f4;
  --bg2: #f2f0ec;
  --bg3: #eae7e1;
  --bg4: #e2ded6;
  --border: #d8d4cc;
  --border2: #ccc8be;
  --text: #1a1a1a;
  --text2: #555550;
  --text3: #888880;
  --accent: #9a6f3a;
  --accent2: #7a5528;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
}
body.light-mode #navbar.scrolled {
  background: rgba(248,247,244,0.95);
}
body.light-mode .hero-bg {
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(154,111,58,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 60%, rgba(154,111,58,0.05) 0%, transparent 60%);
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
body.light-mode .theme-toggle .icon-sun { display: block; }
body.light-mode .theme-toggle .icon-moon { display: none; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-fa);
  font-size: 16px;
  line-height: 1.7;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

body.lang-en {
  font-family: var(--font-en);
  direction: ltr;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; line-height: 1.25; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text2); }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: 1px solid rgba(108,99,255,0.3);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { font-size: 1.05rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--indigo) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--indigo2) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(108,99,255,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  transition: all var(--transition);
  background: transparent;
}
#navbar.scrolled {
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(108,99,255,0.2);
  box-shadow: 0 4px 30px rgba(108,99,255,0.08);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-text { font-size: 1rem; font-weight: 600; color: var(--text); }
.logo-brand {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-family: var(--font-en);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text2);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--bg4); }
.lang-toggle {
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all var(--transition);
  font-family: var(--font-en);
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
.lang-fa-label, .lang-en-label { display: none; }
.lang-fa .lang-fa-label { display: inline; }
.lang-en .lang-en-label { display: inline; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(108,99,255, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 60%, rgba(200, 169, 110, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 50% 80%, rgba(45,212,191, 0.05) 0%, transparent 60%);
  overflow: hidden;
}

/* ===== HERO BLOBS ===== */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: blobFloat 8s ease-in-out infinite;
  pointer-events: none;
}
.hero-blob-1 { width: 500px; height: 500px; background: var(--indigo); top: -100px; right: -100px; animation-delay: 0s; }
.hero-blob-2 { width: 400px; height: 400px; background: var(--accent); bottom: -50px; left: -50px; animation-delay: 3s; }
.hero-blob-3 { width: 300px; height: 300px; background: var(--teal); top: 50%; right: 40%; animation-delay: 5s; }
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* ===== NEURAL NETWORK DECORATION ===== */
.neural-decoration {
  position: absolute;
  top: 50%;
  right: -60px;
  transform: translateY(-50%);
  opacity: 0.08;
  pointer-events: none;
  animation: neuralPulse 6s ease-in-out infinite;
}
.lang-en .neural-decoration { right: auto; left: -60px; transform: translateY(-50%) scaleX(-1); }
@keyframes neuralPulse {
  0%, 100% { opacity: 0.06; }
  50% { opacity: 0.14; }
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 20px;
  font-family: var(--font-en);
}
.hero h1 { margin-bottom: 24px; }
.hero-sub {
  font-size: 1.15rem;
  color: var(--text2);
  max-width: 480px;
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-image-wrap {
  position: relative;
  width: 280px;
}
.hero-avatar {
  width: 260px;
  height: 300px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-avatar svg { width: 100%; height: 100%; }
.hero-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #0d0d0d;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.lang-en .hero-badge { left: auto; right: 50%; transform: translateX(50%); }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}
.hero-scroll span {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ===== PILLARS ===== */
.pillars {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, #0f0f18 100%);
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar-card {
  background: var(--bg2);
  padding: 40px 32px;
  transition: background var(--transition), box-shadow var(--transition);
  position: relative;
}
.pillar-card:hover { background: var(--bg3); }
/* Colored top borders per pillar */
.pillar-card:nth-child(1) { border-top: 3px solid var(--indigo) !important; }
.pillar-card:nth-child(2) { border-top: 3px solid var(--accent) !important; }
.pillar-card:nth-child(3) { border-top: 3px solid var(--teal) !important; }
.pillar-card:nth-child(1):hover { box-shadow: 0 0 30px var(--glow-indigo); }
.pillar-card:nth-child(2):hover { box-shadow: 0 0 30px var(--glow-gold); }
.pillar-card:nth-child(3):hover { box-shadow: 0 0 30px var(--glow-teal); }
.pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.pillar-card:nth-child(1) .pillar-icon { background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.3); color: var(--indigo); }
.pillar-card:nth-child(2) .pillar-icon { background: rgba(200,169,110,0.15); border: 1px solid rgba(200,169,110,0.3); color: var(--accent); }
.pillar-card:nth-child(3) .pillar-icon { background: rgba(45,212,191,0.15); border: 1px solid rgba(45,212,191,0.3); color: var(--teal); }
.pillar-card h3 { margin-bottom: 8px; color: var(--text); }

/* ===== ABOUT ===== */
.about { padding: 120px 0; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.lang-en .about-grid { grid-template-columns: 1.4fr 1fr; }

.about-img-box { position: relative; }
.about-avatar-lg {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border2);
}
.about-avatar-lg svg { width: 100%; height: auto; }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 20px;
}
.stat {
  background: var(--bg3);
  padding: 20px 16px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-en);
}
.stat-label { font-size: 0.8rem; color: var(--text3); }

.about-text h2 { margin-bottom: 20px; }
.about-text p { margin-bottom: 16px; }
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
}
.tag {
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ===== SERVICES ===== */
.services {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg2) 0%, #0d0d18 50%, var(--bg2) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--bg2);
  padding: 48px 40px;
  position: relative;
  transition: background var(--transition), box-shadow var(--transition);
}
.service-card:hover { background: var(--bg3); box-shadow: inset 0 0 40px var(--glow-gold); }
.service-card:nth-child(odd):hover { box-shadow: inset 0 0 40px var(--glow-indigo); }
.service-card:nth-child(even):hover { box-shadow: inset 0 0 40px var(--glow-teal); }
.service-num {
  position: absolute;
  top: 32px;
  left: 40px;
  font-size: 0.7rem;
  font-family: var(--font-en);
  color: var(--text3);
  letter-spacing: 0.1em;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--glow-indigo), var(--glow-gold));
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 6px;
  color: var(--indigo);
  font-weight: 700;
  font-size: 0.65rem;
}
.lang-en .service-num { left: auto; right: 40px; }
.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--glow-indigo), var(--glow-gold));
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--indigo);
  transition: all var(--transition);
}
.service-card:hover .service-icon {
  background: linear-gradient(135deg, rgba(108,99,255,0.25), rgba(200,169,110,0.25));
  border-color: var(--indigo);
  color: var(--accent);
}
.service-card h3 { color: var(--text); margin-bottom: 12px; font-size: 1.15rem; }
.service-card p { margin-bottom: 24px; font-size: 0.9rem; line-height: 1.7; }
.service-link { color: var(--accent); font-size: 0.85rem; font-weight: 500; transition: opacity var(--transition); }
.service-link:hover { opacity: 0.7; }

/* ===== BOOKS ===== */
.books { padding: 120px 0; }
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.book-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.book-card:hover {
  transform: translateY(-8px);
  border-color: var(--teal);
  box-shadow: 0 16px 40px var(--glow-teal);
}
.book-cover {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.book-spine {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: rgba(0,0,0,0.3);
  border-right: 1px solid rgba(255,255,255,0.05);
}
.lang-en .book-spine { right: auto; left: 0; border-right: none; border-left: 1px solid rgba(255,255,255,0.05); }
.book-cover-text {
  text-align: center;
  z-index: 1;
  padding: 20px;
}
.book-cover-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
}
.book-cover-author { font-size: 0.75rem; color: rgba(255,255,255,0.4); font-family: var(--font-en); }
.book-info { padding: 24px; }
.book-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent2);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.book-info h3 { color: var(--text); margin-bottom: 8px; font-size: 1rem; }
.book-info p { font-size: 0.85rem; margin-bottom: 20px; line-height: 1.6; }

/* ===== RESEARCH ===== */
.research {
  padding: 120px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.research-item {
  background: var(--bg2);
  padding: 40px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: background var(--transition);
}
.research-item:hover { background: var(--bg3); }
.research-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.research-content h4 { color: var(--text); margin-bottom: 8px; }
.research-content p { font-size: 0.88rem; line-height: 1.65; }

/* ===== QUOTE ===== */
.quote-section {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(135deg, #0a0a18 0%, #0f1540 50%, #0d0d1a 100%);
  border-top: 1px solid rgba(108,99,255,0.2);
  border-bottom: 1px solid rgba(108,99,255,0.2);
  position: relative;
  overflow: hidden;
}
.quote-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
blockquote p {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.5;
  max-width: 800px;
  margin: 0 auto 20px;
  font-style: italic;
}
blockquote cite {
  background: linear-gradient(90deg, var(--accent), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.9rem;
  font-style: normal;
}

/* ===== CONTACT ===== */
.contact { padding: 120px 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 16px; }
.contact-info > p { margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text2);
  font-size: 0.9rem;
}
.contact-item svg { color: var(--accent); flex-shrink: 0; }
.contact-item a { transition: color var(--transition); }
.contact-item a:hover { color: var(--accent); }
.social-links { display: flex; gap: 12px; }
.social-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all var(--transition);
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--bg4); }

.contact-form {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 40px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
  direction: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg4); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-success {
  display: none;
  text-align: center;
  padding: 12px;
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 12px;
}
.form-success.show { display: block; }

/* ===== FOOTER ===== */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand p { font-size: 0.8rem; color: var(--text3); }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-links a {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text3);
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.75rem; color: var(--text3); }

/* ===== RTL/LTR DIRECTION FIXES ===== */
.lang-en .hero-content { direction: ltr; }
.lang-en .about-grid { direction: ltr; }
.lang-en .contact-grid { direction: ltr; }
.lang-en .service-num { right: 40px; left: auto; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== VIDEO MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  position: relative;
  animation: modalIn 0.35s ease;
}
@keyframes modalIn { from { transform: scale(0.92); opacity:0; } to { transform: scale(1); opacity:1; } }
.modal-video { width: 90vw; max-width: 800px; }
.modal-close {
  position: absolute; top: 12px; left: 12px; z-index: 10;
  width: 36px; height: 36px;
  background: var(--bg4); border: 1px solid var(--border2);
  border-radius: 50%; cursor: pointer; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.lang-en .modal-close { left: auto; right: 12px; }
.modal-close:hover { color: var(--text); border-color: var(--accent); }
.video-wrapper { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrapper video { width: 100%; display: block; aspect-ratio: 16/9; }
.video-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: var(--text3);
  background: var(--bg3);
}
.video-placeholder svg { color: var(--accent); }
.video-placeholder p { font-size: 0.85rem; }
.btn-video { gap: 10px; }

/* ===== TESTIMONIALS ===== */
.testimonials {
  padding: 120px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.testi-slider { overflow: hidden; position: relative; }
.testi-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.testi-card {
  min-width: calc(50% - 12px);
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 36px;
  flex-shrink: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.testi-card:hover {
  border-color: var(--indigo);
  box-shadow: 0 0 30px var(--glow-indigo);
}
.testi-stars { color: var(--accent); font-size: 1rem; margin-bottom: 16px; letter-spacing: 2px; }
.testi-text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 24px;
  font-style: italic;
}
.testi-author { display: flex; align-items: center; gap: 14px; }
.testi-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg4); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--accent); font-weight: 600;
  flex-shrink: 0; font-family: var(--font-en);
}
.testi-author strong { display: block; font-size: 0.9rem; color: var(--text); }
.testi-author span { font-size: 0.78rem; color: var(--text3); }
.testi-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 40px;
}
.testi-btn {
  width: 40px; height: 40px;
  background: var(--bg4); border: 1px solid var(--border2);
  border-radius: 50%; cursor: pointer; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.testi-btn:hover { border-color: var(--accent); color: var(--accent); }
.testi-dots { display: flex; gap: 8px; }
.testi-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border2); cursor: pointer;
  transition: all var(--transition); border: none;
}
.testi-dot.active { background: var(--accent); transform: scale(1.3); }

/* ===== FLOATING BUTTONS ===== */
.floating-btns {
  position: fixed; bottom: 28px; left: 28px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 900;
}
.lang-en .floating-btns { left: auto; right: 28px; }
.fab {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.6); }
.fab-wa { background: #25D366; color: #fff; }
.fab-tg { background: #229ED9; color: #fff; }

/* ===== SECTION CTA ===== */
.section-cta { text-align: center; margin-top: 48px; }

/* ===== ABOUT ACTIONS ===== */
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== FORM ERROR ===== */
.form-error {
  display: none;
  text-align: center;
  padding: 12px;
  color: #e05c5c;
  font-size: 0.9rem;
  margin-top: 12px;
}
.form-error.show { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 48px; }
  .hero-image { display: flex; justify-content: center; }
  .about-grid,
  .lang-en .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-image { display: flex; justify-content: center; }
  .about-img-box { max-width: 360px; width: 100%; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,20,0.98);
    backdrop-filter: blur(20px);
    padding: 80px 24px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
  }
  .nav-links a {
    font-size: 1.1rem;
    padding: 12px 24px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(108,99,255,0.1);
  }
  .lang-en .nav-links { right: 0; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; z-index: 1001; position: relative; }
  .services-grid,
  .research-grid { grid-template-columns: 1fr; }
  .books-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .contact-form { padding: 24px; }
  .service-card { padding: 36px 28px; }
  blockquote p { font-size: 1.2rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; justify-content: center; }
  .testi-card { min-width: calc(100% - 0px); }
  .hero-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-image { display: flex; justify-content: center; }
  .chatbot-wrap { bottom: 80px; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-num { font-size: 1.2rem; }
  .pillars-grid { grid-template-columns: 1fr; }
  .hero-blob-1 { width: 300px; height: 300px; }
  .hero-blob-2 { width: 250px; height: 250px; }
  .hero-blob-3 { display: none; }
}

/* ===== CERTIFICATES ===== */
.certificates { padding: 80px 0; background: var(--bg2); }
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.cert-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: var(--transition);
}
.cert-card:hover { border-color: var(--indigo); transform: translateY(-4px); box-shadow: 0 8px 30px var(--glow-indigo); }
.cert-icon { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.cert-body h4 { font-size: 0.95rem; color: var(--text); margin-bottom: 6px; font-weight: 600; }
.cert-issuer { font-size: 0.82rem; color: var(--text3); margin-bottom: 8px; }
.cert-year {
  display: inline-block;
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: var(--accent);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section { padding: 80px 0; }
.newsletter-box {
  background: linear-gradient(135deg, #0a1628 0%, #0f3460 100%);
  border-radius: 20px;
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  border: 1px solid rgba(200,169,110,0.15);
}
@media (max-width: 768px) { .newsletter-box { grid-template-columns: 1fr; padding: 36px 24px; gap: 28px; } }
.newsletter-text h2 { font-size: 1.6rem; margin-bottom: 12px; }
.newsletter-text p { color: rgba(255,255,255,0.65); font-size: 0.9rem; line-height: 1.7; }
.newsletter-form { display: flex; flex-direction: column; gap: 14px; }
.nl-fields { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(200,169,110,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.35); }
.nl-msg { font-size: 0.85rem; min-height: 1.2em; }

/* ===== SUBMIT REVIEW ===== */
.submit-review { padding: 80px 0; background: var(--bg2); }
.review-form {
  max-width: 640px;
  margin: 48px auto 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }
.star-rating { display: flex; gap: 6px; font-size: 1.8rem; cursor: pointer; margin-top: 6px; }
.star-rating span { color: var(--border2); transition: color .15s; }
.star-rating span.active, .star-rating span.hover { color: var(--accent); }

/* ===== CHATBOT ===== */
.chatbot-wrap { position: fixed; bottom: 100px; left: 24px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-start; }
.lang-fa .chatbot-wrap, body:not(.lang-en) .chatbot-wrap { left: auto; right: 24px; align-items: flex-end; }
.chatbot-toggle {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #0d0d0d;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(200,169,110,0.4);
  transition: var(--transition);
  order: 2;
}
.chatbot-toggle:hover { background: var(--accent2); transform: scale(1.05); }
.chatbot-box {
  width: 320px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  margin-bottom: 12px;
  order: 1;
}
.chatbot-header {
  background: linear-gradient(135deg, #0a1628, var(--indigo2));
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
}
.chatbot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #0d0d0d;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.chatbot-header strong { display: block; font-size: 0.9rem; }
.chatbot-status { font-size: 0.75rem; color: #4caf50; }
.chatbot-messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; }
.chatbot-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 0.85rem; line-height: 1.5; }
.chatbot-msg-bot { background: var(--bg4); color: var(--text); align-self: flex-start; border-radius: 4px 12px 12px 12px; }
.chatbot-msg-user { background: var(--accent); color: #0d0d0d; align-self: flex-end; border-radius: 12px 4px 12px 12px; }
.chatbot-action-btn {
  display: inline-block; background: var(--bg4); border: 1px solid var(--border2);
  color: var(--accent); padding: 7px 14px; border-radius: 8px;
  font-size: 0.8rem; margin-top: 4px; align-self: flex-start; transition: var(--transition);
}
.chatbot-action-btn:hover { background: var(--accent); color: #0d0d0d; }
.chatbot-suggestions { padding: 0 16px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.chatbot-sugg-btn {
  background: var(--bg4); border: 1px solid var(--border2); color: var(--text2);
  padding: 5px 12px; border-radius: 20px; font-size: 0.78rem; cursor: pointer;
  font-family: inherit; transition: var(--transition);
}
.chatbot-sugg-btn:hover { border-color: var(--accent); color: var(--accent); }
.chatbot-input { display: flex; border-top: 1px solid var(--border); }
.chatbot-input input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 12px 16px; color: var(--text); font-size: 0.85rem; font-family: inherit;
}
.chatbot-input input::placeholder { color: var(--text3); }
.chatbot-input button {
  background: none; border: none; color: var(--accent); padding: 12px 14px;
  cursor: pointer; transition: var(--transition);
}
.chatbot-input button:hover { color: var(--white); }
