/* Page styles: index
   Keep page-specific overrides here. */

.z-main {
  --card-radius: 18px;
  --card-border: 1px solid rgba(15, 23, 42, 0.1);
  --shadow-1: 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-2: 0 16px 36px rgba(15, 23, 42, 0.14);
  --hover-lift: -4px;
  --focus-ring: 0 0 0 4px rgba(99, 102, 241, 0.18);
  --ease-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.z-hero--landing {
  position: relative;
  isolation: isolate;
  min-height: clamp(340px, 32vw, 420px);
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(20px, 2vw, 28px);
  align-items: stretch;
  border: var(--card-border);
  border-radius: calc(var(--card-radius) + 6px);
  box-shadow: var(--shadow-1);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(255, 255, 255, 0.92) 0%, rgba(244, 247, 255, 0.74) 42%, rgba(238, 242, 255, 0.58) 100%),
    linear-gradient(145deg, #f8fbff 0%, #f2f6ff 56%, #eff2ff 100%);
}

.z-hero--landing::before,
.z-hero--landing::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.z-hero--landing::before {
  inset: -32% auto auto -12%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 72%);
  filter: blur(2px);
  animation: indexHeroFloat 16s var(--ease-soft) infinite alternate;
}

.z-hero--landing::after {
  inset: auto -12% -30% auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0) 74%);
  animation: indexHeroFloat 18s var(--ease-soft) infinite alternate-reverse;
}

.z-hero--landing > * {
  position: relative;
  z-index: 1;
}

.z-hero--landing > .z-hero__live {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

.z-hero--landing .z-hero__content {
  min-width: 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.z-hero--landing .z-hero__desc {
  max-width: 44ch;
}

.z-hero--landing .z-hero-media {
  position: relative;
  width: 100%;
  height: clamp(280px, 23vw, 360px);
  min-height: clamp(280px, 23vw, 360px);
  max-height: 360px;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--card-radius) + 2px);
  border: var(--card-border);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  border-color: rgba(120, 140, 255, 0.22);
  box-shadow: 0 18px 50px rgba(20, 24, 40, 0.1);
  transform: translateZ(0);
  transition: box-shadow 220ms var(--ease-soft), transform 220ms var(--ease-soft);
}

.z-hero--landing .z-hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.52) 0%,
    rgba(255, 255, 255, 0.16) 56%,
    rgba(255, 255, 255, 0) 100%
  );
}

.z-hero--landing .z-hero-media::after {
  content: none;
}

.z-hero--landing .z-hero-media__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.z-hero--landing .z-hero__badge {
  z-index: 2;
}

.z-hero--landing .z-search--hero {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
  transition: border-color 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), background-color 220ms var(--ease-soft);
}

@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .z-hero--landing .z-search--hero {
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
  }
}

.z-hero--landing .z-search--hero:hover,
.z-hero--landing .z-search--hero:focus-within {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 36px rgba(79, 70, 229, 0.14);
}

.z-hero--landing .z-hero-search__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.z-hero--landing .z-search__inputWrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 180px;
}

.z-hero--landing .z-search__inputWrap .z-search__input {
  min-width: 0;
  width: 100%;
}

.z-hero--landing .z-search__input:focus-visible {
  outline: none;
}

.z-hero--landing .z-search__select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.34);
  background-color: rgba(248, 250, 252, 0.9);
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 15px) calc(50% - 3px),
    calc(100% - 10px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
  transition: border-color 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), background-color 220ms var(--ease-soft);
}

.z-hero--landing .z-search__select:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background-color: rgba(255, 255, 255, 0.96);
}

.z-hero--landing .z-search__select:focus-visible {
  outline: none;
  border-color: rgba(79, 70, 229, 0.42);
  box-shadow: var(--focus-ring);
}

.z-hero--landing .z-search__submit {
  min-width: 108px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.14);
  transition: transform 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), filter 220ms var(--ease-soft);
}

.z-hero--landing .z-search__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
  filter: brightness(1.02);
}

.z-hero--landing .z-search__submit:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 12px 24px rgba(17, 24, 39, 0.18);
}

