@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #38bdf8;
  --primary-glow: rgba(56,189,248,0.35);
  --primary-dark: #0ea5e9;
  --glass-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.0);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
  --blur: blur(8px);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --bg: #080c14;
  --bg2: #0d1221;
  --bg3: #111827;
  --card-bg: rgba(15,23,42,0.5);
  --nav-h: 72px;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --glass-bg: rgba(255,255,255,0.65);
  --glass-border: rgba(255,255,255,0.0);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.12);
  --text: #0f172a;
  --text-muted: #475569;
  --bg: #f0f4f8;
  --bg2: #e8eef5;
  --bg3: #dde5ee;
  --card-bg: rgba(255,255,255,0.85);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Background Mesh ── */
#neuralNetwork {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

[data-theme="light"] #neuralNetwork {
  opacity: 0.3;
}

.bg-mesh {
  display: none;
}

/* ── Grid Lines - Removed, Neural Network handles background ── */
.bg-grid {
  display: none;
}


/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(8,12,20,0.75);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

[data-theme="light"] .navbar.scrolled { 
  background: rgba(240,244,248,0.8); 
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.nav-logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--text);
}

.nav-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 900; color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 15px var(--primary-glow); }
  50% { box-shadow: 0 0 30px rgba(56,189,248,0.5); }
}

.nav-logo-text { font-weight: 800; font-size: 1.1rem; letter-spacing: 2px; }
.nav-logo-sub { font-size: 0.65rem; color: var(--text-muted); font-weight: 300; }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none; color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-links a::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; right: 50%;
  height: 2px; background: var(--primary);
  border-radius: 1px;
  transition: all var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--glass-bg);
}

.nav-links a:hover::after, .nav-links a.active::after {
  left: 10px; right: 10px;
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Theme Toggle */
.theme-toggle {
  width: 52px; height: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transition: all var(--transition);
  box-shadow: 0 0 8px rgba(251,191,36,0.4);
}

[data-theme="light"] .theme-toggle::before {
  left: calc(100% - 25px);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 0 8px var(--primary-glow);
}

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

/* Mobile Nav */
.mobile-nav {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 999;
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05) inset;
  padding: 1rem;
  transform: translateY(-120%);
  transition: transform var(--transition);
}

.mobile-nav.open { transform: translateY(0); }
.mobile-nav a {
  display: block; padding: 0.75rem 1rem;
  color: var(--text-muted); text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-size: 0.95rem;
}
.mobile-nav a:hover { 
  color: var(--text); 
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1) inset;
}

/* ── Main Content ── */
main { padding-top: var(--nav-h); position: relative; z-index: 1; }

/* ── Hero / Slideshow ── */
.slideshow {
  position: relative;
  height: calc(100vh - var(--nav-h));
  min-height: 600px;
  overflow: hidden;
}

.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  display: flex; align-items: center; justify-content: center;
}

.slide.active { opacity: 1; }

.slide-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 50%, var(--bg3) 100%);
}

.slide-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.3;
}

.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 50%);
}

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

.slide-tag {
  display: inline-block;
  background: var(--glass-bg);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease;
}

.slide-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.slide-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.slide-actions { animation: fadeInUp 0.8s ease 0.6s both; }

.slide-dots {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}

.dot {
  width: 8px; height: 8px; border-radius: 4px;
  background: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}

.dot.active { width: 28px; background: var(--primary); }

.slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  transition: all var(--transition);
  backdrop-filter: var(--blur);
  color: var(--text);
  font-size: 1.1rem;
}

.slide-arrow:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-50%) scale(1.1); }
.slide-arrow.prev { left: 1.5rem; }
.slide-arrow.next { right: 1.5rem; }

/* Particles in hero */
.particles {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  animation: float 6s linear infinite;
}

