:root {
  --blue: #1357d6;
  --blue-dark: #0b2e63;
  --blue-soft: #eef4ff;
  --gold: #d4af37;
  --gold-dark: #8a6419;
  --green: #1b7a58;
  --ink: #172033;
  --muted: #616b7d;
  --line: #dce3ec;
  --bg: #faf8f2;
  --shadow: 0 18px 50px rgba(11, 46, 99, .08);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  background:
    radial-gradient(circle at 8% 16%, rgba(212, 175, 55, .08), transparent 23rem),
    linear-gradient(180deg, #fff 0, var(--bg) 44rem);
  color: #465063;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.brand-masthead {
  min-height: 104px;
  background:
    radial-gradient(circle at 50% -45%, rgba(212, 175, 55, .26), transparent 58%),
    linear-gradient(180deg, #fffdf8, #f8fbff);
  border-top: 4px solid var(--blue-dark);
  border-bottom: 1px solid #e3e8ef;
}

.brand-masthead::after {
  content: '';
  position: absolute;
  right: 50%;
  bottom: 0;
  width: 86px;
  height: 3px;
  transform: translateX(50%);
  background: var(--gold);
}

.brand-masthead::before {
  background-image:
    linear-gradient(rgba(11, 46, 99, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 46, 99, .035) 1px, transparent 1px);
  animation: none;
}

.topbar {
  height: 66px;
  justify-content: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(11, 46, 99, .1);
  box-shadow: 0 8px 28px rgba(11, 46, 99, .045);
}

.topbar nav {
  flex: 0 1 auto;
  gap: 18px;
}
.topbar nav a {
  position: relative;
  padding: 10px 7px;
  border-radius: 0;
  color: #374154;
  font-size: 13px;
}

.topbar nav a::after {
  content: '';
  position: absolute;
  right: 25%;
  left: 25%;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .2s ease;
}

.topbar nav a:hover,
.topbar nav .active,
.topbar nav a.current {
  color: var(--blue-dark);
  background: transparent;
  box-shadow: none;
}

.topbar nav a:hover::after,
.topbar nav .active::after,
.topbar nav a.current::after { transform: scaleX(1); }
.topbar.scrolled { height: 60px; box-shadow: 0 10px 30px rgba(11, 46, 99, .08); }

.primary,
.ghost {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
}

.primary,
.header-actions .primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #0d3f9b);
  border: 1px solid transparent;
  box-shadow: inset 0 -2px 0 rgba(212, 175, 55, .75), 0 10px 24px rgba(19, 87, 214, .18);
}

.primary:hover { transform: translateY(-2px); }
.ghost { color: var(--blue-dark); background: #fff; border-color: #cfd8e5; }
.card { border-radius: 14px; border-color: rgba(11, 46, 99, .12); box-shadow: var(--shadow); }

.scroll-progress {
  background: linear-gradient(90deg, var(--gold), var(--blue));
  box-shadow: none;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(315px, .68fr) minmax(0, 1.55fr);
  grid-template-areas: "intro slider" "feed feed";
  gap: 20px;
  padding-top: 38px;
}

.hero::before {
  top: 72px;
  height: 570px;
  background-image:
    linear-gradient(rgba(19, 87, 214, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 87, 214, .035) 1px, transparent 1px);
  animation: none;
}

.hero-intro {
  grid-area: intro;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px 34px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .96)),
    #fff;
  border-top: 4px solid var(--gold);
}

.hero-intro::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  left: -95px;
  bottom: -95px;
  border: 34px solid rgba(19, 87, 214, .045);
  border-radius: 50%;
  pointer-events: none;
}

.eyebrow {
  width: max-content;
  color: var(--gold-dark);
  border-color: rgba(138, 100, 25, .25);
  background: #fffaf0;
  font-weight: 700;
}

.eyebrow i { background: var(--gold); }
.hero h1 {
  margin: 22px 0 12px;
  color: var(--blue-dark);
  font-size: clamp(33px, 3.15vw, 48px);
  line-height: 1.43;
  letter-spacing: -.8px;
}