.z-hero--landing .z-hero__resourceMeta {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

@media (min-width: 992px) {
  .z-hero--landing[data-live-hero="aixram"] {
    --hero-bg-0: #FCFCFA;
    --hero-bg-1: #F1F3F2;
    --hero-bg-2: #DCE1E5;
    --hero-ink: #0B0D0B;
    --hero-muted: #666D78;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
      radial-gradient(140% 150% at 0% 0%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 252, 247, 0.95) 24%, rgba(243, 245, 244, 0.9) 54%, rgba(220, 225, 229, 0.88) 100%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(248, 249, 247, 0.44) 28%, rgba(235, 238, 240, 0.7) 66%, rgba(220, 225, 229, 0.9) 100%);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.07), 0 8px 22px rgba(15, 23, 42, 0.04);
  }

  .z-hero--landing[data-live-hero="aixram"]::before,
  .z-hero--landing[data-live-hero="aixram"]::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    z-index: 0;
  }

  .z-hero--landing[data-live-hero="aixram"]::before {
    top: -10%;
    left: -4%;
    width: 48%;
    height: 90%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0) 74%);
    filter: blur(10px);
    animation: indexHeroAmbientDrift 19s ease-in-out infinite alternate;
  }

  .z-hero--landing[data-live-hero="aixram"]::after {
    right: -6%;
    bottom: -18%;
    width: 42%;
    height: 78%;
    background: radial-gradient(circle, rgba(228, 233, 237, 0.48) 0%, rgba(228, 233, 237, 0) 76%);
    filter: blur(14px);
    animation: indexHeroAmbientDrift 24s ease-in-out infinite alternate-reverse;
  }

  .z-hero--landing[data-live-hero="aixram"] > .z-hero__live {
    display: block;
    opacity: 0.94;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero__content,
  .z-hero--landing[data-live-hero="aixram"] .z-hero-media {
    position: relative;
    z-index: 1;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero__title {
    color: var(--hero-ink);
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero__desc,
  .z-hero--landing[data-live-hero="aixram"] .z-hero__resourceMeta {
    color: var(--hero-muted);
  }

  .z-hero--landing[data-live-hero="aixram"] .z-search--hero {
    border-color: rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(252, 252, 250, 0.82) 100%);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
  }

  .z-hero--landing[data-live-hero="aixram"] .z-search--hero:hover,
  .z-hero--landing[data-live-hero="aixram"] .z-search--hero:focus-within {
    border-color: rgba(148, 163, 184, 0.3);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(253, 252, 248, 0.88) 100%);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.09);
  }

  .z-hero--landing[data-live-hero="aixram"] .z-search__select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: rgba(248, 250, 252, 0.92);
    background-image:
      linear-gradient(45deg, transparent 50%, #6b7280 50%),
      linear-gradient(135deg, #6b7280 50%, transparent 50%);
  }

  .z-hero--landing[data-live-hero="aixram"] .z-search__select:hover {
    border-color: rgba(148, 163, 184, 0.4);
    background-color: rgba(255, 255, 255, 0.94);
  }

  .z-hero--landing[data-live-hero="aixram"] .z-search__select:focus-visible {
    border-color: rgba(107, 114, 128, 0.46);
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.18);
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero-media {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(250, 249, 246, 0.9) 52%, rgba(240, 242, 242, 0.84) 100%);
    border-color: rgba(220, 225, 229, 0.86);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.1);
    will-change: transform, box-shadow;
    animation: indexHeroMediaFloat 9.5s ease-in-out infinite;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero-media::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.54) 0%,
      rgba(255, 251, 245, 0.18) 54%,
      rgba(255, 255, 255, 0) 100%
    );
    animation: indexHeroSheenFloat 12s ease-in-out infinite alternate;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero-media__img {
    transform-origin: center center;
    animation: indexHeroImageDrift 11s ease-in-out infinite alternate;
  }
}

.z-search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  max-height: 340px;
  overflow: auto;
}

.z-search-suggest.is-hidden {
  display: none;
}

.z-search-suggest__item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.z-search-suggest__item:last-child {
  border-bottom: 0;
}

