/*==============================================
  stones/stones-hub.css — Natasha Libelle
  Хаб-страница энциклопедии камней.
  Подключать ПОСЛЕ shared/base.css.
  Без инлайн-стилей. Без !important.
==============================================*/

/* ══════════════════════════════════════════════
   1. HERO — идентично gifts/gifts.css (gh-hero)
   Мозаика убрана, одна фоновая картинка
══════════════════════════════════════════════ */
.gh-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: 88px;
  padding-bottom: 88px;
  color: #fff;
  overflow: hidden;
}

.gh-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gh-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.gh-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(12, 9, 18, 0.2)  0%,
    rgba(12, 9, 18, 0.55) 45%,
    rgba(12, 9, 18, 0.92) 100%
  );
}

.gh-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Хлебные крошки */
.gh-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none; flex-wrap: wrap;
  margin-bottom: 36px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.5);
}
.gh-breadcrumb li { display: flex; align-items: center; gap: 8px; }
.gh-breadcrumb li + li::before {
  content: '/';
  opacity: 0.5;
  flex-shrink: 0;
}

.gh-breadcrumb a {
  color: inherit;
  transition: color 0.2s;
}

.gh-breadcrumb a:hover { color: rgba(255, 255, 255, 0.9); }
.gh-breadcrumb [aria-current="page"] { color: rgba(255,255,255,.9); font-weight: 600; }

/* Eyebrow */
.gh-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-accent-l);
  margin-bottom: 20px;
}

.gh-hero__eyebrow-line {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--c-accent-l);
  flex-shrink: 0;
}

/* Заголовок */
.gh-hero__title {
  font-family: 'Cormorant Garamond', 'Garamond', serif;
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 28px;
}

.gh-hero__title em {
  font-style: italic;
  color: var(--c-accent-l);
}

/* Лид */
.gh-hero__inner > p {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  max-width: 640px;
  margin-bottom: 48px;
}

/* Статистика */
.gh-hero__stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.gh-hero__stat-num {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 300;
  color: #fff;
  line-height: 1;
}

.gh-hero__stat-txt {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

/* Scroll-индикатор */
.gh-hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
  animation: gh-bounce 2.4s ease-in-out infinite;
}

