/**
 * Home hub — обща разпределяща начална страница (page 8124).
 *
 * Welcome блок + две едри карти („Персонализирани книги" / „Коледен пакет").
 * Mobile-first: картите се стекват; от >=768px застават рамо до рамо.
 * Ползва само съществуващи tokens (variables.css) — без hardcode на цветове.
 */

.home-hub {
  text-align: center;
}

/* ── Welcome ──────────────────────────────────────────────────────────────── */

.home-hub__welcome {
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: var(--space-10, 2.5rem);
}

.home-hub__logo {
  display: block;
  width: auto;
  height: 64px;
  margin: 0 auto var(--space-5, 1.25rem);
}

.home-hub__title {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-extrabold, 800);
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  line-height: 1.15;
  color: var(--color-text);
  margin: 0 0 var(--space-3, 0.75rem);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.home-hub__lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Grid ─────────────────────────────────────────────────────────────────── */

.home-hub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: var(--container-lg);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .home-hub__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

/* ── Card ─────────────────────────────────────────────────────────────────── */

.hub-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base);
}

.hub-card:hover,
.hub-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.hub-card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* Media panel — цветен фон зад изображението (акцент за всяка карта). */
.hub-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hub-card--books .hub-card__media {
  background: var(--color-blue-soft);
  padding: var(--space-4) var(--space-4) 0;
}

.hub-card--books .hub-card__media img {
  width: auto;
  max-width: 62%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

.hub-card--xmas .hub-card__media {
  background: var(--color-footer-pink);
}

.hub-card--xmas .hub-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body */
.hub-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5) var(--space-8);
  flex: 1 1 auto;
}

.hub-card__title {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-bold, 700);
  font-size: var(--font-size-2xl);
  line-height: 1.2;
  color: var(--color-text);
}

.hub-card__text {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 26rem;
}

/* CTA — жълт бутон (наследява .btn--primary). margin-top:auto залепя бутона долу,
   за да са изравнени CTA-тата при различна дължина на текста. */
.hub-card__cta {
  margin-top: auto;
}


/* ═══ Приказно въведение (28.10.2026) ═══
   Кремав фон с меки цветни кръгове (като херото на книгите), без малкото лого,
   „Ванчелино" с цветни букви като в логото, вълнообразна линия и звездички. */
.home-hub { position: relative; overflow: hidden; background: linear-gradient(180deg, #fdf3e6 0, #fdf3e6 360px, #fff 620px); }
.home-hub::before, .home-hub::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.home-hub::before { width: 420px; height: 420px; left: -170px; top: -150px; background: radial-gradient(circle at 60% 60%, rgba(98,196,244,.55), rgba(98,196,244,.25) 60%, transparent 70%); }
.home-hub::after { width: 360px; height: 360px; right: -130px; top: 40px; background: radial-gradient(circle at 40% 40%, rgba(236,132,157,.45), rgba(236,132,157,.18) 60%, transparent 70%); }
.home-hub > .container { position: relative; z-index: 1; }

.home-hub__welcome--story { position: relative; max-width: 46rem; padding-top: 8px; margin-bottom: 48px; }
.home-hub__welcome--story .home-hub__logo { display: none; }
.home-hub__eyebrow {
	display: inline-block; margin: 0 0 16px; padding: 6px 16px;
	font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
	color: #c46a10; background: rgba(255,255,255,.75); border: 1px solid rgba(247,148,29,.35); border-radius: 999px;
}
.home-hub__welcome--story .home-hub__title { font-size: clamp(28px, 4.2vw, 52px); line-height: 1.12; margin: 0; letter-spacing: -.005em; }
.home-hub__brand { display: inline-block; white-space: nowrap; }
.home-hub__l { display: inline-block; transform-origin: 50% 80%; }
.home-hub__l--0 { color: #3fb3ec; transform: rotate(-4deg); }
.home-hub__l--1 { color: #e8708d; transform: translateY(-2px) rotate(3deg); }
.home-hub__l--2 { color: #7cb82f; transform: rotate(-2deg); }
.home-hub__l--3 { color: #f7941d; transform: translateY(1px) rotate(4deg); }
.home-hub__l--4 { color: #e9a800; transform: rotate(-3deg); }
.home-hub__wave { display: block; width: min(240px, 60%); height: 16px; margin: 14px auto 16px; }
.home-hub__welcome--story .home-hub__lead { font-size: clamp(16px, 1.4vw, 20px); color: #555; margin: 0; }

.home-hub__spark { position: absolute; width: 22px; height: 22px; opacity: .9; animation: hubTwinkle 3.2s ease-in-out infinite; }
.home-hub__spark--a { left: 4%;  top: 18%; width: 26px; height: 26px; }
.home-hub__spark--b { right: 6%; top: 8%;  animation-delay: .8s; }
.home-hub__spark--c { left: 12%; bottom: 8%; width: 16px; height: 16px; animation-delay: 1.6s; }
.home-hub__spark--d { right: 12%; bottom: 14%; width: 18px; height: 18px; animation-delay: 2.4s; }
@keyframes hubTwinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: .9; } 50% { transform: scale(.65) rotate(20deg); opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .home-hub__spark { animation: none; } }

@media (max-width: 767px) {
	.home-hub { background: linear-gradient(180deg, #fdf3e6 0, #fdf3e6 260px, #fff 440px); }
	.home-hub::before { width: 240px; height: 240px; left: -120px; top: -100px; }
	.home-hub::after { width: 200px; height: 200px; right: -110px; top: 30px; }
	.home-hub__welcome--story { margin-bottom: 32px; }
	.home-hub__eyebrow { font-size: 11px; padding: 5px 12px; margin-bottom: 12px; }
	.home-hub__brand { display: block; margin-top: 2px; }
	.home-hub__spark--a { left: 2%; top: 30%; } .home-hub__spark--b { right: 2%; top: 6%; }
	.home-hub__spark--c, .home-hub__spark--d { display: none; }
}

/* Корекции 31.10.2026: коледната карта — заглавие на 2 реда, подзаглавие на 1 ред */
.hub-card__text--one-line { white-space: nowrap; max-width: none; font-size: clamp(13px, 3.6vw, var(--font-size-base)); }
.hub-card__title--two-lines > span { white-space: nowrap; }
@media (max-width: 767px) { .hub-card__title--two-lines { font-size: clamp(17px, 5vw, var(--font-size-2xl)); } }

/* Корекции 01.11.2026: картата „Персонализирани книги“ — снимка, запълва като коледната. */
.hub-card--books .hub-card__media:has(.hub-card__photo) { padding: 0; }
.hub-card--books .hub-card__media .hub-card__photo { width: 100%; max-width: none; height: 100%; object-fit: cover; object-position: center 40%; filter: none; }
