/* header - markup lives in partials/header.fa.html, JS in js/header.js */

:root {
  --hd-top-h: 36px;
  --hd-bar-h: 69px;
  --hd-ink: #0f172a;
  --hd-text: #334155;
  --hd-muted: #64748b;
  --hd-line: #e7ecf3;
  --hd-soft: #f7f9fc;
  --hd-hover: #f1f6fd;
  --hd-brand: #0073ec;
  --hd-brand-dark: #005ec2;
  --hd-brand-tint: #eaf3fe;
  --hd-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --hd-font: IRANSans, Tahoma, sans-serif;
}

/* Heights match .main-with-padding (105px) and its 92px mobile value in style.css. */
@media (max-width: 768px) {
  :root {
    --hd-bar-h: 56px;
  }
}

.pk-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1040;
  font-family: var(--hd-font);
  transition: transform 0.28s var(--hd-ease);
}
.pk-header.is-scrolled:not(.is-menu-open) {
  transform: translateY(calc(-1 * var(--hd-top-h)));
}
.pk-header *,
.pk-header *::before,
.pk-header *::after {
  box-sizing: border-box;
}
.pk-header ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pk-header p {
  margin: 0;
}
.pk-header a,
.pk-header a:hover,
.pk-header a:focus {
  text-decoration: none;
}
.pk-header a:focus-visible,
.pk-header button:focus-visible {
  outline: 2px solid var(--hd-brand);
  outline-offset: 2px;
  border-radius: 8px;
}

.pk-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

/* Top bar
   -------------------------------------------------------------------------- */
.pk-topbar {
  height: var(--hd-top-h);
  background: var(--hd-soft);
  border-bottom: 1px solid var(--hd-line);
  font-size: 12.5px;
  color: var(--hd-muted);
}
.pk-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.pk-topbar__list {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pk-topbar__item,
.pk-topbar__item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  color: var(--hd-muted);
  transition: color 0.15s ease;
}
.pk-topbar__item a:hover {
  color: var(--hd-brand);
}
.pk-topbar .pk-ico {
  width: 15px;
  height: 15px;
}
.pk-topbar__list--account {
  gap: 0;
}
.pk-topbar__list--account .pk-topbar__item + .pk-topbar__item {
  margin-inline-start: 12px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid #d9e0ea;
}
@media (max-width: 575.98px) {
  .pk-hide-sm {
    display: none !important;
  }
}

/* Main bar
   -------------------------------------------------------------------------- */
.pk-bar {
  position: relative;
  height: var(--hd-bar-h);
  background: #ffffff;
  border-bottom: 1px solid var(--hd-line);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.pk-header.is-scrolled .pk-bar {
  border-bottom-color: transparent;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}
.pk-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}
.pk-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.pk-logo img {
  display: block;
  width: 120px;
  height: auto;
}

.pk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  font: 700 14px/1 var(--hd-font);
  white-space: nowrap;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.pk-btn--primary,
.pk-btn--primary:focus {
  background: var(--hd-brand);
  color: #ffffff;
  box-shadow: 0 6px 16px -6px rgba(0, 115, 236, 0.55);
}
.pk-btn--primary:hover {
  background: var(--hd-brand-dark);
  color: #ffffff;
}
.pk-btn--primary:active {
  transform: translateY(1px);
}

.pk-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  padding: 0;
  border: 1px solid var(--hd-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--hd-ink);
  cursor: pointer;
}
.pk-burger .pk-ico {
  width: 22px;
  height: 22px;
}
.pk-burger .pk-ico--close,
.pk-header.is-menu-open .pk-burger .pk-ico--menu {
  display: none;
}
.pk-header.is-menu-open .pk-burger .pk-ico--close {
  display: block;
}

/* Menu content (shared by desktop and drawer)
   -------------------------------------------------------------------------- */
.pk-nav__link {
  font-family: var(--hd-font);
  color: var(--hd-ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.pk-chev {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}
.pk-nav__item.is-open .pk-chev {
  transform: rotate(180deg);
}

.pk-dd__head {
  padding: 0 10px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--hd-muted);
}

.pk-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  color: var(--hd-ink);
  transition: background-color 0.15s ease;
}
.pk-link:hover,
.pk-link:focus-visible {
  background: var(--hd-hover);
}
.pk-link__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--hd-brand-tint);
  color: var(--hd-brand);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.pk-link:hover .pk-link__ico {
  background: var(--hd-brand);
  color: #ffffff;
}
.pk-link__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pk-link__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--hd-ink);
  transition: color 0.15s ease;
}
.pk-link:hover .pk-link__title,
.pk-link[aria-current='page'] .pk-link__title {
  color: var(--hd-brand);
}
.pk-link__desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--hd-muted);
}