.z-search-suggest__item:hover,
.z-search-suggest__item:focus-visible {
  background: #f8fafc;
  outline: none;
}

.z-search-suggest__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}

.z-search-suggest__title mark {
  background: #fff3bf;
  color: inherit;
  border-radius: 4px;
  padding: 0 2px;
}

.z-search-suggest__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.z-search-suggest__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.z-city--link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--card-radius);
  transition: box-shadow 220ms var(--ease-soft), border-color 220ms var(--ease-soft), background-color 220ms var(--ease-soft), filter 220ms var(--ease-soft);
}

.z-discover .z-citylist {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
  cursor: grab;
}

body[data-page="home"] .z-discover .z-cityrail {
  position: relative;
}

body[data-page="home"] .z-discover .z-section__head {
  margin-bottom: 12px;
}

body[data-page="home"] .z-discover .z-citylist {
  gap: 12px;
  align-items: stretch;
  padding: 2px 2px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
  -ms-overflow-style: none;
}

body[data-page="home"] .z-discover .z-citylist::-webkit-scrollbar {
  height: 0;
}

body[data-page="home"] .z-discover .z-citylist::-webkit-scrollbar-thumb,
body[data-page="home"] .z-discover .z-citylist::-webkit-scrollbar-track {
  background: transparent;
}

@media (hover: none) and (pointer: coarse) {
  .z-discover .z-citylist,
  #homeCityList {
    touch-action: auto;
  }
}

.z-discover .z-citylist.is-dragging {
  cursor: grabbing;
  user-select: none;
}

body[data-page="home"] .z-discover .z-citylist .z-city {
  flex: 0 0 calc((100% - 24px) / 3);
  min-width: clamp(248px, 24vw, 340px);
  scroll-snap-align: start;
  border-radius: var(--card-radius);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: perspective(1000px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: #ffffff;
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.06),
    0 4px 12px rgba(15, 23, 42, 0.035);
  transition:
    transform 220ms var(--ease-soft),
    box-shadow 220ms var(--ease-soft),
    border-color 220ms var(--ease-soft),
    background-color 220ms var(--ease-soft);
}

body[data-page="home"] .z-discover .z-citylist .z-city::before {
  content: none;
}

body[data-page="home"] .z-discover .z-citylist .z-city::after {
  content: none;
}

body[data-page="home"] .z-discover .z-citylist .z-city:hover,
body[data-page="home"] .z-discover .z-citylist .z-city.is-fx-active {
  transform: perspective(1000px) translate3d(0, -2px, 0) rotateX(var(--fx-rotate-x, 0deg)) rotateY(var(--fx-rotate-y, 0deg));
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.96);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.08),
    0 8px 18px rgba(15, 23, 42, 0.045);
}

body[data-page="home"] .z-discover .z-citylist .z-city:active {
  transform: perspective(1000px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.06),
    0 3px 8px rgba(15, 23, 42, 0.03);
}

body[data-page="home"] .z-discover .z-citylist .z-city:focus-visible {
  outline: none;
  border-color: rgba(191, 219, 254, 0.98);
  box-shadow:
    var(--focus-ring),
    0 20px 40px rgba(15, 23, 42, 0.09),
    0 8px 18px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body[data-page="home"] .z-discover .z-citylist .z-city .z-city__img {
  position: relative;
  transform: translateZ(0);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  transition: transform 220ms var(--ease-soft), filter 220ms var(--ease-soft);
}

body[data-page="home"] .z-discover .z-citylist .z-city .z-city__img::after {
  content: none;
}

body[data-page="home"] .z-discover .z-citylist .z-city .z-city__imgPhoto {
  transform: scale(1);
  filter: saturate(1.04) contrast(1.02);
  transition: transform 220ms var(--ease-soft), filter 220ms var(--ease-soft);
}

body[data-page="home"] .z-discover .z-citylist .z-city:hover .z-city__img:not(.z-city__img--photo) {
  transform: scale(1.022);
}

body[data-page="home"] .z-discover .z-citylist .z-city:hover .z-city__imgPhoto {
  transform: scale(1.02);
  filter: saturate(1.07) contrast(1.03);
}

body[data-page="home"] .z-discover .z-citylist .z-city .z-city__meta {
  position: relative;
  z-index: 1;
  padding: 14px 15px 15px;
  display: grid;
  gap: 5px;
  background: transparent;
}

body[data-page="home"] .z-discover .z-citylist .z-city .z-city__meta h3 {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #162033;
}

body[data-page="home"] .z-discover .z-citylist .z-city .z-city__meta p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.42;
  font-weight: 500;
  color: #516075;
}

