/* ── Custom CSS – Sports & Social Home ──────────────────────────────────────────────── */

/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  /* ── Steel blue palette ── */
  --ch-accent:              #0077b6;   /* ocean blue — PRIMARY: change this to retheme */
  --ch-accent-dark:         #005f8e;
  --ch-accent-soft:         rgba(0, 119, 182, 0.10);
  --ch-accent-ring:         rgba(0, 119, 182, 0.15);
  --ch-accent-glow:         rgba(0, 119, 182, 0.35);
  --ch-focus-ring:          rgba(0, 119, 182, 0.30);
  --ch-purple:              #023e8a;   /* deep navy — gradient anchor */
  --ch-violet:              #005f8e;   /* intermediate blue */
  --ch-pill-bg:             rgba(0, 119, 182, 0.07);
  --ch-pill-bg-hover:       rgba(0, 119, 182, 0.13);
  --ch-pill-shadow:         rgba(0, 119, 182, 0.18);
  --ch-pill-icon-bg:        rgba(0, 119, 182, 0.10);
  --ch-glow-violet:         rgba(0, 119, 182, 0.40);
  --ch-glow-violet-strong:  rgba(0, 119, 182, 0.55);
  --ch-card-hover-y:    -6px;
  --ch-ease:            cubic-bezier(0.4, 0, 0.2, 1);
  --ch-fast:            150ms;
  --ch-base:            250ms;
  --ch-slow:            380ms;

  /* Glassmorphism */
  --ch-glass-bg:        rgba(255, 255, 255, 0.72);
  --ch-glass-border:    rgba(255, 255, 255, 0.45);
  --ch-glass-blur:      16px;

  /* Gradient endpoints — same family, light→dark violet */
  --ch-grad-start:      #023e8a;
  --ch-grad-end:        #0077b6;

  /* Shimmer overlay */
  --ch-shimmer-color:   rgba(255, 255, 255, 0.18);

  /* Glow shadows */
  --ch-glow-accent:     rgba(0, 119, 182, 0.45);
  --ch-glow-purple:     rgba(2, 62, 138, 0.40);
}

/* ─── Override outline buttons → violet, fill on hover ──────────────────── */
.btn-outline-primary {
  color:        var(--ch-accent) !important;
  border-color: var(--ch-accent) !important;
  background:   transparent !important;
  transition:
    background var(--ch-fast) var(--ch-ease),
    color      var(--ch-fast) var(--ch-ease),
    box-shadow var(--ch-fast) var(--ch-ease),
    transform  var(--ch-fast) var(--ch-ease) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background:   var(--ch-accent) !important;
  border-color: var(--ch-accent) !important;
  color:        #fff !important;
  box-shadow:   0 4px 14px var(--ch-glow-accent) !important;
  transform:    translateY(-1px);
}

.btn-outline-dark {
  transition:
    background var(--ch-fast) var(--ch-ease),
    color      var(--ch-fast) var(--ch-ease),
    border-color var(--ch-fast) var(--ch-ease),
    box-shadow var(--ch-fast) var(--ch-ease),
    transform  var(--ch-fast) var(--ch-ease) !important;
}
.btn-outline-dark:hover,
.btn-outline-dark:focus {
  background:   var(--ch-accent) !important;
  border-color: var(--ch-accent) !important;
  color:        #fff !important;
  box-shadow:   0 4px 14px var(--ch-glow-accent) !important;
  transform:    translateY(-1px);
}

/* ─── Override Soft UI primary gradient → violet ─────────────────────────── */
.bg-gradient-primary {
  background-image: linear-gradient(310deg, var(--ch-purple), var(--ch-accent)) !important;
}
.btn.bg-gradient-primary,
a.bg-gradient-primary {
  background-image: linear-gradient(310deg, var(--ch-purple), var(--ch-accent)) !important;
}
.text-primary {
  color: var(--ch-accent) !important;
}

/* ─── Hero: full-screen sticky shrink ───────────────────────────────────── */
.ch-hero-sticky {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
}

.ch-hero-cover {
  position: relative;
  z-index: 1;
  background-color: #fff;
}

#ch-hero-content {
  will-change: opacity, transform;
}