@keyframes float {
  0% { opacity: 0; transform: translateY(100vh) translateX(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-10vh) translateX(50px); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  border: none; outline: none;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover { box-shadow: 0 6px 30px rgba(56,189,248,0.4); transform: translateY(-2px); }

.btn-glass {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

.btn-glass:hover { 
  background: rgba(255,255,255,0.15);
  border-color: var(--primary); 
  color: var(--primary); 
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56,189,248,0.3), 0 0 0 1px rgba(56,189,248,0.2) inset;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

/* ── Glass Card ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(255,255,255,0.05) inset;
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.glass-card:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(56,189,248,0.4);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(56,189,248,0.2) inset, 0 0 40px rgba(56,189,248,0.1);
  transform: translateY(-6px);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

[data-theme="light"] .glass-card:hover {
  background: rgba(255,255,255,0.75);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15), 0 0 0 1px rgba(56,189,248,0.3) inset;
}

/* ── Sections ── */
.section { padding: 6rem 0; }
.section-sm { padding: 4rem 0; }

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

.section-header { text-align: center; margin-bottom: 4rem; }

.section-tag {
  display: inline-block;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 0.3rem 1rem;
  border: 1px solid rgba(56,189,248,0.3);
  border-radius: 20px;
  background: rgba(56,189,248,0.05);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Grid Layouts ── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ── Product Card ── */
.product-card .card-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg3);
  display: block;
}

.product-card .card-img-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.card-body { padding: 1.5rem; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-desc { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; line-height: 1.6; }
.card-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; }
.card-meta { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.5rem; }

/* ── Service Cards ── */
.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
  transition: all var(--transition);
}

.service-icon:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.service-icon.blue { background: rgba(56,189,248,0.2); color: var(--primary); }
.service-icon.purple { background: rgba(139,92,246,0.2); color: #8b5cf6; }
.service-icon.green { background: rgba(34,197,94,0.2); color: #22c55e; }
.service-icon.orange { background: rgba(249,115,22,0.2); color: #f97316; }
.service-icon.pink { background: rgba(236,72,153,0.2); color: #ec4899; }
.service-icon.cyan { background: rgba(6,182,212,0.2); color: #06b6d4; }

/* ── Sub-service items ── */
.sub-services { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sub-services li {
  padding: 0.6rem 0.9rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: default;
}
.sub-services li:hover { color: var(--primary); border-color: rgba(56,189,248,0.3); }

/* ── Tech Stack ── */
.tech-stack { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.tech-item {
  position: relative;
  overflow: hidden;
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  
  border-radius: 15px;
  transition: all var(--transition);
  cursor: pointer;
}

.tech-item::before {
  
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,107,53,0.15), transparent);
  transition: left 0.5s;
}

.tech-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
}


@keyframes borderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.95); opacity: 0.5; }
}

.tech-item:hover i {
  transform: scale(1.2);
  filter: drop-shadow(0 0 12px currentColor);
}

.tech-item i {
  font-size: 2.5rem;
  transition: all var(--transition);
}

.tech-item span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.tech-badge {
  padding: 0.4rem 0.9rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
}
.tech-badge:hover { background: rgba(255,107,53,0.1); border-color: var(--primary); transform: scale(1.05); }

/* ── Project Gallery ── */
.project-card { cursor: pointer; }
.project-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,12,20,0.9) 0%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover .overlay { opacity: 1; }
.project-card .card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  transform: translateY(10px);
  transition: transform var(--transition);
}
.project-card:hover .card-info { transform: translateY(0); }
.project-thumb {
  width: 100%; aspect-ratio: 16/10;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--text-muted);
}

/* ── Contact ── */
.contact-info-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.25rem;
}
.contact-icon {
  width: 44px; height: 44px;
  background: rgba(56,189,248,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.4rem; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); }
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.9rem;
  transition: all var(--transition);
  outline: none;
  direction: rtl;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control::placeholder { color: var(--text-muted); opacity: 0.6; }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control option { background: var(--bg3); }

/* ── About ── */
.honor-card {
  text-align: center;
  padding: 2rem 1.5rem;
}
.honor-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.honor-number { font-size: 2.5rem; font-weight: 900; color: var(--primary); line-height: 1; }
.honor-label { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

/* ── Footer ── */
footer {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
  padding: 3rem 0 1.5rem;
  position: relative; z-index: 1;
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; margin-top: 1rem; line-height: 1.8; }
.footer-col h4 { font-weight: 700; margin-bottom: 1rem; font-size: 0.95rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--glass-border); padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }
.social-links { display: flex; gap: 0.75rem; }
.social-link {
  width: 36px; height: 36px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05) inset;
}
.social-link:hover { 
  background: var(--primary); 
  border-color: var(--primary); 
  color: #fff; 
  transform: scale(1.15); 
  box-shadow: 0 8px 24px rgba(56,189,248,0.4), 0 0 20px rgba(56,189,248,0.3);
}

