﻿:root {
  --cyrus-home-header-height: 76px;
  --header-height: var(--cyrus-home-header-height);
  --cyrus-home-header-max: 1416px;
  --cyrus-home-header-bg: rgba(16, 20, 35, 0.72);
  --cyrus-home-header-text: #fff;
  --cyrus-home-header-control: rgba(255, 255, 255, 0.055);
  --cyrus-home-header-control-border: rgba(203, 213, 225, 0.18);
  --cyrus-home-help-panel-height: 170px;
}

.home-nav-link[data-i18n="nav_admin_panel"],
.home-mobile-nav-link[data-i18n="nav_admin_panel"] {
  position: relative;
}

.cyrus-admin-attention-badge {
  position: absolute;
  inset-block-start: -3px;
  inset-inline-end: -7px;
  display: block;
  width: 9px;
  height: 9px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--cyrus-home-header-bg, #fff);
  border-radius: 999px;
  background: #ef4444;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.16);
  pointer-events: none;
}

:root[data-theme="light"] {
  --cyrus-home-header-bg: rgba(243, 231, 225, 0.72);
  --cyrus-home-header-text: #111827;
  --cyrus-home-header-control: rgba(255, 255, 255, 0.42);
  --cyrus-home-header-control-border: rgba(17, 24, 39, 0.22);
}

.home-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--cyrus-home-header-height);
  background: var(--cyrus-home-header-bg);
  border-bottom: 0;
  color: var(--cyrus-home-header-text);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.home-header.is-scrolled {
  background: rgba(16, 20, 35, 0.82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .home-header.is-scrolled {
  background: rgba(243, 231, 225, 0.84);
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
}

.home-header-nav {
  display: grid;
  grid-template-areas: "links brand actions";
  grid-template-columns: minmax(360px, 1fr) 116px minmax(360px, 1fr);
  align-items: center;
  width: min(var(--cyrus-home-header-max), calc(100% - 56px));
  height: var(--cyrus-home-header-height);
  margin: 0 auto;
  column-gap: 28px;
}

html[dir="rtl"] .home-header-nav {
  grid-template-areas: "links brand actions";
  grid-template-columns: minmax(360px, 1fr) 116px minmax(360px, 1fr);
  column-gap: 28px;
}

.home-nav-links,
.home-header-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.home-mobile-menu-toggle,
.home-mobile-menu {
  display: none;
}

.home-nav-links {
  grid-area: links;
  justify-self: start;
  justify-content: flex-start;
  gap: clamp(18px, 1.65vw, 30px);
}

html[dir="rtl"] .home-nav-links {
  justify-self: start;
  justify-content: flex-start;
  gap: clamp(18px, 1.65vw, 30px);
}

.home-header-actions {
  grid-area: actions;
  justify-self: end;
  justify-content: flex-end;
  gap: 14px;
  direction: ltr;
}

html[dir="rtl"] .home-header-actions {
  justify-self: end;
  justify-content: flex-end;
  gap: 14px;
  direction: ltr;
  flex-direction: row-reverse;
}

.home-brand {
  grid-area: brand;
  justify-self: center;
  width: 156px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: inherit;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 1;
  text-decoration: none;
}

html[dir="rtl"] .home-nav-link {
  font-size: 20px;
  line-height: 1.3;
}

html[dir="rtl"] .home-nav-menu-button[data-i18n="nav_help"]::after {
  margin-inline-start: 4px;
}

.home-nav-menu-button[data-i18n="nav_help"]::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-inline-start: 6px;
  border-inline-end: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.75;
}

.home-icon-button,
.home-login-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--cyrus-home-header-control-border);
  background: var(--cyrus-home-header-control);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.home-icon-button {
  width: 40px;
  border-radius: 999px;
  color: #cfc3e8;
}

.home-icon-button svg {
  width: 19px;
  height: 19px;
  display: block;
}