.gh-hero__scroll:hover { color: #fff; }

@keyframes gh-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════════════════════
   2. ФИЛЬТР-ПОЛОСА
══════════════════════════════════════════════ */
.hub-filters {
  position: sticky; top: 68px; z-index: 40;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
@media (max-width: 1100px) { .hub-filters { top: 56px; } }

.hub-filters__inner {
  display: flex; align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
}
.hub-filters__inner::-webkit-scrollbar { display: none; }

.hub-filter {
  flex-shrink: 0;
  padding: 16px 20px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #888;
  background: none; border: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color .2s;
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.hub-filter::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--c-accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s;
}
.hub-filter:hover { color: #333; }
.hub-filter.is-active { color: var(--c-accent); }
.hub-filter.is-active::after { transform: scaleX(1); }
.hub-filter--link { color: var(--c-accent); margin-left: auto; }
.hub-filter--link::after { display: none; }
.hub-filter--link:hover { color: var(--c-dark); }

/* ── Мобильный баннер «По знаку зодиака» (≤600px) ──────
   Скрыт на десктопе, показывается под полосой фильтров.
   Ведёт к блоку #js-hub-zodiac на этой же странице.
──────────────────────────────────────────────────────── */
.hub-zodiac-shortcut {
  display: none; /* скрыт на десктопе */
  align-items: center; justify-content: center;
  gap: 10px;
  padding: 11px var(--w-pad);
  background: #f8f2f7;
  border-bottom: 1px solid rgba(107,63,143,.15);
  text-decoration: none;
  color: var(--c-accent);
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .2s;
}
.hub-zodiac-shortcut:hover { background: rgba(107,63,143,.08); }
.hub-zodiac-shortcut__icon {
  font-size: 16px; line-height: 1; flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   3. СЕТКА КАМНЕЙ
══════════════════════════════════════════════ */
.hub-stones {
  background: var(--c-warm);
  padding: 64px 0 80px;
  max-width: 1920px; margin: 0 auto;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid #e8e3de;
  border-left: 1px solid #e8e3de;
}

/* Широкая карточка занимает 2 колонки */
.hub-card--wide { grid-column: span 2; }

/* При фильтрации скрытые карточки не занимают место в гриде */
.hub-card.is-hidden { display: none; }

/* ── Заголовок раздела (напр. «Редкие камни») внутри .W перед сеткой ── */
.hub-grid-label {
  padding: 40px 0 20px;
  display: flex; align-items: center; gap: 14px;
}
.hub-grid-label::before {
  content: '';
  width: 2px; height: 18px;
  background: var(--c-accent); flex-shrink: 0;
}
.hub-grid-label__text {
  font-size: 11px; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--c-accent);
}

/* ── CTA-плитка внутри сетки ── */
.hub-card--cta {
  background: var(--c-dark);
  border-color: transparent;
}
.hub-card--cta .hub-card__inner {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 40px 28px; gap: 16px;
  min-height: 200px;
  color: #fff;
}
.hub-card--cta:hover .hub-card__inner { background: #180e2a; }
.hub-card--cta .hub-card__cta-eyebrow {
  font-size: 9px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--c-accent-l); display: block;
}
.hub-card--cta .hub-card__cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; font-weight: 300; color: rgba(255,255,255,.88); line-height: 1.35;
}

/* ══════════════════════════════════════════════
   КАРТОЧКА КАМНЯ
══════════════════════════════════════════════ */
.hub-card {
  background: #fff;
  overflow: hidden;
  border-right: 1px solid #e8e3de;
  border-bottom: 1px solid #e8e3de;
}

.hub-card__inner {
  display: flex; flex-direction: column;
  height: 100%;
  text-decoration: none; color: inherit;
  transition: background .25s;
}
.hub-card__inner:hover { background: #fdfcfb; }

/* Изображение */
.hub-card__img {
  position: relative; overflow: hidden;
  padding-bottom: 66%;
  background: #111; flex-shrink: 0;
}
.hub-card--wide .hub-card__img { padding-bottom: 44%; }

.hub-card__img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  /* Per-card фокус: переопределяется через style="--obj-pos:…" на .hub-card */
  object-position: var(--obj-pos, center center);
  opacity: .88;
  /* Placeholder-фон пока изображение грузится */
  background: #1a1220;
  transition: opacity .4s, transform .6s cubic-bezier(.4,0,.2,1);
}
.hub-card__inner:hover .hub-card__img img {
  opacity: 1; transform: scale(1.04);
}

/* Палитра цветов камня */
.hub-card__palette {
  position: absolute; bottom: 14px; left: 16px;
  display: flex; gap: 5px; z-index: 2;
}
.hub-card__palette span {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.35);
  flex-shrink: 0;
}

/* Мета */
.hub-card__meta {
  padding: 24px 26px 28px;
  display: flex; flex-direction: column; flex: 1;
}

/* Бейджи */
.hub-card__badges {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.hub-badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
}
.hub-badge--rare    { background: rgba(107,63,143,.12); color: var(--c-accent); border: 1px solid rgba(107,63,143,.25); }
.hub-badge--classic { background: rgba(28,18,32,.07); color: rgba(28,18,32,.55); }
.hub-badge--origin  { background: #e8f0e0; color: #2d5a1a; }
.hub-badge--special { background: var(--c-accent); color: #fff; }

/* Заголовок */
.hub-card__meta > h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 300; line-height: 1.1;
  color: #1c1220; margin-bottom: 4px;
  letter-spacing: 0;
  transition: color .2s;
}
.hub-card__inner:hover .hub-card__meta > h2 { color: var(--c-accent); }

.hub-card__meta > p:first-of-type {
  font-size: 11px; color: #999;
  letter-spacing: .06em; font-style: italic;
  margin-bottom: 14px;
}

/* Крючок-текст */
.hub-card__meta > p:nth-of-type(2) {
  font-size: 13px; color: #555; line-height: 1.75;
  margin-bottom: 20px; flex: 1;
}

/* Мини-таблица свойств */
.hub-card__props {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.07);
}
.hub-card__prop {
  display: flex; gap: 12px; align-items: baseline;
}
.hub-card__prop dt {
  font-size: 10px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #aaa;
  flex-shrink: 0; width: 100px;
}
.hub-card__prop dd {
  font-size: 12px; color: #444;
}

/* CTA-стрелка */
.hub-card__cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-accent);
  transition: gap .2s;
  margin-top: auto;
}
.hub-card__inner:hover .hub-card__cta { gap: 10px; }

/* Счётчик */
#js-hub-count {
  margin-top: 32px;
  font-size: 13px; color: #888; text-align: center;
  letter-spacing: .04em;
}