/* ─── Global ─────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

main {
  min-height: 70vh;
}

body {
  animation: ch-page-in 0.35s var(--ch-ease) both;
}

@keyframes ch-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ─── Focus styles ───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--ch-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Skip link ──────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 9999;
  padding: 0.45rem 1rem;
  background: var(--ch-accent);
  color: #fff !important;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: top var(--ch-fast) var(--ch-ease);
}
.skip-link:focus {
  top: 0;
  outline: none;
}

/* ─── Navbar ──────────────────────────────────────────────────────────────── */
.navbar-scrolled {
  background: rgba(255, 255, 255, 0.93) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.10) !important;
  transition: box-shadow var(--ch-base) var(--ch-ease),
              background var(--ch-base) var(--ch-ease);
}

/* ─── Navbar animated active underline ──────────────────────────────────── */
@media (min-width: 992px) {
  .navbar-nav .nav-link {
    position: relative;
  }
  .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--ch-purple), var(--ch-accent));
    border-radius: 2px;
    transition:
      left  var(--ch-base) var(--ch-ease),
      right var(--ch-base) var(--ch-ease);
  }
  .navbar-nav .nav-link.active::after,
  .navbar-nav .nav-link:hover::after {
    left: 0.5rem;
    right: 0;
  }
}

/* ─── Navbar brand gradient text ─────────────────────────────────────────── */
.navbar-brand {
  background: linear-gradient(135deg, var(--ch-purple), var(--ch-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700 !important;
}

/* ─── Hero – animated blob mesh ─────────────────────────────────────────── */
.ch-hero-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ch-hero-mesh::before,
.ch-hero-mesh::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
}
.ch-hero-mesh::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--ch-accent) 0%, transparent 70%);
  top: -120px;
  left: -80px;
  animation: ch-blob-a 13s ease-in-out infinite alternate;
}
.ch-hero-mesh::after {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, var(--ch-purple) 0%, transparent 70%);
  bottom: -100px;
  right: -60px;
  animation: ch-blob-b 17s ease-in-out infinite alternate;
}
@keyframes ch-blob-a {
  0%   { transform: translate(0,    0)    scale(1);    }
  33%  { transform: translate(60px, 30px) scale(1.08); }
  66%  { transform: translate(20px, 80px) scale(0.95); }
  100% { transform: translate(80px, 20px) scale(1.05); }
}
@keyframes ch-blob-b {
  0%   { transform: translate(0,     0)     scale(1);    }
  33%  { transform: translate(-40px, -30px) scale(1.06); }
  66%  { transform: translate(-70px,  20px) scale(0.97); }
  100% { transform: translate(-20px, -60px) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .ch-hero-mesh::before,
  .ch-hero-mesh::after { animation: none; }
}

/* ─── Hero title ─────────────────────────────────────────────────────────── */
.ch-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ─── Gradient text utility ──────────────────────────────────────────────── */
.ch-text-gradient {
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ch-text-gradient--vivid {
  background: linear-gradient(135deg, var(--ch-purple) 0%, var(--ch-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Hero floating badge ────────────────────────────────────────────────── */
.ch-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 100px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: ch-badge-float 3.6s ease-in-out infinite;
}
.ch-hero-badge .ch-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #82d616;
  box-shadow: 0 0 0 0 rgba(130, 214, 22, 0.5);
  animation: ch-badge-pulse 2s ease-out infinite;
  flex-shrink: 0;
}
@keyframes ch-badge-float {
  0%, 100% { transform: translateY(0px);  }
  50%       { transform: translateY(-5px); }
}
@keyframes ch-badge-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(130, 214, 22, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(130, 214, 22, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(130, 214, 22, 0);    }
}
@media (prefers-reduced-motion: reduce) {
  .ch-hero-badge,
  .ch-hero-badge .ch-badge-dot { animation: none; }
}

/* ─── CTA button glow ────────────────────────────────────────────────────── */
.ch-btn-glow {
  position: relative;
  box-shadow: 0 4px 18px var(--ch-glow-accent) !important;
  transition:
    box-shadow var(--ch-base) var(--ch-ease),
    transform  var(--ch-fast) var(--ch-ease) !important;
}
.ch-btn-glow:hover {
  box-shadow: 0 6px 28px var(--ch-glow-accent), 0 0 0 4px var(--ch-accent-ring) !important;
  transform: translateY(-2px) !important;
}
.ch-btn-glow:active {
  transform: translateY(0) !important;
}
.ch-btn-glow-light {
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25) !important;
  transition:
    box-shadow var(--ch-base) var(--ch-ease),
    transform  var(--ch-fast) var(--ch-ease) !important;
}
.ch-btn-glow-light:hover {
  box-shadow: 0 6px 28px rgba(255, 255, 255, 0.40) !important;
  transform: translateY(-2px) !important;
}

/* ─── Cards – shared lift + shimmer + glow border ────────────────────────── */
.card-discount,
.article-card {
  position: relative;
  overflow: hidden; /* contains shimmer sweep */
  transition:
    transform    var(--ch-base) var(--ch-ease),
    box-shadow   var(--ch-base) var(--ch-ease);
}

.card-discount:hover,
.article-card:hover {
  transform: translateY(var(--ch-card-hover-y));
  /* lift shadow + gradient glow border via multi-layer box-shadow */
  box-shadow:
    0 0 0 2px var(--ch-accent),
    0 20px 40px rgba(0, 0, 0, 0.10) !important;
}

/* Ensure card content stays above shimmer overlay */
.card-discount .card-body,
.card-discount .card-footer,
.article-card .card-body,
.article-card .card-footer {
  position: relative;
  z-index: 2;
}

/* Shimmer glare sweep on hover */
.card-discount::after,
.article-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    var(--ch-shimmer-color) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  pointer-events: none;
  z-index: 1;
  transition: transform 0s; /* no transition at rest — sweeps in on hover */
}
.card-discount:hover::after,
.article-card:hover::after {
  transform: translateX(100%);
  transition: transform 0.55s var(--ch-ease);
}

/* ─── Glassmorphism card (homepage featured) ─────────────────────────────── */
.card-glass {
  background: var(--ch-glass-bg) !important;
  backdrop-filter: blur(var(--ch-glass-blur));
  -webkit-backdrop-filter: blur(var(--ch-glass-blur));
  border: 1px solid var(--ch-glass-border) !important;
  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}
.card-glass:hover {
  box-shadow:
    0 0 0 2px var(--ch-accent),
    0 20px 48px rgba(31, 38, 135, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

/* ─── Card scroll-reveal with stagger ───────────────────────────────────── */
.ch-card-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   var(--ch-slow) var(--ch-ease),
    transform var(--ch-slow) var(--ch-ease);
}
.ch-card-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Favourite button ───────────────────────────────────────────────────── */
.btn-favourite {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: #8392AB;
  padding: 0.3rem 0.4rem;
  border-radius: 50%;
  line-height: 1;
  transition:
    color        var(--ch-fast) var(--ch-ease),
    background   var(--ch-fast) var(--ch-ease),
    transform    var(--ch-fast) var(--ch-ease);
}
.btn-favourite:hover {
  color:      var(--ch-accent);
  background: var(--ch-accent-soft);
  transform:  scale(1.25) rotate(-8deg);
}
.btn-favourite.active {
  color: var(--ch-accent);
  animation: ch-fav-pop 0.35s var(--ch-ease);
}
.btn-favourite.is-loading {
  pointer-events: none;
  opacity: 0.45;
}
@keyframes ch-fav-pop {
  0%   { transform: scale(1);    }
  40%  { transform: scale(1.45); }
  70%  { transform: scale(0.9);  }
  100% { transform: scale(1);    }
}

/* ─── Voucher code ───────────────────────────────────────────────────────── */
.voucher-code {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: linear-gradient(310deg, var(--ch-purple), var(--ch-accent));
  color: #fff;
  border-radius: 0.5rem;
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  cursor: pointer;
  user-select: all;
  border: none;
  transition:
    filter    var(--ch-fast) var(--ch-ease),
    transform var(--ch-fast) var(--ch-ease),
    opacity   var(--ch-fast) var(--ch-ease);
}
.voucher-code:hover {
  filter:    brightness(1.12);
  transform: translateY(-1px);
}
.voucher-code:focus-visible {
  outline-color: #fff;
}
.voucher-code.copied {
  background: linear-gradient(310deg, #17ad37, #98ec2d);
  letter-spacing: normal;
}

/* ─── Category filter pills ──────────────────────────────────────────────── */
.ch-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.ch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1.5px solid transparent;
  background: var(--ch-pill-bg);
  color: var(--ch-purple);
  transition:
    background    var(--ch-fast) var(--ch-ease),
    color         var(--ch-fast) var(--ch-ease),
    transform     var(--ch-fast) var(--ch-ease),
    box-shadow    var(--ch-fast) var(--ch-ease);
}
.ch-pill:hover {
  background: var(--ch-pill-bg-hover);
  color: var(--ch-purple);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px var(--ch-pill-shadow);
  text-decoration: none;
}
.ch-pill.ch-pill--active {
  background: linear-gradient(135deg, var(--ch-grad-start), var(--ch-grad-end));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--ch-accent-glow);
}
.ch-pill.ch-pill--active:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ─── Empty state ────────────────────────────────────────────────────────── */
.ch-empty-state {
  padding: 4rem 2rem;
  text-align: center;
}
.ch-empty-state__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ch-pill-icon-bg), rgba(203, 12, 159, 0.10));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
  color: var(--ch-accent);
}
.ch-empty-state__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #344767;
  margin-bottom: 0.5rem;
}
.ch-empty-state__body {
  font-size: 0.875rem;
  color: #8392AB;
  max-width: 320px;
  margin: 0 auto 1.25rem;
}

