/* Homepage popular-cities V2. Source-owned while the authored Vite frontend is absent. */

.popular-cities-v2 {
  position: relative;
  isolation: isolate;
  padding: clamp(3rem, 5vw, 4.75rem) 1rem clamp(3.25rem, 5.5vw, 5rem);
  overflow: hidden;
  background: var(--color-page-bg, #ffffff);
}

.popular-cities-v2-inner {
  width: min(100%, 72rem);
  margin-inline: auto;
}

.popular-cities-v2-head {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}

.popular-cities-v2-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.popular-cities-v2-lead {
  max-width: 42rem;
  margin: .65rem auto 0;
  color: #64748b;
  font-size: clamp(.92rem, 1.4vw, 1rem);
  line-height: 1.8;
  text-wrap: balance;
}

.popular-cities-v2-grid {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
}

.popular-cities-v2-card {
  min-width: 0;
  min-height: 5.4rem;
  padding: 1rem 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgb(226 232 240 / 86%);
  border-radius: 1rem;
  background: rgb(255 255 255 / 78%);
  color: #0f172a;
  box-shadow: 0 9px 28px rgb(15 23 42 / 6%);
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scroll-snap-align: start;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.popular-cities-v2-card:hover {
  transform: translateY(-2px);
  border-color: rgb(217 119 6 / 38%);
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 14px 34px rgb(15 23 42 / 9%);
}

.popular-cities-v2-card:focus-visible,
.popular-cities-v2-all:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 3px;
}

.popular-cities-v2-card-copy {
  min-width: 0;
  display: block;
}

.popular-cities-v2-card-name {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popular-cities-v2-card-meta {
  display: block;
  margin-top: .3rem;
  overflow: hidden;
  color: #64748b;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popular-cities-v2-arrow {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  color: #f59e0b;
  transition: transform .18s ease;
}

html[dir="rtl"] .popular-cities-v2-arrow,
html[lang="fa"] .popular-cities-v2-arrow {
  transform: rotate(180deg);
}

.popular-cities-v2-card:hover .popular-cities-v2-arrow {
  transform: translateX(2px);
}

html[dir="rtl"] .popular-cities-v2-card:hover .popular-cities-v2-arrow,
html[lang="fa"] .popular-cities-v2-card:hover .popular-cities-v2-arrow {
  transform: rotate(180deg) translateX(2px);
}

.popular-cities-v2-actions {
  margin-top: 1.55rem;
  display: flex;
  justify-content: center;
}

.popular-cities-v2-all {
  min-height: 2.9rem;
  padding: .7rem 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid rgb(217 119 6 / 46%);
  border-radius: 9999px;
  background: rgb(255 255 255 / 62%);
  color: #b45309;
  font-size: .88rem;
  font-weight: 750;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.popular-cities-v2-all:hover {
  transform: translateY(-1px);
  border-color: rgb(217 119 6 / 68%);
  background: rgb(255 251 235 / 88%);
  color: #92400e;
}

.popular-cities-v2-all svg {
  width: 1rem;
  height: 1rem;
}

html[dir="rtl"] .popular-cities-v2-all svg,
html[lang="fa"] .popular-cities-v2-all svg {
  transform: rotate(180deg);
}

@media (max-width: 1023px) {
  .popular-cities-v2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .popular-cities-v2 {
    padding: 2.6rem 0 3rem;
  }

  .popular-cities-v2-head,
  .popular-cities-v2-actions {
    padding-inline: 1rem;
  }

  .popular-cities-v2-title {
    font-size: 1.75rem;
  }

  .popular-cities-v2-lead {
    max-width: 23rem;
    font-size: .9rem;
    line-height: 1.7;
  }

  .popular-cities-v2-grid {
    margin-top: 1.4rem;
    padding: .2rem 1rem .85rem;
    display: flex;
    gap: .7rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .popular-cities-v2-grid::-webkit-scrollbar {
    display: none;
  }

  .popular-cities-v2-card {
    width: 10.75rem;
    min-width: 10.75rem;
    min-height: 4.9rem;
    padding: .85rem .9rem;
    box-shadow: 0 7px 22px rgb(15 23 42 / 6%);
  }

  .popular-cities-v2-card-name {
    font-size: .94rem;
  }

  .popular-cities-v2-card-meta {
    font-size: .74rem;
  }

  .popular-cities-v2-actions {
    margin-top: .65rem;
  }
}

@media (prefers-color-scheme: dark) {
  .popular-cities-v2 {
    background: var(--color-page-bg, #101010);
  }

  .popular-cities-v2-title {
    color: #f5f5f5;
  }

  .popular-cities-v2-lead {
    color: #a3a3a3;
  }

  .popular-cities-v2-card {
    border-color: rgb(255 255 255 / 10%);
    background: rgb(27 27 27 / 78%);
    color: #f3f4f6;
    box-shadow: 0 12px 30px rgb(0 0 0 / 20%);
  }

  .popular-cities-v2-card:hover {
    border-color: rgb(245 158 11 / 36%);
    background: rgb(32 32 32 / 94%);
    box-shadow: 0 16px 38px rgb(0 0 0 / 30%);
  }

  .popular-cities-v2-card-meta {
    color: #a3a3a3;
  }

  .popular-cities-v2-all {
    border-color: rgb(245 158 11 / 42%);
    background: rgb(24 24 24 / 72%);
    color: #fbbf24;
  }

  .popular-cities-v2-all:hover {
    border-color: rgb(245 158 11 / 64%);
    background: rgb(32 32 32 / 92%);
    color: #fcd34d;
  }
}

@media (prefers-reduced-motion: reduce) {
  .popular-cities-v2-card,
  .popular-cities-v2-arrow,
  .popular-cities-v2-all {
    transition: none;
  }

  .popular-cities-v2-card:hover,
  .popular-cities-v2-all:hover {
    transform: none;
  }
}