body[data-page="home"] .z-discover .z-cityrail__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #162033;
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.03);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 220ms var(--ease-soft),
    background-color 220ms var(--ease-soft),
    border-color 220ms var(--ease-soft);
}

body[data-page="home"] .z-discover .z-cityrail__arrow--prev {
  left: -10px;
}

body[data-page="home"] .z-discover .z-cityrail__arrow--next {
  right: -10px;
}

body[data-page="home"] .z-discover .z-cityrail__arrow span {
  display: block;
  font-size: 21px;
  line-height: 1;
  transform: translateY(-1px);
}

body[data-page="home"] .z-discover .z-cityrail__arrow:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(203, 213, 225, 0.96);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.1),
    0 4px 10px rgba(15, 23, 42, 0.04);
}

body[data-page="home"] .z-discover .z-cityrail__arrow:focus-visible {
  outline: none;
  border-color: rgba(191, 219, 254, 0.98);
  box-shadow:
    var(--focus-ring),
    0 14px 28px rgba(15, 23, 42, 0.1),
    0 4px 10px rgba(15, 23, 42, 0.04);
}

body[data-page="home"] .z-discover .z-cityrail__arrow:disabled {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.96);
}

@media (max-width: 1180px) {
  body[data-page="home"] .z-discover .z-citylist .z-city {
    flex-basis: calc((100% - 12px) / 2);
    min-width: clamp(260px, 40vw, 360px);
  }
}

@media (hover: none), (pointer: coarse), (max-width: 980px) {
  body[data-page="home"] .z-discover .z-cityrail__arrow {
    display: none;
  }
}

.z-discover .z-citylist::-webkit-scrollbar {
  height: 8px;
}

.z-discover .z-citylist::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
}

.z-discover .z-citylist::-webkit-scrollbar-track {
  background: transparent;
}

.z-city__img--default {
  background-image: url("../../img/berlin.jpg");
}

.z-city__img--photo {
  background-image: none !important;
}

.z-city__imgPhoto {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.z-cats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(12px, 1vw, 16px);
}

.z-cats .z-cat {
  --cat-accent: #475569;
  --cat-surface: rgba(226, 232, 240, 0.5);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 130px;
  height: 100%;
  padding: 18px;
  border-radius: var(--card-radius);
  border: var(--card-border);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  text-align: center;
  transition: transform 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), border-color 220ms var(--ease-soft);
}

.z-cats .z-cat__content {
  display: grid;
  gap: 6px;
  width: 100%;
}

.z-cats .z-cat .z-cat__title {
  width: 100%;
  font-weight: 600;
  margin: 0;
}

.z-cats .z-cat .z-cat__text,
.z-cats .z-cat .z-cat__icon,
.z-cats .z-cat .z-cat__arrow {
  display: none;
}

.z-cats .z-cat .z-cat__text {
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
}

.z-cats .z-cat--universities {
  --cat-accent: #3158c7;
  --cat-surface: rgba(49, 88, 199, 0.1);
}

.z-cats .z-cat--programs {
  --cat-accent: #7c3aed;
  --cat-surface: rgba(124, 58, 237, 0.1);
}

.z-cats .z-cat--work {
  --cat-accent: #0f766e;
  --cat-surface: rgba(15, 118, 110, 0.1);
}

.z-cats .z-cat--legal {
  --cat-accent: #b45309;
  --cat-surface: rgba(180, 83, 9, 0.1);
}

.z-cats .z-cat--life {
  --cat-accent: #c24168;
  --cat-surface: rgba(194, 65, 104, 0.1);
}