.hero-intro > p { margin: 0; color: var(--muted); font-size: 15px; line-height: 2; }
.hero-points { display: grid; gap: 9px; margin: 23px 0; }
.hero-points span { color: #33405a; font-size: 13px; font-weight: 600; }
.hero-points span::before { content: '◆'; margin-left: 8px; color: var(--gold); font-size: 9px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-buttons a { min-height: 44px; padding: 10px 16px; font-size: 12px; }
.hero-help { width: max-content; max-width: 100%; margin-top: 18px; color: var(--blue); font-size: 12px; font-weight: 700; }
.hero-fallback { position: absolute; inset: 0; display: block; background-position: center; background-size: cover; color: #fff; }
.hero-fallback::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 15, 37, .12), rgba(3, 15, 37, .72) 64%, rgba(3, 15, 37, .96));
}

.hero-slide::after {
  background:
    linear-gradient(90deg, rgba(2, 13, 34, .06), rgba(2, 13, 34, .62) 58%, rgba(2, 13, 34, .97)),
    linear-gradient(0deg, rgba(2, 13, 34, .92), transparent 62%),
    radial-gradient(circle at 16% 12%, rgba(212, 175, 55, .2), transparent 40%);
}

.slide-copy > span,
.slide-badge {
  color: #fff8dc;
  border-color: rgba(212, 175, 55, .55);
  background: rgba(7, 28, 63, .68);
}

