/**
 * Decoración temporal del Hub (login + home).
 * Clases: body.hub-season--{id}
 */

.page--hub[class*="hub-season--"],
.page--auth[class*="hub-season--"] {
  transition: background 0.4s ease;
}

.page--hub[class*="hub-season--"] .header,
.page--auth[class*="hub-season--"] .auth-card {
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ── Banner festivo (JS) ── */

.hub-season-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: center;
  border-bottom: none;
  background: transparent;
}

.hub-season-banner__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  max-width: min(100%, 42rem);
  padding: 0.7rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.08);
}

.page--auth > .hub-season-banner {
  margin: 0 auto 1.25rem;
  padding: 0 1rem;
  max-width: 440px;
  width: 100%;
}

.page--auth > .hub-season-banner .hub-season-banner__inner {
  width: 100%;
}

.page--hub > .hub-season-banner,
.hub-main > .hub-season-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0 1.25rem;
  box-sizing: border-box;
  background: transparent;
  border: none;
}

.hub-season-banner:not(:has(.hub-season-banner__inner)) {
  width: fit-content;
  max-width: min(100%, 42rem);
  margin-left: auto;
  margin-right: auto;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.08);
}

.hub-season-banner--halloween .hub-season-banner__inner,
.hub-season-banner--halloween:not(:has(.hub-season-banner__inner)) {
  color: #fff;
  background: linear-gradient(90deg, #4c1d95, #c2410c, #7c2d12, #4c1d95);
  background-size: 300% 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hub-season-banner--christmas .hub-season-banner__inner,
.hub-season-banner--christmas:not(:has(.hub-season-banner__inner)) {
  color: #fff;
  background: linear-gradient(90deg, #14532d, #b91c1c, #14532d);
  background-size: 200% 100%;
}

.hub-season-banner--newYear .hub-season-banner__inner,
.hub-season-banner--newYear:not(:has(.hub-season-banner__inner)) {
  color: #fff;
  background: linear-gradient(90deg, #1e3a8a, #ca8a04, #1e3a8a);
  background-size: 200% 100%;
}

.hub-season-banner--dayOfDead .hub-season-banner__inner,
.hub-season-banner--dayOfDead:not(:has(.hub-season-banner__inner)) {
  color: #fffbeb;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
    linear-gradient(118deg, #6d28d9 0%, #c026d3 32%, #ea580c 68%, #7c2d12 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 4px 22px rgba(109, 40, 217, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(67, 20, 90, 0.35);
}

.hub-season-banner--valentine .hub-season-banner__inner,
.hub-season-banner--valentine:not(:has(.hub-season-banner__inner)),
.hub-season-banner--womenDay .hub-season-banner__inner,
.hub-season-banner--womenDay:not(:has(.hub-season-banner__inner)) {
  color: #fff;
  background: linear-gradient(118deg, #be185d, #9333ea);
}

.hub-season-banner--laborDay .hub-season-banner__inner,
.hub-season-banner--laborDay:not(:has(.hub-season-banner__inner)) {
  color: #fff;
  background: linear-gradient(118deg, #374151, #6b7280);
}

.hub-season-banner--panamaNovember .hub-season-banner__inner,
.hub-season-banner--panamaNovember:not(:has(.hub-season-banner__inner)) {
  color: #fff;
  background: linear-gradient(118deg, #d3122a 0%, #2563eb 50%, #d3122a 100%);
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .hub-season-banner--halloween .hub-season-banner__inner,
  .hub-season-banner--halloween:not(:has(.hub-season-banner__inner)),
  .hub-season-banner--christmas .hub-season-banner__inner,
  .hub-season-banner--christmas:not(:has(.hub-season-banner__inner)),
  .hub-season-banner--newYear .hub-season-banner__inner,
  .hub-season-banner--newYear:not(:has(.hub-season-banner__inner)),
  .hub-season-banner--panamaNovember .hub-season-banner__inner,
  .hub-season-banner--panamaNovember:not(:has(.hub-season-banner__inner)) {
    animation: hub-season-banner-shift 8s ease-in-out infinite;
  }

  .hub-season-banner--dayOfDead .hub-season-banner__inner,
  .hub-season-banner--dayOfDead:not(:has(.hub-season-banner__inner)) {
    animation: hub-season-banner-shift 10s ease-in-out infinite;
    background-size: 200% 200%;
  }
}

@keyframes hub-season-banner-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ── Partículas flotantes (JS) ── */

.hub-season-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}

.hub-season-fx__item {
  position: absolute;
  left: var(--hub-fx-left, 10%);
  top: -12%;
  font-size: var(--hub-fx-size, 1.4rem);
  opacity: 0;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: no-preference) {
  .hub-season-fx--halloween .hub-season-fx__item,
  .hub-season-fx--thanksgiving .hub-season-fx__item {
    animation: hub-fx-fall-halloween var(--hub-fx-duration, 18s) linear infinite;
    animation-delay: var(--hub-fx-delay, 0s);
  }

  .hub-season-fx--christmas .hub-season-fx__item,
  .hub-season-fx--newYear .hub-season-fx__item {
    animation: hub-fx-snow var(--hub-fx-duration, 20s) linear infinite;
    animation-delay: var(--hub-fx-delay, 0s);
  }

  .hub-season-fx--valentine .hub-season-fx__item,
  .hub-season-fx--dayOfDead .hub-season-fx__item {
    animation: hub-fx-drift var(--hub-fx-duration, 22s) ease-in-out infinite;
    animation-delay: var(--hub-fx-delay, 0s);
  }
}

@keyframes hub-fx-fall-halloween {
  0% {
    transform: translate3d(0, -8vh, 0) rotate(-12deg) scale(0.85);
    opacity: 0;
  }
  6% {
    opacity: 0.55;
  }
  50% {
    transform: translate3d(calc(var(--hub-fx-drift, 0px) * 0.5), 45vh, 0) rotate(8deg) scale(1);
  }
  94% {
    opacity: 0.45;
  }
  100% {
    transform: translate3d(var(--hub-fx-drift, 20px), 108vh, 0) rotate(18deg) scale(0.9);
    opacity: 0;
  }
}

@keyframes hub-fx-snow {
  0% {
    transform: translate3d(0, -10vh, 0);
    opacity: 0;
  }
  8% {
    opacity: 0.5;
  }
  100% {
    transform: translate3d(var(--hub-fx-drift, 0px), 105vh, 0);
    opacity: 0;
  }
}

@keyframes hub-fx-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translate3d(var(--hub-fx-drift, 0px), -24px, 0) scale(1.08);
    opacity: 0.55;
  }
}

/* ── Halloween (25–31 oct) ── */

.page--hub.hub-season--halloween,
.page--auth.hub-season--halloween {
  background:
    radial-gradient(ellipse 90% 55% at 100% 0%, rgba(232, 119, 34, 0.22), transparent 58%),
    radial-gradient(ellipse 80% 50% at 0% 100%, rgba(88, 28, 135, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(124, 45, 18, 0.04) 0%, transparent 28%),
    var(--fl-page);
}

.page--hub.hub-season--halloween .header {
  position: relative;
  border-bottom-color: rgba(232, 119, 34, 0.45);
  box-shadow: 0 3px 0 rgba(88, 28, 135, 0.1);
}

.page--hub.hub-season--halloween .header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #ea580c, #7c3aed);
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .page--hub.hub-season--halloween .header::before {
    animation: hub-season-banner-shift 5s ease-in-out infinite;
  }
}

.page--hub.hub-season--halloween .hub-hero {
  position: relative;
  padding: 1.15rem 3rem 1.15rem 1.25rem;
  margin-bottom: 0.25rem;
  border-radius: var(--fl-radius, 12px);
  border: 1px solid rgba(234, 88, 12, 0.35);
  background: linear-gradient(
    125deg,
    rgba(234, 88, 12, 0.12) 0%,
    rgba(88, 28, 135, 0.08) 55%,
    rgba(234, 88, 12, 0.06) 100%
  );
  box-shadow: 0 8px 28px rgba(124, 45, 18, 0.08);
}

.page--hub.hub-season--halloween .hub-hero::after {
  content: "🎃";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.25rem;
  opacity: 0.75;
  pointer-events: none;
  filter: drop-shadow(0 3px 8px rgba(124, 45, 18, 0.2));
}

.page--hub.hub-season--halloween .hub-hero h1::after {
  content: " 👻";
  font-size: 0.78em;
  opacity: 0.85;
}

.page--hub.hub-season--halloween .hub-hero p {
  color: #7c2d12;
  font-weight: 500;
}

.page--hub.hub-season--halloween .stat-card {
  border-color: rgba(234, 88, 12, 0.35);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.9), var(--fl-surface));
}

.page--hub.hub-season--halloween .app-card:not(.app-card--disabled) {
  box-shadow:
    0 1px 0 rgba(234, 88, 12, 0.12),
    var(--fl-shadow, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.page--hub.hub-season--halloween .search-input {
  border-color: rgba(234, 88, 12, 0.35);
}

.page--auth.hub-season--halloween .auth-card {
  border: 2px solid rgba(234, 88, 12, 0.45);
  box-shadow:
    var(--fl-shadow-lg),
    0 12px 40px rgba(88, 28, 135, 0.12);
}

.page--auth.hub-season--halloween .auth-card__title::after {
  content: " 🎃";
  font-size: 0.9em;
}

@media (prefers-reduced-motion: no-preference) {
  .page--hub.hub-season--halloween .hub-hero::after {
    animation: hub-season-pumpkin-bob 3s ease-in-out infinite;
  }

  .page--hub.hub-season--halloween .hub-hero h1::after {
    display: inline-block;
    animation: hub-season-ghost-wiggle 2.5s ease-in-out infinite;
  }
}

@keyframes hub-season-pumpkin-bob {
  0%,
  100% {
    transform: translateY(-50%) rotate(-4deg);
  }
  50% {
    transform: translateY(calc(-50% - 8px)) rotate(4deg);
  }
}

@keyframes hub-season-ghost-wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

/* ── Navidad (1–25 dic) ── */

.page--hub.hub-season--christmas,
.page--auth.hub-season--christmas {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(16, 124, 65, 0.14), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(211, 18, 42, 0.1), transparent 45%),
    var(--fl-page);
}

.page--hub.hub-season--christmas .header {
  border-bottom-color: rgba(16, 124, 65, 0.35);
}

.page--hub.hub-season--christmas .hub-hero {
  position: relative;
  padding-right: 2.5rem;
}

.page--hub.hub-season--christmas .hub-hero::after {
  content: "✨";
  position: absolute;
  right: 0;
  top: 0.15rem;
  font-size: 1.6rem;
  opacity: 0.65;
  pointer-events: none;
}

.page--hub.hub-season--christmas .hub-hero h1::after {
  content: " 🎄";
  font-size: 0.72em;
  opacity: 0.75;
}

.page--auth.hub-season--christmas .auth-card {
  border-color: rgba(16, 124, 65, 0.35);
}

/* ── Año nuevo (26 dic – 3 ene) ── */

.page--hub.hub-season--newYear,
.page--auth.hub-season--newYear {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.14), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(234, 179, 8, 0.12), transparent 45%),
    var(--fl-page);
}

.page--hub.hub-season--newYear .hub-hero h1::after {
  content: " 🎆";
  font-size: 0.72em;
  opacity: 0.75;
}

.page--auth.hub-season--newYear .auth-card__title::after {
  content: " ✨";
  font-size: 0.85em;
}

/* ── San Valentín ── */

.page--hub.hub-season--valentine,
.page--auth.hub-season--valentine {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(225, 29, 72, 0.12), transparent 50%),
    var(--fl-page);
}

.page--hub.hub-season--valentine .hub-hero h1::after {
  content: " 💜";
  font-size: 0.72em;
  opacity: 0.65;
}

/* ── 8M ── */

.page--hub.hub-season--womenDay,
.page--auth.hub-season--womenDay {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(168, 85, 247, 0.12), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(236, 72, 153, 0.08), transparent 45%),
    var(--fl-page);
}