/* ─── Homepage stats bar ─────────────────────────────────────────────────── */
.ch-stats-bar {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}
.ch-stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.ch-stat {
  text-align: center;
}
.ch-stat__value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--ch-purple), var(--ch-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ch-stat__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8392AB;
  margin-top: 0.2rem;
}
.ch-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(0, 0, 0, 0.10);
  flex-shrink: 0;
}
@media (max-width: 575px) {
  .ch-stat-divider { display: none; }
  .ch-stats-inner  { gap: 1.5rem; }
}

/* ─── Auth forms ─────────────────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
}
.auth-card {
  width: clamp(320px, 92vw, 640px);
}
.auth-title {
  white-space: nowrap;
}
.input-group .form-control {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}
.input-group-text {
  border-radius: 0.5rem 0 0 0.5rem;
  background-color: #fff;
}
.auth-card .input-group {
  width: 100%;
}
.auth-card .input-group .form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

/* ─── Search bar focus glow ──────────────────────────────────────────────── */
.form-control:focus {
  border-color: var(--ch-accent-glow);
  box-shadow: 0 0 0 3px var(--ch-focus-ring);
}

/* ─── Ticket cards ───────────────────────────────────────────────────────── */
.card-ticket              { border-left: 4px solid var(--ch-accent); }
.card-ticket.ticket-valid { border-left-color: #82d616; }
.card-ticket.ticket-void  { border-left-color: #ea0606; opacity: 0.6; }

/* ─── Article / news cards ───────────────────────────────────────────────── */
.article-card img {
  object-fit: cover;
  height: 180px;
}
@media (min-width: 992px) {
  .article-card img { height: 220px; }
}
.badge + .badge { margin-left: .25rem; }

/* ─── Reading progress bar ───────────────────────────────────────────────── */
#ch-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--ch-purple), var(--ch-accent));
  z-index: 9999;
  transition: width 80ms linear;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
}

/* ─── Scroll-to-top button ───────────────────────────────────────────────── */
#ch-scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 990;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: none;
  background: linear-gradient(310deg, var(--ch-purple), var(--ch-accent));
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--ch-glow-violet);
  opacity: 0;
  transform: translateY(14px) scale(0.85);
  transition:
    opacity    var(--ch-base) var(--ch-ease),
    transform  var(--ch-base) var(--ch-ease),
    box-shadow var(--ch-fast) var(--ch-ease);
  pointer-events: none;
}
#ch-scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#ch-scroll-top:hover {
  box-shadow: 0 6px 22px var(--ch-glow-violet-strong);
  transform: translateY(-3px) scale(1.05);
}

/* ─── Toast notifications ────────────────────────────────────────────────── */
#ch-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.ch-toast {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  background: #344767;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(52, 71, 103, 0.35);
  pointer-events: auto;
  max-width: 300px;
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity   var(--ch-base) var(--ch-ease),
    transform var(--ch-base) var(--ch-ease);
}
.ch-toast.is-show {
  opacity: 1;
  transform: translateX(0);
}
.ch-toast--success { border-left: 3px solid #82d616; }
.ch-toast--error   { border-left: 3px solid #ea0606; }
.ch-toast--info    { border-left: 3px solid #17c1e8; }

/* ─── Alert auto-drain indicator ─────────────────────────────────────────── */
.alert-dismissible {
  position: relative;
  overflow: hidden;
}
.alert-dismissible::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.45);
  animation: ch-drain 5s linear forwards;
}
@keyframes ch-drain {
  from { width: 100%; }
  to   { width:   0%; }
}
