/* ===== Brand Refresh Overlay =====
   Layered over the existing per-page <style> block. Uses the existing
   --forest / --gold tokens, plus adds aliases (--primary, --accent) so
   either naming works. Targets existing class names (.site-header,
   .hero, .btn-cta, .review-card, .runner-card, .site-footer, etc.)
   so no HTML changes are needed.
*/

:root {
  --primary: var(--forest, #012169);
  --primary-dark: #000d30;
  --primary-light: var(--forest-light, #0a2d7a);
  --accent: var(--gold, #C8102E);
  --accent-hover: var(--gold-hover, #a50d23);
  --accent-glow: rgba(200, 16, 46, 0.4);
  --bg-subtle: #f8fafc;
  --bg-alt-2: #f1f5f9;
  --text-muted-2: #475569;
  --border-soft: rgba(226, 232, 240, 0.8);
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-soft: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Header polish ----- */
.site-header {
  background: rgba(1, 33, 105, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-header.shrunk { background: var(--primary-dark) !important; }
.header-logo img {
  height: 40px !important;
  width: auto !important;
  max-width: 200px;
  display: block;
}

/* ----- Hero polish ----- */
.hero {
  background: var(--primary-dark) !important;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 20%, rgba(200, 16, 46, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(10, 45, 122, 0.4) 0%, transparent 50%);
  animation: brandBgPulse 15s ease infinite alternate;
  z-index: 0;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
  pointer-events: none;
}
.hero > *, .hero-content { position: relative; z-index: 1; }

@keyframes brandBgPulse {
  from { transform: rotate(0deg); }
  to   { transform: rotate(5deg); }
}

/* ----- CTA button polish ----- */
.btn-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
  box-shadow: 0 4px 14px 0 var(--accent-glow);
  transition: var(--transition-soft);
  letter-spacing: 0.02em;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px 0 var(--accent-glow);
  background: linear-gradient(135deg, var(--accent-hover), var(--accent)) !important;
}

/* ----- Top-list "Claim Bonus" CTAs (table + runners-up) ----- */
.comparison-table .btn-cta.btn-sm,
.compare-table .btn-cta.btn-sm {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d51230, #a50d23) !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 9px 16px !important;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 4px 14px rgba(200, 16, 46, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
}
.comparison-table .btn-cta.btn-sm::after,
.compare-table .btn-cta.btn-sm::after {
  content: '→';
  font-size: 0.95em;
  line-height: 1;
  transition: transform 0.25s ease;
}
.comparison-table .btn-cta.btn-sm::before,
.compare-table .btn-cta.btn-sm::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  animation: ctaShine 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.comparison-table .btn-cta.btn-sm:hover,
.compare-table .btn-cta.btn-sm:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 22px rgba(200, 16, 46, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.comparison-table .btn-cta.btn-sm:hover::after,
.compare-table .btn-cta.btn-sm:hover::after {
  transform: translateX(3px);
}

@keyframes ctaShine {
  0%, 100% { left: -120%; }
  40%, 60% { left: 130%; }
}

/* Slightly bigger CTA on the runners-up cards (they have more space) */
.runners-up .btn-cta.btn-sm,
#runners-up .btn-cta.btn-sm,
#more-live .btn-cta.btn-sm,
#more-slots .btn-cta.btn-sm,
#more-new .btn-cta.btn-sm {
  padding: 11px 20px !important;
  font-size: 0.82rem;
}

/* ----- Comparison table polish ----- */
.comparison-table th,
table.comparison th,
.compare-table th {
  background: var(--bg-alt-2);
  color: var(--text-muted-2);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ----- Mobile top-list cards (no horizontal scroll) ----- */
@media (max-width: 720px) {
  .table-wrapper {
    overflow-x: visible !important;
    -webkit-overflow-scrolling: auto;
  }
  .comparison-table,
  .comparison-table.fl-table,
  table.comparison,
  .compare-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }
  .comparison-table thead,
  .compare-table thead { display: none !important; }
  .comparison-table tbody,
  .compare-table tbody { display: block !important; }

  .comparison-table tr,
  .compare-table tr {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-auto-flow: row;
    column-gap: 10px;
    row-gap: 4px;
    align-items: center;
    padding: 12px 12px !important;
    margin-bottom: 10px;
    background: #fff !important;
    border: 1px solid var(--border, #E2E8F0) !important;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 13, 48, 0.06);
  }
  .comparison-table tr:nth-child(even),
  .compare-table tr:nth-child(even) { background: #fff !important; }

  .comparison-table td,
  .compare-table td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem !important;
    color: var(--text-secondary, #4A5568);
    line-height: 1.35;
  }

  /* Rank (#) — spans both rows on the left */
  .comparison-table td:first-child,
  .compare-table td:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    text-align: center;
    font-size: 1.15rem !important;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
  }

  /* Logo cell (2nd column in source) — top-left of the card */
  .comparison-table td:nth-child(2),
  .compare-table td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .comparison-table td:nth-child(2) img,
  .compare-table td:nth-child(2) img {
    max-height: 30px !important;
    width: auto !important;
    height: auto !important;
    max-width: 130px !important;
    object-fit: contain;
  }

  /* CTA cell (last) — anchored right, spans both rows */
  .comparison-table td:last-child,
  .compare-table td:last-child {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
  }
  .comparison-table td:last-child .btn,
  .compare-table td:last-child .btn {
    padding: 10px 14px !important;
    font-size: 0.72rem !important;
    font-weight: 900;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow:
      0 4px 12px rgba(200, 16, 46, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }

  /* Middle cells (everything between logo and CTA) — stack inside col 2 */
  .comparison-table td:not(:first-child):not(:nth-child(2)):not(:last-child),
  .compare-table td:not(:first-child):not(:nth-child(2)):not(:last-child) {
    grid-column: 2;
    grid-row: auto;
    font-size: 0.78rem !important;
    color: var(--text-secondary, #4A5568);
    line-height: 1.3;
    white-space: normal;
  }

  /* Rating badge prominence */
  .comparison-table .rating-badge,
  .compare-table .rating-badge {
    display: inline-block;
    background: var(--primary, #012169);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.75rem;
  }
}

/* Extra-narrow phones */
@media (max-width: 380px) {
  .comparison-table tr,
  .compare-table tr {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    column-gap: 8px;
    padding: 10px !important;
  }
  .comparison-table td:nth-child(2) img,
  .compare-table td:nth-child(2) img { max-width: 110px !important; }
  .comparison-table td:last-child .btn,
  .compare-table td:last-child .btn { padding: 8px 12px !important; font-size: 0.72rem !important; }
}

/* ----- Runner card polish ----- */
.runner-card {
  border-left: 6px solid var(--primary);
  transition: var(--transition-soft);
}
.runner-card:hover {
  border-left-color: var(--accent);
  transform: translateX(8px);
}

/* ----- Review card lift ----- */
.review-card {
  transition: var(--transition-soft);
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 13, 48, 0.12);
}

/* ----- Footer polish ----- */
.site-footer { background: var(--primary-dark) !important; }
.footer-col h4 {
  position: relative;
  padding-bottom: 12px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
}

/* ----- Trust badges polish ----- */
.trust-badges {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.trust-badge,
.hero-trust-badge {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 10px 16px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-soft);
  white-space: nowrap;
}
.trust-badge:hover,
.hero-trust-badge:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}
.trust-badge .badge-icon,
.hero-trust-badge .badge-icon {
  font-size: 1rem !important;
  line-height: 1;
  flex: 0 0 auto;
}
.trust-badge .badge-text,
.hero-trust-badge .badge-text {
  font-size: 0.78rem !important;
  line-height: 1.2;
  font-weight: 600;
}

@media (max-width: 640px) {
  .trust-badges {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 24px;
    padding: 0 8px;
  }
  .trust-badge,
  .hero-trust-badge {
    padding: 9px 12px !important;
    justify-content: center;
    width: 100%;
  }
  .trust-badge .badge-text,
  .hero-trust-badge .badge-text {
    font-size: 0.72rem !important;
    white-space: normal;
    text-align: left;
  }
}

/* ----- Rating circles ----- */
.rating-circle {
  border: 3px solid var(--accent);
}

/* ----- Featured strip / top pick banner ----- */
.featured-strip,
.top-pick-strip {
  background: linear-gradient(to right, var(--primary-dark), var(--primary));
  border-bottom: 4px solid var(--accent);
}

/* ----- Mobile hero collapse ----- */
.hero-toggle { display: none; }
.hero-details { display: contents; }

@media (max-width: 640px) {
  .hero {
    padding: 28px 0 24px !important;
    min-height: 0 !important;
  }
  .hero h1 {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
  }
  .hero .subtitle {
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
    margin-bottom: 14px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-details {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease, margin-top 0.35s ease;
    margin-top: 0;
  }
  .hero.hero-expanded .hero-details {
    max-height: 1000px;
    opacity: 1;
    margin-top: 12px;
  }
  .hero.hero-expanded .hero .subtitle,
  .hero.hero-expanded .subtitle {
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .hero-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .hero-toggle:hover,
  .hero-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
  }
  .hero-toggle-icon {
    transition: transform 0.25s ease;
    line-height: 1;
  }
  .hero.hero-expanded .hero-toggle-icon {
    transform: rotate(180deg);
  }
  /* Tighten featured-pick + intro on mobile so the comparison table starts higher */
  .featured-pick { padding: 14px 0 !important; }
  section { padding: 28px 0 !important; }
  #comparison, #newest-sites {
    padding-top: 18px !important;
  }
  #comparison .section-title,
  #newest-sites .section-title {
    font-size: 1.35rem !important;
    margin-bottom: 4px !important;
  }
  #comparison .section-subtitle,
  #newest-sites .section-subtitle {
    font-size: 0.85rem !important;
    margin-bottom: 16px !important;
  }
}
