/* ═══════════════════════════════════════════════
   طیف گستر — Main Stylesheet
   رنگ اصلی: #0F3460  |  Dark/Light Mode
   فونت: Vazirmatn لوکال
═══════════════════════════════════════════════ */

@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

/* ── CSS Variables ── */
:root {
  /* Brand */
  --navy:       #0F3460;
  --navy-mid:   #16213E;
  --navy-light: #1a4080;
  --cyan:       #0EA5E9;
  --cyan-glow:  rgba(14,165,233,0.25);
  --accent:     #38BDF8;

  /* Light mode */
  --bg:         #f0f4f8;
  --bg2:        #ffffff;
  --bg3:        #e8eef5;
  --surface:    rgba(255,255,255,0.85);
  --surface2:   rgba(255,255,255,0.6);
  --border:     rgba(15,52,96,0.15);
  --text:       #1e293b;
  --text2:      #475569;
  --text3:      #94a3b8;
  --nav-bg:     rgba(255,255,255,0.92);
  --card-shadow: 0 8px 32px rgba(15,52,96,0.12);
  --card-hover:  0 20px 48px rgba(15,52,96,0.2);

  /* Transitions */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t3: all 0.3s var(--ease);
  --t5: all 0.5s var(--ease);
}

[data-theme="dark"] {
  --bg:         #080f1e;
  --bg2:        #0d1b2e;
  --bg3:        #0a1628;
  --surface:    rgba(15,52,96,0.35);
  --surface2:   rgba(15,52,96,0.18);
  --border:     rgba(56,189,248,0.12);
  --text:       #e2eaf4;
  --text2:      #94b8d8;
  --text3:      #4a7094;
  --nav-bg:     rgba(8,15,30,0.94);
  --card-shadow: 0 8px 32px rgba(0,0,0,0.4);
  --card-hover:  0 20px 48px rgba(14,165,233,0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Vazir', 'Tahoma', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.7;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ── Selection ── */
::selection { background: var(--cyan); color: white; }

/* ── Container ── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: var(--t3);
}

.site-nav.scrolled {
  box-shadow: 0 4px 24px rgba(15,52,96,0.15);
}

[data-theme="dark"] .site-nav.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--cyan) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 100%);
}

.logo-text-wrap .logo-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
  display: block;
  line-height: 1.1;
  transition: color 0.3s;
}

[data-theme="dark"] .logo-text-wrap .logo-name {
  color: var(--accent);
}

.logo-text-wrap .logo-tagline {
  font-size: 10.5px;
  color: var(--text3);
  letter-spacing: 0.06em;
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  border-radius: 8px;
  transition: var(--t3);
  position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
  background: rgba(15,52,96,0.07);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
  color: var(--accent);
  background: rgba(56,189,248,0.08);
}

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

/* Nav right side */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-phone {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  transition: var(--t3);
}

[data-theme="dark"] .nav-phone {
  color: var(--accent);
  border-color: rgba(56,189,248,0.25);
}

.nav-phone:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  transform: translateY(-1px);
}

[data-theme="dark"] .nav-phone:hover {
  background: var(--cyan);
  color: white;
  border-color: var(--cyan);
}

/* Theme Toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t3);
  color: var(--text2);
  font-size: 16px;
}

.theme-toggle:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  transform: rotate(20deg);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--cyan);
  border-color: var(--cyan);
}

.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--t3);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--t3);
}

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

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 190;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: var(--t3);
  padding: 16px 24px 20px;
}

.mobile-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-drawer a {
  display: block;
  padding: 13px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  transition: var(--t3);
}

.mobile-drawer a:last-child { border-bottom: none; }

.mobile-drawer a:hover,
.mobile-drawer a.active {
  color: var(--navy);
  padding-right: 12px;
}

[data-theme="dark"] .mobile-drawer a:hover,
[data-theme="dark"] .mobile-drawer a.active {
  color: var(--accent);
}

/* ══════════════════════════════════════
   PAGE HERO BANNER (inner pages)
══════════════════════════════════════ */
.page-banner {
  padding-top: 68px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #1a5fa0 100%);
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(14,165,233,0.2) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 Q25 0 50 50 Q75 100 100 50' stroke='rgba(56,189,248,0.07)' fill='none' stroke-width='1'/%3E%3C/svg%3E");
}

/* animated mesh */
.page-banner::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(56,189,248,0.15) 0%, transparent 70%);
  border-radius: 50%;
  right: -100px; top: -100px;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 20px) scale(1.05); }
  66% { transform: translate(20px, -10px) scale(0.95); }
}

.page-banner-inner {
  position: relative;
  z-index: 1;
  padding: 72px 0 56px;
  text-align: center;
  color: white;
}

.page-banner h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.page-banner .banner-sub {
  font-size: 15px;
  opacity: 0.75;
  max-width: 460px;
  margin: 0 auto 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: rgba(255,255,255,0.4); }

.cyan-bar {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ══════════════════════════════════════
   SECTION SHARED
══════════════════════════════════════ */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg3);
  transition: background 0.4s ease;
}

[data-theme="dark"] .section-alt {
  background: var(--bg2);
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(14,165,233,0.1);
  border: 1px solid rgba(14,165,233,0.25);
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

[data-theme="dark"] .eyebrow {
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.2);
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.3;
}

.section-title em {
  font-style: normal;
  color: var(--navy);
}

[data-theme="dark"] .section-title em {
  color: var(--accent);
}

.section-desc {
  font-size: 15px;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-family: 'Vazir', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t3);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(15,52,96,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15,52,96,0.4);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--accent) 100%);
  box-shadow: 0 6px 20px rgba(14,165,233,0.3);
}

[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 12px 28px rgba(14,165,233,0.4);
}

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

.btn-outline:hover {
  background: var(--navy);
  color: white;
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-outline {
  color: var(--accent);
  border-color: var(--accent);
}

[data-theme="dark"] .btn-outline:hover {
  background: var(--cyan);
  color: white;
  border-color: var(--cyan);
}

.btn-ghost {
  background: rgba(15,52,96,0.07);
  color: var(--navy);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-ghost {
  background: rgba(56,189,248,0.07);
  color: var(--accent);
  border-color: rgba(56,189,248,0.2);
}

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: var(--t5);
  backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover);
  border-color: rgba(15,52,96,0.3);
}

[data-theme="dark"] .card:hover {
  border-color: rgba(56,189,248,0.25);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  background: var(--navy-mid);
  color: rgba(255,255,255,0.8);
  margin-top: auto;
}

[data-theme="dark"] .site-footer {
  background: #050d18;
}

.footer-body {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 60px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand-desc {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  margin-top: 16px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: var(--t3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a::before {
  content: '›';
  color: var(--cyan);
  font-size: 16px;
}

.footer-links a:hover {
  color: white;
  padding-right: 4px;
}

.footer-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
  line-height: 1.6;
}

.footer-contact-row svg {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom a { color: #facc15; }

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: var(--t3);
}

.footer-social a:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: white;
  transform: translateY(-3px);
}

/* ══════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════ */
.back-top {
  position: fixed;
  left: 20px;
  bottom: 24px;
  width: 44px; height: 44px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: var(--t3);
  box-shadow: 0 6px 20px rgba(15,52,96,0.35);
}

[data-theme="dark"] .back-top {
  background: var(--cyan);
  box-shadow: 0 6px 20px rgba(14,165,233,0.35);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(15,52,96,0.5);
}

/* ══════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-body { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-phone { display: none; }
  .footer-body { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .page-banner-inner { padding: 56px 0 40px; }
}