.page--hub.hub-season--womenDay .hub-hero h1::after {
  content: " 💜";
  font-size: 0.72em;
  opacity: 0.7;
}

/* ── 1 de mayo ── */

.page--hub.hub-season--laborDay .hub-hero h1::after {
  content: " ⚙️";
  font-size: 0.72em;
  opacity: 0.55;
}

/* ── Día de muertos (1–2 nov) ── */

.page--hub.hub-season--dayOfDead,
.page--auth.hub-season--dayOfDead {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(249, 115, 22, 0.12), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(124, 58, 237, 0.1), transparent 50%),
    var(--fl-page);
}

.page--hub.hub-season--dayOfDead .hub-hero h1::after {
  content: " 🌼";
  font-size: 0.72em;
  opacity: 0.7;
}

/* ── Fiestas patrias Panamá (3–5 nov) ── */

.page--hub.hub-season--panamaNovember,
.page--auth.hub-season--panamaNovember {
  background:
    linear-gradient(180deg, rgba(211, 18, 42, 0.08) 0%, transparent 35%),
    linear-gradient(0deg, rgba(37, 99, 235, 0.08) 0%, transparent 35%),
    var(--fl-page);
}

.page--hub.hub-season--panamaNovember .header {
  border-bottom-color: rgba(211, 18, 42, 0.35);
}