.pk-dd__aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  background: var(--hd-soft);
}
.pk-dd__aside-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--hd-ink);
}
.pk-dd__aside-text {
  font-size: 13px;
  line-height: 1.9;
  color: var(--hd-text);
}
.pk-dd__aside-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--hd-brand);
}
.pk-dd__aside-link:hover {
  color: var(--hd-brand-dark);
}
.pk-dd__aside-link .pk-ico {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.pk-dd__aside-link:hover .pk-ico {
  transform: translateX(-3px);
}

.pk-dd__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px -10px -10px;
  padding: 12px 20px;
  border-top: 1px solid var(--hd-line);
  background: var(--hd-soft);
  border-radius: 0 0 14px 14px;
  font-size: 12.5px;
  color: var(--hd-muted);
}
.pk-dd__foot a {
  font-weight: 700;
  color: var(--hd-ink);
}
.pk-dd__foot a:hover {
  color: var(--hd-brand);
}

/* Desktop
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  .pk-burger {
    display: none;
  }
  .pk-nav {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
  }
  .pk-nav__list {
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 100%;
  }
  .pk-nav__item {
    position: relative;
    display: flex;
  }
  .pk-nav__item--mega {
    position: static;
  }
  .pk-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 100%;
    padding: 0 12px;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.18s ease;
  }
  .pk-nav__link:focus-visible {
    outline-offset: -6px;
  }
  .pk-nav__link::after {
    content: '';
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--hd-brand);
    transform: scaleX(0);
    transition: transform 0.22s var(--hd-ease);
  }
  .pk-nav__item:hover > .pk-nav__link,
  .pk-nav__item.is-open > .pk-nav__link,
  .pk-nav__item.is-current > .pk-nav__link {
    color: var(--hd-brand);
  }
  .pk-nav__item.is-open > .pk-nav__link::after,
  .pk-nav__item.is-current > .pk-nav__link::after {
    transform: scaleX(1);
  }
  .pk-nav__actions {
    display: flex;
    align-items: center;
    margin-inline-start: auto;
  }

  .pk-dd {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 300px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--hd-line);
    border-radius: 14px;
    box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.22s var(--hd-ease), visibility 0s linear 0.22s;
  }
  /* Keeps the pointer inside the item while crossing the gap under the bar. */
  .pk-dd::before {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    top: -8px;
    height: 8px;
  }
  .pk-nav__item.is-open > .pk-dd {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.22s var(--hd-ease), visibility 0s;
  }

  .pk-dd--sm {
    width: 320px;
  }
  .pk-dd--grid2 {
    width: 600px;
  }
  .pk-dd--grid2 .pk-dd__head {
    padding-top: 6px;
  }
  .pk-dd--grid2 .pk-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
  }

  .pk-dd--mega {
    right: auto;
    left: 50%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 250px;
    width: min(900px, calc(100vw - 48px));
    padding: 0;
    overflow: hidden;
    transform: translate(-50%, 8px);
  }
  .pk-nav__item.is-open > .pk-dd--mega {
    transform: translate(-50%, 0);
  }
  .pk-dd--mega::before {
    display: none;
  }
  .pk-dd__col {
    padding: 20px 14px 14px;
  }
  .pk-dd__col + .pk-dd__col,
  .pk-dd__aside {
    border-inline-start: 1px solid var(--hd-line);
  }
}

/* Drawer (tablet and mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .pk-bar__inner {
    position: static;
  }
  .pk-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--hd-top-h) - var(--hd-bar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ffffff;
    border-top: 1px solid var(--hd-line);
    box-shadow: 0 30px 40px -24px rgba(15, 23, 42, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.24s var(--hd-ease), visibility 0s linear 0.24s;
  }
  .pk-header.is-menu-open .pk-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.24s var(--hd-ease), visibility 0s;
  }
  .pk-nav__list {
    padding: 4px 16px 8px;
  }
  .pk-nav__item {
    border-bottom: 1px solid var(--hd-line);
  }
  .pk-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 54px;
    padding: 0 4px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: right;
  }
  .pk-nav__item.is-open > .pk-nav__link,
  .pk-nav__item.is-current > .pk-nav__link {
    color: var(--hd-brand);
  }
  .pk-chev {
    width: 16px;
    height: 16px;
  }
  .pk-dd {
    display: none;
    padding: 0 0 12px;
  }
  .pk-nav__item.is-open > .pk-dd {
    display: block;
  }
  .pk-dd__head {
    padding: 10px 4px 4px;
  }
  .pk-dd__col + .pk-dd__col {
    margin-top: 4px;
  }
  .pk-dd__aside,
  .pk-dd__foot {
    display: none;
  }
  .pk-link {
    padding: 9px 4px;
  }
  .pk-link__ico {
    width: 34px;
    height: 34px;
  }
  .pk-nav__actions {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid var(--hd-line);
  }
  .pk-nav__actions .pk-btn {
    width: 100%;
    height: 46px;
  }
  html.pk-lock,
  html.pk-lock body {
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  .pk-bar__inner {
    gap: 16px;
  }
  .pk-logo img {
    width: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-header,
  .pk-header * {
    transition-duration: 0.01ms !important;
  }
}

/* the theme's full-screen loader covered the page until all scripts had run */
#preloader {
  display: none !important;
}
