:root {
  --site-nav: #1f3c88;
  --site-nav-deep: #1f2b51;
  --site-nav-hover: #16306e;
  --site-text: #333;
  --site-muted: #777;
  --site-line: #e5e7eb;
  --site-accent: #0088cc;
  --site-font: IRANSans, Tahoma, sans-serif;
  --site-container: 1336px;
  --site-gutter: clamp(0.75rem, 2vw, 1.5rem);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #fff;
  color: var(--site-text);
  font-family: var(--site-font);
}

button,
input,
textarea,
select {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.site-container {
  width: 100%;
  max-width: var(--site-container);
  margin-inline: auto;
  padding-inline: var(--site-gutter);
  box-sizing: border-box;
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  overflow: visible;
}

.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--site-container);
  margin: 0 auto;
  padding: 0.65rem var(--site-gutter);
  min-height: 88px;
  position: relative;
  box-sizing: border-box;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.site-brand img {
  display: block;
  height: 72px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

.site-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1f3c88, #0d47a1);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
  flex: 0 0 auto;
}

.site-brand-copy {
  min-width: 0;
}

.site-brand-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f3c88;
  line-height: 1.35;
}

.site-brand-line {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--site-muted);
}

.site-top-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  position: relative;
}

.site-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 36px;
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  border: 0;
  background: transparent;
  color: #1f3c88;
  border-radius: 8px;
}

.site-tool:hover,
.site-tool:focus-visible,
.site-tool.is-active {
  background: #f3f6fb;
}

.site-tool-en {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.site-account {
  position: relative;
}

.site-account-link,
.site-account-trigger {
  gap: 0.45rem;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.84rem;
  max-width: min(240px, 42vw);
}

.site-account-link span,
.site-account-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-account-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.site-account-caret {
  font-size: 0.65rem;
  opacity: 0.8;
}

.site-account-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--site-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  z-index: 120;
  padding: 0.4rem;
  display: grid;
  gap: 0.15rem;
}

html[dir="ltr"] .site-account-panel {
  left: auto;
  right: 0;
}

.site-account-panel a,
.site-account-panel button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--site-text);
  text-align: start;
  font: inherit;
  cursor: pointer;
}

.site-account-panel a:hover,
.site-account-panel button:hover {
  background: #f3f6fb;
  color: #1f3c88;
}

.site-search-panel,
.site-lang-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  width: min(360px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--site-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  z-index: 120;
  padding: 0.75rem;
}

html[dir="ltr"] .site-search-panel,
html[dir="ltr"] .site-lang-panel {
  left: auto;
  right: 0;
}

.site-search-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-search-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--site-line);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font: inherit;
}

.site-search-row button {
  border: 0;
  background: #f3f6fb;
  color: #1f3c88;
  border-radius: 8px;
  min-width: 36px;
  min-height: 36px;
}

.site-search-results {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #c5cdd8 transparent;
}

.site-search-results::-webkit-scrollbar {
  width: 6px;
}

.site-search-results::-webkit-scrollbar-thumb {
  background: #c5cdd8;
  border-radius: 999px;
}

.site-search-results li a,
.site-search-results li span {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.site-search-results li a:hover,
.site-search-results li a:focus-visible {
  background: #f3f6fb;
  color: #1f3c88;
}

.site-search-empty {
  margin: 0.65rem 0 0;
  color: var(--site-muted);
  font-size: 0.85rem;
  padding: 0.35rem 0.25rem;
}

.site-lang-panel {
  width: min(220px, calc(100vw - 2rem));
  padding: 0.4rem;
}

.site-lang-panel button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--site-text);
  text-align: start;
}

.site-lang-panel button:hover,
.site-lang-panel button.is-active {
  background: #f3f6fb;
  color: #1f3c88;
}

.site-nav-bar {
  background: var(--site-nav);
  overflow: visible;
}

.site-nav-inner {
  width: 100%;
  max-width: var(--site-container);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0 var(--site-gutter);
  min-height: 52px;
  overflow: visible;
  position: relative;
  box-sizing: border-box;
}

.site-nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin: 0.55rem 0;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: var(--site-accent);
  color: #fff;
  font-weight: 700;
}