.z-cats .z-cat:hover {
  transform: translateY(var(--hover-lift));
  box-shadow: var(--shadow-2);
  border-color: rgba(99, 102, 241, 0.24);
}

.z-grid__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.z-grid__headLeft {
  display: grid;
  gap: 6px;
}

.z-section__title,
.z-grid__title {
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.z-discover .z-section__title {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.z-grid__controls {
  display: grid;
  gap: 0;
  justify-items: end;
  max-width: 100%;
}

body[data-page="home"] .z-grid__controls .z-pills {
  display: none;
}

body[data-page="home"] .z-grid__toolbar {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  max-width: 100%;
}

body[data-page="home"] .z-toolbar-menu {
  position: relative;
}

body[data-page="home"] .z-toolbar-trigger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #3f4a5f;
  cursor: pointer;
  transition: border-color 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), background-color 220ms var(--ease-soft), transform 180ms ease, color 180ms ease;
}

body[data-page="home"] .z-toolbar-trigger__label {
  display: none;
}

body[data-page="home"] .z-toolbar-trigger:hover {
  border-color: rgba(17, 24, 39, 0.18);
  background: #fff;
  transform: translateY(-1px);
}

body[data-page="home"] .z-toolbar-trigger:focus-visible,
body[data-page="home"] .z-toolbar-trigger[aria-expanded="true"] {
  outline: none;
  border-color: rgba(79, 70, 229, 0.42);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

body[data-page="home"] .z-toolbar-trigger__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(238, 242, 247, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 1px 1px rgba(17, 24, 39, 0.06);
  color: #5f6b84;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

body[data-page="home"] .z-toolbar-trigger__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

body[data-page="home"] .z-toolbar-trigger:hover .z-toolbar-trigger__icon,
body[data-page="home"] .z-toolbar-trigger:focus-visible .z-toolbar-trigger__icon,
body[data-page="home"] .z-toolbar-trigger[aria-expanded="true"] .z-toolbar-trigger__icon {
  transform: translateY(-1px) scale(1.04);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 4px rgba(17, 24, 39, 0.08);
  color: #334155;
}

body[data-page="home"] .z-toolbar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  min-width: 188px;
  padding: 8px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12), 0 2px 8px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(14px);
}

body[data-page="home"] .z-toolbar-popover[hidden] {
  display: none !important;
}

body[data-page="home"] .z-toolbar-popover__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

body[data-page="home"] .z-toolbar-popover__option:hover,
body[data-page="home"] .z-toolbar-popover__option:focus-visible {
  outline: none;
  background: rgba(241, 245, 249, 0.92);
}

body[data-page="home"] .z-toolbar-popover__option.is-active {
  background: rgba(247, 248, 252, 0.98);
  color: #0f172a;
}

body[data-page="home"] .z-toolbar-popover__check {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 160ms ease, transform 160ms ease;
}

body[data-page="home"] .z-toolbar-popover__option.is-active .z-toolbar-popover__check {
  opacity: 1;
  transform: scale(1);
  background: radial-gradient(circle at 50% 50%, #111827 0 38%, transparent 42%);
}

body[data-page="home"] .z-toolbar-nativeSelect {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.z-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.z-pill {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), transform 220ms var(--ease-soft), background-color 220ms var(--ease-soft);
}

.z-pill:hover {
  border-color: rgba(17, 24, 39, 0.2);
  transform: translateY(-1px);
}

.z-pill:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.z-pill.is-active {
  background: #fff6d8;
  border-color: #f0ce6b;
  color: #6d5208;
}

.z-sort {
  height: 36px;
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  padding: 0 12px;
  transition: border-color 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft);
}

.z-sort:focus-visible {
  outline: none;
  border-color: rgba(79, 70, 229, 0.42);
  box-shadow: var(--focus-ring);
}

.z-grid .z-card {
  border-radius: var(--card-radius);
  border: var(--card-border);
  background: #fff;
  box-shadow: var(--shadow-1);
  padding: 18px;
  height: 100%;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), border-color 220ms var(--ease-soft);
}

