/* فونت اختیاری ایران‌سنس محلی: در صورت قرار دادن فایل‌های woff2 در پوشه fonts به‌صورت خودکار اعمال می‌شود */
@font-face {
  font-family: 'IRANSans';
  src: url('./fonts/IRANSansWeb.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IRANSans';
  src: url('./fonts/IRANSansWeb_Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #040915;
  --bg-navy: #0a1428;
  --bg-card: rgba(13, 24, 46, 0.78);
  --bg-card-solid: #0d182e;
  --border-subtle: rgba(148, 163, 184, 0.22);
  --border-bright: rgba(186, 230, 253, 0.45);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --accent-sky: #38bdf8;
  --accent-blue: #2563eb;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --font-main: 'IRANSans', 'IRANSansX', 'Vazirmatn', Tahoma, 'Segoe UI', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(ellipse 75% 55% at 50% 0%, #0f2142 0%, #060d1f 52%, #030712 100%);
  color: var(--text-main);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
}

/* Subtle background grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(148, 197, 255, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 11, 24, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border: 1px solid rgba(186, 230, 253, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
}

.brand-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: #fff;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--accent-sky);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

.nav-links a:hover {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-silver {
  color: #071022;
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(90deg, #334e7b 0%, #9ab4d6 18%, #eef4fb 50%, #9ab4d6 82%, #334e7b 100%);
  box-shadow: 0 0 24px rgba(148, 197, 255, 0.24);
}

.btn-silver:hover {
  filter: brightness(1.08);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-bright);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12px;
  border-radius: 10px;
}

/* Hero */
.hero {
  padding: 58px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.38;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #dbeafe 70%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 24px;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.stat-item strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.stat-item span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Hero Right Panel — Quick Access Cards */
.hero-portal-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.hero-portal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
}

.portal-card-title {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 12px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.portal-link-item:last-child {
  margin-bottom: 0;
}

.portal-link-item:hover {
  background: rgba(56, 189, 248, 0.09);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-2px);
}

.portal-link-meta strong {
  display: block;
  font-size: 14px;
  color: #fff;
}

.portal-link-meta span {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.pill-green {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pill-sky {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.pill-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Section Generic */
section {
  padding: 46px 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 30px;
}

.section-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-sky);
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Free Tools Hub */
.tools-shell {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.55);
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.tool-tab {
  padding: 11px 18px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.tool-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.tool-tab.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3), rgba(37, 99, 235, 0.28));
  border-color: rgba(56, 189, 248, 0.65);
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.18);
}

.tool-panel {
  display: none;
}

.tool-panel.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: 7px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-control {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(4, 9, 21, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-control:focus {
  border-color: var(--accent-sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.input-ltr {
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 1px;
}

.prefix-ir {
  position: absolute;
  left: 12px;
  font-family: ui-monospace, monospace;
  font-weight: 900;
  font-size: 14px;
  color: var(--accent-sky);
  background: rgba(56, 189, 248, 0.14);
  padding: 3px 8px;
  border-radius: 7px;
  pointer-events: none;
}

.input-with-ir {
  padding-left: 54px;
}

.helper-text {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Result Cards */
.result-box {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(4, 9, 21, 0.68);
  border: 1px solid var(--border-subtle);
}

.result-box.valid {
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(4, 9, 21, 0.85));
}

.result-box.invalid {
  border-color: rgba(244, 63, 94, 0.55);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(4, 9, 21, 0.85));
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.status-title {
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-valid { color: #6ee7b7; }
.status-invalid { color: #fda4af; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.kpi-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.kpi-card .k-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.kpi-card .k-val {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  word-break: break-word;
}

.kpi-card .k-val-ltr {
  direction: ltr;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.6px;
}

.copy-inline {
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  cursor: pointer;
}

.copy-inline:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #fff;
  border-color: var(--accent-sky);
}

/* Amortization Table */
.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  max-height: 330px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: center;
}

table.data-table th {
  position: sticky;
  top: 0;
  background: #0f1d38;
  color: #bae6fd;
  font-weight: 800;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

table.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-soft);
}

table.data-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.tool-cta-strip {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.32);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

/* Cards Grid (Products & Services) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
}

.card h3 {
  font-size: 17px;
  font-weight: 900;
  margin: 10px 0 8px;
}

.card p {
  font-size: 13px;
  color: var(--text-soft);
}

.feature-list {
  list-style: none;
  margin-top: 12px;
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.feature-list li::before {
  content: "✓";
  color: var(--accent-sky);
  font-weight: 900;
  margin-left: 8px;
}

/* Video Showcase Box */
.video-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 26px;
  align-items: center;
}

.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: radial-gradient(circle at center, #13294d 0%, #060d1f 100%);
  border: 1px solid rgba(148, 197, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.video-frame video,
.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
}

.play-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.18);
  border: 2px solid rgba(56, 189, 248, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
  margin-bottom: 12px;
  font-size: 13.5px;
}

.contact-row strong {
  color: var(--text-muted);
  font-size: 12px;
}

.contact-row a {
  font-weight: 800;
  color: #fff;
  direction: ltr;
}

/* Footer */
footer {
  margin-top: 30px;
  padding: 26px 0 36px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-slogan {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-soft);
  margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid, .video-box, .contact-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