.slide-link { color: #f2d77e; }
.slide-progress { background: linear-gradient(90deg, #f0d470, var(--gold)); box-shadow: 0 0 12px rgba(212, 175, 55, .45); }
.slide-dots button.active { background: var(--gold); }
.slide-arrows button:hover,
.slide-arrows button:focus-visible { background: rgba(138, 100, 25, .92); }
.blocks div { animation: none; }
@keyframes pipelineActive {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212, 175, 55, .08); }
  50% { box-shadow: 0 0 0 7px rgba(212, 175, 55, .16); }
}
.world-map {
  position: absolute;
  z-index: 0;
  inset: 7% 2% auto;
  width: 96%;
  height: 86%;
  object-fit: contain;
  opacity: .2;
  filter: grayscale(1) sepia(.35) saturate(2.2) hue-rotate(178deg) contrast(1.15);
}

.mapstats .map-phrase {
  min-height: 46px;
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  font-size: 14px;
  line-height: 1.6;
}

@keyframes mapRouteFlow { to { stroke-dashoffset: -220; } }
@keyframes mapHubPulse {
  0%, 100% { transform: scale(.82); opacity: .72; }
  50% { transform: scale(1.35); opacity: 1; }
}

.section { padding-top: 92px; padding-bottom: 92px; }
.section-title { margin-bottom: 38px; }
.section-title > span,
.label { color: var(--gold-dark); }
.section-title > span::before,
.label::before { content: ''; display: inline-block; width: 24px; height: 2px; margin-left: 8px; vertical-align: middle; background: var(--gold); }
.section-title h2,
.ai-grid h2 { color: var(--blue-dark); }

.stat-grid { gap: 15px; }
.stat-grid article { border-top: 3px solid rgba(212, 175, 55, .75); }
.stat-grid b { color: var(--blue-dark); }

.ai-section,
.timeline,
.news { border-block-color: rgba(11, 46, 99, .09); }
.ai-section {
  background: linear-gradient(120deg, #081e42, var(--blue-dark));
}
.ai-grid > div:first-child h2,
.ai-grid > div:first-child p,
.ai-grid > div:first-child li { color: #fff; }
.ai-grid > div:first-child p,
.ai-grid > div:first-child li { color: #d9e5f6; }
.ai-grid li::before { color: var(--gold); }
.chat { box-shadow: 0 24px 70px rgba(0, 0, 0, .18); }
.chat:hover { transform: translateY(-2px); }
.avatar { background: linear-gradient(135deg, var(--blue), var(--gold-dark)); }
.chat-head small { color: var(--green); }
.chat-head { align-items: center; padding-bottom: 14px; border-bottom: 1px solid #edf1f6; }
.chat-head > div { flex: 1; }
.chat-head > a { color: var(--blue-dark); font-size: 11px; border-bottom: 1px solid rgba(212, 175, 55, .8); }
.messages {
  height: 250px;
  margin: 14px -4px 0;
  padding: 4px 4px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b9c8dc transparent;
}
.messages .chat-message {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 12px;
  color: inherit;
  background: transparent;
}
.messages .chat-message > span { margin: 0 9px 3px; color: #7a879a; font-size: 9px; }
.messages .chat-message p {
  width: fit-content;
  max-width: 86%;
  margin: 0;
  padding: 11px 14px;
  color: #26364d;
  background: #f0f4fa;
  border: 1px solid #e8edf4;
  border-radius: 15px 15px 4px 15px;
  font-size: 12px;
  line-height: 1.9;
  text-align: right;
  overflow-wrap: anywhere;
}
.messages .chat-message small { margin: 4px 9px 0; color: #738198; font-size: 9px; }
.messages .chat-message.user-message {
  align-items: flex-end;
  margin: 0 0 12px;
  color: inherit;
  background: transparent;
}
.messages .user-message > span { color: #5071a2; }
.messages .user-message p {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-color: transparent;
  border-radius: 15px 15px 15px 4px;
}
.messages .typing-message p { color: #718096; animation: assistantThinking 1.2s ease-in-out infinite; }
.assistant-handoff {
  display: inline-flex;
  margin: -2px 8px 12px;
  padding: 7px 12px;
  color: var(--blue-dark);
  background: #fffaf0;
  border: 1px solid rgba(212, 175, 55, .55);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 750;
}
.quick { min-height: 34px; flex-wrap: wrap; }
.quick button { color: var(--blue-dark); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.quick button:hover,
.quick button:focus-visible { border-color: var(--gold); background: #fffaf0; }
.assistant-form { align-items: stretch; }
.assistant-form input:focus { outline: 2px solid rgba(20, 98, 255, .18); border-color: var(--blue); }
.assistant-form button {
  min-width: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-bottom: 3px solid var(--gold);
  cursor: pointer;
}
.assistant-form button b { font-size: 16px; }
.assistant-form button:disabled { opacity: .55; cursor: wait; }
.assistant-note { display: block; margin-top: 9px; color: #7d8999; font-size: 9px; }

@keyframes assistantThinking { 50% { opacity: .48; } }

.service-personas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: -8px 0 58px;
}

.service-personas button {
  min-height: 116px;
  padding: 20px;
  text-align: right;
  color: var(--blue-dark);
  background: #fff;
  border: 1px solid #d6deea;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.service-personas button::before { content: '◆'; display: block; margin-bottom: 10px; color: var(--gold); font-size: 10px; }
.service-personas button b,
.service-personas button span { display: block; }
.service-personas button b { font-size: 14px; }
.service-personas button span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.service-personas button:hover,
.service-personas button.is-active { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 14px 32px rgba(11, 46, 99, .1); }
.service-title { margin-bottom: 26px; }
.service-grid { gap: 16px; }
.service-grid article { min-height: 185px; border-top: 3px solid transparent; border-radius: 12px; }
.service-grid article:hover,
.service-grid article.is-selected { transform: translateY(-3px); border-color: rgba(19, 87, 214, .28); border-top-color: var(--gold); background: linear-gradient(160deg, #fff, #f6f9ff); }
.service-grid i { color: var(--gold-dark); font-size: 12px; letter-spacing: 1px; }
.service-grid .service-category{display:block;margin-top:-18px;margin-right:36px;color:var(--blue);font-size:11px;font-weight:800}.service-grid .service-load-error{grid-column:1/-1;text-align:center;color:var(--muted)}
.service-grid article::after { content: 'مشاهده جزئیات ←'; color: var(--blue-dark); }
.service-detail { border-color: rgba(212, 175, 55, .58); background: linear-gradient(135deg, #fffdf8, #f3f7ff); }
.service-detail li::marker { color: var(--gold-dark); }
.service-detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.service-detail-actions .ghost,
.service-detail-actions .primary { padding: 9px 14px; font-size: 11px; }

.timeline { background: linear-gradient(180deg, #f4f7fc, #eef3fb); }

/* Dynamic ecosystem map */
@keyframes ecoOrbit{to{transform:rotate(360deg)}}@keyframes ecoNodeFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}@keyframes ecoCore{0%,100%{transform:scale(1);box-shadow:0 0 0 12px rgba(212,175,55,.1),0 18px 46px rgba(8,48,105,.25)}50%{transform:scale(1.035);box-shadow:0 0 0 17px rgba(212,175,55,.055),0 22px 54px rgba(8,48,105,.3)}}@keyframes ecoSignal{0%{transform:scale(.78);opacity:.8}100%{transform:scale(1.28);opacity:0}}@keyframes ecoGlow{50%{transform:scale(1.09);opacity:.65}}

@keyframes storyDrawBrand {
  0%, 10% { stroke-dashoffset: 500; opacity: .28; }
  50%, 78% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -35; opacity: .45; }
}
@keyframes storyDashBrand { to { stroke-dashoffset: -200; } }
@keyframes storyPulseBrand {
  0%, 100% { transform: scale(.88); opacity: .7; }
  50% { transform: scale(1.42); opacity: 1; }
}
@keyframes storyGoldBrand {
  0%, 100% { transform: translateY(0) scale(.92); }
  50% { transform: translateY(-12px) scale(1.08); }
}
@keyframes storyGlowBrand {
  0%, 100% { transform: translate(-3%, 8%) scale(.88); opacity: .45; }
  50% { transform: translate(6%, -18%) scale(1.08); opacity: .9; }
}

.news { background: linear-gradient(180deg, #f1f5fb, #eaf0f8); }
.featured,
.news-list article { border-radius: 12px; }
.featured > span,
.news-list span { color: var(--gold-dark); font-weight: 700; }
.news-art::after { display: none; animation: none; }

footer { background: #071a39; border-top: 1px solid rgba(212, 175, 55, .35); }
footer .copy { border-top-color: rgba(255, 255, 255, .12); }
footer form button { color: var(--blue-dark); background: var(--gold); font-weight: 800; }
.floating { background: var(--blue-dark); border: 2px solid var(--gold); box-shadow: 0 12px 28px rgba(7, 26, 57, .28); animation: none; }
.mobile-apply { display: none; }

.inner-nav,
.news-nav { background: rgba(255, 255, 255, .96); border-bottom: 1px solid rgba(11, 46, 99, .1); }
.inner-nav nav a:hover,
.news-nav nav a:hover,
.news-nav nav a.current { color: var(--blue-dark); background: var(--blue-soft); }
.inner-hero,
.news-hero { background: linear-gradient(120deg, #f8f2df, #edf4ff); border-bottom: 1px solid rgba(11, 46, 99, .08); }
.inner-hero span,
.news-hero span { color: var(--gold-dark); }
.inner-hero h1,
.news-hero h1 { color: var(--blue-dark); }
.faq-layout aside button.active { color: var(--blue-dark); border-color: var(--gold); background: #fffaf0; }
.contact-info article,
.contact-form,
.faq-list details,
.side-card,
.archive-card { border-radius: 12px; }
.contact-form button,
.news-tools button,
.side-card form button { background: var(--blue-dark); }

@media (max-width: 1050px) {
  .topbar { justify-content: flex-start; }
  .topbar .menu {
    width: 42px;
    height: 42px;
    margin-right: auto;
    margin-left: 0;
    color: var(--blue-dark);
    background: #f5f8fc;
    border: 1px solid #d9e1ec;
    border-radius: 10px;
  }
  .topbar nav.open { top: calc(100% - 1px); border-radius: 12px; }
  .hero { grid-template-columns: minmax(290px, .75fr) minmax(0, 1.35fr); }
  .hero-intro { padding: 30px 26px; }
  .service-personas { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .ai-grid > * { min-width: 0; }
  .chat { width: 100%; min-width: 0; }
  .assistant-form input,
  footer form input { min-width: 0; }
  body { padding-bottom: 66px; }
  .brand-masthead { min-height: 82px; }
  .brand-masthead a { height: 76px; }
  .brand-masthead img { width: 160px; }
  .topbar { height: 64px; }
  .topbar.scrolled { height: 60px; }
  .topbar nav.open { top: 58px; }
  .menu { color: var(--blue-dark); }
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "slider" "feed";
    padding-top: 18px;
  }
  .hero-intro { min-height: auto; padding: 28px 23px; }
  .hero h1 { font-size: 32px; }
  .slide-copy { right: 22px; left: 22px; bottom: 76px; }
  .slide-copy h2 { font-size: 23px; }
  .service-personas { grid-template-columns: 1fr; gap: 9px; margin-bottom: 42px; }
  .service-personas button { min-height: 94px; padding: 16px; }
  .service-grid article { min-height: auto; }
  .section { padding-block: 72px; }
  .mobile-apply {
    display: grid;
    place-items: center;
    position: fixed;
    z-index: 35;
    right: 14px;
    left: 82px;
    bottom: 12px;
    height: 48px;
    color: var(--blue-dark);
    background: var(--gold);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(7, 26, 57, .28);
    font-weight: 800;
  }
  .floating { left: 16px; bottom: 11px; width: 50px; height: 50px; }
  footer { padding-bottom: 16px; }
}

@media (max-width: 430px) {
  .hero-buttons { grid-template-columns: 1fr; }
  .hero-buttons a { width: 100%; min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .primary:hover,
  .service-personas button:hover,
  .service-grid article:hover { transform: none; }
}