.z-grid .z-cards {
  align-items: stretch;
}

.z-grid .z-card:hover {
  transform: translateY(var(--hover-lift));
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: var(--shadow-2);
}

.z-grid .z-card:focus-within {
  box-shadow: var(--focus-ring), var(--shadow-2);
}

.z-grid .z-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.z-grid .z-card__pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.z-grid .z-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f9fafb;
  color: #4b5563;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.z-grid .z-chip--cat {
  background: #f3f4f6;
}

.z-grid .z-chip--reco {
  background: #fff6d8;
  border-color: #f0ce6b;
  color: #6d5208;
}

.z-grid .z-card__when {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.z-grid .z-card__when strong {
  color: #111827;
}

.z-grid .z-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 52px;
}

.z-grid .z-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.z-grid .z-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.z-grid .z-card__metaItem {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fafb;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  min-height: 52px;
}

.z-grid .z-card__metaLabel {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.z-grid .z-card__metaValue {
  font-size: 13px;
  line-height: 1.2;
}

.z-grid .z-card__notice {
  border: 1px solid rgba(245, 200, 75, 0.65);
  border-radius: 12px;
  background: #fff9e7;
  color: #5b4300;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.z-grid .z-card__actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.z-btn--sm {
  height: 36px;
  font-size: 13px;
  padding: 0 14px;
  border-radius: 12px;
}

.z-card__guideBtn {
  border-color: rgba(245, 200, 75, 0.8);
  background: #fffdf6;
}

.z-card__guideBtn.is-placeholder {
  visibility: hidden;
  pointer-events: none;
}

/* Resources catalog normalization (scoped to resources page/index only) */
body[data-page="home"] .z-grid .z-cards,
body:not([data-page]) .z-grid .z-cards,
body[data-section="resources"] .z-grid .z-cards,
body[data-page="resources"] .z-grid .z-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

body[data-page="home"] .z-grid .z-card,
body:not([data-page]) .z-grid .z-card,
body[data-section="resources"] .z-grid .z-card,
body[data-page="resources"] .z-grid .z-card {
  min-height: 360px;
  height: 100%;
  padding: 16px;
}

body[data-page="home"] .z-grid .z-card__head,
body:not([data-page]) .z-grid .z-card__head,
body[data-section="resources"] .z-grid .z-card__head,
body[data-page="resources"] .z-grid .z-card__head {
  min-height: 30px;
}

body[data-page="home"] .z-grid .z-card__pills,
body:not([data-page]) .z-grid .z-card__pills,
body[data-section="resources"] .z-grid .z-card__pills,
body[data-page="resources"] .z-grid .z-card__pills {
  flex-wrap: nowrap;
}

body[data-page="home"] .z-grid .z-card__headRight,
body:not([data-page]) .z-grid .z-card__headRight,
body[data-section="resources"] .z-grid .z-card__headRight,
body[data-page="resources"] .z-grid .z-card__headRight {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

body[data-page="home"] .z-grid .z-card__when,
body:not([data-page]) .z-grid .z-card__when,
body[data-section="resources"] .z-grid .z-card__when,
body[data-page="resources"] .z-grid .z-card__when {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

body[data-page="home"] .z-grid .z-chip--status,
body:not([data-page]) .z-grid .z-chip--status,
body[data-section="resources"] .z-grid .z-chip--status,
body[data-page="resources"] .z-grid .z-chip--status {
  background: transparent;
  border-width: 1px;
}

body[data-page="home"] .z-grid .z-chip--status-active,
body:not([data-page]) .z-grid .z-chip--status-active,
body[data-section="resources"] .z-grid .z-chip--status-active,
body[data-page="resources"] .z-grid .z-chip--status-active {
  border-color: rgba(37, 99, 235, 0.34);
  color: #1d4ed8;
}

body[data-page="home"] .z-grid .z-chip--status-reco,
body:not([data-page]) .z-grid .z-chip--status-reco,
body[data-section="resources"] .z-grid .z-chip--status-reco,
body[data-page="resources"] .z-grid .z-chip--status-reco {
  border-color: rgba(234, 179, 8, 0.45);
  color: #854d0e;
}

body[data-page="home"] .z-grid .z-card__title,
body:not([data-page]) .z-grid .z-card__title,
body[data-section="resources"] .z-grid .z-card__title,
body[data-page="resources"] .z-grid .z-card__title {
  -webkit-line-clamp: 2;
  min-height: 52px;
}

body[data-page="home"] .z-grid .z-card__desc,
body:not([data-page]) .z-grid .z-card__desc,
body[data-section="resources"] .z-grid .z-card__desc,
body[data-page="resources"] .z-grid .z-card__desc {
  -webkit-line-clamp: 3;
  min-height: 64px;
}

body[data-page="home"] .z-grid .z-card__meta,
body:not([data-page]) .z-grid .z-card__meta,
body[data-section="resources"] .z-grid .z-card__meta,
body[data-page="resources"] .z-grid .z-card__meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-page="home"] .z-grid .z-card__metaItem,
body:not([data-page]) .z-grid .z-card__metaItem,
body[data-section="resources"] .z-grid .z-card__metaItem,
body[data-page="resources"] .z-grid .z-card__metaItem {
  min-height: 56px;
}

body[data-page="home"] .z-grid .z-card__notice,
body:not([data-page]) .z-grid .z-card__notice,
body[data-section="resources"] .z-grid .z-card__notice,
body[data-page="resources"] .z-grid .z-card__notice {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 58px;
}

body[data-page="home"] .z-grid .z-card__actions,
body:not([data-page]) .z-grid .z-card__actions,
body[data-section="resources"] .z-grid .z-card__actions,
body[data-page="resources"] .z-grid .z-card__actions {
  margin-top: auto;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}

body[data-page="home"] .z-grid .z-card__actions .z-btn,
body:not([data-page]) .z-grid .z-card__actions .z-btn,
body[data-section="resources"] .z-grid .z-card__actions .z-btn,
body[data-page="resources"] .z-grid .z-card__actions .z-btn {
  height: 36px;
  background: transparent;
  border: 1px solid rgba(17, 24, 39, 0.2);
  color: #1f2937;
  box-shadow: none;
}

body[data-page="home"] .z-grid .z-card__actions .z-btn:hover,
body:not([data-page]) .z-grid .z-card__actions .z-btn:hover,
body[data-section="resources"] .z-grid .z-card__actions .z-btn:hover,
body[data-page="resources"] .z-grid .z-card__actions .z-btn:hover {
  background: rgba(17, 24, 39, 0.04);
  border-color: rgba(17, 24, 39, 0.28);
}

body[data-page="home"] .z-grid .z-card__actions .z-btn:active,
body:not([data-page]) .z-grid .z-card__actions .z-btn:active,
body[data-section="resources"] .z-grid .z-card__actions .z-btn:active,
body[data-page="resources"] .z-grid .z-card__actions .z-btn:active {
  background: rgba(17, 24, 39, 0.08);
}

body[data-page="home"] .z-grid .z-card__actions .z-card__guideBtn,
body:not([data-page]) .z-grid .z-card__actions .z-card__guideBtn,
body[data-section="resources"] .z-grid .z-card__actions .z-card__guideBtn,
body[data-page="resources"] .z-grid .z-card__actions .z-card__guideBtn {
  border-color: rgba(17, 24, 39, 0.2);
  background: transparent;
}

@media (max-width: 1180px) {
  body[data-page="home"] .z-grid .z-cards,
  body:not([data-page]) .z-grid .z-cards,
  body[data-section="resources"] .z-grid .z-cards,
  body[data-page="resources"] .z-grid .z-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body[data-page="home"] .z-grid .z-cards,
  body:not([data-page]) .z-grid .z-cards,
  body[data-section="resources"] .z-grid .z-cards,
  body[data-page="resources"] .z-grid .z-cards {
    grid-template-columns: 1fr;
  }
  
  body[data-page="home"] .z-hero--landing .z-hero__content {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes indexHeroFloat {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes indexHeroAmbientDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.92;
  }
  50% {
    transform: translate3d(1.2%, -1.6%, 0) scale(1.04);
    opacity: 1;
  }
  100% {
    transform: translate3d(-1%, 1.2%, 0) scale(1.02);
    opacity: 0.9;
  }
}

@keyframes indexHeroMediaFloat {
  0% {
    transform: translate3d(0, 0, 0);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.1);
  }
  50% {
    transform: translate3d(0, -9px, 0);
    box-shadow: 0 28px 62px rgba(15, 23, 42, 0.12);
  }
  100% {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.1);
  }
}

@keyframes indexHeroSheenFloat {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.88;
  }
  100% {
    transform: translate3d(0, -5%, 0);
    opacity: 1;
  }
}