/* ── Flash Messages ── */
.flash-messages { position: fixed; top: calc(var(--nav-h) + 1rem); left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; min-width: 320px; }
.flash {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: var(--blur);
  border: 1px solid;
  animation: slideDown 0.3s ease;
}
.flash.success { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); color: #22c55e; }
.flash.error { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #ef4444; }
.flash.info { background: rgba(56,189,248,0.15); border-color: rgba(56,189,248,0.4); color: var(--primary); }

/* ── Page Header ── */
.page-header {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 80px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
}
.page-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; }
.page-breadcrumb { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.75rem; }
.page-breadcrumb a { color: var(--primary); text-decoration: none; }

/* ── Category Filter ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass-bg);
  color: var(--text-muted);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.filter-btn.active, .filter-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Map ── */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  height: 400px;
}
.map-container iframe { width: 100%; height: 100%; border: none; filter: grayscale(0.5) invert(0.1); }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── Admin Styles ── */
.admin-layout { display: flex; min-height: 100vh; direction: rtl; }

.admin-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  border-left: 1px solid var(--glass-border);
  position: fixed; top: 0; right: 0;
  height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  z-index: 100;
  padding: 1.5rem 0;
}

.admin-sidebar-logo {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1rem;
}

.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

.admin-sidebar-logo span {
  font-weight: 800; font-size: 1.1rem; letter-spacing: 1px;
}

.admin-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
  border-right: 3px solid transparent;
}

.admin-nav-item:hover {
  color: var(--text);
  background: var(--glass-bg);
  border-right-color: var(--primary);
}

.admin-nav-item.active {
  color: var(--primary);
  background: rgba(56,189,248,0.1);
  border-right-color: var(--primary);
}

.admin-nav-item i { width: 20px; text-align: center; font-size: 1rem; }

.admin-content {
  margin-right: 260px;
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
}

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h2 {
  font-size: 1.8rem; font-weight: 800;
  margin: 0;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem; font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.service-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Glass effect */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--glass-bg);
  border-bottom: 2px solid var(--glass-border);
}

th {
  padding: 1rem;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: var(--glass-bg);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Alert Messages */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid;
  animation: slideDown 0.3s ease;
}

.alert-success {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: #22c55e;
}

.alert-error {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}

.alert-info {
  background: rgba(56,189,248,0.1);
  border-color: rgba(56,189,248,0.3);
  color: var(--primary);
}

.alert i {
  font-size: 1.2rem;
}

/* Buttons */
.btn-warning {
  background: #eab308;
  color: #fff;
}

.btn-warning:hover {
  background: #ca8a04;
}

.btn-success {
  background: #22c55e;
  color: #fff;
}

.btn-success:hover {
  background: #16a34a;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}

.badge-primary {
  background: rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.3);
  color: var(--primary);
}

.badge-success {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.3);
  color: #22c55e;
}

.badge-warning {
  background: rgba(234,179,8,0.15);
  border-color: rgba(234,179,8,0.3);
  color: #eab308;
}

.badge-danger {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}

.badge-info {
  background: rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.3);
  color: var(--primary);
}

/* Admin Login */
.animate-in {
  animation: fadeInUp 0.6s ease;
}

/* Mobile Sidebar Toggle */
#sidebarToggle {
  display: none;
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  
  /* Admin Mobile */
  .admin-sidebar {
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-content {
    margin-right: 0;
    padding: 1.5rem;
  }
  
  #sidebarToggle {
    display: flex;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }
  
  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .slide-title { font-size: 2rem; }
  .admin-content { padding: 1rem; }
  
  table {
    font-size: 0.8rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
  }
}


/* ── Additional Utility Classes ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text2 { color: var(--text-muted); }
.text3 { color: var(--text-muted); opacity: 0.7; }

.surface2 { background: var(--bg2); }
.surface3 { background: var(--bg3); }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Hover effects */
.hover-scale:hover { transform: scale(1.05); }
.hover-lift:hover { transform: translateY(-4px); }

/* Disabled state */
.disabled, [disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ── Modal Styles ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.modal-close:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--bg2);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

/* Modal info items */
.modal-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.modal-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.modal-info-content {
  flex: 1;
}

.modal-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.modal-info-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 90vh;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
}