.page--hub.hub-season--panamaNovember .hub-hero h1::after {
  content: " 🇵🇦";
  font-size: 0.72em;
}

/* ── Thanksgiving (ventana puntual; ver hub-seasonal.js) ── */

.hub-season-banner--thanksgiving .hub-season-banner__inner,
.hub-season-banner--thanksgiving:not(:has(.hub-season-banner__inner)) {
  color: #fffbeb;
  background: linear-gradient(
    118deg,
    #9a3412 0%,
    #ca8a04 38%,
    #b45309 72%,
    #7c2d12 100%
  );
  border: 1px solid rgba(255, 251, 235, 0.35);
  text-shadow: 0 1px 2px rgba(67, 20, 7, 0.35);
}

.page--hub.hub-season--thanksgiving,
.page--auth.hub-season--thanksgiving {
  background:
    radial-gradient(ellipse 85% 55% at 100% 0%, rgba(234, 179, 8, 0.16), transparent 58%),
    radial-gradient(ellipse 70% 45% at 0% 100%, rgba(180, 83, 9, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(154, 52, 18, 0.04) 0%, transparent 32%),
    var(--fl-page);
}

.page--hub.hub-season--thanksgiving .header {
  border-bottom-color: rgba(180, 83, 9, 0.4);
}

.page--hub.hub-season--thanksgiving .hub-hero {
  border: 1px solid rgba(202, 138, 4, 0.35);
  background: linear-gradient(
    125deg,
    rgba(251, 191, 36, 0.12) 0%,
    rgba(234, 88, 12, 0.07) 55%,
    rgba(251, 191, 36, 0.05) 100%
  );
}

.page--hub.hub-season--thanksgiving .hub-hero h1::after {
  content: " 🦃";
  font-size: 0.72em;
  opacity: 0.85;
}

.page--auth.hub-season--thanksgiving .auth-card {
  border-color: rgba(180, 83, 9, 0.4);
  box-shadow:
    var(--fl-shadow-lg),
    0 10px 36px rgba(154, 52, 18, 0.1);
}

.page--auth.hub-season--thanksgiving .auth-card__title::after {
  content: " 🍂";
  font-size: 0.88em;
}

@media (prefers-reduced-motion: no-preference) {
  .hub-season-banner--thanksgiving .hub-season-banner__inner,
  .hub-season-banner--thanksgiving:not(:has(.hub-season-banner__inner)) {
    animation: hub-season-banner-shift 9s ease-in-out infinite;
    background-size: 200% 100%;
  }

}

.hub-season-fx--thanksgiving .hub-season-fx__item {
  opacity: 1;
}

@media (max-width: 640px) {
  .page--hub[class*="hub-season--"] .hub-hero::after {
    font-size: 1.75rem;
  }
  .page--hub.hub-season--halloween .hub-hero {
    padding-right: 2.75rem;
  }
  .hub-season-fx__item {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-season-fx {
    display: none;
  }
}