@keyframes indexHeroImageDrift {
  0% {
    transform: scale(1.01) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.026) translate3d(-0.5%, -0.8%, 0);
  }
  100% {
    transform: scale(1.018) translate3d(0.4%, -0.3%, 0);
  }
}

.z-main .z-btn,
.z-main .z-linkbtn {
  border-radius: 12px;
  transition: transform 220ms var(--ease-soft), box-shadow 220ms var(--ease-soft), border-color 220ms var(--ease-soft), background-color 220ms var(--ease-soft);
}

.z-main .z-btn:hover,
.z-main .z-linkbtn:hover {
  transform: translateY(-1px);
}

.z-main .z-btn:focus-visible,
.z-main .z-linkbtn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  .z-hero--landing::before,
  .z-hero--landing::after {
    animation: none !important;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero-media,
  .z-hero--landing[data-live-hero="aixram"] .z-hero-media::before,
  .z-hero--landing[data-live-hero="aixram"] .z-hero-media__img {
    animation: none !important;
    transform: none !important;
  }

  .z-hero--landing .z-search--hero,
  .z-hero--landing .z-search__select,
  .z-hero--landing .z-search__submit,
  .z-cats .z-cat,
  .z-discover .z-citylist .z-city,
  .z-discover .z-citylist .z-city .z-city__img,
  .z-discover .z-citylist .z-city .z-city__imgPhoto,
  .z-grid .z-card,
  .z-main .z-btn,
  .z-main .z-linkbtn,
  .z-pill,
  .z-sort,
  .reveal.is-revealed {
    transition: none !important;
  }
}

