/*
  Enhanced Theme for sadeghpsy (Mohammad Sadegh Bagheri)
  Palette:
  - Primary Blue: #3A7BD5
  - Purple Accent: #8B5CF6
  - Red Accent: #EF4444
  - Pink Accent: #EC4899
  - Hopeful Green (accent): #00D2B8
  - Energetic Orange (accent): #FF6B6B
  - Background Light Gray: #F8F9FA
  - Text Dark Gray: #2D3748
*/

/* CSS Reset (modern minimal) */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html:focus-within { scroll-behavior: smooth; }
html, body { 
  height: 100%; 
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}
html { 
  scroll-behavior: smooth; 
  overflow-x: hidden;
}
body { 
  line-height: 1.6; 
  -webkit-font-smoothing: antialiased; 
  text-rendering: optimizeLegibility; 
  background: #F8F9FA; 
  color: #2D3748; 
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}
/* Image optimization */
img, picture, video, canvas, svg { 
  display: block; 
  max-width: 100%; 
  height: auto;
}
img[loading="lazy"] {
  content-visibility: auto;
}

/* Performance optimizations */
.testimonial-track {
  will-change: transform;
}
.scroll-progress {
  will-change: width;
}
[data-aos] {
  will-change: transform, opacity;
}
input, button, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

/* Dark Mode Variables */
:root {
  --bg-primary: #F8F9FA;
  --bg-secondary: #ffffff;
  --text-primary: #2D3748;
  --text-secondary: #4a5568;
  --accent-blue: #3A7BD5;
  --accent-purple: #8B5CF6;
  --accent-red: #EF4444;
  --accent-pink: #EC4899;
  --accent-green: #00D2B8;
  --accent-orange: #FF6B6B;
  --shadow-sm: rgba(0,0,0,.04);
  --shadow-md: rgba(0,0,0,.08);
  --shadow-lg: rgba(0,0,0,.12);
}

[data-theme="dark"] {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --shadow-sm: rgba(0,0,0,.3);
  --shadow-md: rgba(0,0,0,.5);
  --shadow-lg: rgba(0,0,0,.7);
}

body { background: var(--bg-primary); color: var(--text-primary); }

/* Typography with font-display optimization - Modern Persian Fonts */
@font-face {
  font-family: 'Vazirmatn';
  font-display: swap;
}
body.fa { 
  font-family: 'Vazirmatn', 'Vazir', 'Samim', 'Tanha', system-ui, -apple-system, Segoe UI, Arial, sans-serif; 
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  word-spacing: 0.05em;
}
body.en { font-family: Arial, Helvetica, sans-serif; }