.site-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1;
  overflow: visible;
  gap: 0;
}

.site-nav > li {
  position: static;
  flex: 0 1 auto;
}

.site-nav > li > a,
.site-nav > li > button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 100%;
  min-height: 52px;
  padding: 0 clamp(0.4rem, 0.7vw, 0.7rem);
  border: 0;
  background: transparent;
  color: #fff;
  font-size: clamp(0.72rem, 0.85vw, 0.8125rem);
  font-weight: 700;
  white-space: nowrap;
}

.site-nav > li > a:hover,
.site-nav > li > button:hover,
.site-nav > li.is-open > a,
.site-nav > li.is-open > button,
.site-nav > li > a:focus-visible,
.site-nav > li > button:focus-visible {
  background: var(--site-nav-hover);
}

.site-nav .caret {
  font-size: 0.7rem;
  opacity: 0.95;
  line-height: 1;
}

.site-mega {
  display: none;
  position: absolute;
  top: 100%;
  inset-inline-start: clamp(0.5rem, 1.5vw, 1.25rem);
  inset-inline-end: auto;
  min-width: min(560px, calc(100vw - 2rem));
  width: min(640px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  padding: 0.85rem 0.5rem;
  margin: 0;
  list-style: none;
  background: var(--site-nav-deep);
  box-shadow: 0 14px 32px rgba(8, 18, 48, 0.3);
  z-index: 130;
  overflow: visible;
  border-radius: 0 0 8px 8px;
}

.site-nav > li.is-open > .site-mega {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.1rem 0.5rem;
}

.site-nav > li.mega-end > .site-mega {
  inset-inline-start: auto;
  inset-inline-end: clamp(0.5rem, 1.5vw, 1.25rem);
}

.site-mega a {
  display: block;
  padding: 0.55rem 1rem;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
}

.site-mega a:hover,
.site-mega a:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.site-main {
  flex: 1;
  width: 100%;
}

.site-home {
  max-width: var(--site-container);
  margin: 0 auto;
  padding: 2.5rem var(--site-gutter) 3rem;
  box-sizing: border-box;
}

.site-home h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  color: #1f3c88;
}

.site-home p {
  margin: 0;
  max-width: 40rem;
  line-height: 1.8;
  color: #4b5563;
}

.apr-loading {
  max-width: var(--site-container);
  margin: 0 auto;
  padding: 2.5rem var(--site-gutter);
  color: #64748b;
  box-sizing: border-box;
}

.site-footer {
  border-top: 4px solid #a0895a;
  padding: 0;
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  background: #1e3a5f;
}

.site-footer .site-container {
  padding-block: 0;
  max-width: none;
  padding-inline: 0;
}

.site-footer-nipc {
  max-width: var(--site-container);
  margin-inline: auto;
  padding: 2rem var(--site-gutter) 1.5rem;
  box-sizing: border-box;
}

.site-footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-footer-logo {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.site-footer-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
}

.site-footer-logo em {
  font-style: normal;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
}

.site-footer-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.3);
}

.site-footer-note {
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .site-footer-sep {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-account-link span,
  .site-account-trigger span,
  .site-account-caret {
    display: none;
  }

  .site-account-link,
  .site-account-trigger {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .site-top {
    min-height: 72px;
    padding: 0.55rem 1rem;
  }

  .site-brand img {
    height: 56px;
  }

  .site-nav-toggle {
    display: inline-flex;
  }

  .site-nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0 0.75rem 0.35rem;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > li {
    position: relative;
  }

  .site-nav > li > a,
  .site-nav > li > button {
    width: 100%;
    justify-content: space-between;
    min-height: 46px;
    font-size: 0.9rem;
    padding: 0 0.85rem;
  }

  .site-mega {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    inset: auto;
    box-shadow: none;
    border-radius: 0;
  }

  .site-nav > li.is-open > .site-mega {
    grid-template-columns: 1fr;
  }

  .site-search-panel,
  .site-lang-panel,
  .site-account-panel {
    left: auto;
    right: 0;
    width: min(320px, calc(100vw - 1.5rem));
  }
}