@media (max-width: 1180px) {
  .z-discover .z-citylist .z-city {
    flex-basis: calc((100% - 10px) / 2);
  }

  .z-hero--landing {
    min-height: 340px;
  }

  .z-hero--landing .z-hero__content {
    max-width: none;
  }

  .z-hero--landing .z-hero-media {
    height: 230px;
    min-height: 230px;
    max-height: 230px;
  }

  .z-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1440px) and (min-width: 1181px) {
  .z-hero--landing {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.88fr);
  }

  .z-cats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .z-discover .z-citylist .z-city {
    flex-basis: calc((100% - 20px) / 3);
  }
}

@media (max-width: 860px) {
  .z-hero--landing {
    min-height: 320px;
  }

  .z-hero--landing .z-hero-media {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }

  .z-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .z-grid__head {
    flex-direction: column;
    align-items: stretch;
  }

  .z-grid__controls {
    justify-items: stretch;
  }

  body[data-page="home"] .z-grid__toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .z-grid .z-card {
    min-height: 0;
  }

  .z-grid .z-card__head {
    flex-direction: column;
  }

  .z-grid .z-card__when {
    white-space: normal;
  }

  .z-grid .z-card__meta {
    grid-template-columns: 1fr;
  }

  .z-grid .z-card__actions .z-btn {
    width: 100%;
  }

  .z-grid .z-card__actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .z-discover .z-citylist .z-city {
    flex-basis: 100%;
  }

  body[data-page="home"] .z-toolbar-menu {
    flex: 0 0 auto;
  }

  body[data-page="home"] .z-toolbar-popover {
    left: 0;
    right: auto;
    min-width: 176px;
  }

  .z-hero--landing {
    min-height: 300px;
  }

  .z-hero--landing .z-hero-media {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
  }

  .z-cats {
    grid-template-columns: 1fr;
  }
}