/* Enhanced Persian Typography for Modern Appeal */
html[dir="rtl"] body.fa {
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body.fa h1,
html[dir="rtl"] body.fa h2,
html[dir="rtl"] body.fa h3,
html[dir="rtl"] body.fa h4,
html[dir="rtl"] body.fa h5,
html[dir="rtl"] body.fa h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body.fa p,
html[dir="rtl"] body.fa li,
html[dir="rtl"] body.fa span {
  line-height: 1.85;
  word-spacing: 0.08em;
}

html[dir="rtl"] body.fa .btn,
html[dir="rtl"] body.fa button {
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1, h2, h3 { 
  line-height: 1.3; 
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }
.muted { color: #6B7280; }

/* Utilities */
.container { 
  width: min(1120px, 92%); 
  margin-inline: auto; 
  max-width: 100%;
  padding-left: 4%;
  padding-right: 4%;
  box-sizing: border-box;
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .9rem 1.2rem; border-radius: .8rem; font-weight: 700; transition: all 0.3s ease; box-shadow: 0 6px 18px rgba(58, 123, 213, 0.12); position: relative; overflow: hidden; }
.btn::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255,255,255,.3); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; }
.btn:hover::before { width: 300px; height: 300px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(58,123,213,0.16); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0,210,184,.25); }
.btn-primary { background: linear-gradient(135deg, #3A7BD5 0%, #8B5CF6 100%); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #326fc0 0%, #7C3AED 100%); }
.btn-secondary { background: linear-gradient(135deg, #EF4444 0%, #EC4899 100%); color: #fff; }
.btn-secondary:hover { background: linear-gradient(135deg, #DC2626 0%, #DB2777 100%); }
.btn-accent { background: linear-gradient(135deg, #00D2B8 0%, #3A7BD5 100%); color: #fff; }
.btn-accent:hover { background: linear-gradient(135deg, #00bea6 0%, #326fc0 100%); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 2px solid rgba(45, 55, 72, 0.15); padding: .6rem .9rem; border-radius: .7rem; }
.btn-ghost:hover { background: rgba(58, 123, 213, 0.08); border-color: rgba(58,123,213,0.4); }
.btn-hero { padding: 1rem 2rem; font-size: 1.05rem; }
.theme-toggle { min-width: 42px; padding: .6rem; }
.theme-icon { font-size: 1.2rem; transition: transform 0.3s ease; }
.theme-toggle:hover .theme-icon { transform: rotate(20deg); }

/* Header */
.site-header { 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  backdrop-filter: saturate(1.2) blur(12px); 
  background: rgba(248, 249, 250, 0.95); 
  border-bottom: 1px solid rgba(45, 55, 72, 0.08); 
  box-shadow: 0 2px 8px rgba(0,0,0,.04); 
  transition: background 0.3s ease, border-color 0.3s ease;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  left: 0;
  right: 0;
}
[data-theme="dark"] .site-header { background: rgba(15, 23, 42, 0.95); border-bottom-color: rgba(255,255,255,.1); }
.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 1.5rem; 
  padding: 1rem 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}
.logo { 
  display: inline-flex !important; 
  align-items: center; 
  gap: .6rem; 
  font-weight: 800; 
  letter-spacing: .3px;
  visibility: visible !important;
  opacity: 1 !important;
  flex-shrink: 0;
  min-width: 0;
}
.logo .brand-mark { 
  width: 14px; 
  height: 14px; 
  border-radius: 4px; 
  background: linear-gradient(135deg, #3A7BD5 0%, #8B5CF6 50%, #EC4899 100%); 
  box-shadow: 0 6px 14px rgba(139, 92, 246, 0.3); 
  animation: gradient-shift 3s ease infinite;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
@keyframes gradient-shift {
  0%, 100% { background: linear-gradient(135deg, #3A7BD5 0%, #8B5CF6 50%, #EC4899 100%); }
  50% { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #3A7BD5 100%); }
}
.logo.small .brand-mark { width: 10px; height: 10px; }
.brand-text { 
  font-size: 1.25rem; 
  color: var(--text-primary); 
  font-weight: 700; 
  font-family: 'Vazirmatn', 'Vazir', 'Samim', 'Tanha', 'Shabnam', 'Estedad', system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 52%, #8B5CF6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.brand-text::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.3) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.logo:hover .brand-text::after {
  opacity: 1;
}
[data-theme="dark"] .brand-text {
  background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 50%, #94A3B8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation */
.main-nav { 
  position: relative; 
  width: auto;
  max-width: 100%;
  flex-shrink: 1;
}
.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; padding: .4rem; flex-shrink: 0; }
.nav-toggle .bar { width: 22px; height: 2px; background: #2D3748; display: block; margin: 4px 0; border-radius: 1px; }
.nav-list { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-list::-webkit-scrollbar {
  display: none;
}
.nav-link { 
  padding: .65rem 1rem; 
  border-radius: .6rem; 
  color: #2D3748; 
  font-weight: 600; 
  font-size: 0.95rem; 
  opacity: .86; 
  white-space: nowrap; 
  transition: all 0.2s ease; 
  letter-spacing: 0.01em; 
  display: inline-flex; 
  align-items: center;
  flex-shrink: 0;
}
.nav-link:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(58,123,213,.3); }
.nav-link:hover { background: rgba(58, 123, 213, 0.08); opacity: 1; color: #3A7BD5; }
.nav-link.active { background: rgba(58, 123, 213, 0.12); color: #1f3f70; font-weight: 700; }

/* Hero */
.hero { position: relative; background: linear-gradient(135deg, #ffffff 0%, #F8F9FA 50%, #ffffff 100%); padding: 4rem 0 5rem; overflow: hidden; }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%); }
.hero-background { position: absolute; inset: 0; background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 20%, rgba(58, 123, 213, 0.1) 0%, transparent 50%); z-index: 0; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 2.2rem; }
.hero-badge { display: inline-block; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); color: #fff; padding: .5rem 1rem; border-radius: 2rem; font-size: .85rem; font-weight: 600; margin-bottom: 1rem; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); animation: pulse 2s ease infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.hero-title { font-size: clamp(2rem, 4vw, 3rem); background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
[data-theme="dark"] .hero-title { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-description { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.5rem; }
.hero-subtitle { margin-top: .5rem; font-weight: 700; color: #3A7BD5; }
.hero-usp { margin-top: 1rem; font-size: 1.05rem; color: var(--text-primary); background: var(--bg-secondary); border: 1px solid rgba(58,123,213,0.15); padding: .9rem 1rem; border-radius: .8rem; box-shadow: 0 10px 24px rgba(58,123,213,0.07); }
.hero-cta { margin-top: 1.2rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-visual { display: grid; place-items: center; position: relative; }
.hero-visual-wrapper { position: relative; width: 100%; }
.hero-glow { position: absolute; inset: -20px; background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%); border-radius: 50%; filter: blur(40px); animation: glow-pulse 3s ease infinite; z-index: 0; }
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}
.placeholder-image { position: relative; z-index: 1; width: min(500px, 100%); aspect-ratio: 4/3; border-radius: 1.2rem; background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); border: 2px solid rgba(139, 92, 246, 0.3); color: #8B5CF6; display: grid; place-items: center; font-weight: 800; letter-spacing: .5px; box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2); }
[data-theme="dark"] .placeholder-image { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%); border-color: rgba(139, 92, 246, 0.5); }

/* Sections */
.section { 
  padding: 4rem 0; 
  position: relative; 
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}
/* Ensure AOS elements are visible */
[data-aos] {
  opacity: 1 !important;
  visibility: visible !important;
}
/* Override AOS default hidden state */
body:not(.aos-enabled) [data-aos],
html:not(.aos-enabled) [data-aos] {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: .6rem; font-weight: 800; }
[data-theme="dark"] .section-header h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.section-header p { color: var(--text-secondary); font-size: 1.05rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.card { position: relative; background: var(--bg-secondary); border: 1px solid rgba(45,55,72,.08); border-radius: 1.5rem; padding: 1.8rem; transition: all 0.3s ease; box-shadow: 0 10px 26px var(--shadow-sm); overflow: hidden; }
[data-theme="dark"] .card { border-color: rgba(255,255,255,.1); }
.card-gradient { position: absolute; top: 0; left: 0; right: 0; height: 4px; opacity: 0; transition: opacity 0.3s ease; }
.card-1 .card-gradient { background: linear-gradient(90deg, #3A7BD5 0%, #8B5CF6 100%); }
.card-2 .card-gradient { background: linear-gradient(90deg, #EF4444 0%, #EC4899 100%); }
.card-3 .card-gradient { background: linear-gradient(90deg, #8B5CF6 0%, #3A7BD5 100%); }
.card-4 .card-gradient { background: linear-gradient(90deg, #00D2B8 0%, #3A7BD5 100%); }
.card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 50px var(--shadow-md); border-color: transparent; }
.card:hover .card-gradient { opacity: 1; }
.card-icon { font-size: 2.5rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.1)); transition: transform 0.3s ease; }
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); }
.card-title { font-size: 1.15rem; color: var(--text-primary); margin-bottom: .5rem; font-weight: 700; }
.card-text { color: var(--text-secondary); line-height: 1.6; }
.card-arrow { position: absolute; bottom: 1.5rem; left: 1.8rem; font-size: 1.5rem; color: var(--accent-purple); opacity: 0; transform: translateX(-10px); transition: all 0.3s ease; }
.card:hover .card-arrow { opacity: 1; transform: translateX(0); }

/* Partners */
.logo-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-items: center; }
.logo-box { height: 56px; background: linear-gradient(180deg, #fff, #f3f7fd); border: 1px solid rgba(45,55,72,.08); border-radius: .8rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 6px 16px rgba(0,0,0,.04); }

/* New Partners Section */
.partners-section { padding: 4rem 0; background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); border-top: 1px solid rgba(45,55,72,.06); border-bottom: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .partners-section { border-color: rgba(255,255,255,.1); }
.partners-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.partners-section h2 { text-align: center; color: var(--text-primary); font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin-bottom: .4rem; position: relative; z-index: 1; }
.partners-section p { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; position: relative; z-index: 1; }
.partners-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; align-items: center; position: relative; z-index: 1; }
.partner-logo { height: 80px; display: grid; place-items: center; border-radius: 1rem; background: var(--bg-secondary); border: 2px dashed rgba(139, 92, 246, 0.3); color: var(--accent-purple); font-weight: 800; transition: all 0.3s ease; box-shadow: 0 4px 12px var(--shadow-sm); }
.partner-logo:hover { transform: translateY(-5px); border-color: var(--accent-purple); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2); background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); }
.partner-logo.placeholder { font-size: .95rem; }

@media (max-width: 1024px) {
  .partners-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Footer */
.site-footer { margin-top: 3rem; border-top: 1px solid rgba(45,55,72,.06); background: var(--bg-secondary); position: relative; }
[data-theme="dark"] .site-footer { border-top-color: rgba(255,255,255,.1); }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.5) 50%, transparent 100%); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem 0; }
.footer-brand .logo { margin-bottom: .5rem; }
.socials { display: flex; gap: .8rem; margin-top: .6rem; flex-wrap: wrap; }
.social { width: 42px; height: 42px; border-radius: .8rem; display: grid; place-items: center; background: var(--bg-primary); border: 1px solid rgba(139, 92, 246, 0.2); color: var(--text-primary); transition: all 0.3s ease; font-size: 1.1rem; }
.social:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3); }
.social:hover { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); border-color: rgba(139, 92, 246, 0.5); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2); }

/* Enhanced Social Media Buttons */
.social-btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.6rem; 
  padding: 0.75rem 1.2rem; 
  border-radius: 0.8rem; 
  font-weight: 600; 
  font-size: 0.95rem; 
  transition: all 0.3s ease; 
  text-decoration: none; 
  border: none; 
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}
.social-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.social-btn:hover::before {
  width: 300px;
  height: 300px;
}
.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.social-btn:active {
  transform: translateY(-1px);
}

/* WhatsApp Button */
.social-btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
}
.social-btn-whatsapp:hover {
  background: linear-gradient(135deg, #20BA5A 0%, #0F7A6D 100%);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

/* Telegram Button - More Prominent */
.social-btn-telegram {
  background: linear-gradient(135deg, #0088cc 0%, #005f8c 100%);
  color: #fff;
  font-size: 1rem;
  padding: 0.85rem 1.4rem;
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.25);
}
.social-btn-telegram:hover {
  background: linear-gradient(135deg, #0077b3 0%, #004d6b 100%);
  box-shadow: 0 10px 24px rgba(0, 136, 204, 0.4);
}

/* Instagram Button - More Prominent */
.social-btn-instagram {
  background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCB045 100%);
  color: #fff;
  font-size: 1rem;
  padding: 0.85rem 1.4rem;
  box-shadow: 0 6px 16px rgba(131, 58, 180, 0.25);
}
.social-btn-instagram:hover {
  background: linear-gradient(135deg, #7229A0 0%, #E01A1A 50%, #E09E3D 100%);
  box-shadow: 0 10px 24px rgba(131, 58, 180, 0.4);
}

/* Phone Call Button */
.social-btn-phone {
  background: linear-gradient(135deg, #3A7BD5 0%, #8B5CF6 100%);
  color: #fff;
}
.social-btn-phone:hover {
  background: linear-gradient(135deg, #326fc0 0%, #7C3AED 100%);
  box-shadow: 0 8px 20px rgba(58, 123, 213, 0.3);
}

/* SMS Button */
.social-btn-sms {
  background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  color: #fff;
}
.social-btn-sms:hover {
  background: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

/* Social Icons */
.social-icon {
  font-size: 1.3rem;
  line-height: 1;
  display: inline-block;
}
.social-icon img {
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
  display: block;
  vertical-align: middle;
}
.social-btn .social-icon img {
  width: 1.2rem;
  height: 1.2rem;
}
.social .social-icon img,
.social img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  display: block;
}
.floating-contacts .social-btn .social-icon img {
  width: 1.8rem;
  height: 1.8rem;
}

/* Contact Buttons Grid */
.contact-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.contact-buttons-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}
.contact-buttons-compact .social-btn {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

/* Floating Contact Buttons */
.floating-contacts {
  position: fixed;
  bottom: 100px;
  left: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.floating-contacts .social-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.floating-contacts .social-btn .social-icon {
  font-size: 1.5rem;
}
@media (max-width: 768px) {
  /* Ensure logo is always visible on mobile screens - HIGHEST PRIORITY */
  a.logo,
  .logo,
  .logo .brand-mark,
  .logo .brand-text,
  .logo span.brand-mark,
  .logo span.brand-text {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
  }
  
  a.logo,
  .logo {
    flex-shrink: 0 !important;
    min-width: auto !important;
    max-width: none !important;
    width: auto !important;
  }
  
  .logo .brand-mark,
  .logo span.brand-mark,
  span.brand-mark {
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
  }
  
  .logo .brand-text,
  .logo span.brand-text {
    display: inline-block !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: clamp(0.95rem, 3.5vw, 1.2rem) !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
  }
  
  .floating-contacts {
    bottom: 80px;
    left: 15px;
  }
  .floating-contacts .social-btn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  .header-socials {
    display: none !important;
  }
  .contact-buttons {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 1024px) {
  .header-socials .social-btn {
    padding: 0.4rem 0.7rem !important;
    font-size: 0.8rem !important;
  }
  .header-socials .social-btn .lang-fa {
    display: none !important;
  }
}
.footer-bottom { padding: 1rem 0 1.5rem; border-top: 1px dashed rgba(45,55,72,.1); text-align: center; }
[data-theme="dark"] .footer-bottom { border-top-color: rgba(255,255,255,.1); }
.trust-badges { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.trust-badge { display: inline-flex; align-items: center; gap: .5rem; background: var(--bg-primary); padding: .6rem 1rem; border-radius: .8rem; border: 1px solid rgba(139, 92, 246, 0.2); font-size: .85rem; color: var(--text-secondary); transition: all 0.3s ease; }
.trust-badge:hover { border-color: rgba(139, 92, 246, 0.5); background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15); }
.trust-icon { color: var(--accent-purple); font-weight: 700; font-size: 1rem; }

/* RTL/LTR helpers */
html[dir="rtl"] .hero-cta { flex-direction: row-reverse; }

/* Prevent horizontal overflow on RTL/LTR switch */
html[dir="rtl"],
html[dir="ltr"] {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  position: relative;
}

/* Ensure all main containers don't overflow */
main, section, article, aside {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Prevent horizontal overflow on RTL/LTR switch */
html[dir="rtl"],
html[dir="ltr"] {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  position: relative;
}

/* Ensure all main containers don't overflow */
main, section, article, aside {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
html[dir="rtl"] .nav-list { flex-direction: row-reverse; }
html[dir="ltr"] .nav-link { letter-spacing: .2px; }

/* Fix header buttons on mobile to prevent overflow */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
  
  .header-inner > * {
    flex-shrink: 1;
    min-width: 0;
  }
  
  .logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 200px);
  }
  
  .btn-ghost, .btn-accent {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.85rem !important;
    padding: 0.5rem 0.8rem !important;
  }
  
  #lang-switch {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.7rem !important;
    min-width: auto !important;
  }
  
  .btn-accent {
    font-size: 0.85rem !important;
    padding: 0.6rem 1rem !important;
  }
  
  .theme-toggle {
    min-width: 44px !important;
    padding: 0.5rem !important;
  }
}

/* ============================================
   MOBILE HEADER (like index.html) — opt-in via body class
   Applies ONLY when <body> has "mobile-header-like-index"
   ============================================ */

@media screen and (min-width: 769px) {
  body.mobile-header-like-index .header-top-row {
    display: contents !important;
  }
}

@media screen and (max-width: 768px) {
  body.mobile-header-like-index .site-header {
    padding: 0.75rem 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: var(--bg-primary) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  body.mobile-header-like-index .site-header .container {
    width: 92% !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
  }

  body.mobile-header-like-index .header-inner {
    position: relative !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  body.mobile-header-like-index .main-nav {
    position: relative !important;
    z-index: 10000 !important;
  }

  body.mobile-header-like-index .header-top-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  body.mobile-header-like-index .logo {
    font-size: 0.9rem !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
  }

  body.mobile-header-like-index .logo .brand-text {
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Hide Header Socials on Mobile (same as index.html) */
  body.mobile-header-like-index .header-socials {
    display: none !important;
  }

  body.mobile-header-like-index #theme-toggle,
  body.mobile-header-like-index #lang-switch {
    padding: 0.5rem !important;
    min-width: 40px !important;
    min-height: 40px !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
  }

  /* No hamburger on this template */
  body.mobile-header-like-index .nav-toggle {
    display: none !important;
  }

  body.mobile-header-like-index .main-nav {
    position: relative !important;
    width: 100% !important;
    order: 3 !important;
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid rgba(139, 92, 246, 0.1) !important;
  }

  body.mobile-header-like-index #nav-menu.nav-list,
  body.mobile-header-like-index ul#nav-menu.nav-list,
  body.mobile-header-like-index .main-nav #nav-menu.nav-list,
  body.mobile-header-like-index nav.main-nav ul#nav-menu.nav-list {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    translate: 0 0 !important;
    inset-inline-start: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    z-index: 1 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent !important;
  }

  body.mobile-header-like-index #nav-menu.nav-list.open,
  body.mobile-header-like-index #nav-menu.nav-list {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.mobile-header-like-index #nav-menu.nav-list::-webkit-scrollbar {
    height: 4px !important;
  }

  body.mobile-header-like-index #nav-menu.nav-list::-webkit-scrollbar-track {
    background: transparent !important;
  }

  body.mobile-header-like-index #nav-menu.nav-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3) !important;
    border-radius: 2px !important;
  }

  body.mobile-header-like-index .nav-overlay {
    display: none !important;
  }

  body.mobile-header-like-index .nav-list li {
    flex-shrink: 0 !important;
    width: auto !important;
    position: relative !important;
  }

  body.mobile-header-like-index .nav-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    border-radius: 0.75rem !important;
    text-align: center !important;
    min-height: 40px !important;
    min-width: auto !important;
    white-space: nowrap !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    position: relative !important;
    margin: 0 !important;
    background: rgba(139, 92, 246, 0.08) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    pointer-events: auto !important;
  }

  body.mobile-header-like-index .nav-link:hover,
  body.mobile-header-like-index .nav-link:active,
  body.mobile-header-like-index .nav-link:focus {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(58, 123, 213, 0.1) 100%) !important;
    color: var(--accent-purple) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2) !important;
  }

  body.mobile-header-like-index .nav-link.active {
    background: linear-gradient(135deg, #8B5CF6 0%, #3A7BD5 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3) !important;
    transform: translateY(-2px) scale(1.05) !important;
  }

  body.mobile-header-like-index .nav-link::after,
  body.mobile-header-like-index .nav-link::before {
    display: none !important;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .logo-row { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .nav-list { position: absolute; inset-inline-start: 0; top: calc(100% + .5rem); background: #ffffff; border: 1px solid rgba(45,55,72,.1); border-radius: .8rem; padding: .6rem; box-shadow: 0 16px 28px rgba(0,0,0,.08); display: none; flex-direction: column; min-width: 220px; white-space: normal; }
  .nav-list.open { display: flex; }
  .nav-link { white-space: normal; width: 100%; justify-content: flex-start; }
  .header-inner { gap: 1rem; padding: .8rem 0; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .logo-row { grid-template-columns: repeat(2, 1fr); }
}

/* Print Styles */
@media print {
  header, .site-header, .nav-toggle, .nav-list, .hero-visual, .logo-row, .site-footer, #backToTop, #spinner { display: none !important; }
  /* Ensure logo is always visible even when header is hidden */
  .logo, .logo .brand-mark, .logo .brand-text { display: inline-flex !important; visibility: visible !important; opacity: 1 !important; }
  .logo .brand-mark { display: inline-block !important; }
  .btn { display: none !important; }
  .section { padding: 0; }
  .container { width: 100%; }
  body { color: #000; background: #fff; }
}

/* Forms */
.form { display: grid; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { font-weight: 700; color: var(--text-primary); margin-bottom: .5rem; display: inline-block; font-size: .95rem; }
.input, .textarea, .select { width: 100%; padding: 1rem 1.2rem; border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1rem; background: var(--bg-secondary); color: var(--text-primary); transition: all 0.3s ease; font-size: 1rem; }
[data-theme="dark"] .input, [data-theme="dark"] .textarea, [data-theme="dark"] .select { border-color: rgba(139, 92, 246, 0.3); }
.textarea { min-height: 140px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent-purple); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), 0 4px 12px rgba(139, 92, 246, 0.1); transform: translateY(-2px); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.25); }
.helper { font-size: .85rem; color: var(--text-secondary); }

/* Gallery / Grid utilities */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.tile { position: relative; background: var(--bg-secondary); border: 1px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 1.5rem; box-shadow: 0 10px 30px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.tile:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.tile:hover::before { opacity: 1; }
[data-theme="dark"] .tile { border-color: rgba(139, 92, 246, 0.3); }
.tile .thumb { height: 200px; background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); border: 2px dashed rgba(139, 92, 246, 0.4); border-radius: 1rem; margin-bottom: 1rem; display: grid; place-items: center; color: var(--accent-purple); font-weight: 700; transition: all 0.3s ease; }
.tile:hover .thumb { border-color: rgba(139, 92, 246, 0.6); background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%); transform: scale(1.05); }
[data-theme="dark"] .tile .thumb { border-color: rgba(139, 92, 246, 0.5); }

/* Back to Top */
#backToTop { position: fixed; inset-inline-end: 20px; bottom: 20px; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); color: #fff; display: grid; place-items: center; border: 0; cursor: pointer; box-shadow: 0 12px 24px rgba(139, 92, 246, 0.4); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all 0.3s ease; z-index: 90; font-size: 1.2rem; font-weight: 700; }
#backToTop:hover { background: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%); transform: translateY(-4px); box-shadow: 0 16px 32px rgba(139, 92, 246, 0.5); }
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Spinner */
#spinner { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(255,255,255,.8); z-index: 120; }
#spinner.active { display: flex; }
.spinner-dot { width: 10px; height: 10px; margin: 4px; border-radius: 50%; background: #3A7BD5; animation: bounce .6s infinite alternate; }
.spinner-dot:nth-child(2) { background: #00D2B8; animation-delay: .2s; }
.spinner-dot:nth-child(3) { background: #FF6B6B; animation-delay: .4s; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* Animated Counters */
.counter { font-size: 2.5rem; font-weight: 800; color: #3A7BD5; }
.counter-label { font-size: 1rem; color: #6B7280; margin-top: .5rem; }

/* Interactive Timeline */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before { content: ''; position: absolute; left: 2rem; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #8B5CF6 0%, #EC4899 50%, #3A7BD5 100%); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 2.5rem; padding-left: 4.5rem; }
.timeline-item::before { content: ''; position: absolute; left: 1.25rem; top: .5rem; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); border: 4px solid var(--bg-primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3), 0 4px 12px rgba(139, 92, 246, 0.2); transition: all 0.3s ease; }
.timeline-item:hover::before { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.4), 0 6px 16px rgba(139, 92, 246, 0.3); }
.timeline-content { background: var(--bg-secondary); padding: 2rem; border-radius: 1.5rem; box-shadow: 0 15px 35px var(--shadow-sm); border: 1px solid rgba(139, 92, 246, 0.2); transition: all 0.3s ease; position: relative; overflow: hidden; }
.timeline-content::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.timeline-content:hover { transform: translateX(5px); box-shadow: 0 20px 45px var(--shadow-md); border-color: rgba(139, 92, 246, 0.4); }
.timeline-content:hover::before { opacity: 1; }
[data-theme="dark"] .timeline-content { border-color: rgba(139, 92, 246, 0.3); }
.timeline-year { font-weight: 800; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: .5rem; font-size: 1.1rem; }

/* Flip Cards */
.flip-card { background: transparent; width: 100%; height: 220px; perspective: 1000px; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s ease; transform-style: preserve-3d; }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 1.5rem; padding: 2rem; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 15px 35px var(--shadow-md); }
.flip-card-front { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #3A7BD5 100%); color: #fff; }
.flip-card-back { background: var(--bg-secondary); color: var(--text-primary); transform: rotateY(180deg); border: 2px solid rgba(139, 92, 246, 0.3); }
[data-theme="dark"] .flip-card-back { border-color: rgba(139, 92, 246, 0.4); }

/* Why Intelligence Testing Section */
.why-testing-section { background: var(--bg-primary); padding: 3.5rem 0; border-radius: 0; margin: 1rem 0 2rem; position: relative; }
.why-testing-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.why-testing-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; position: relative; z-index: 1; }
[data-theme="dark"] .why-testing-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.reasons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; z-index: 1; }
.reason-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 1.8rem; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.reason-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.reason-card:hover { transform: translateY(-6px); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.reason-card:hover::before { opacity: 1; }
[data-theme="dark"] .reason-card { border-color: rgba(139, 92, 246, 0.3); }
.reason-card h3 { color: var(--text-primary); margin-bottom: .6rem; font-size: 1.1rem; font-weight: 700; }
.reason-card p { color: var(--text-secondary); line-height: 1.6; }

@media (max-width: 1024px) {
  .reasons-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .reasons-grid { grid-template-columns: 1fr; }
}

/* Specialized Assessments Section */
.assessments-section { background: var(--bg-primary); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .assessments-section { border-color: rgba(255,255,255,.1); }
.assessments-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.assessments-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .6rem; position: relative; z-index: 1; }
[data-theme="dark"] .assessments-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.assessments-section p { text-align: center; color: var(--text-secondary); margin-bottom: 2.5rem; position: relative; z-index: 1; }
.assessments-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; position: relative; z-index: 1; }
.assessment-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 2rem; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.assessment-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.assessment-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.assessment-card:hover::before { opacity: 1; }
[data-theme="dark"] .assessment-card { border-color: rgba(139, 92, 246, 0.3); }
.assessment-icon { font-size: 3rem; margin-bottom: 1.2rem; text-align: center; filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.assessment-card:hover .assessment-icon { transform: scale(1.15) rotate(5deg); }
.assessment-card h3 { color: var(--text-primary); margin-bottom: 1rem; font-size: 1.2rem; line-height: 1.4; font-weight: 700; }
.assessment-card p { color: var(--text-secondary); margin-bottom: 1.2rem; line-height: 1.7; }
.assessment-features { display: flex; flex-direction: column; gap: .6rem; }
.assessment-features span { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); padding: .5rem 1rem; border-radius: .8rem; color: var(--accent-purple); font-size: .95rem; font-weight: 600; border: 1px solid rgba(139, 92, 246, 0.2); }

@media (max-width: 1024px) {
  .assessments-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .assessment-card { padding: 1.2rem; }
  .assessment-icon { font-size: 2rem; }
}

/* Technical Specs Section */
.technical-specs { background: var(--bg-primary); padding: 3.5rem 0; border-top: 1px solid rgba(45,55,72,.06); border-bottom: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .technical-specs { border-color: rgba(255,255,255,.1); }
.technical-specs::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.technical-specs h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; position: relative; z-index: 1; }
[data-theme="dark"] .technical-specs h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.specs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; z-index: 1; }
.spec-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 1.8rem; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.spec-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.spec-card:hover { transform: translateY(-6px); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.spec-card:hover::before { opacity: 1; }
[data-theme="dark"] .spec-card { border-color: rgba(139, 92, 246, 0.3); }
.spec-icon { font-size: 2.5rem; margin-bottom: 1rem; text-align: center; filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.spec-card:hover .spec-icon { transform: scale(1.2) rotate(10deg); }
.spec-card h3 { color: var(--text-primary); margin-bottom: .6rem; font-size: 1.1rem; text-align: center; font-weight: 700; }
.spec-card ul { padding-inline-start: 1.5rem; }
.spec-card li { color: var(--text-secondary); margin-bottom: .5rem; list-style: disc; line-height: 1.6; }

@media (max-width: 1024px) {
  .specs-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .specs-grid { grid-template-columns: 1fr; }
}

/* Collaboration Section */
.collaboration-section { background: var(--bg-primary); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .collaboration-section { border-color: rgba(255,255,255,.1); }
.collaboration-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.collaboration-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; position: relative; z-index: 1; }
[data-theme="dark"] .collaboration-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.collaboration-intro { max-width: 860px; margin: 0 auto 2rem; color: var(--text-secondary); text-align: center; position: relative; z-index: 1; font-size: 1.05rem; line-height: 1.7; }
.collaboration-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; z-index: 1; }
.collab-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 1.8rem; box-shadow: 0 15px 35px var(--shadow-sm); text-align: center; transition: all 0.3s ease; overflow: hidden; }
.collab-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.collab-card:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.collab-card:hover::before { opacity: 1; }
[data-theme="dark"] .collab-card { border-color: rgba(139, 92, 246, 0.3); }
.collab-icon { font-size: 2.5rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.collab-card:hover .collab-icon { transform: scale(1.2) rotate(10deg); }
.collab-card h3 { color: var(--text-primary); margin-bottom: .6rem; font-size: 1.1rem; font-weight: 700; }
.collab-card p { color: var(--text-secondary); line-height: 1.6; }

@media (max-width: 1024px) {
  .collaboration-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .collaboration-grid { grid-template-columns: 1fr; }
}

/* Team Section */
.team-section { background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .team-section { border-color: rgba(255,255,255,.1); }
.team-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.team-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; position: relative; z-index: 1; }
[data-theme="dark"] .team-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.team-description { max-width: 900px; margin: 0 auto 2rem; text-align: center; position: relative; z-index: 1; }
.team-description p { color: var(--text-secondary); line-height: 1.7; font-size: 1.05rem; }
.team-commitments h3 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 2rem; font-size: 1.5rem; position: relative; z-index: 1; }
[data-theme="dark"] .team-commitments h3 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.commitments-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; z-index: 1; }
.commitment-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 2rem; text-align: center; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.commitment-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.commitment-card:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.commitment-card:hover::before { opacity: 1; }
[data-theme="dark"] .commitment-card { border-color: rgba(139, 92, 246, 0.3); }
.commitment-icon { font-size: 3rem; margin-bottom: 1.2rem; filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.commitment-card:hover .commitment-icon { transform: scale(1.2) rotate(10deg); }
.commitment-card h4 { color: var(--text-primary); margin-bottom: .8rem; font-size: 1.15rem; font-weight: 700; }
.commitment-card p { color: var(--text-secondary); line-height: 1.6; font-size: 1rem; }

@media (max-width: 1024px) {
  .commitments-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .commitments-grid { grid-template-columns: 1fr; }
  .commitment-card { padding: 1.2rem; }
  .commitment-icon { font-size: 2rem; }
}

/* Collaboration Benefits & Success Stories */
.collaboration-benefits, .success-stories { margin: 2.5rem 0; position: relative; }
.collaboration-benefits h3, .success-stories h3 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 2rem; font-size: 1.5rem; font-weight: 800; }
[data-theme="dark"] .collaboration-benefits h3, [data-theme="dark"] .success-stories h3 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.benefit-item { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 1.8rem; text-align: center; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.benefit-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.benefit-item:hover { transform: translateY(-6px); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.benefit-item:hover::before { opacity: 1; }
[data-theme="dark"] .benefit-item { border-color: rgba(139, 92, 246, 0.3); }
.benefit-icon { font-size: 2.5rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.benefit-item:hover .benefit-icon { transform: scale(1.2) rotate(10deg); }
.benefit-item h4 { color: var(--text-primary); margin-bottom: .6rem; font-size: 1.1rem; font-weight: 700; }
.benefit-item p { color: var(--text-secondary); font-size: .95rem; line-height: 1.6; }

.stories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.story-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 1.8rem; text-align: center; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.story-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.story-card:hover { transform: translateY(-6px); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.story-card:hover::before { opacity: 1; }
[data-theme="dark"] .story-card { border-color: rgba(139, 92, 246, 0.3); }
.story-icon { font-size: 2.5rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.story-card:hover .story-icon { transform: scale(1.2) rotate(10deg); }
.story-card h4 { color: var(--text-primary); margin-bottom: .6rem; font-size: 1.1rem; font-weight: 700; }
.story-card p { color: var(--text-secondary); font-size: .95rem; line-height: 1.6; }

@media (max-width: 1024px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .stories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .benefits-grid, .stories-grid { grid-template-columns: 1fr; }
}

/* Collaboration Form Section */
.collaboration-form-section { background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .collaboration-form-section { border-color: rgba(255,255,255,.1); }
.collaboration-form-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.collaboration-form { max-width: 800px; margin: 0 auto; background: var(--bg-secondary); border-radius: 1.5rem; padding: 2.5rem; box-shadow: 0 25px 50px var(--shadow-md); border: 2px solid rgba(139, 92, 246, 0.2); position: relative; z-index: 1; }
[data-theme="dark"] .collaboration-form { border-color: rgba(139, 92, 246, 0.3); }
.collaboration-form::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); border-radius: 1.5rem 1.5rem 0 0; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: .6rem; font-weight: 700; color: var(--text-primary); font-size: .95rem; }
.form-actions { text-align: center; margin-top: 2rem; }
.collaboration-form .input, .collaboration-form .select, .collaboration-form .textarea { width: 100%; padding: 1rem 1.2rem; border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1rem; background: var(--bg-primary); color: var(--text-primary); transition: all 0.3s ease; font-size: 1rem; }
[data-theme="dark"] .collaboration-form .input, [data-theme="dark"] .collaboration-form .select, [data-theme="dark"] .collaboration-form .textarea { border-color: rgba(139, 92, 246, 0.3); }
.collaboration-form .input:focus, .collaboration-form .select:focus, .collaboration-form .textarea:focus { outline: none; border-color: var(--accent-purple); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), 0 4px 12px rgba(139, 92, 246, 0.1); transform: translateY(-2px); }
.collaboration-form .textarea { min-height: 140px; resize: vertical; }

@media (max-width: 768px) {
  .collaboration-form { padding: 1.5rem; margin: 0 1rem; }
}

/* Statistics Section */
.statistics-section { background: linear-gradient(135deg, #3A7BD5 0%, #8B5CF6 50%, #EC4899 100%); padding: 4rem 0; color: #fff; position: relative; overflow: hidden; }
.statistics-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.1) 0%, transparent 50%); }
.statistics-section h2 { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.statistics-section p { color: rgba(255,255,255,.95); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; z-index: 1; }
.statistics-section .stat-card { text-align: center; padding: 2rem; background: rgba(0,0,0,.18); border-radius: 1.5rem; backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.26); transition: all 0.3s ease; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.statistics-section .stat-card:hover { transform: translateY(-5px) scale(1.05); background: rgba(0,0,0,.24); box-shadow: 0 15px 40px rgba(0,0,0,.3); }
.stat-icon { font-size: 3rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.stat-number { font-size: 3.5rem; font-weight: 800; margin-bottom: .5rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.3); background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,.8) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-unit { font-size: 2rem; font-weight: 800; color: #fff; display: inline; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.stat-label { font-size: 1.05rem; color: rgba(255,255,255,.95); font-weight: 600; }

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-number { font-size: 2.5rem; }
}

/* Process Section */
.process-section { background: var(--bg-primary); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .process-section { border-color: rgba(255,255,255,.1); }
.process-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.process-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 2rem; position: relative; z-index: 1; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
[data-theme="dark"] .process-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.process-timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; z-index: 1; }
.process-step { text-align: center; position: relative; }
.step-number { width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #3A7BD5 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; margin: 0 auto 1.5rem; box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4); transition: all 0.3s ease; position: relative; }
.step-number::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; z-index: -1; filter: blur(8px); }
.process-step:hover .step-number { transform: scale(1.15) rotate(10deg); box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5); }
.process-step:hover .step-number::before { opacity: 0.5; }
.step-content h3 { color: var(--text-primary); margin-bottom: .6rem; font-size: 1.15rem; font-weight: 700; }
.step-content p { color: var(--text-secondary); font-size: .95rem; line-height: 1.6; }

@media (max-width: 1024px) {
  .process-timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-timeline { grid-template-columns: 1fr; }
}

/* FAQ Section */
.faq-section { background: #ffffff; padding: 3rem 0; border-top: 1px solid rgba(45,55,72,.06); }
.faq-section h2 { text-align: center; color: #1f3f70; margin-bottom: 1.2rem; }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 1rem; border: 1px solid rgba(58,123,213,.15); border-radius: .8rem; overflow: hidden; background: #fff; }
.faq-question { width: 100%; padding: 1.2rem; background: #fff; border: 0; text-align: left; font-weight: 700; color: #2D3748; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background .3s ease; }
.faq-question:hover { background: #f8f9fa; }
.faq-icon { font-size: 1.2rem; font-weight: 800; color: #3A7BD5; transition: transform 0.3s ease; }
.faq-answer { padding: 0 1.2rem; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-answer.open { max-height: 200px; padding: 1.2rem; }
.faq-icon.open { transform: rotate(45deg); }

/* Enhanced Testimonials */
.testimonial-slider { position: relative; overflow: hidden; border-radius: 1.5rem; max-width: 900px; margin: 0 auto; box-shadow: 0 20px 40px var(--shadow-md); }
.testimonial-track { display: flex; transition: transform 0.5s ease; }
.testimonial-slide { min-width: 100%; padding: 3rem; background: var(--bg-secondary); border: 1px solid rgba(139, 92, 246, 0.2); position: relative; }
[data-theme="dark"] .testimonial-slide { border-color: rgba(139, 92, 246, 0.4); }
.testimonial-slide::before { content: '"'; position: absolute; top: 1rem; left: 1.5rem; font-size: 5rem; color: rgba(139, 92, 246, 0.2); font-family: serif; line-height: 1; }
.testimonial-content { text-align: center; position: relative; z-index: 1; }
.testimonial-text { font-style: italic; margin-bottom: 1.5rem; color: var(--text-secondary); font-size: 1.15rem; line-height: 1.8; }
.testimonial-author { font-weight: 700; color: var(--accent-purple); font-size: 1.05rem; }
.testimonial-nav { display: flex; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.testimonial-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(139, 92, 246, 0.3); cursor: pointer; transition: all 0.3s ease; }
.testimonial-dot:hover { transform: scale(1.2); }
.testimonial-dot.active { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); transform: scale(1.3); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4); }

/* Counter Animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-number.animate { animation: countUp 0.6s ease-out; }

/* Smooth Scrolling */
html { scroll-behavior: smooth; }

/* Form Validation Styles */
.input:invalid, .select:invalid, .textarea:invalid { border-color: #FF6B6B; }
.input:valid, .select:valid, .textarea:valid { border-color: #00D2B8; }
.form-error { color: #FF6B6B; font-size: .85rem; margin-top: .25rem; }
.form-success { color: #00D2B8; font-size: .85rem; margin-top: .25rem; }

/* Loading States */
.loading { opacity: 0.6; pointer-events: none; }
.loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2px solid #3A7BD5; border-top: 2px solid transparent; border-radius: 50%; animation: spin 1s linear infinite; }

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hover Effects */
.card:hover, .tile:hover, .assessment-card:hover, .commitment-card:hover { transform: translateY(-4px); }
.btn:hover { transform: translateY(-2px); }

/* Focus States for Accessibility */
.btn:focus-visible, .input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid #3A7BD5; outline-offset: 2px; }

/* Print Optimizations */
@media print {
  .statistics-section, .testimonial-slider, .faq-section { break-inside: avoid; }
}

/* Tests Page Styles */
.introduction-section { background: var(--bg-primary); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .introduction-section { border-color: rgba(255,255,255,.1); }
.introduction-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.introduction-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; position: relative; z-index: 1; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
[data-theme="dark"] .introduction-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.introduction-content { max-width: 900px; margin: 0 auto 2rem; position: relative; z-index: 1; }
.intro-text { margin-bottom: 1.5rem; }
.intro-text p { color: var(--text-secondary); line-height: 1.8; font-size: 1.1rem; }

/* Main Intelligence Tests Section */
.main-tests-section { background: var(--bg-primary); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .main-tests-section { border-color: rgba(255,255,255,.1); }
.main-tests-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.main-tests-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; position: relative; z-index: 1; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
[data-theme="dark"] .main-tests-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.main-test-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 2.5rem; margin-bottom: 2rem; box-shadow: 0 20px 50px var(--shadow-md); transition: all 0.3s ease; overflow: hidden; }
.main-test-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); }
.main-test-card:hover { transform: translateY(-5px); box-shadow: 0 30px 60px var(--shadow-lg); border-color: rgba(139, 92, 246, 0.5); }
[data-theme="dark"] .main-test-card { border-color: rgba(139, 92, 246, 0.3); }
.test-header { display: flex; align-items: center; margin-bottom: 2rem; }
.test-icon { font-size: 4.5rem; margin-left: 1.5rem; filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.main-test-card:hover .test-icon { transform: scale(1.1) rotate(5deg); }
.test-title-section { flex: 1; }
.test-title-section h3 { background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: .8rem; font-size: 1.6rem; font-weight: 800; }
[data-theme="dark"] .test-title-section h3 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.test-badge { display: inline-block; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); color: #fff; padding: .5rem 1.2rem; border-radius: 2rem; font-size: .9rem; font-weight: 600; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.test-description { margin-bottom: 2rem; }
.test-description p { color: var(--text-secondary); line-height: 1.8; font-size: 1.1rem; }
.test-details { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.detail-section h4 { color: var(--text-primary); margin-bottom: 1.2rem; font-size: 1.2rem; font-weight: 700; }
.feature-list, .application-list { list-style: none; padding: 0; }
.feature-list li, .application-list li { color: var(--text-secondary); margin-bottom: .8rem; padding-right: 1.5rem; position: relative; line-height: 1.6; font-size: 1rem; }
.feature-list li::before { content: "✓"; color: var(--accent-purple); font-weight: bold; position: absolute; right: 0; font-size: 1.2rem; }
.application-list li::before { content: "🎯"; position: absolute; right: 0; font-size: 1.2rem; }

/* Children's Assessment Tests Section */
.children-tests-section { background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(236, 72, 153, 0.05) 100%); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .children-tests-section { background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(236, 72, 153, 0.1) 100%); border-color: rgba(255,255,255,.1); }
.children-tests-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 70%); }
.children-tests-section h2 { text-align: center; background: linear-gradient(135deg, #EF4444 0%, #EC4899 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; position: relative; z-index: 1; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
[data-theme="dark"] .children-tests-section h2 { background: linear-gradient(135deg, #FCA5A5 0%, #F9A8D4 50%, #C4B5FD 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.children-test-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(236, 72, 153, 0.3); border-radius: 1.5rem; padding: 2.5rem; margin-bottom: 2rem; box-shadow: 0 20px 50px rgba(236, 72, 153, 0.15); transition: all 0.3s ease; overflow: hidden; }
.children-test-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #EF4444 0%, #EC4899 50%, #8B5CF6 100%); }
.children-test-card:hover { transform: translateY(-5px); box-shadow: 0 30px 60px rgba(236, 72, 153, 0.25); border-color: rgba(236, 72, 153, 0.5); }
[data-theme="dark"] .children-test-card { border-color: rgba(236, 72, 153, 0.4); }
.children-badge { background: linear-gradient(135deg, #EF4444 0%, #EC4899 100%) !important; color: #fff; padding: .5rem 1.2rem; border-radius: 2rem; font-size: .9rem; font-weight: 600; box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3); }
.test-icon { font-size: 4.5rem; margin-left: 1.5rem; filter: drop-shadow(0 4px 12px rgba(236, 72, 153, 0.3)); transition: transform 0.3s ease; }
.children-test-card:hover .test-icon { transform: scale(1.1) rotate(5deg); }

/* Assessment Areas Grid */
.assessment-areas { margin-bottom: 2rem; }
.assessment-areas h4 { color: var(--text-primary); margin-bottom: 1.5rem; font-size: 1.2rem; font-weight: 700; }
.areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.area-item { position: relative; background: var(--bg-secondary); border: 2px solid rgba(236, 72, 153, 0.2); border-radius: 1.2rem; padding: 1.5rem; text-align: center; transition: all 0.3s ease; box-shadow: 0 8px 20px var(--shadow-sm); overflow: hidden; }
.area-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #EF4444 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.area-item:hover { transform: translateY(-6px) scale(1.05); box-shadow: 0 15px 35px rgba(236, 72, 153, 0.25); border-color: rgba(236, 72, 153, 0.5); background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%); }
.area-item:hover::before { opacity: 1; }
[data-theme="dark"] .area-item { border-color: rgba(236, 72, 153, 0.3); }
.area-icon { font-size: 2.5rem; margin-bottom: .8rem; display: block; filter: drop-shadow(0 4px 8px rgba(236, 72, 153, 0.3)); transition: transform 0.3s ease; }
.area-item:hover .area-icon { transform: scale(1.2) rotate(10deg); }
.area-item span { color: var(--text-primary); font-weight: 600; font-size: 1rem; }

.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; }
.feature-card { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 1.8rem; text-align: center; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.feature-card:hover::before { opacity: 1; }
[data-theme="dark"] .feature-card { border-color: rgba(139, 92, 246, 0.3); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.feature-card:hover .feature-icon { transform: scale(1.2) rotate(10deg); }
.feature-card h3 { color: var(--text-primary); margin-bottom: .8rem; font-size: 1.15rem; font-weight: 700; }
.feature-card p { color: var(--text-secondary); font-size: .95rem; line-height: 1.6; }

.tests-section { background: var(--bg-primary); padding: 4rem 0; border-top: 1px solid rgba(45,55,72,.06); position: relative; }
[data-theme="dark"] .tests-section { border-color: rgba(255,255,255,.1); }
.tests-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%); }
.tests-section h2 { text-align: center; background: linear-gradient(135deg, #1f3f70 0%, #3A7BD5 50%, #8B5CF6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; position: relative; z-index: 1; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
[data-theme="dark"] .tests-section h2 { background: linear-gradient(135deg, #F1F5F9 0%, #CBD5E1 50%, #94A3B8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tests-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; z-index: 1; }
.test-category { position: relative; background: var(--bg-secondary); border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1.5rem; padding: 2rem; text-align: center; box-shadow: 0 15px 35px var(--shadow-sm); transition: all 0.3s ease; overflow: hidden; }
.test-category::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%); opacity: 0; transition: opacity 0.3s ease; }
.test-category:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 25px 50px var(--shadow-md); border-color: rgba(139, 92, 246, 0.5); }
.test-category:hover::before { opacity: 1; }
[data-theme="dark"] .test-category { border-color: rgba(139, 92, 246, 0.3); }
.category-icon { font-size: 3.5rem; margin-bottom: 1.2rem; filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3)); transition: transform 0.3s ease; }
.test-category:hover .category-icon { transform: scale(1.15) rotate(10deg); }
.test-category h3 { color: var(--text-primary); margin-bottom: 1rem; font-size: 1.3rem; font-weight: 700; }
.test-category p { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.7; font-size: 1rem; }
.test-list { list-style: none; padding: 0; }
.test-list li { background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); padding: .6rem 1rem; border-radius: .8rem; color: var(--accent-purple); font-weight: 600; margin-bottom: .5rem; border: 1px solid rgba(139, 92, 246, 0.2); transition: all 0.3s ease; }
.test-list li:hover { transform: translateX(-5px); background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%); border-color: rgba(139, 92, 246, 0.4); }

.cta-section { background: linear-gradient(135deg, #3A7BD5 0%, #00D2B8 100%); padding: 3rem 0; color: #fff; }
.cta-content { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-content h2 { color: #fff; margin-bottom: 1rem; font-size: 1.8rem; }
.cta-content p { color: rgba(255,255,255,.9); margin-bottom: 1.5rem; font-size: 1.1rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .tests-grid { grid-template-columns: repeat(2, 1fr); }
  .test-details { grid-template-columns: 1fr; gap: 1.5rem; }
  .test-header { flex-direction: column; text-align: center; }
  .test-icon { margin-left: 0; margin-bottom: 1rem; }
}
@media (max-width: 560px) {
  .features-grid, .tests-grid { grid-template-columns: 1fr; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-content h2 { font-size: 1.5rem; }
  .main-test-card { padding: 1.5rem; }
  .test-icon { font-size: 3rem; }
  .test-title-section h3 { font-size: 1.2rem; }
}

/* Testimonial Slider */
.testimonial-slider { position: relative; overflow: hidden; border-radius: 1rem; }
.testimonial-track { display: flex; transition: transform 0.5s ease; }
.testimonial-slide { min-width: 100%; padding: 2rem; background: #fff; border: 1px solid rgba(58,123,213,.15); }
.testimonial-content { text-align: center; }
.testimonial-text { font-style: italic; margin-bottom: 1rem; color: #4a5568; }
.testimonial-author { font-weight: 700; color: #3A7BD5; }
.testimonial-nav { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.testimonial-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(58,123,213,.3); cursor: pointer; transition: background .3s; }
.testimonial-dot.active { background: #3A7BD5; }

/* FAQ Accordion */
.faq-item { margin-bottom: 1.2rem; border: 2px solid rgba(139, 92, 246, 0.2); border-radius: 1rem; overflow: hidden; background: var(--bg-secondary); transition: all 0.3s ease; box-shadow: 0 4px 12px var(--shadow-sm); }
.faq-item:hover { border-color: rgba(139, 92, 246, 0.4); box-shadow: 0 8px 20px var(--shadow-md); transform: translateY(-2px); }
[data-theme="dark"] .faq-item { border-color: rgba(139, 92, 246, 0.3); }
.faq-question { width: 100%; padding: 1.5rem; background: transparent; border: 0; text-align: left; font-weight: 700; color: var(--text-primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; font-size: 1.05rem; }
.faq-question:hover { background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%); color: var(--accent-purple); }
.faq-answer { padding: 0 1.5rem; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; color: var(--text-secondary); line-height: 1.7; }
.faq-answer.open { max-height: 500px; padding: 0 1.5rem 1.5rem; }
.faq-icon { transition: transform 0.3s ease; font-size: 1.2rem; color: var(--accent-purple); font-weight: 800; }
.faq-icon.open { transform: rotate(45deg); }

/* Scroll Progress */
.scroll-progress { position: fixed; top: 0; left: 0; width: 0%; height: 3px; background: linear-gradient(90deg, #3A7BD5, #00D2B8); z-index: 1000; transition: width 0.1s; }
@media (max-width: 768px) {
  .scroll-progress {
    height: 2px;
  }
}

/* Parallax */
.parallax { transform: translateZ(0); will-change: transform; }

/* Contact Enhancements */
.contact-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.vcard-download { background: #3A7BD5; color: #fff; padding: .8rem 1.2rem; border-radius: .8rem; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.calendar-booking { background: #00D2B8; color: #0b3a36; padding: .8rem 1.2rem; border-radius: .8rem; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }

/* Download Resources */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.resource-item { background: #fff; border: 1px solid rgba(58,123,213,.15); border-radius: 1rem; padding: 1.5rem; text-align: center; transition: transform .2s; }
.resource-item:hover { transform: translateY(-2px); }
.resource-icon { font-size: 2rem; margin-bottom: 1rem; }
.resource-download { background: #3A7BD5; color: #fff; padding: .6rem 1rem; border-radius: .6rem; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; }

/* Performance: Critical CSS inline styles */
.critical { display: none; }

@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================
   ENHANCED ANIMATIONS & VISUAL EFFECTS
   ============================================ */

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(1deg); }
  66% { transform: translateY(-5px) rotate(-1deg); }
}

/* Breathing Animation */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Slide In From Left */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Slide In From Right */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Fade In Up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Fade In Down */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scale In */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Rotate In */
@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-180deg) scale(0.5); }
  to { opacity: 1; transform: rotate(0deg) scale(1); }
}

/* Bounce In */
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Pulse Glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.8), 0 0 60px rgba(236, 72, 153, 0.4); }
}

/* Gradient Shift */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Wave Animation */
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}

/* Enhanced Card Animations */
.card, .tile, .assessment-card, .commitment-card, .test-category, .feature-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Floating Elements */
.hero-visual, .hero-glow, .placeholder-image {
  animation: float 6s ease-in-out infinite;
}

.hero-badge {
  animation: pulse 2s ease infinite, breathe 3s ease infinite;
}

/* Enhanced Hover Effects */
.card:hover, .tile:hover, .assessment-card:hover {
  animation: pulseGlow 2s ease infinite;
}

/* Icon Animations */
.card-icon, .assessment-icon, .commitment-icon, .feature-icon, .category-icon {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.card:hover .card-icon, 
.assessment-card:hover .assessment-icon,
.commitment-card:hover .commitment-icon,
.feature-card:hover .feature-icon,
.test-category:hover .category-icon {
  animation: bounceIn 0.6s ease, float 3s ease infinite;
  transform: scale(1.2) rotate(10deg);
}

/* Button Enhancements */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 35px rgba(58, 123, 213, 0.3);
}

.btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* Social Icons Animation */
.social {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social:hover {
  animation: bounceIn 0.5s ease, pulseGlow 2s ease infinite;
  transform: translateY(-5px) scale(1.15) rotate(5deg);
}

/* Logo Animation */
.logo .brand-mark {
  animation: gradient-shift 3s ease infinite, breathe 4s ease infinite;
}

.logo:hover .brand-mark {
  animation: rotateIn 0.6s ease, pulseGlow 2s ease infinite;
}

/* Navigation Link Animations */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::before {
  width: 80%;
}

.nav-link:hover {
  transform: translateY(-2px);
}

/* Section Header Animations */
.section-header h2 {
  animation: fadeInDown 0.8s ease-out;
}

.section-header p {
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Statistics Section Enhancements */
.stat-card {
  animation: scaleIn 0.6s ease-out backwards;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
  animation: pulseGlow 2s ease infinite;
  transform: translateY(-8px) scale(1.08) rotate(2deg);
}

.stat-icon {
  animation: float 4s ease-in-out infinite;
  transition: transform 0.4s ease;
}

.stat-card:hover .stat-icon {
  animation: bounceIn 0.6s ease, float 3s ease infinite;
  transform: scale(1.3) rotate(15deg);
}

/* Testimonial Enhancements */
.testimonial-slide {
  animation: fadeInUp 0.8s ease-out;
}

.testimonial-dot {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.testimonial-dot:hover {
  transform: scale(1.5);
  animation: pulseGlow 1s ease infinite;
}

/* Process Step Animations */
.step-number {
  animation: scaleIn 0.6s ease-out backwards;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.process-step:nth-child(1) .step-number { animation-delay: 0.1s; }
.process-step:nth-child(2) .step-number { animation-delay: 0.2s; }
.process-step:nth-child(3) .step-number { animation-delay: 0.3s; }
.process-step:nth-child(4) .step-number { animation-delay: 0.4s; }

.process-step:hover .step-number {
  animation: rotateIn 0.6s ease, pulseGlow 2s ease infinite;
}

/* Hero Section Enhancements */
.hero-title {
  animation: fadeInUp 0.8s ease-out;
  background-size: 200% auto;
  animation: fadeInUp 0.8s ease-out, gradientShift 3s ease infinite;
}

.hero-description {
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-cta {
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-cta .btn {
  animation: scaleIn 0.6s ease-out backwards;
}

.hero-cta .btn:nth-child(1) { animation-delay: 0.5s; }
.hero-cta .btn:nth-child(2) { animation-delay: 0.6s; }

/* Footer Animations */
.site-footer {
  animation: fadeInUp 0.8s ease-out;
}

.socials {
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

/* Form Input Animations */
.input, .textarea, .select {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.input:focus, .textarea:focus, .select:focus {
  animation: pulseGlow 2s ease infinite;
  transform: translateY(-3px) scale(1.02);
}

/* Partner Logo Animations */
.partner-logo {
  animation: fadeInUp 0.6s ease-out backwards;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.partner-logo:nth-child(1) { animation-delay: 0.1s; }
.partner-logo:nth-child(2) { animation-delay: 0.2s; }
.partner-logo:nth-child(3) { animation-delay: 0.3s; }
.partner-logo:nth-child(4) { animation-delay: 0.4s; }
.partner-logo:nth-child(5) { animation-delay: 0.5s; }

.partner-logo:hover {
  animation: bounceIn 0.6s ease, float 3s ease infinite;
  transform: translateY(-8px) scale(1.1) rotate(5deg);
}

/* Trust Badge Animations */
.trust-badge {
  animation: fadeInUp 0.6s ease-out backwards;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.trust-badge:nth-child(1) { animation-delay: 0.1s; }
.trust-badge:nth-child(2) { animation-delay: 0.2s; }
.trust-badge:nth-child(3) { animation-delay: 0.3s; }

.trust-badge:hover {
  animation: pulseGlow 2s ease infinite;
  transform: translateY(-4px) scale(1.05);
}

/* Back to Top Button Enhancement */
#backToTop {
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#backToTop:hover {
  animation: bounceIn 0.6s ease, pulseGlow 2s ease infinite;
  transform: translateY(-5px) scale(1.1) rotate(360deg);
}

/* Spinner Enhancement */
.spinner-dot {
  animation: bounce 0.6s infinite alternate, pulseGlow 2s ease infinite;
}

/* FAQ Item Animations */
.faq-item {
  animation: fadeInUp 0.5s ease-out backwards;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }

.faq-item:hover {
  transform: translateX(5px);
}

.faq-icon {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.faq-icon.open {
  animation: rotateIn 0.4s ease;
}

/* Area Item Animations */
.area-item {
  animation: scaleIn 0.5s ease-out backwards;
}

.area-item:nth-child(1) { animation-delay: 0.1s; }
.area-item:nth-child(2) { animation-delay: 0.2s; }
.area-item:nth-child(3) { animation-delay: 0.3s; }
.area-item:nth-child(4) { animation-delay: 0.4s; }

.area-item:hover .area-icon {
  animation: bounceIn 0.6s ease, wave 2s ease infinite;
}

/* Test List Item Animations */
.test-list li {
  animation: slideInRight 0.5s ease-out backwards;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.test-list li:nth-child(1) { animation-delay: 0.1s; }
.test-list li:nth-child(2) { animation-delay: 0.2s; }
.test-list li:nth-child(3) { animation-delay: 0.3s; }
.test-list li:nth-child(4) { animation-delay: 0.4s; }

.test-list li:hover {
  transform: translateX(-8px) scale(1.05);
  animation: pulseGlow 1.5s ease infinite;
}

/* Header Sticky Animation */
.site-header {
  transition: all 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: saturate(1.5) blur(20px);
}

/* Parallax Effect Classes */
.parallax-slow {
  transition: transform 0.3s ease-out;
}

.parallax-medium {
  transition: transform 0.2s ease-out;
}

.parallax-fast {
  transition: transform 0.1s ease-out;
}

/* Shimmer Effect for Loading */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Gradient Text Animation */
.gradient-text {
  background: linear-gradient(135deg, #3A7BD5 0%, #8B5CF6 50%, #EC4899 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease infinite;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Magnetic Effect (for buttons) */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Enhanced Glow Effects */
.glow-blue {
  box-shadow: 0 0 20px rgba(58, 123, 213, 0.5);
  animation: pulseGlow 2s ease infinite;
}

.glow-purple {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
  animation: pulseGlow 2s ease infinite;
}

.glow-pink {
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
  animation: pulseGlow 2s ease infinite;
}

/* Loading Skeleton Animation */
@keyframes skeleton {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  background-size: 200px 100%;
  animation: skeleton 1.5s infinite;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Base Mobile Typography - Better Readability */
@media (max-width: 768px) {
  html {
    font-size: 16px; /* Prevent zoom on iOS */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  
  body {
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Improved Container for Mobile */
  .container {
    width: 94%;
    padding-left: 3%;
    padding-right: 3%;
    margin-inline: auto;
  }
  
  /* Better Hero Section for Mobile */
  .hero {
    padding: 2.5rem 0 3rem;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem) !important;
    line-height: 1.3;
    margin-bottom: 1rem;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.15rem);
    line-height: 1.5;
  }
  
  .hero-description {
    font-size: clamp(0.95rem, 3.5vw, 1.05rem);
    line-height: 1.8;
  }
  
  .hero-usp {
    font-size: clamp(0.9rem, 3vw, 1rem);
    padding: 1rem;
    line-height: 1.7;
  }
  
  /* Mobile-Friendly Buttons */
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 48px; /* Touch target size */
    min-width: 48px;
    border-radius: 1rem;
    -webkit-tap-highlight-color: rgba(58, 123, 213, 0.2);
    touch-action: manipulation;
  }
  
  .btn-hero {
    padding: 1.1rem 1.8rem;
    font-size: 1.05rem;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.75rem;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Improved Header for Mobile */
  .header-inner {
    padding: 0.75rem 0;
    gap: 0.75rem;
  }
  
  .logo {
    font-size: 0.95rem;
  }
  
  .brand-text {
    font-size: clamp(0.9rem, 3.5vw, 1.05rem);
  }
  
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 101;
  }
  
  .nav-toggle .bar {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
  }
  
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  /* Enhanced Mobile Navigation Menu */
  .nav-list {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height */
    background: var(--bg-secondary);
    border: none;
    border-inline-end: 1px solid rgba(45, 55, 72, 0.1);
    border-radius: 0;
    padding: 5rem 1.5rem 2rem;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateX(calc(100% * var(--nav-direction, 1)));
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 100;
    overscroll-behavior: contain;
  }
  
  html[dir="rtl"] .nav-list {
    --nav-direction: -1;
  }
  
  html[dir="ltr"] .nav-list {
    --nav-direction: 1;
  }
  
  .nav-list.open {
    transform: translateX(0);
  }
  
  .nav-link {
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    min-height: 52px;
    border-radius: 1rem;
    width: 100%;
    justify-content: flex-start;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.15);
    touch-action: manipulation;
    transition: all 0.3s ease;
  }
  
  .nav-link:active {
    transform: scale(0.98);
    background: rgba(139, 92, 246, 0.1);
  }
  
  /* Mobile Menu Overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
    -webkit-tap-highlight-color: transparent;
  }
  
  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Improved Section Spacing for Mobile */
  .section {
    padding: 2.5rem 0;
  }
  
  .section-header {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
  }
  
  .section-header h2 {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  .section-header p {
    font-size: clamp(0.9rem, 3vw, 1rem);
    line-height: 1.7;
  }
  
  /* Better Cards for Mobile */
  .card, .tile {
    padding: 1.5rem;
    border-radius: 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  .card-title {
    font-size: clamp(1.05rem, 4vw, 1.15rem);
    line-height: 1.4;
  }
  
  .card-text {
    font-size: clamp(0.9rem, 3vw, 1rem);
    line-height: 1.7;
  }
  
  /* Improved Forms for Mobile */
  .form {
    gap: 1.5rem;
  }
  
  .input, .textarea, .select {
    padding: 1.1rem 1.3rem;
    font-size: 1rem;
    min-height: 52px;
    border-radius: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.1);
  }
  
  .textarea {
    min-height: 140px;
    line-height: 1.7;
  }
  
  /* Better Footer for Mobile */
  .footer-inner {
    gap: 2rem;
    padding: 2rem 0;
  }
  
  .footer-brand p {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    line-height: 1.7;
  }
  
  .social {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.2rem;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
  }
  
  /* Back to Top Button - Mobile */
  #backToTop {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    inset-inline-end: 16px;
    bottom: 20px;
    font-size: 1.3rem;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Better Grid Layouts for Mobile */
  .grid-2, .grid-3, .grid-4 {
    gap: 1.25rem;
  }
  
  /* Statistics Cards - Mobile */
  .stat-card {
    padding: 1.5rem 1rem;
  }
  
  .stat-number {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }
  
  .stat-label {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
  }
  
  /* Partners Grid - Mobile */
  .partners-grid {
    gap: 1rem;
  }
  
  .partner-logo {
    height: 70px;
    font-size: 0.85rem;
  }
  
  /* Hero Visual - Mobile */
  .hero-visual {
    margin-top: 2rem;
  }
  
  .placeholder-image {
    border-radius: 1rem;
    font-size: clamp(0.9rem, 3vw, 1rem);
  }
  
  /* Touch-Friendly Interactions */
  * {
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.1);
  }
  
  button, a, input, select, textarea {
    touch-action: manipulation;
  }
  
  /* Prevent Text Selection on Buttons */
  .btn, .nav-link, .nav-toggle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Better Scroll Behavior */
  html {
    scroll-padding-top: 80px;
  }
  
  /* Safe Area Insets for Notched Devices */
  .site-header {
    padding-top: env(safe-area-inset-top);
  }
  
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Extra Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
  .container {
    width: 96%;
    padding-left: 2%;
    padding-right: 2%;
  }
  
  .hero {
    padding: 2rem 0 2.5rem;
  }
  
  .hero-title {
    font-size: clamp(1.5rem, 7vw, 2rem) !important;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .card, .tile {
    padding: 1.25rem;
  }
  
  .btn {
    padding: 0.95rem 1.3rem;
    font-size: 0.95rem;
  }
  
  .nav-list {
    width: 90%;
    max-width: 280px;
  }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 2rem 0 2.5rem;
  }
  
  .nav-list {
    max-height: 90vh;
    max-height: 90dvh;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* RTL/LTR Specific Mobile Improvements */
@media (max-width: 768px) {
  html[dir="rtl"] body {
    text-align: right;
  }
  
  html[dir="ltr"] body {
    text-align: left;
  }
  
  /* Better spacing for RTL */
  html[dir="rtl"] .hero-cta {
    align-items: flex-end;
  }
  
  html[dir="ltr"] .hero-cta {
    align-items: flex-start;
  }
  
  /* Font size adjustments for Persian text */
  html[dir="rtl"] body.fa {
    font-size: 1rem;
    letter-spacing: 0;
  }
  
  /* Font size adjustments for English text */
  html[dir="ltr"] body.en {
    font-size: 1rem;
    letter-spacing: 0.01em;
  }
}

/* Tablet Improvements (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    width: 90%;
  }
  
  .hero-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo .brand-mark {
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.25);
  }
  
  .btn {
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.1);
  }
}

/* Dark Mode Mobile Improvements */
@media (max-width: 768px) {
  [data-theme="dark"] .nav-list {
    background: var(--bg-secondary);
    border-inline-end-color: rgba(255, 255, 255, 0.1);
  }
  
  [data-theme="dark"] .nav-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
  
  [data-theme="dark"] .nav-toggle {
    background: var(--bg-secondary);
    border-color: rgba(139, 92, 246, 0.3);
  }
}

/* Print Styles - Mobile Friendly */
@media print {
  @page {
    margin: 1cm;
  }
  
  .site-header,
  .nav-toggle,
  .nav-list,
  .site-footer,
  #backToTop {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.6;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
  }
}

/* Additional Mobile Utilities */
@media (max-width: 768px) {
  /* Better Text Wrapping for Long Words */
  body {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Improve Table Display on Mobile */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Better Code Blocks on Mobile */
  pre, code {
    font-size: 0.875rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Improve Video Embeds */
  iframe, video, embed {
    max-width: 100%;
    height: auto;
  }
  
  /* Better List Spacing */
  ul, ol {
    padding-inline-start: 1.5rem;
  }
  
  li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
  }
  
  /* Improve Heading Spacing */
  h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }
  
  /* Better Paragraph Spacing */
  p {
    margin-bottom: 1rem;
  }
  
  /* Improve Blockquote */
  blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    border-inline-start: 4px solid var(--accent-purple);
  }
  
  /* Mobile-Specific Animations */
  @keyframes slideInFromRight {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  html[dir="rtl"] .nav-list.open {
    animation: slideInFromRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  html[dir="ltr"] .nav-list.open {
    animation: slideInFromLeft 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  
  /* Improve Focus States for Touch */
  *:focus-visible {
    outline: 3px solid rgba(139, 92, 246, 0.5);
    outline-offset: 2px;
    border-radius: 0.25rem;
  }
  
  /* Better Loading States */
  .loading {
    pointer-events: none;
    opacity: 0.6;
  }
  
  /* Improve Accessibility on Mobile */
  [aria-hidden="true"] {
    display: none !important;
  }
  
  /* Better Spacing for Stats */
  .stats-grid {
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1.25rem 1rem;
  }
  
  /* Improve Testimonial Slider on Mobile */
  .testimonial-slider {
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Better Accordion on Mobile */
  .faq-item {
    margin-bottom: 1rem;
  }
  
  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    min-height: 52px;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.15);
  }
  
  .faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
  }
  
  /* Improve Timeline on Mobile */
  .timeline {
    padding: 1.5rem 0;
  }
  
  .timeline-item {
    padding-left: 3.5rem;
    margin-bottom: 2rem;
  }
  
  .timeline::before {
    left: 1.5rem;
  }
  
  .timeline-item::before {
    left: 0.75rem;
  }
  
  /* Better Contact Actions on Mobile */
  .contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
  
  .contact-actions a {
    width: 100%;
    padding: 1rem;
    text-align: center;
    min-height: 52px;
  }
}

/* ============================================
   ADVANCED MOBILE ENHANCEMENTS & GESTURES
   ============================================ */

/* Improved Viewport and Base Settings */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px; /* Base font size to prevent iOS zoom */
}

/* Enhanced Mobile Typography - Persian & English */
@media (max-width: 768px) {
  /* Persian (RTL) Typography */
  html[dir="rtl"] body.fa {
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0;
    word-spacing: 0.1em;
    text-align: right;
  }
  
  /* English (LTR) Typography */
  html[dir="ltr"] body.en {
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    text-align: left;
  }
  
  /* Prevent unwanted zoom on input focus (iOS) */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
  }
  
  /* Enhanced Container with Better Padding */
  .container {
    width: 94%;
    padding-left: 3%;
    padding-right: 3%;
    margin-inline: auto;
    max-width: 100%;
  }
  
  /* Improved Hero Section */
  .hero {
    padding: 2.5rem 0 3rem;
    min-height: auto;
  }
  
  .hero-inner {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  
  .hero-content {
    order: 2;
  }
  
  .hero-visual {
    order: 1;
    margin-bottom: 1.5rem;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    line-height: 1.25;
    margin-bottom: 1rem;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
  }
  
  html[dir="rtl"] .hero-title {
    text-align: right;
  }
  
  html[dir="ltr"] .hero-title {
    text-align: left;
  }
  
  .hero-description {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    line-height: 1.8;
    margin-bottom: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4.5vw, 1.2rem);
    line-height: 1.5;
  }
  
  .hero-usp {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    padding: 1.2rem;
    line-height: 1.75;
    border-radius: 1rem;
  }
  
  /* Enhanced Buttons for Touch */
  .btn {
    padding: 1.1rem 1.8rem;
    font-size: 1.05rem;
    min-height: 52px;
    min-width: 52px;
    border-radius: 1rem;
    -webkit-tap-highlight-color: rgba(58, 123, 213, 0.25);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
  }
  
  .btn:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
  }
  
  .btn-hero {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.75rem;
    padding: 1.2rem 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1.5rem;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Enhanced Header */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(1.5) blur(20px);
    -webkit-backdrop-filter: saturate(1.5) blur(20px);
    background: rgba(248, 249, 250, 0.98);
    border-bottom: 1px solid rgba(45, 55, 72, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  }
  
  [data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .header-inner {
    padding: 0.85rem 0;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }
  
  .logo {
    font-size: 0.95rem;
    flex-shrink: 0;
  }
  
  .brand-text {
    font-size: clamp(0.9rem, 3.5vw, 1.05rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Enhanced Mobile Navigation Toggle */
  .nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    border-radius: 0.875rem;
    background: var(--bg-secondary);
    border: 1.5px solid rgba(139, 92, 246, 0.25);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 1001;
    position: relative;
    transition: all 0.3s ease;
  }
  
  .nav-toggle:active {
    transform: scale(0.95);
    background: rgba(139, 92, 246, 0.1);
  }
  
  .nav-toggle .bar {
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
  }
  
  .nav-toggle[aria-expanded="true"] {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
  }
  
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-15px);
  }
  
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Enhanced Mobile Menu with Swipe Gesture Support */
  .nav-list {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    border: none;
    border-inline-end: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 0;
    padding: 5.5rem 1.5rem 2rem;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateX(calc(100% * var(--nav-direction, 1)));
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
    overscroll-behavior: contain;
    will-change: transform;
  }
  
  html[dir="rtl"] .nav-list {
    --nav-direction: -1;
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.2);
  }
  
  html[dir="ltr"] .nav-list {
    --nav-direction: 1;
  }
  
  .nav-list.open {
    transform: translateX(0);
  }
  
  .nav-link {
    padding: 1.1rem 1.5rem;
    font-size: 1.05rem;
    min-height: 56px;
    border-radius: 1rem;
    width: 100%;
    justify-content: flex-start;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
    touch-action: manipulation;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .nav-link:active {
    transform: scale(0.98);
  }
  
  .nav-link:active::before {
    opacity: 1;
  }
  
  .nav-link.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.3);
    font-weight: 700;
  }
  
  /* Enhanced Mobile Menu Overlay with Tap to Close */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Improved Sections */
  .section {
    padding: 2.5rem 0;
  }
  
  .section-header {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
  }
  
  .section-header h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  html[dir="rtl"] .section-header h2 {
    text-align: right;
  }
  
  html[dir="ltr"] .section-header h2 {
    text-align: left;
  }
  
  .section-header p {
    font-size: clamp(0.95rem, 3.5vw, 1.05rem);
    line-height: 1.75;
  }
  
  /* Enhanced Cards and Tiles */
  .card, .tile {
    padding: 1.5rem;
    border-radius: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
  }
  
  .card:active, .tile:active {
    transform: scale(0.98);
  }
  
  .card-title {
    font-size: clamp(1.1rem, 4.5vw, 1.2rem);
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }
  
  .card-text {
    font-size: clamp(0.95rem, 3.5vw, 1.05rem);
    line-height: 1.75;
  }
  
  /* Enhanced Grid Layouts */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  /* Enhanced Forms */
  .form {
    gap: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .input, .textarea, .select {
    padding: 1.2rem 1.5rem;
    font-size: 16px !important; /* Prevent iOS zoom */
    min-height: 56px;
    border-radius: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.1);
    width: 100%;
    box-sizing: border-box;
  }
  
  .textarea {
    min-height: 160px;
    line-height: 1.75;
    resize: vertical;
  }
  
  /* Enhanced Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
    text-align: center;
  }
  
  html[dir="rtl"] .footer-inner {
    text-align: right;
  }
  
  html[dir="ltr"] .footer-inner {
    text-align: left;
  }
  
  .footer-brand {
    margin-bottom: 1.5rem;
  }
  
  .footer-brand p {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    line-height: 1.75;
    margin-top: 0.75rem;
  }
  
  .footer-contact {
    text-align: center;
  }
  
  html[dir="rtl"] .footer-contact {
    text-align: right;
  }
  
  html[dir="ltr"] .footer-contact {
    text-align: left;
  }
  
  .socials {
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
  }
  
  html[dir="rtl"] .socials {
    justify-content: flex-end;
  }
  
  html[dir="ltr"] .socials {
    justify-content: flex-start;
  }
  
  .social {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    font-size: 1.3rem;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.25);
    touch-action: manipulation;
  }
  
  .social:active {
    transform: scale(0.95);
  }
  
  /* Enhanced Back to Top Button */
  #backToTop {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    inset-inline-end: 20px;
    bottom: 24px;
    font-size: 1.4rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  }
  
  #backToTop:active {
    transform: scale(0.95) translateY(0);
  }
  
  /* Partners Grid - Mobile */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .partner-logo {
    height: 75px;
    font-size: 0.85rem;
    border-radius: 0.875rem;
  }
  
  /* Hero Visual - Mobile */
  .hero-visual {
    margin-top: 0;
    margin-bottom: 2rem;
  }
  
  .placeholder-image {
    border-radius: 1rem;
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    padding: 2rem;
  }
  
  /* Statistics Cards */
  .stat-card {
    padding: 1.5rem 1rem;
    text-align: center;
  }
  
  .stat-number {
    font-size: clamp(2.25rem, 9vw, 3rem);
  }
  
  .stat-label {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    line-height: 1.6;
  }
  
  /* Counter */
  .counter {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }
  
  .counter-label {
    font-size: clamp(0.9rem, 3.5vw, 1rem);
    line-height: 1.6;
  }
  
  /* Timeline - Mobile */
  .timeline {
    padding: 1.5rem 0;
  }
  
  html[dir="rtl"] .timeline::before {
    right: 1.5rem;
    left: auto;
  }
  
  html[dir="ltr"] .timeline::before {
    left: 1.5rem;
    right: auto;
  }
  
  .timeline-item {
    padding-inline-start: 4rem;
    margin-bottom: 2rem;
  }
  
  html[dir="rtl"] .timeline-item::before {
    right: 0.75rem;
    left: auto;
  }
  
  html[dir="ltr"] .timeline-item::before {
    left: 0.75rem;
    right: auto;
  }
  
  .timeline-content {
    padding: 1.5rem;
    border-radius: 1.25rem;
  }
  
  /* Flip Cards - Mobile */
  .flip-card {
    height: 280px;
    margin-bottom: 1.5rem;
  }
  
  .flip-card-front,
  .flip-card-back {
    padding: 1.5rem;
    border-radius: 1.25rem;
  }
  
  /* Touch-Friendly Interactions */
  * {
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.15);
  }
  
  button, a, input, select, textarea {
    touch-action: manipulation;
  }
  
  /* Prevent Text Selection on Interactive Elements */
  .btn, .nav-link, .nav-toggle, .social {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Better Scroll Behavior */
  html {
    scroll-padding-top: 90px;
  }
  
  body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  
  /* Safe Area Insets for Notched Devices */
  .site-header {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  .site-footer {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  /* Improved Text Wrapping */
  body {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  html[dir="rtl"] body {
    text-align: right;
  }
  
  html[dir="ltr"] body {
    text-align: left;
  }
  
  /* Better Focus States for Touch */
  *:focus-visible {
    outline: 3px solid rgba(139, 92, 246, 0.5);
    outline-offset: 3px;
    border-radius: 0.5rem;
  }
  
  /* Improved Table Display */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9rem;
  }
  
  /* Better Code Blocks */
  pre, code {
    font-size: 0.875rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Improve Video Embeds */
  iframe, video, embed {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
  }
  
  /* Better List Spacing */
  ul, ol {
    padding-inline-start: 1.75rem;
    margin-bottom: 1rem;
  }
  
  li {
    margin-bottom: 0.75rem;
    line-height: 1.75;
  }
  
  /* Improve Heading Spacing */
  h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }
  
  /* Better Paragraph Spacing */
  p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
  }
  
  /* Improve Blockquote */
  blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.75;
    border-inline-start: 4px solid var(--accent-purple);
    border-radius: 0.5rem;
    background: rgba(139, 92, 246, 0.05);
  }
  
  /* FAQ Accordion - Mobile */
  .faq-item {
    margin-bottom: 1rem;
  }
  
  .faq-question {
    padding: 1.2rem 1.5rem;
    font-size: 1.05rem;
    min-height: 56px;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
    touch-action: manipulation;
    border-radius: 1rem;
  }
  
  .faq-question:active {
    transform: scale(0.98);
  }
  
  .faq-answer {
    padding: 0 1.5rem 1.2rem;
    font-size: 0.95rem;
    line-height: 1.75;
  }
  
  /* Contact Actions - Mobile */
  .contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
  
  .contact-actions a {
    width: 100%;
    padding: 1.2rem;
    text-align: center;
    min-height: 56px;
    border-radius: 1rem;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
    touch-action: manipulation;
  }
  
  .contact-actions a:active {
    transform: scale(0.98);
  }
}

/* Extra Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
  .container {
    width: 96%;
    padding-left: 2%;
    padding-right: 2%;
  }
  
  .hero {
    padding: 2rem 0 2.5rem;
  }
  
  .hero-title {
    font-size: clamp(1.5rem, 8vw, 2.25rem) !important;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .card, .tile {
    padding: 1.25rem;
  }
  
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  .nav-list {
    width: 90%;
    max-width: 280px;
  }
  
  .brand-text {
    font-size: clamp(0.85rem, 4vw, 1rem);
  }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 2rem 0 2.5rem;
  }
  
  .nav-list {
    max-height: 90vh;
    max-height: 90dvh;
    padding-top: 4rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem) !important;
  }
}

/* Tablet Improvements (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    width: 92%;
  }
  
  .hero-title {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo .brand-mark {
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.25);
  }
  
  .btn {
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.1);
  }
  
  /* Sharper text on high DPI */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Dark Mode Mobile Improvements */
@media (max-width: 768px) {
  [data-theme="dark"] .nav-list {
    background: var(--bg-secondary);
    border-inline-end-color: rgba(255, 255, 255, 0.15);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
  }
  
  html[dir="rtl"][data-theme="dark"] .nav-list {
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.4);
  }
  
  [data-theme="dark"] .nav-overlay {
    background: rgba(0, 0, 0, 0.75);
  }
  
  [data-theme="dark"] .nav-toggle {
    background: var(--bg-secondary);
    border-color: rgba(139, 92, 246, 0.35);
  }
  
  [data-theme="dark"] .nav-toggle .bar {
    background: var(--text-primary);
  }
}

/* ============================================
   COMPREHENSIVE MOBILE ENHANCEMENTS & FIXES
   ============================================ */

/* Base Mobile Settings - Proper Font Sizing */
@media (max-width: 768px) {
  /* Ensure base font size prevents unwanted zoom */
  html {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
  
  /* Persian (RTL) - Optimized Typography */
  html[dir="rtl"] body.fa {
    font-size: 16px;
    line-height: 1.85;
    letter-spacing: 0;
    word-spacing: 0.12em;
    text-align: right;
  }
  
  /* English (LTR) - Optimized Typography */
  html[dir="ltr"] body.en {
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.015em;
    text-align: left;
  }
  
  /* Prevent iOS zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }
  
  /* Enhanced Container - Better Spacing */
  .container {
    width: 92% !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
    margin-inline: auto;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Improved Grid Layouts */
  .grid-2 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  
  .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  
  .card-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  
  /* Hero Section - Mobile Optimized */
  .hero {
    padding: 2rem 0 2.5rem !important;
    min-height: auto;
  }
  
  .hero-inner {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .hero-title {
    font-size: clamp(1.65rem, 7.5vw, 2.4rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 0.875rem !important;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
  }
  
  html[dir="rtl"] .hero-title {
    text-align: right;
  }
  
  html[dir="ltr"] .hero-title {
    text-align: left;
  }
  
  .hero-description {
    font-size: clamp(0.95rem, 4.2vw, 1.08rem) !important;
    line-height: 1.85 !important;
    margin-bottom: 1.25rem !important;
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4.8vw, 1.18rem) !important;
    line-height: 1.5 !important;
  }
  
  .hero-usp {
    font-size: clamp(0.9rem, 3.8vw, 1rem) !important;
    padding: 1.15rem !important;
    line-height: 1.8 !important;
    border-radius: 1rem !important;
  }
  
  /* Enhanced Buttons - Touch Friendly */
  .btn {
    padding: 1.15rem 1.9rem !important;
    font-size: 1.05rem !important;
    min-height: 54px !important;
    min-width: 54px !important;
    border-radius: 1rem !important;
    -webkit-tap-highlight-color: rgba(58, 123, 213, 0.3) !important;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
  }
  
  .btn:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease !important;
  }
  
  .btn-hero {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0.8rem !important;
    padding: 1.25rem 2rem !important;
  }
  
  .hero-cta {
    flex-direction: column !important;
    gap: 0.8rem !important;
    width: 100% !important;
    margin-top: 1.5rem !important;
  }
  
  .hero-cta .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  
  /* Enhanced Header - Mobile */
  .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    backdrop-filter: saturate(1.6) blur(24px) !important;
    -webkit-backdrop-filter: saturate(1.6) blur(24px) !important;
    background: rgba(248, 249, 250, 0.98) !important;
    border-bottom: 1px solid rgba(45, 55, 72, 0.12) !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06) !important;
  }
  
  [data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, 0.98) !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
  }
  
  .header-inner {
    padding: 0.9rem 0 !important;
    gap: 0.6rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .logo {
    font-size: 0.95rem !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 180px) !important;
  }
  
  .brand-text {
    font-size: clamp(0.85rem, 3.5vw, 1rem) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Header buttons on mobile - prevent overflow */
  .header-inner .btn-ghost,
  .header-inner .btn-accent {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.8rem !important;
    padding: 0.5rem 0.7rem !important;
    min-width: auto !important;
  }
  
  .theme-toggle {
    min-width: 44px !important;
    width: 44px !important;
    padding: 0.5rem !important;
    flex-shrink: 0 !important;
  }
  
  #lang-switch {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.6rem !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
  }
  
  .btn-accent {
    font-size: 0.8rem !important;
    padding: 0.55rem 0.9rem !important;
    flex-shrink: 0 !important;
  }
  
  /* Enhanced Navigation Toggle */
  .nav-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    padding: 0.6rem !important;
    border-radius: 0.9rem !important;
    background: var(--bg-secondary) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.3) !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    z-index: 1001 !important;
    position: relative !important;
    transition: all 0.3s ease !important;
  }
  
  .nav-toggle:active {
    transform: scale(0.94) !important;
    background: rgba(139, 92, 246, 0.12) !important;
  }
  
  .nav-toggle .bar {
    width: 22px !important;
    height: 3px !important;
    border-radius: 2px !important;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  }
  
  /* Enhanced Mobile Menu */
  .nav-list {
    position: fixed !important;
    top: 0 !important;
    inset-inline-start: 0 !important;
    width: 88% !important;
    max-width: 340px !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: var(--bg-secondary) !important;
    border: none !important;
    border-inline-end: 1px solid rgba(45, 55, 72, 0.12) !important;
    border-radius: 0 !important;
    padding: 5.5rem 1.75rem 2.5rem !important;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    transform: translateX(calc(100% * var(--nav-direction, 1))) !important;
    transition: transform 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 1000 !important;
    overscroll-behavior: contain !important;
  }
  
  html[dir="rtl"] .nav-list {
    --nav-direction: -1;
  }
  
  html[dir="ltr"] .nav-list {
    --nav-direction: 1;
  }
  
  .nav-list.open {
    transform: translateX(0) !important;
  }
  
  .nav-link {
    padding: 1.1rem 1.4rem !important;
    font-size: 1.08rem !important;
    min-height: 56px !important;
    border-radius: 1.1rem !important;
    width: 100% !important;
    justify-content: flex-start !important;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.18) !important;
    touch-action: manipulation !important;
    transition: all 0.3s ease !important;
  }
  
  .nav-link:active {
    transform: scale(0.97) !important;
    background: rgba(139, 92, 246, 0.12) !important;
  }
  
  /* Mobile Menu Overlay */
  .nav-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.35s ease, visibility 0.35s ease !important;
    z-index: 999 !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
  .nav-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Improved Sections */
  .section {
    padding: 2.5rem 0 !important;
  }
  
  .section-header {
    margin-bottom: 2.25rem !important;
    padding: 0 0.5rem !important;
  }
  
  .section-header h2 {
    font-size: clamp(1.45rem, 5.5vw, 2rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 0.8rem !important;
  }
  
  .section-header p {
    font-size: clamp(0.9rem, 3.2vw, 1.02rem) !important;
    line-height: 1.75 !important;
  }
  
  /* Better Cards & Tiles */
  .card, .tile {
    padding: 1.6rem !important;
    border-radius: 1.3rem !important;
    margin-bottom: 1.3rem !important;
  }
  
  .card-title {
    font-size: clamp(1.08rem, 4.2vw, 1.18rem) !important;
    line-height: 1.45 !important;
  }
  
  .card-text {
    font-size: clamp(0.92rem, 3.2vw, 1.02rem) !important;
    line-height: 1.75 !important;
  }
  
  /* Ensure logo is always visible on mobile - HIGHEST PRIORITY */
  a.logo,
  .logo,
  .logo .brand-mark,
  .logo .brand-text,
  .logo span.brand-mark,
  .logo span.brand-text,
  span.brand-mark {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
  }
  
  a.logo,
  .logo {
    flex-shrink: 0 !important;
    min-width: auto !important;
    max-width: none !important;
    width: auto !important;
  }
  
  .logo .brand-mark,
  .logo span.brand-mark,
  span.brand-mark {
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .logo .brand-text,
  .logo span.brand-text {
    display: inline-block !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: clamp(0.95rem, 3.5vw, 1.2rem) !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Enhanced Forms */
  .form {
    gap: 1.6rem !important;
  }
  
  .input, .textarea, .select {
    padding: 1.15rem 1.4rem !important;
    font-size: 16px !important;
    min-height: 54px !important;
    border-radius: 1.1rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.12) !important;
  }
  
  .textarea {
    min-height: 150px !important;
    line-height: 1.8 !important;
  }
  
  /* Better Footer */
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 2.25rem !important;
    padding: 2.25rem 0 !important;
  }
  
  .footer-brand p {
    font-size: clamp(0.86rem, 3.2vw, 0.96rem) !important;
    line-height: 1.8 !important;
  }
  
  .social {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    font-size: 1.25rem !important;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.25) !important;
  }
  
  /* Back to Top Button */
  #backToTop {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    inset-inline-end: 18px !important;
    bottom: 24px !important;
    font-size: 1.4rem !important;
    border-radius: 50% !important;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.25) !important;
  }
  
  /* Partners Grid */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
  
  .partner-logo {
    height: 70px !important;
    font-size: 0.9rem !important;
  }
  
  /* Statistics Cards */
  .counter {
    font-size: clamp(2rem, 8vw, 2.75rem) !important;
  }
  
  .counter-label {
    font-size: clamp(0.9rem, 3.5vw, 1.05rem) !important;
  }
  
  /* Timeline */
  .timeline-item {
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Flip Cards */
  .flip-card {
    min-height: 280px !important;
  }
  
  /* FAQ Accordion */
  .faq-question {
    padding: 1.2rem 1.4rem !important;
    font-size: 1.05rem !important;
    min-height: 56px !important;
  }
  
  .faq-answer {
    padding: 0 1.4rem 1.2rem !important;
    font-size: 0.98rem !important;
    line-height: 1.75 !important;
  }
  
  /* Contact Actions */
  .contact-actions {
    flex-direction: column !important;
    gap: 0.9rem !important;
  }
  
  .contact-actions a {
    width: 100% !important;
    padding: 1.2rem !important;
    min-height: 56px !important;
    font-size: 1.05rem !important;
  }
}

/* Extra Small Devices (320px - 480px) */
@media (max-width: 480px) {
  .container {
    width: 94% !important;
    padding-left: 3% !important;
    padding-right: 3% !important;
  }
  
  .hero-title {
    font-size: clamp(1.5rem, 8vw, 2.2rem) !important;
  }
  
  .section-header h2 {
    font-size: clamp(1.3rem, 6vw, 1.85rem) !important;
  }
  
  .btn {
    padding: 1.1rem 1.6rem !important;
    font-size: 1rem !important;
  }
  
  .card, .tile {
    padding: 1.4rem !important;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 1.5rem 0 2rem !important;
  }
  
  .hero-title {
    font-size: clamp(1.6rem, 6vw, 2rem) !important;
  }
  
  .section {
    padding: 2rem 0 !important;
  }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    width: 90% !important;
  }
  
  .hero-title {
    font-size: clamp(2rem, 4.8vw, 2.8rem) !important;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.75rem !important;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.75rem !important;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Desktop - Persian/English Mode Optimization */
@media (min-width: 1025px) {
  html[dir="rtl"] body.fa {
    font-size: 17px;
    line-height: 1.8;
  }
  
  html[dir="ltr"] body.en {
    font-size: 16px;
    line-height: 1.7;
  }
  
  .container {
    width: min(1120px, 92%);
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Ensure header doesn't overflow on desktop */
  .header-inner {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .nav-list {
    max-width: calc(100vw - 600px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
  }
  
  .logo .brand-mark {
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.28) !important;
  }
}

/* Dark Mode Mobile Enhancements */
@media (max-width: 768px) {
  [data-theme="dark"] .nav-list {
    background: var(--bg-secondary) !important;
    border-inline-end-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.5) !important;
  }
  
  html[dir="rtl"][data-theme="dark"] .nav-list {
    box-shadow: -4px 0 40px rgba(0, 0, 0, 0.5) !important;
  }
  
  [data-theme="dark"] .nav-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
  }
  
  [data-theme="dark"] .nav-toggle {
    background: var(--bg-secondary) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
  }
  
  [data-theme="dark"] .nav-toggle .bar {
    background: var(--text-primary) !important;
  }
}

/* Touch Gesture Improvements */
@media (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.15);
  }
  
  a, button, [role="button"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
  }
  
  /* Prevent text selection on buttons */
  .btn, .nav-toggle, .nav-link {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
  }
  
  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
}

