/* ============================================
   SPREAD CARDS — аккордеон + Алина-баннер
   ============================================ */

/* Domain switcher */
.domain-switcher {
  display: flex;
  justify-content: center;
  padding: 18px 0 6px;
}
.domain-pill {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 4px;
  gap: 0;
}
.domain-btn {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s;
}
.domain-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}
.domain-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* === Кликабельный заголовок категории + плавное раскрытие === */
.cat-bar {
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, #a78bfa, #67e8f9);
  border-radius: 2px;
  transition: width 0.3s;
  flex-shrink: 0;
}

.catalog-section {
  margin: 18px 0 6px;
  border-radius: 14px;
  transition: background 0.2s;
}
.catalog-section:hover {
  background: rgba(167, 139, 250, 0.04);
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
  transition: background 0.2s;
  position: relative;
  outline: none;
}
.cat-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.cat-header:focus-visible {
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.5);
}
.catalog-section.open .cat-bar {
  width: 50px;
}

.cat-title {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  flex: 1;
  margin: 0;
}

.cat-count {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-body, "Manrope", sans-serif);
  font-weight: 500;
}

.cat-hint {
  font-size: 0.72rem;
  color: rgba(167, 139, 250, 0.6);
  font-weight: 500;
  transition: opacity 0.25s, transform 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-family: var(--font-body, "Manrope", sans-serif);
}
.catalog-section.open .cat-hint {
  opacity: 0.4;
}

.cat-chevron {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
  flex-shrink: 0;
}
.cat-header:hover .cat-chevron {
  background: rgba(167, 139, 250, 0.18);
}
.catalog-section.open .cat-chevron {
  transform: rotate(180deg);
  background: rgba(167, 139, 250, 0.2);
}
.cat-chevron svg {
  width: 14px;
  height: 14px;
  color: #c4b5fd;
}

/* Тело категории — плавное раскрытие */
.cat-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.catalog-section.open .cat-body {
  max-height: 2000px;
}

.cat-grid-wrap {
  padding: 6px 16px 18px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s 0.05s, transform 0.4s 0.05s;
}
.catalog-section.open .cat-grid-wrap {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 540px) {
  .cat-title { font-size: 1.2rem; }
  .cat-header { padding: 12px 12px; gap: 10px; }
  .cat-hint { display: none; }
  .cat-grid-wrap { padding: 4px 4px 14px; }
}

/* === Grid плашек === */
.spreads-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) {
  .spreads-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .spreads-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 380px) {
  .spreads-grid { grid-template-columns: 1fr; }
}

.spread-card {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.spread-card-tilt {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s,
              border-color 0.25s;
}
.spread-card:hover .spread-card-tilt {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.25);
  border-color: rgba(167, 139, 250, 0.4);
}

@media (max-width: 720px) {
  .spread-card-tilt {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }
}