/* ─── Пагинация ────────────────────────────────────────────── */
.hub-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid rgba(0,0,0,.09);
}

.hub-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border: 1px solid rgba(28,18,32,.15);
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  line-height: 1;
}
.hub-pager__btn:hover:not(:disabled) {
  background: rgba(124,79,154,.08);
  border-color: rgba(124,79,154,.35);
  color: #7c4f9a;
  transform: translateY(-1px);
}
.hub-pager__btn.is-active {
  background: #7c4f9a;
  border-color: #7c4f9a;
  color: #fff;
  cursor: default;
}
.hub-pager__btn:disabled {
  opacity: .3;
  cursor: not-allowed;
  transform: none;
}

.hub-pager__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 40px;
  color: #aaa;
  font-size: 15px;
  user-select: none;
}

.hub-pager__info {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #aaa;
  letter-spacing: .04em;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .hub-pager { gap: 6px; margin-top: 32px; padding-top: 28px; }
  .hub-pager__btn { min-width: 36px; height: 36px; font-size: 13px; }
  .hub-pager__info { font-size: 11px; }
}

/* ══════════════════════════════════════════════
   4. БЛОК ЗОДИАКА
══════════════════════════════════════════════ */
.hub-zodiac {
  position: relative;
  background: #f8f2f7;
  padding: 100px 0;
  overflow: hidden;
  max-width: 1920px; margin: 0 auto;
}

.hub-zodiac__bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 50%, rgba(107,63,143,.07) 0%, transparent 70%),
              radial-gradient(ellipse 60% 80% at 80% 80%, rgba(107,63,143,.05) 0%, transparent 70%);
  pointer-events: none;
}

.hub-zodiac__layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
  align-items: start;
}

.hub-zodiac__eyebrow {
  display: block;
  font-size: 10px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--c-accent);
  margin-bottom: 20px;
}
.hub-zodiac__text > h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 300; line-height: 1.1;
  letter-spacing: 0;
  color: #1c1220; margin-bottom: 20px;
}
.hub-zodiac__text > p {
  font-size: clamp(13px, 1vw, 15px);
  color: rgba(28,18,32,.6); line-height: 1.85;
  margin-bottom: 32px;
}

/* Сетка знаков */
.hub-zodiac__signs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  background: rgba(107,63,143,.08);
}

.hub-sign {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 22px 12px;
  background: #f8f2f7;
  text-decoration: none; color: inherit;
  transition: background .2s;
}
.hub-sign:hover { background: rgba(107,63,143,.1); }

.hub-sign__sym {
  font-size: 24px; line-height: 1;
  color: var(--c-accent);
}
.hub-sign__name {
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: #1c1220; text-transform: uppercase;
}
.hub-sign__stone {
  font-size: 11px; color: rgba(28,18,32,.45);
  text-align: center; line-height: 1.4;
}

/* ── Scroll-in анимации ─────────────────────────
   .hub-sign — знаки зодиака (снизу вверх + fade)
   .gh-hero__stat — цифры hero (снизу вверх + fade)
   Начальное состояние: невидимы и смещены вниз.
   .is-visible добавляет JS по IntersectionObserver.
──────────────────────────────────────────────── */
.hub-sign,
.gh-hero__stat {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.hub-sign.is-visible,
.gh-hero__stat.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Каскадная задержка для знаков зодиака (1–12) */
.hub-sign:nth-child(1)  { transition-delay: .00s; }
.hub-sign:nth-child(2)  { transition-delay: .05s; }
.hub-sign:nth-child(3)  { transition-delay: .10s; }
.hub-sign:nth-child(4)  { transition-delay: .15s; }
.hub-sign:nth-child(5)  { transition-delay: .20s; }
.hub-sign:nth-child(6)  { transition-delay: .25s; }
.hub-sign:nth-child(7)  { transition-delay: .30s; }
.hub-sign:nth-child(8)  { transition-delay: .35s; }
.hub-sign:nth-child(9)  { transition-delay: .40s; }
.hub-sign:nth-child(10) { transition-delay: .45s; }
.hub-sign:nth-child(11) { transition-delay: .50s; }
.hub-sign:nth-child(12) { transition-delay: .55s; }

/* Задержка для трёх цифр hero */
.gh-hero__stat:nth-child(1) { transition-delay: .00s; }
.gh-hero__stat:nth-child(2) { transition-delay: .12s; }
.gh-hero__stat:nth-child(3) { transition-delay: .24s; }

/* Fallback: если IntersectionObserver не поддерживается — показать всё */
@media (prefers-reduced-motion: reduce) {
  .hub-sign,
  .gh-hero__stat {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ══════════════════════════════════════════════
   5. CTA — АТЕЛЬЕ
══════════════════════════════════════════════ */
.hub-cta {
  background: #fff;
  padding: 100px 0;
  max-width: 1920px; margin: 0 auto;
}

.hub-cta__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hub-cta__eyebrow {
  display: block;
  font-size: 10px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--c-accent);
  margin-bottom: 20px;
}
.hub-cta__text > h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 300; letter-spacing: 0; color: #1c1220;
  margin-bottom: 20px; line-height: 1.1;
}
.hub-cta__text > p {
  font-size: clamp(14px, 1vw, 16px);
  color: rgba(28,18,32,.6); line-height: 1.8;
  margin-bottom: 36px; max-width: 460px;
}
.hub-cta__btns {
  display: flex; gap: 12px; flex-wrap: wrap;
}

.hub-cta__img {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
}
.hub-cta__img img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--obj-pos, center center);
  display: block;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.hub-cta__img:hover img { transform: scale(1.04); }

