:root {
  --home-pink: #e83f73;
  --home-pink-soft: #fff4f7;
  --home-ink: #20242a;
  --home-muted: #7b8490;
  --home-line: #eceff2;
  --home-soft: #f5f7fa;
  --home-brand: #117c68;
  --home-brand-dark: #0a5549;
}

body {
  background: #ffffff;
}

.page.home-search-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.home-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 10px clamp(20px, 5vw, 86px);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #eceff2;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

.home-topbar-brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--home-ink);
  text-decoration: none;
  font-weight: 900;
}

.home-topbar-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--home-brand), var(--home-brand-dark));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 124, 104, 0.18);
  font: 900 1.2rem/1 "Segoe UI", sans-serif;
}

.home-topbar-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 44px);
  flex-wrap: wrap;
}

.home-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2e3339;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-topbar-item.is-pending {
  color: #4d555e;
}

.home-topbar-badge {
  min-width: 30px;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--home-pink);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

.home-search-page {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.93), rgba(255,255,255,0.97)),
    radial-gradient(circle at center, rgba(17, 124, 104, 0.08) 1.5px, transparent 1.6px);
  background-size: auto, 22px 22px;
}

.home-hero {
  width: min(840px, calc(100% - 32px));
  margin: clamp(76px, 10vh, 140px) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-brand-emblem {
  position: relative;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  background: linear-gradient(145deg, #ffffff, #eef7f4);
  border: 1px solid #dfece8;
  box-shadow: 0 18px 45px rgba(17, 124, 104, 0.1);
}

.home-brand-emblem span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--home-brand), var(--home-brand-dark));
  color: #ffffff;
  font: 900 2.3rem/1 "Segoe UI", sans-serif;
}

.home-brand-emblem i {
  position: absolute;
  width: 14px;
  height: 14px;
  top: 16px;
  right: 18px;
  border-radius: 50%;
  background: var(--home-pink);
  box-shadow: -15px 11px 0 -3px #f4b31b;
}

.home-hero h1 {
  margin: 18px 0 2px;
  color: var(--home-ink);
  font: 900 1.3rem/1.4 "Segoe UI", IRANSans, sans-serif;
  direction: ltr;
}

.home-hero > p {
  margin: 0 0 18px;
  color: #30363d;
  font-size: 0.9rem;
  font-weight: 800;
}

.home-main-search {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 62px;
  grid-template-areas: "modes input submit";
  align-items: stretch;
  direction: ltr;
  overflow: hidden;
  border: 9px solid #f5f6f8;
  border-radius: 36px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.home-search-modes {
  grid-area: modes;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-left: 1px solid #e8ebee;
}

.home-search-mode {
  min-width: 86px;
  border: 0;
  background: #ffffff;
  color: #a0a6ad;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.home-search-mode.is-active {
  margin: 7px;
  border-radius: 19px;
  background: var(--home-pink);
  color: #ffffff;
}

.home-search-mode.is-disabled {
  cursor: default;
}

.home-main-search input {
  grid-area: input;
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 22px;
  background: #ffffff;
  color: #2e3339;
  font: inherit;
  font-size: 0.96rem;
  text-align: center;
  cursor: text;
  pointer-events: auto;
  user-select: text;
  direction: rtl;
}

.home-main-search input::placeholder {
  color: #8f97a1;
  text-align: center;
  opacity: 1;
}

.home-main-search input:focus {
  background: #ffffff;
  box-shadow: inset 0 -2px 0 rgba(232, 63, 115, 0.18);
}

.home-search-submit {
  grid-area: submit;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #ffffff;
  color: var(--home-pink);
  cursor: pointer;
}

.home-search-submit svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

.home-category-grid {
  width: min(940px, calc(100% - 32px));
  margin: 62px auto 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px;
}

.home-category-card {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 11px;
  color: #20242a;
  text-decoration: none;
}

.home-category-icon {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f5f8;
  color: #59616c;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.home-category-icon svg {
  width: 62px;
  height: 62px;
  fill: #59616c;
  stroke: #59616c;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-category-card:hover .home-category-icon {
  transform: translateY(-3px);
  background: #edf7f4;
  color: var(--home-brand);
}

.home-category-card:hover .home-category-icon svg {
  fill: var(--home-brand);
  stroke: var(--home-brand);
}

.home-category-card strong {
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: center;
}

.home-category-count {
  position: absolute;
  z-index: 2;
  top: -6px;
  right: calc(50% - 54px);
  min-width: 38px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 9px;
  background: var(--home-pink);
  color: #ffffff;
  font: 800 0.65rem/1 "Segoe UI", sans-serif;
}

.home-category-icon--all {
  color: #36719c;
  font: 900 1.75rem/1 "Segoe UI", sans-serif;
  letter-spacing: 5px;
}

.home-footer {
  margin-top: auto;
  padding: 32px 24px 18px;
  text-align: center;
}

.home-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.home-footer nav span {
  padding: 0 18px;
  color: #a0a6ad;
  font-size: 0.76rem;
  border-left: 1px solid #e1e4e7;
}

.home-footer nav span:last-child {
  border-left: 0;
}

.home-footer p {
  margin: 10px 0 0;
  color: #b0b6bd;
  font-size: 0.68rem;
}

.home-accessibility {
  position: fixed;
  z-index: 50;
  left: 30px;
  bottom: 28px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #bd1e55;
  color: #ffffff;
  box-shadow: 0 9px 24px rgba(189, 30, 85, 0.25);
  font: 900 0.9rem/1 "Segoe UI", sans-serif;
  opacity: 1;
}

@media (max-width: 980px) {
  .home-topbar {
    justify-content: space-between;
    gap: 14px;
    padding-inline: 18px;
  }

  .home-topbar-nav {
    justify-content: flex-start;
    gap: 15px 22px;
  }

  .home-topbar-item {
    font-size: 0.78rem;
  }

  .home-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 650px;
    row-gap: 24px;
  }
}