/* Background gradients */
.spread-img { position: absolute; inset: 0; }
.spread-img--day { background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #8b5cf6 100%); }
.spread-img--yes { background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%); }
.spread-img--three { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%); }
.spread-img--any { background: linear-gradient(135deg, #a78bfa 0%, #fbbf24 100%); }
.spread-img--love { background: linear-gradient(135deg, #be123c 0%, #ec4899 50%, #a78bfa 100%); }
.spread-img--cheat { background: linear-gradient(135deg, #7c2d12 0%, #f43f5e 100%); }
.spread-img--exback { background: linear-gradient(135deg, #831843 0%, #ec4899 100%); }
.spread-img--crisis { background: linear-gradient(135deg, #4c1d95 0%, #be185d 100%); }
.spread-img--week { background: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%); }
.spread-img--month { background: linear-gradient(135deg, #4338ca 0%, #8b5cf6 100%); }
.spread-img--lunar { background: linear-gradient(135deg, #312e81 0%, #1e293b 100%); }
.spread-img--horo { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.spread-img--compat { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #8b5cf6 100%); }
.spread-img--natal { background: linear-gradient(135deg, #1e1b4b 0%, #7c3aed 50%, #f59e0b 100%); }

.spread-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.45) 35%,
    rgba(0, 0, 0, 0.05) 65%,
    transparent 100%
  );
}

/* Badges */
.spread-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.spread-badge--free {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.spread-badge--paid {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.spread-badge--prem {
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  color: #1a1208;
  border: 0;
  box-shadow: 0 2px 8px rgba(252, 211, 77, 0.3);
}

@media (max-width: 540px) {
  .spread-badge { font-size: 10px; padding: 3px 8px; top: 7px; left: 7px; }
}

/* Bottom content */
.spread-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  z-index: 2;
}
.spread-title {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.18;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}
.spread-divider {
  display: block;
  width: 100%;
  max-width: 140px;
  height: 1px;
  margin: 8px 0;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.85), rgba(167, 139, 250, 0.4), transparent);
}
.spread-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .spread-bottom { padding: 10px 12px; }
  .spread-title { font-size: 0.92rem; line-height: 1.15; }
  .spread-sub { font-size: 0.66rem; margin-top: 2px; }
  .spread-divider { max-width: 60px; margin: 4px 0; }
}

/* ============================================
   ALINA INLINE — баннер между категориями
   с ЗОЛОТИСТОЙ фразой "Алина всегда готова прийти на помощь"
   ============================================ */
.alina-inline {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 22px;
  padding: 28px 32px;
  margin: 24px 0 18px;
  position: relative;
  overflow: hidden;
}
.alina-inline::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(252, 211, 77, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.alina-inline::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.alina-inline-content {
  position: relative;
  z-index: 2;
}

.alina-inline-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
}

.alina-inline-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.5);
  flex-shrink: 0;
}
.alina-inline-avatar svg {
  width: 22px;
  height: 22px;
}

.alina-inline-desc {
  margin: 0 0 10px;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* ЗОЛОТИСТАЯ фраза "Алина всегда готова прийти на помощь" */
.alina-inline-tag {
  margin: 0 0 18px;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
  /* Fallback на случай если background-clip не работает */
  color: #fcd34d;
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 35%, #fb923c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.5;
  text-shadow: 0 0 24px rgba(252, 211, 77, 0.25);
  /* Защита от старых правил */
  letter-spacing: 0.01em;
}
/* На случай если браузер не поддерживает background-clip — оставляем сплошной золотой */
@supports not (-webkit-background-clip: text) {
  .alina-inline-tag {
    color: #fcd34d;
    -webkit-text-fill-color: #fcd34d;
    background: none;
  }
}

.alina-inline-feat {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.alina-inline-feat li {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1.4;
}
.alina-inline-feat li::before {
  content: "✓";
  color: #67e8f9;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1rem;
}

.alina-inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.alina-inline-cta {
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter 0.15s, transform 0.15s, background 0.15s, border-color 0.15s;
  border: 0;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.4);
}
.alina-inline-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.alina-inline-cta-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
.alina-inline-cta-ghost:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.4);
}

.alina-inline-preview {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  z-index: 2;
}
.alina-bubble {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: 92%;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}
.alina-bubble.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}
.alina-bubble > span:last-child {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 8px 12px;
}
.alina-bubble.user > span:last-child {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(6, 182, 212, 0.22));
}
.alina-bubble-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.alina-bubble-av.usr {
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 800px) {
  .alina-inline {
    grid-template-columns: 1fr;
    padding: 22px 18px;
    gap: 16px;
    border-radius: 16px;
  }
  .alina-inline::before { width: 180px; height: 180px; top: -60px; right: -60px; }
  .alina-inline::after { display: none; }
  .alina-inline-title { font-size: 1.3rem; gap: 10px; margin: 0 0 10px; }
  .alina-inline-avatar { width: 34px; height: 34px; }
  .alina-inline-avatar svg { width: 17px; height: 17px; }
  .alina-inline-desc { font-size: 0.85rem; line-height: 1.5; }
  .alina-inline-tag { font-size: 0.95rem; margin: 0 0 14px; }
  .alina-inline-feat { gap: 7px; margin: 0 0 16px; }
  .alina-inline-feat li { font-size: 0.82rem; }
  .alina-inline-cta { padding: 10px 18px; font-size: 0.85rem; }
  .alina-inline-preview { padding: 12px; gap: 8px; }
  .alina-bubble { font-size: 0.78rem; gap: 7px; }
  .alina-bubble > span:last-child { padding: 7px 10px; }
  .alina-bubble-av { width: 22px; height: 22px; font-size: 10px; }
  /* На мобиле скрываем 4-5 сообщения чтобы блок не был слишком высоким */
  .alina-inline-preview > .alina-bubble:nth-child(n+4) { display: none; }
}
