/* ══════════════════════════════════════════════════════════════
   PropFirmChief — Homepage v5
   Dark dashboard modules matching the PropFirmStats reference:
   hero, live payout dashboard, prize card, hot offers, colored
   best-selling grid, data table, review grid, FAQ.
   ══════════════════════════════════════════════════════════════ */

.v5-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.v5-grad {
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Hero ── */
.v5-hero {
  position: relative;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #1B0F3A 0%, var(--bg) 70%);
  padding: 64px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.v5-hero-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  pointer-events: none;
}
.v5-hero > .v5-wrap {
  position: relative;
  z-index: 1;
}
.v5-hero-tags { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.v5-tag {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 100px;
}
.v5-hero-h1 {
  font-family: var(--font-head); font-weight: 800;
  color: var(--text); font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15; margin: 0 0 16px;
}
.v5-hero-sub { color: var(--text-dim); font-size: 16px; max-width: 600px; margin: 0 auto 24px; }
.v5-hero-pills { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.v5-pill { color: var(--text-dim); font-size: 13px; font-weight: 500; }
.v5-hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.v5-btn-grad, .v5-btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 14.5px; padding: 13px 26px;
  border-radius: 100px; text-decoration: none; cursor: pointer; border: none;
}
.v5-btn-grad { background: linear-gradient(90deg, var(--purple), var(--magenta)); color: #fff; }
.v5-btn-grad:hover { filter: brightness(1.1); color: #fff; }
.v5-btn-outline { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.v5-btn-outline:hover { border-color: var(--purple); color: var(--purple); }

/* ── Section base ── */
.v5-section { padding: 40px 0; }
.v5-section-head {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}
.v5-section-head h2 { font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: 22px; margin: 0; }
.v5-section-head-center { text-align: center; max-width: 600px; margin: 0 auto 32px; }
.v5-section-head-center h2 { font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: 28px; margin: 0 0 8px; }
.v5-section-head-center p { color: var(--text-dim); font-size: 14.5px; margin: 0; }
.v5-eyebrow {
  display: inline-block; color: var(--orange); font-size: 12.5px;
  font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px;
}
.v5-view-all { text-align: center; margin-top: 28px; }

/* ── Live payout dashboard ── */
.v5-dash {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 28px;
}
.v5-dash-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.v5-dash-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.v5-dash-title { font-family: var(--font-head); font-weight: 700; color: var(--text); font-size: 16px; }
.v5-dash-sub { color: var(--text-mute); font-size: 12.5px; }
.v5-dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.v5-dash-stat {
  background: var(--surface-2); border-radius: var(--radius);
  padding: 16px 18px;
}
.v5-dash-stat span { display: block; font-size: 12px; color: var(--text-mute); margin-bottom: 6px; }
.v5-dash-stat strong { font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: 24px; }
.v5-dash-list-title { font-size: 12px; font-weight: 700; color: var(--text-mute); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 12px; }
.v5-dash-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.v5-dash-row:last-child { border-bottom: none; }
.v5-dash-check { color: var(--green); font-weight: 700; }
.v5-dash-firm { color: var(--text); font-weight: 600; flex: 1; }
.v5-dash-date { color: var(--text-mute); font-size: 12px; }
.v5-dash-amt { color: var(--green); font-family: var(--font-head); }

/* ── UGC / Payout submission + prize card ── */
.v5-ugc {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.v5-ugc-label { color: var(--purple); font-size: 12.5px; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
.v5-ugc-left h2 { font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: 24px; margin: 0 0 12px; }
.v5-ugc-left p { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.v5-ugc-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; }
.v5-ugc-list li { color: var(--text-dim); font-size: 13.5px; padding-left: 20px; position: relative; }
.v5-ugc-list li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.v5-ugc-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.v5-prize-card {
  background: linear-gradient(160deg, var(--orange-dim), var(--surface-2));
  border: 1px solid var(--orange); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; position: relative;
}
.v5-prize-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 100px; white-space: nowrap;
}
.v5-prize-icon { font-size: 32px; margin: 16px 0 8px; }
.v5-prize-label { color: var(--text-mute); font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
.v5-prize-amt { font-family: var(--font-head); font-weight: 800; color: var(--orange); font-size: 36px; }
.v5-prize-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.v5-prize-list { list-style: none; padding: 0; margin: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.v5-prize-list li { color: var(--text-dim); font-size: 12.5px; }

/* ── Hot offers ── */
.v5-offers-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.v5-offers-icon { font-size: 18px; }
.v5-offers-head span:nth-child(2) { font-family: var(--font-head); font-weight: 800; color: var(--text); font-size: 18px; }
.v5-offers-sub { color: var(--text-mute); font-size: 12.5px; }
.v5-offers-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.v5-offer-card {
  background: var(--surface); border: 1px solid var(--c, var(--border));
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.v5-offer-logo, .v5-offer-logo-fallback {
  width: 40px; height: 40px; border-radius: 8px; margin: 0 auto 10px;
  object-fit: contain;
}
.v5-offer-logo-fallback {
  background: var(--c, var(--purple)); color: #fff; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.v5-offer-name { color: var(--text); font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.v5-offer-code {
  background: var(--c, var(--purple)); color: #fff; border: none;
  font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 100px;
  cursor: pointer; width: 100%;
}

/* ── Best selling grid (colored cards) ── */
.v5-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.v5-mod-card {
  background: var(--surface);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, var(--surface)), var(--surface));
  border: 1px solid var(--c, var(--border));
  border-radius: var(--radius-lg); padding: 20px;
  text-decoration: none; display: block;
  transition: transform .15s;
}
.v5-mod-card:hover { transform: translateY(-3px); }
.v5-mod-logo, .v5-mod-logo-fallback {
  width: 48px; height: 48px; border-radius: 10px; margin-bottom: 14px;
  object-fit: contain;
}
.v5-mod-logo-fallback {
  background: var(--c, var(--purple)); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.v5-mod-name { font-family: var(--font-head); font-weight: 700; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.v5-mod-desc { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; margin-bottom: 14px; min-height: 36px; }
.v5-mod-stars { color: var(--border); font-size: 13px; }
.v5-mod-stars .on { color: #FBBF24; }
.v5-mod-score { color: var(--text); font-weight: 700; margin-left: 6px; font-family: var(--font-head); }

/* ── Filters ── */
.v5-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.v5-filter {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 100px; cursor: pointer;
}
.v5-filter span { color: var(--text-mute); }
.v5-filter.is-active, .v5-filter:hover {
  background: linear-gradient(90deg, var(--purple), var(--magenta)); color: #fff; border-color: transparent;
}
.v5-filter.is-active span, .v5-filter:hover span { color: rgba(255,255,255,.7); }

/* ── Data table ── */
.v5-table {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.v5-table-head, .v5-table-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr .8fr .9fr 1fr 1fr .6fr;
  gap: 10px; align-items: center; padding: 12px 20px;
}
.v5-table-head {
  background: var(--surface-2); font-size: 11px; font-weight: 700;
  color: var(--text-mute); text-transform: uppercase; letter-spacing: .3px;
}
.v5-table-row { border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); }
.v5-table-firm { display: flex; align-items: center; gap: 10px; }
.v5-table-firm img, .v5-table-fallback {
  width: 28px; height: 28px; border-radius: 6px; object-fit: contain;
}
.v5-table-fallback { background: var(--purple); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.v5-table-firm a { color: var(--text); font-weight: 600; text-decoration: none; }
.v5-table-firm a:hover { color: var(--magenta); }
.v5-table-score { color: var(--green); font-weight: 700; }
.v5-table-score span { color: var(--text-mute); font-weight: 400; font-size: 11px; }
.v5-table-code {
  background: linear-gradient(90deg, rgba(124,58,237,.16), rgba(217,70,239,.16));
  border: 1.5px dashed var(--purple);
  color: var(--purple); font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 6px; cursor: pointer;
  transition: all .15s;
}
.v5-table-code:hover {
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  color: #fff; border-color: transparent;
}
.v5-table-code.is-revealed {
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  color: #fff; border-style: solid; border-color: transparent;
}
.v5-table-btn {
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  color: #fff; font-size: 11.5px; font-weight: 700; padding: 6px 12px;
  border-radius: 100px; text-decoration: none; white-space: nowrap;
}

/* ── Review grid ── */
.v5-review-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.v5-review-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-decoration: none;
  display: flex; flex-direction: column; gap: 10px;
}
.v5-review-card:hover { border-color: var(--purple); }
.v5-review-card img, .v5-review-fallback {
  width: 36px; height: 36px; border-radius: 8px; object-fit: contain;
}
.v5-review-fallback { background: var(--purple); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.v5-review-name { color: var(--text); font-weight: 600; font-size: 13.5px; }
.v5-review-name span { color: var(--text-mute); font-weight: 400; font-size: 11.5px; display: block; }
.v5-review-link { color: var(--purple); font-size: 12px; font-weight: 600; }

/* ── FAQ ── */
.v5-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.v5-faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 20px;
}
.v5-faq-item summary {
  padding: 16px 0; font-weight: 700; color: var(--text); font-size: 14.5px;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.v5-faq-item summary::-webkit-details-marker { display: none; }
.v5-faq-item summary::after { content: '+'; color: var(--purple); font-size: 20px; }
.v5-faq-item[open] summary::after { content: '−'; }
.v5-faq-item p { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; margin: 0 0 16px; }

/* ══ Responsive ══ */
@media (max-width: 900px) {
  .v5-ugc { grid-template-columns: 1fr; }
  .v5-grid { grid-template-columns: repeat(2, 1fr); }
  .v5-review-grid { grid-template-columns: repeat(2, 1fr); }
  .v5-table-head { display: none; }

  /* Compact mobile card: firm identity on its own line, then every
     other data point in a labeled 2-column grid below it, instead of
     7 separate full-width stacked blocks. With 40+ firms in this table,
     the old stacked layout made the page enormously long to scroll —
     this fits meaningfully more per screen while staying fully readable. */
  .v5-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "firm firm"
      "score country"
      "assets account"
      "promo action";
    gap: 8px 12px;
    padding: 14px 16px;
  }
  .v5-table-row > .v5-table-firm { grid-area: firm; margin-bottom: 4px; }
  .v5-table-row > *:nth-child(2) { grid-area: score; }
  .v5-table-row > *:nth-child(3) { grid-area: country; }
  .v5-table-row > *:nth-child(4) { grid-area: assets; }
  .v5-table-row > *:nth-child(5) { grid-area: account; }
  .v5-table-row > *:nth-child(6) { grid-area: promo; }
  .v5-table-row > *:nth-child(7) { grid-area: action; justify-self: end; }

  /* Labels so a bare number/country/code isn't ambiguous without the
     column headers that are hidden on mobile */
  .v5-table-row > *:nth-child(2)::before { content: "Score: "; color: var(--text-mute); font-weight: 400; }
  .v5-table-row > *:nth-child(3)::before { content: "Country: "; color: var(--text-mute); font-weight: 400; }
  .v5-table-row > *:nth-child(4)::before { content: "Assets: "; color: var(--text-mute); font-weight: 400; }
  .v5-table-row > *:nth-child(5)::before { content: "Max: "; color: var(--text-mute); font-weight: 400; }
  .v5-table-row > *:nth-child(2), .v5-table-row > *:nth-child(3),
  .v5-table-row > *:nth-child(4), .v5-table-row > *:nth-child(5) {
    font-size: 12.5px;
  }
}
@media (max-width: 600px) {
  .v5-dash-stats { grid-template-columns: 1fr; }
  .v5-grid { grid-template-columns: 1fr; }
  .v5-review-grid { grid-template-columns: 1fr; }
  .v5-offers-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── Latest News grid ── */
.v5-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.v5-news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.v5-news-card:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
}
.v5-news-thumb {
  height: 140px;
  background: var(--surface-2);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v5-news-thumb-fallback { font-size: 32px; opacity: .3; }
.v5-news-cat {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 14px 16px 0;
}
.v5-news-title {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  padding: 6px 16px 0;
}
.v5-news-excerpt {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 6px 16px 0;
  flex: 1;
}
.v5-news-date {
  color: var(--text-mute);
  font-size: 11.5px;
  padding: 12px 16px 16px;
}
.v5-section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}
.v5-section-link:hover { color: var(--magenta); }

@media (max-width: 900px) {
  .v5-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .v5-news-grid { grid-template-columns: 1fr; }
}