/* ── Кнопка «Подобрать камень по знаку» на розовом фоне .hub-zodiac ── */
.hub-zodiac .btn--ghost-w {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.hub-zodiac .btn--ghost-w:hover {
  background: var(--c-accent);
  color: #fff;
}

/* ── Кнопки в блоке CTA ателье (.hub-cta) — светлый фон ── */
/* Главная CTA: btn--dark → фиолетовый заливкой */
.hub-cta .btn--dark {
  background: var(--c-accent);
  color: #fff;
}
.hub-cta .btn--dark:hover {
  background: #52307a;
  transform: translateY(-1px);
}
/* Второстепенная: btn--ghost-k → фиолетовый контур */
.hub-cta .btn--ghost-k {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.hub-cta .btn--ghost-k:hover {
  background: var(--c-accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════
   АДАПТИВ
══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hub-zodiac__layout { grid-template-columns: 300px 1fr; gap: 48px; }
  .hub-cta__layout { gap: 48px; }
}

@media (max-width: 900px) {
  /* Hero — адаптив gh-hero на планшете */
  .gh-hero {
    padding-bottom: 60px;
    min-height: 88svh;
  }
  .gh-hero__stats { gap: 28px; }

  /* Сетка камней — 2 колонки */
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-card--wide { grid-column: span 2; }

  /* Зодиак */
  .hub-zodiac__layout { grid-template-columns: 1fr; gap: 48px; }
  .hub-zodiac__signs { grid-template-columns: repeat(4, 1fr); }

  /* CTA */
  .hub-cta__layout { grid-template-columns: 1fr; }
  .hub-cta__img { aspect-ratio: 16 / 7; }
}

@media (max-width: 600px) {
  /* Hero — адаптив gh-hero на мобиле */
  .gh-hero {
    min-height: 85svh;
    padding-bottom: 48px;
    align-items: flex-end;
  }
  .gh-hero__stats {
    gap: 20px;
    flex-wrap: wrap;
  }
  .gh-hero__stat-num { font-size: clamp(32px, 9vw, 48px); }
  .gh-hero__inner > p { margin-bottom: 32px; }

  /* Фильтры: ссылка «По знаку» остаётся видимой — горизонтальный скролл полосы позволяет до неё добраться */
  /* .hub-filter--link { display: none; } — убрано: ссылка должна быть доступна на мобиле */

  /* Мобильный баннер-ссылка под фильтрами */
  .hub-zodiac-shortcut { display: flex; }

  /* Сетка камней — 1 колонка */
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card--wide { grid-column: span 1; }
  .hub-card--wide .hub-card__img { padding-bottom: 60%; }

  /* Зодиак */
  .hub-zodiac { padding: 64px 0; }
  .hub-zodiac__signs { grid-template-columns: repeat(3, 1fr); }
  .hub-zodiac__text .btn { width: 100%; justify-content: center; }

  /* CTA */
  .hub-cta { padding: 64px 0; }
  .hub-cta__btns .btn { flex: 1; justify-content: center; }
}

@media (max-width: 400px) {
  .hub-zodiac__signs { grid-template-columns: repeat(2, 1fr); }
}