:root[data-theme="light"] .home-icon-button,
:root[data-theme="light"] .home-login-button {
  border-color: rgba(17, 24, 39, 0.42);
  background: rgba(255, 255, 255, 0.34);
  color: #111827;
}

:root[data-theme="light"] .home-icon-button:hover,
:root[data-theme="light"] .home-login-button:hover {
  border-color: rgba(17, 24, 39, 0.64);
  background: rgba(255, 255, 255, 0.52);
}

:root[data-theme="light"] .home-icon-button svg path[fill="#fff"] {
  fill: rgba(17, 24, 39, 0.22);
}

.home-lang-button {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.home-login-button {
  min-width: 78px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  direction: inherit;
}


.home-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.home-nav-menu-button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}


/* خود هدر باز می‌شود، باکس جدا نداریم */
.home-header {
  overflow: visible;
  transition:
    height 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.home-header-nav {
  position: relative;
  z-index: 3;
}

.home-nav-dropdown {
  position: static;
  display: inline-flex;
  align-items: center;
}

.home-nav-menu-button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

/* باز شدن خود هدر */
.home-header.is-help-menu-open,
.home-header:has(.home-nav-dropdown:hover),
.home-header:has(.home-nav-dropdown:focus-within),
.home-header:has(.home-nav-dropdown.is-open) {
  height: calc(var(--cyrus-home-header-height) + var(--cyrus-home-help-panel-height));
  background: var(--cyrus-home-header-bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}

:root[data-theme="light"] .home-header.is-help-menu-open,
:root[data-theme="light"] .home-header:has(.home-nav-dropdown:hover),
:root[data-theme="light"] .home-header:has(.home-nav-dropdown:focus-within),
:root[data-theme="light"] .home-header:has(.home-nav-dropdown.is-open) {
  background: var(--cyrus-home-header-bg);
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.09);
}

/* منو ادامه‌ی خود هدر است */
.home-nav-menu {
  position: fixed;
  inset-block-start: var(--cyrus-home-header-height);
  inset-inline-start: 0;
  inset-inline-end: 0;
  z-index: 101;

  width: 100vw;
  height: var(--cyrus-home-help-panel-height);

  display: grid;
  align-content: start;
  gap: 10px;

  padding-block: 34px 26px;
  padding-inline: max(28px, calc((100vw - var(--cyrus-home-header-max)) / 2 + 28px));

  border: 0;
  border-radius: 0;
  border-block-start: 1px solid var(--cyrus-home-header-control-border);

  background: transparent;
  color: var(--cyrus-home-header-text);
  box-shadow: none;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(-5px);

  transition:
    opacity 160ms ease,
    visibility 160ms ease,
    transform 160ms ease;
}

.home-header.is-help-menu-open .home-nav-menu,
.home-nav-dropdown:hover .home-nav-menu,
.home-nav-dropdown:focus-within .home-nav-menu,
.home-nav-dropdown.is-open .home-nav-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* متن‌ها کوچیک‌تر */
.home-nav-menu-item {
  display: block;

  width: fit-content;
  max-width: min(420px, 100%);

  padding: 0;
  margin: 0;

  border: 0;
  border-radius: 0;
  background: transparent;

  color: inherit;
  text-decoration: none;
  white-space: nowrap;

  font-size: clamp(20px, 1.45vw, 26px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;

  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.home-nav-menu-item:hover,
.home-nav-menu-item:focus-visible {
  background: transparent;
  opacity: 0.62;
  outline: none;
}

/* انگلیسی: زیر Home، سمت چپ */
html:not([dir="rtl"]) .home-nav-menu {
  direction: ltr;
  text-align: left;
  justify-items: start;
}

html:not([dir="rtl"]) .home-nav-menu-item {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

html:not([dir="rtl"]) .home-nav-menu-item:hover,
html:not([dir="rtl"]) .home-nav-menu-item:focus-visible {
  transform: translateX(5px);
}

/* فارسی: زیر خانه، سمت راست */
html[dir="rtl"] .home-nav-menu {
  direction: rtl;
  text-align: right;
  justify-items: start;
}

html[dir="rtl"] .home-nav-menu-item {
  margin-inline-start: 0;
  margin-inline-end: 0;
  letter-spacing: 0;
  font-size: clamp(21px, 1.5vw, 28px);
}

html[dir="rtl"] .home-nav-menu-item:hover,
html[dir="rtl"] .home-nav-menu-item:focus-visible {
  transform: translateX(-5px);
}

@media (max-width: 820px) {
  :root {
    --cyrus-home-help-panel-height: 0px;
  }

  .home-header.is-help-menu-open,
  .home-header:has(.home-nav-dropdown:hover),
  .home-header:has(.home-nav-dropdown:focus-within),
  .home-header:has(.home-nav-dropdown.is-open) {
    height: var(--cyrus-home-header-height);
  }

  .home-nav-menu {
    display: none;
  }
}

/* .home-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.home-nav-menu-button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.home-nav-menu {
  position: absolute;
  inset-block-start: calc(100% + 16px);
  inset-inline-start: 0;
  display: grid;
  min-width: 154px;
  padding: 8px;
  border: 1px solid var(--cyrus-home-header-control-border);
  border-radius: 8px;
  background: rgba(16, 20, 35, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

:root[data-theme="light"] .home-nav-menu {
  background: rgba(243, 231, 225, 0.96);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.14);
}

.home-nav-dropdown:hover .home-nav-menu,
.home-nav-dropdown:focus-within .home-nav-menu,
.home-nav-dropdown.is-open .home-nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.home-nav-menu-item {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  color: inherit;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}

.home-nav-menu-item:hover {
  background: var(--cyrus-home-header-control);
}

html[dir="rtl"] .home-nav-menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

html[dir="rtl"] .home-nav-menu-item {
  font-size: 17px;
} */

@media (max-width: 1120px) {
  .home-header-nav {
    width: min(100% - 28px, var(--cyrus-home-header-max));
    grid-template-columns: minmax(260px, 1fr) 104px minmax(260px, 1fr);
    column-gap: 18px;
  }

  .home-nav-links {
    gap: 12px;
  }

  .home-nav-link {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
  }

  html[dir="rtl"] .home-header-nav {
    grid-template-columns: minmax(260px, 1fr) 104px minmax(260px, 1fr);
    column-gap: 18px;
  }

  html[dir="rtl"] .home-nav-links {
    gap: 12px;
  }

  html[dir="rtl"] .home-nav-link {
    font-size: 16px;
    line-height: 1.3;
  }
}

/* @media (max-width: 1120px) {
  .home-header-nav {
    width: min(100% - 28px, var(--cyrus-home-header-max));
    grid-template-columns: minmax(260px, 1fr) 104px minmax(260px, 1fr);
    column-gap: 18px;
  }

  .home-nav-link {
    font-size: 16px;
  }


  .home-nav-link {
    font-size: 14px;
  }

  html[dir="rtl"] .home-header-nav {
    grid-template-columns: minmax(260px, 1fr) 104px minmax(260px, 1fr);
    column-gap: 18px;
  }

  html[dir="rtl"] .home-nav-links {
    gap: 12px;
  }
} */

@media (max-width: 820px) {
  :root {
    --cyrus-home-header-height: 66px;
  }

  .home-header {
    overflow: visible;
  }

  .home-header-nav {
    position: relative;
    grid-template-areas: "menu brand";
    grid-template-columns: 42px minmax(0, 1fr);
    width: min(100% - 24px, var(--cyrus-home-header-max));
    column-gap: 12px;
  }

  html[dir="rtl"] .home-header-nav {
    grid-template-areas: "brand menu";
    grid-template-columns: minmax(0, 1fr) 42px;
    width: min(100% - 24px, var(--cyrus-home-header-max));
    column-gap: 12px;
  }

  .home-nav-links {
    display: none;
  }

  .home-mobile-menu-toggle {
    grid-area: menu;
    appearance: none;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--cyrus-home-header-control-border);
    border-radius: 999px;
    background: var(--cyrus-home-header-control);
    color: inherit;
    cursor: pointer;
  }

  .home-mobile-menu-toggle span {
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .home-header.is-mobile-menu-open .home-mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .home-header.is-mobile-menu-open .home-mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .home-header.is-mobile-menu-open .home-mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .home-brand {
    width: 82px;
    height: 54px;
    justify-self: end;
  }

  html[dir="rtl"] .home-brand {
    justify-self: start;
  }

  .home-header-actions {
    display: none;
  }

  html[dir="rtl"] .home-header-actions {
    display: none;
  }

  .home-icon-button,
  .home-login-button {
    min-height: 38px;
  }

  .home-icon-button {
    width: 38px;
    flex: 0 0 38px;
  }

  .home-login-button {
    max-width: 112px;
    padding: 0 10px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-mobile-menu[hidden] {
    display: none !important;
  }

  .home-mobile-menu {
    position: absolute;
    inset-block-start: calc(100% + 10px);
    inset-inline: 0;
    z-index: 101;
    display: block;
    max-height: calc(100dvh - var(--cyrus-home-header-height) - 18px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .home-mobile-menu-inner {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--cyrus-home-header-control-border);
    border-radius: 8px;
    background: rgba(16, 20, 35, 0.96);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
  }

  :root[data-theme="light"] .home-mobile-menu-inner {
    background: rgba(243, 231, 225, 0.98);
    box-shadow: 0 22px 60px rgba(17, 24, 39, 0.14);
  }

  .home-mobile-actions {
    display: grid;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cyrus-home-header-control-border);
  }

  .home-mobile-control-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: 8px;
  }

  .home-mobile-control-row > .home-mobile-control-cell {
    display: grid;
    width: 100%;
    min-width: 0;
    height: 44px;
    place-self: stretch;
  }

  .home-mobile-control-row > .home-mobile-control-cell > .home-mobile-control-button {
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    max-width: none;
    flex-basis: auto;
    border-radius: 8px;
  }

  .home-mobile-control-row .home-icon-button,
  .home-mobile-control-row .cyrus-notification-trigger {
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
  }

  /* .home-mobile-control-row .cyrus-notification-root {
    display: grid;
    width: 100%;
    min-width: 0;
    align-self: stretch;
    justify-self: stretch;
  }

  .home-mobile-control-row .cyrus-notification-root .home-icon-button {
    width: 100%;
    height: 44px;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  } */

  .home-mobile-auth-slot {
    display: grid;
    width: 100%;
  }

  .home-mobile-auth-slot .cyrus-auth-btn,
  .home-mobile-auth-slot .cyrus-user-pill {
    width: 100%;
    max-width: none;
    min-height: 44px;
    border-radius: 8px;
    font-size: 14px;
  }

  .home-mobile-auth-slot .cyrus-auth-menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
    box-shadow: none;
  }

  .home-mobile-auth-slot .cyrus-auth-item,
  .home-mobile-auth-slot .cyrus-auth-link,
  .home-mobile-auth-slot .cyrus-auth-provider {
    min-height: 40px;
    border-radius: 6px;
    font-size: 14px;
  }

  .home-mobile-nav {
    display: grid;
    gap: 4px;
  }

  .home-mobile-nav-link,
  .home-mobile-nav-label {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    color: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-align: start;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  .home-mobile-nav-link:hover {
    background: var(--cyrus-home-header-control);
  }

  .home-mobile-nav-label {
    opacity: 0.72;
  }

  .home-mobile-subnav {
    display: grid;
    gap: 2px;
    padding-inline-start: 12px;
  }

  html[dir="rtl"] .home-mobile-subnav {
    padding-inline-start: 0;
    padding-inline-end: 12px;
  }
}

@media (max-width: 560px) {
  .home-header-nav,
  html[dir="rtl"] .home-header-nav {
    width: min(100% - 18px, var(--cyrus-home-header-max));
  }

  .home-icon-button {
    width: 36px;
    min-height: 36px;
    flex-basis: 36px;
  }

  .home-mobile-control-row > .home-mobile-control-cell > .home-mobile-control-button {
    width: 100%;
    height: 44px;
    min-height: 44px;
    flex-basis: auto;
  }

  .home-login-button {
    max-width: 96px;
  }

  .home-mobile-menu-inner {
    padding: 10px;
  }
}


/* Auth menu from shared file inside home header */
.home-auth-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.home-auth-slot .cyrus-auth-btn,
.home-auth-slot .cyrus-user-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  max-width: 170px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--cyrus-home-header-control-border);
  background: var(--cyrus-home-header-control);
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.home-auth-slot .cyrus-auth-menu {
  position: absolute;
  top: calc(100% + 12px);
  inset-inline-start: 0;
  inset-inline-end: auto;
  display: grid;
  min-width: 230px;
  padding: 14px;
  border: 1px solid var(--cyrus-home-header-control-border);
  border-radius: 18px;
  background: rgba(16, 20, 35, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
  z-index: 9999;
}

:root[data-theme="light"] .home-auth-slot .cyrus-auth-menu {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.14);
}

.home-auth-slot .cyrus-auth-menu[hidden] {
  display: none !important;
}

.home-auth-slot .cyrus-auth-item,
.home-auth-slot .cyrus-auth-link,
.home-auth-slot .cyrus-auth-provider {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: start;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.home-auth-slot .cyrus-auth-item:hover,
.home-auth-slot .cyrus-auth-link:hover,
.home-auth-slot .cyrus-auth-provider:hover {
  background: var(--cyrus-home-header-control);
}

html[dir="rtl"] .home-auth-slot .cyrus-auth-menu {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

html[dir="rtl"] .home-auth-slot .cyrus-auth-item,
html[dir="rtl"] .home-auth-slot .cyrus-auth-link,
html[dir="rtl"] .home-auth-slot .cyrus-auth-provider {
  justify-content: flex-end;
  text-align: right;
}

@media (max-width: 820px) {
  .home-auth-slot .cyrus-auth-btn,
  .home-auth-slot .cyrus-user-pill {
    max-width: 120px;
    padding: 0 9px;
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  .home-auth-slot .cyrus-auth-btn,
  .home-auth-slot .cyrus-user-pill {
    max-width: 96px;
  }
}


/* App/Profile/Dashboard compact variant */
.home-header.home-header--app {
  --cyrus-home-header-height: 75px;
  --cyrus-home-header-max: 840px;
}

.home-header.home-header--app.home-header--app-wide {
  --cyrus-home-header-max: 1440px;
}

.home-header.home-header--app.home-header--app-wide .home-header-nav {
  width: min(var(--cyrus-home-header-max), calc(100% - 56px));
}

.home-header.home-header--app .home-header-nav {
  width: min(var(--cyrus-home-header-max), calc(100% - 32px));
  grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
  column-gap: 16px;
}

.home-header.home-header--app .home-brand {
  width: 108px;
  height: 60px;
}

.home-header.home-header--app .home-nav-links {
  gap: 18px;
  flex-wrap: wrap;
}

/* .home-header.home-header--app .home-nav-link {
  font-size: 12.5px;
  font-weight: 700;
} */

.home-header.home-header--app .home-nav-link {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.home-header.home-header--app .home-header-actions {
  gap: 8px;
}

/* =====================================================
   Cyrus language selector
   Floating card + two-line labels
===================================================== */

body.cyrus-language-dialog-open {
  overflow: hidden;
}

/* لایه تاریک پشت پنجره */
.cyrus-language-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;

  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  /*
   * جای کارت شبیه ظاهر قبلی:
   * کمی فاصله از بالا و چپ صفحه
   */
  padding:
    max(68px, 7vh)
    clamp(18px, 5vw, 84px);

  /*
   * حتی در صفحات فارسی،
   * کارت در سمت چپ باقی بماند.
   */
  direction: ltr;

  background: rgba(2, 6, 23, 0.7);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cyrus-language-overlay[hidden] {
  display: none;
}

/* کارت اصلی */
.cyrus-language-dialog {
  box-sizing: border-box;

  width: min(340px, calc(100vw - 32px));
  max-height: min(
    620px,
    calc(100dvh - 96px)
  );

  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr);

  overflow: hidden;

  color: #f8fafc;
  background: #202020;

  border:
    1px solid
    rgba(255, 255, 255, 0.09);

  border-radius: 14px;

  box-shadow:
    0 28px 80px
    rgba(0, 0, 0, 0.46);

  direction: ltr;
}

/* هدر کارت */
.cyrus-language-dialog-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  min-height: 56px;

  padding: 12px 16px;

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.1);
}

.cyrus-language-dialog-header h2 {
  margin: 0;

  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

/* دکمه بستن */
/* .cyrus-language-dialog-close {
  appearance: none;
  -webkit-appearance: none;

  width: 38px;
  height: 38px;
  flex: 0 0 38px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 0;
  border-radius: 999px;

  color: #ffffff;
  background:
    rgba(255, 255, 255, 0.12);

  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  transition:
    background-color 140ms ease,
    transform 140ms ease;
}

.cyrus-language-dialog-close:hover {
  background:
    rgba(255, 255, 255, 0.18);
}

.cyrus-language-dialog-close:active {
  transform: scale(0.95);
}

.cyrus-language-dialog-close:focus-visible {
  outline:
    2px solid
    rgba(255, 255, 255, 0.35);

  outline-offset: 2px;
} */

/* لیست زبان‌ها */
.cyrus-language-options {
  box-sizing: border-box;

  min-height: 0;

  padding: 8px;

  overflow-x: hidden;
  overflow-y: auto;

  overscroll-behavior: contain;

  scrollbar-width: thin;

  scrollbar-color:
    rgba(255, 255, 255, 0.24)
    transparent;
}

.cyrus-language-options::-webkit-scrollbar {
  width: 7px;
}

.cyrus-language-options::-webkit-scrollbar-track {
  background: transparent;
}

.cyrus-language-options::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.24);
}

/* هر گزینه زبان */
.cyrus-language-option {
  appearance: none;
  -webkit-appearance: none;

  box-sizing: border-box;

  display: flex;
  align-items: center;

  width: 100%;
  min-height: 62px;

  margin: 0;
  padding: 9px 12px;

  border: 0;
  border-radius: 8px;

  color: inherit;
  background: transparent;

  font: inherit;
  text-align: left;

  cursor: pointer;

  -webkit-tap-highlight-color:
    transparent;

  transition:
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.cyrus-language-option:hover {
  background:
    rgba(255, 255, 255, 0.07);
}

.cyrus-language-option:focus-visible {
  outline: none;

  background:
    rgba(255, 255, 255, 0.08);

  box-shadow:
    inset 0 0 0 2px
    rgba(255, 255, 255, 0.15);
}

/* زبان انتخاب‌شده */
.cyrus-language-option.is-selected {
  background: #383838;
}

.cyrus-language-option.is-selected:hover {
  background: #3f3f3f;
}

/* کانتینر دو خط متن */
/* .cyrus-language-option-text {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr);

  gap: 2px;

  width: 100%;
  min-width: 0;

  direction: ltr;
} */

.cyrus-language-option-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 2px;

  width: 100%;
  min-width: 0;

  direction: ltr;
  text-align: left;
}

/* تنظیمات مشترک لیبل‌ها */
/* .cyrus-language-option-native,
.cyrus-language-option-english {
  display: block;

  width: 100%;
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
} */

.cyrus-language-option-native,
.cyrus-language-option-english {
  display: block;
  align-self: flex-start;

  width: fit-content;
  max-width: 100%;
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  text-align: left;
}

.cyrus-language-option-native {
  color: #f8fafc;

  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;

  text-align: left;
  unicode-bidi: plaintext;
}

/* خط دوم: نام انگلیسی */
.cyrus-language-option-english {
  color:
    rgba(248, 250, 252, 0.82);

  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;

  direction: ltr;
  text-align: left;
}

/* =====================================================
   Light theme
===================================================== */

:root[data-theme="light"]
.cyrus-language-overlay {
  background:
    rgba(15, 23, 42, 0.32);
}

:root[data-theme="light"]
.cyrus-language-dialog {
  color: #111827;
  background: #fffaf7;

  border-color:
    rgba(15, 23, 42, 0.1);

  box-shadow:
    0 28px 80px
    rgba(15, 23, 42, 0.2);
}

:root[data-theme="light"]
.cyrus-language-dialog-header {
  border-bottom-color:
    rgba(15, 23, 42, 0.1);
}

/* :root[data-theme="light"]
.cyrus-language-dialog-close {
  color: #111827;

  background:
    rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"]
.cyrus-language-dialog-close:hover {
  background:
    rgba(15, 23, 42, 0.13);
} */

:root[data-theme="light"]
.cyrus-language-option:hover {
  background:
    rgba(15, 23, 42, 0.06);
}

:root[data-theme="light"]
.cyrus-language-option:focus-visible {
  background:
    rgba(15, 23, 42, 0.07);

  box-shadow:
    inset 0 0 0 2px
    rgba(15, 23, 42, 0.13);
}

:root[data-theme="light"]
.cyrus-language-option.is-selected {
  background:
    rgba(15, 23, 42, 0.11);
}

:root[data-theme="light"]
.cyrus-language-option-native {
  color: #111827;
}

:root[data-theme="light"]
.cyrus-language-option-english {
  color:
    rgba(17, 24, 39, 0.7);
}

/* =====================================================
   Mobile
===================================================== */

@media (max-width: 640px) {
  .cyrus-language-overlay {
    align-items: flex-end;
    justify-content: center;

    padding: 12px;
  }

  .cyrus-language-dialog {
    width: 100%;
    max-height:
      calc(100dvh - 24px);

    border-radius: 18px;
  }

  .cyrus-language-dialog-header {
    min-height: 60px;
  }
}

.home-header.home-header--app .home-icon-button {
  width: 40px;
  min-height: 40px;
}

.home-header.home-header--app .home-auth-slot .cyrus-auth-btn,
.home-header.home-header--app .home-auth-slot .cyrus-user-pill {
  max-width: 150px;
  min-height: 40px;
  font-size: 11px;
}

@media (max-width: 820px) {
  .home-header.home-header--app {
    --cyrus-home-header-height: 66px;
    --cyrus-home-header-max: 100%;
  }

  .home-header.home-header--app .home-header-nav {
    grid-template-areas: "menu brand";
    grid-template-columns: 42px minmax(0, 1fr);
    width: min(100% - 24px, var(--cyrus-home-header-max));
    column-gap: 12px;
  }

  html[dir="rtl"] .home-header.home-header--app .home-header-nav {
    grid-template-areas: "brand menu";
    grid-template-columns: minmax(0, 1fr) 42px;
    width: min(100% - 24px, var(--cyrus-home-header-max));
    column-gap: 12px;
  }

  .home-header.home-header--app.home-header--app-wide .home-header-nav,
  html[dir="rtl"] .home-header.home-header--app.home-header--app-wide .home-header-nav {
    width: min(100% - 36px, var(--cyrus-home-header-max));
  }

  .home-header.home-header--app .home-brand {
    width: 82px;
    height: 54px;
  }

  .home-header.home-header--app .home-nav-links {
    display: none;
  }

  .home-header.home-header--app .home-header-actions {
    display: none;
  }

  .home-header.home-header--app .home-icon-button {
    width: 38px;
    min-height: 38px;
  }

  .home-header.home-header--app .home-auth-slot .cyrus-auth-btn,
  .home-header.home-header--app .home-auth-slot .cyrus-user-pill {
    max-width: 112px;
    min-height: 38px;
    padding: 0 9px;
    font-size: 10.5px;
  }
}

@media (max-width: 560px) {
  .home-header.home-header--app.home-header--app-wide .home-header-nav,
  html[dir="rtl"] .home-header.home-header--app.home-header--app-wide .home-header-nav {
    width: min(100% - 28px, var(--cyrus-home-header-max));
  }
}

@media (max-width: 380px) {
  .home-auth-slot .cyrus-auth-btn,
  .home-auth-slot .cyrus-user-pill,
  .home-header.home-header--app .home-auth-slot .cyrus-auth-btn,
  .home-header.home-header--app .home-auth-slot .cyrus-user-pill {
    max-width: 94px;
  }
}

/* @media (max-width: 820px) {
  .home-mobile-control-row .cyrus-notification-root--mobile {
    align-self: stretch;
    justify-self: stretch;
    inline-size: 100%;
    block-size: 100%;
  }

  .home-mobile-control-row .cyrus-notification-trigger--mobile {
    inline-size: 100% !important;
    block-size: 44px;
    min-block-size: 44px;
    min-inline-size: 0;
    max-inline-size: none;
    flex-basis: auto;
    border-radius: 8px;
  }
} */

@media (max-width: 820px) {
  .home-mobile-control-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
  }

  .home-mobile-control-row > .home-mobile-control-cell,
  .home-mobile-control-row > .cyrus-notification-root--mobile {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    place-self: stretch !important;
  }

  .home-mobile-control-row .cyrus-notification-trigger--mobile {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
  }

  .home-header .home-auth-slot.home-mobile-auth-slot .cyrus-auth-btn,
  .home-header .home-auth-slot.home-mobile-auth-slot .cyrus-user-pill,
  .home-header.home-header--app .home-auth-slot.home-mobile-auth-slot .cyrus-auth-btn,
  .home-header.home-header--app .home-auth-slot.home-mobile-auth-slot .cyrus-user-pill {
    width: 100%;
    max-width: none;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
  }

  .home-mobile-auth-slot .cyrus-user-pill::after {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-inline-start: 10px;
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    opacity: 0.7;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .home-mobile-auth-slot .cyrus-user-pill[aria-expanded="true"]::after {
    opacity: 1;
    transform: translateY(2px) rotate(225deg);
  }

  .home-header .home-auth-slot.home-mobile-auth-slot,
  .home-header.home-header--app .home-auth-slot.home-mobile-auth-slot {
    display: grid;
    width: 100%;
    align-items: stretch;
  }

  .home-header .home-auth-slot.home-mobile-auth-slot .cyrus-auth-menu,
  .home-header.home-header--app .home-auth-slot.home-mobile-auth-slot .cyrus-auth-menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
    box-shadow: none;
  }

  .home-header.home-header--app .home-mobile-control-row .home-icon-button {
    width: 100%;
    height: 44px;
    min-height: 44px;
    flex-basis: auto;
    border-radius: 8px;
    font-size: 13px;
  }

  .home-mobile-nav-group,
  .home-mobile-nav-label,
  .home-mobile-subnav {
    display: contents;
    padding: 0;
  }

  /* .home-mobile-control-row > .home-mobile-control-cell {
    display: grid;
    inline-size: 100% !important;
    block-size: 44px;
    min-inline-size: 0;
    place-self: stretch;
  } */

  /* .home-mobile-control-row > .home-mobile-control-cell > .home-mobile-control-button {
    inline-size: 100% !important;
    block-size: 44px !important;
    min-block-size: 44px;
    min-inline-size: 0;
    max-inline-size: none;
    border-radius: 8px;
  } */
}