@media (max-width: 700px) {
  .home-topbar {
    min-height: 58px;
    align-items: center;
    padding: 8px 10px;
  }

  .home-topbar-brand span:last-child {
    display: none;
  }

  .home-topbar-mark {
    width: 38px;
    height: 38px;
  }

  .home-topbar-nav {
    flex: 1;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .home-topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .home-topbar-item {
    flex: 0 0 auto;
    font-size: 0.68rem;
  }

  .home-topbar-badge {
    min-width: 25px;
    min-height: 22px;
    font-size: 0.63rem;
  }

  .home-search-page {
    min-height: calc(100vh - 58px);
  }

  .home-hero {
    width: calc(100% - 20px);
    margin-top: 44px;
  }

  .home-brand-emblem {
    width: 92px;
    height: 92px;
    border-radius: 26px;
  }

  .home-brand-emblem span {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    font-size: 1.9rem;
  }

  .home-hero > p {
    font-size: 0.78rem;
    margin-bottom: 14px;
  }

  .home-main-search {
    min-height: 58px;
    grid-template-columns: 102px minmax(0, 1fr) 50px;
    grid-template-areas: "modes input submit";
    border-width: 6px;
    border-radius: 30px;
  }

  .home-search-modes {
    grid-template-columns: 1fr;
  }

  .home-search-mode {
    min-width: 0;
    font-size: 0.62rem;
  }

  .home-search-mode.is-disabled {
    display: none;
  }

  .home-search-mode.is-active {
    margin: 5px;
  }

  .home-main-search input {
    padding-inline: 12px;
    font-size: 0.78rem;
  }

  .home-search-submit svg {
    width: 23px;
    height: 23px;
  }

  .home-category-grid {
    width: 100%;
    max-width: none;
    margin-top: 38px;
    padding: 0 12px 8px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .home-category-grid::-webkit-scrollbar {
    display: none;
  }

  .home-category-card {
    flex: 0 0 86px;
    scroll-snap-align: start;
  }

  .home-category-icon {
    width: 80px;
    height: 80px;
  }

  .home-category-icon svg {
    width: 48px;
    height: 48px;
  }

  .home-category-count {
    right: calc(50% - 43px);
    top: -5px;
  }

  .home-footer {
    padding-bottom: 24px;
  }

  .home-footer nav span {
    padding-inline: 10px;
    font-size: 0.66rem;
  }

  .home-accessibility {
    left: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }
}
