/* ==========================================================================
   index.css — Thoroughbred Trainers Information Guide
   Homepage-only styles. Loaded after main.css and global.css.
   Mobile rules live directly under each section's base rules (look for
   the "Mobile:" comment right below a component), not in one big block.
   ========================================================================== */

/* ---------- Dashboard: quick links → rotating ad → boards ---------- */
.dashboard__inner {
  display: grid;
  gap: 2rem;
}

.quick-links__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: 600 0.88rem/1.2 var(--font-head);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.quick-link svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--primary);
}
.quick-link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* Mobile: 6 quick links → 3 per row on tablets, 2 per row on phones */
@media (max-width: 1100px) {
  .quick-links__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .quick-links__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-link { font-size: 0.84rem; }
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

/* Mobile: 2 board columns → 1 */
@media (max-width: 768px) {
  .boards { grid-template-columns: 1fr; }
}

/* Row of pre-made square ad creatives, spans both board columns */
.spotlight-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.spotlight-row__item {
  display: block;
  flex: 1 1 220px;
  max-width: 280px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.15s;
}
.spotlight-row__item:hover { transform: translateY(-2px); }
.spotlight-row__item img {
  display: block;
  width: 100%;
  height: auto;
}

.spotlight-row__item--open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  aspect-ratio: 1 / 1;
  padding: 1.5rem;
  text-align: center;
  background: var(--primary-soft);
  border: 2px dashed var(--primary);
  box-shadow: none;
}
.spotlight-row__item--open span:first-child {
  font: 700 1rem/1.3 var(--font-head);
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Mobile: cards wrap down to one per row anyway (flex-basis 220px vs a
   phone's ~340px content width) — just tighten the gap between rows */
@media (max-width: 768px) {
  .spotlight-row { gap: 1rem; }
}

/* ---------- Health topic video poster ---------- */
.video {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 9;
  padding: 1.25rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--primary);
  color: var(--surface);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.video__art {
  position: absolute;
  top: -14%;
  right: -6%;
  z-index: 0;
  width: 58%;
  height: auto;
  color: var(--secondary);
  opacity: 0.14;
}
.video__chips {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  display: flex;
  gap: 0.4rem;
}
.chip {
  padding: 0.4rem 0.55rem;
  border-radius: 4px;
  background: var(--line-on-dark);
  color: var(--surface);
  font: 700 0.64rem/1 var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.chip--gold {
  background: var(--secondary);
  color: var(--primary);
}
.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--primary);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  transition: transform 0.15s;
}
.video__play svg {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}
.video:hover .video__play { transform: translate(-50%, -50%) scale(1.07); }
.video__title {
  position: relative;
  z-index: 1;
  max-width: 24ch;
  font: 700 1.05rem/1.25 var(--font-head);
}
.video-blurb {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Mobile: a squarer poster and a smaller play button suit a narrow card */
@media (max-width: 768px) {
  .video { aspect-ratio: 4 / 3; }
  .video__play {
    width: 56px;
    height: 56px;
  }
  .video__play svg {
    width: 22px;
    height: 22px;
  }
  .video__title { font-size: 0.95rem; }
}

/* ---------- Products & savings ---------- */
.product {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.product:last-child { border-bottom: 0; }
.product__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
}
.product__icon svg { width: 36px; height: 36px; }
.product__name {
  font-weight: 500;
  line-height: 1.3;
}
.product__note {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Mobile: smaller icon frees up room for the product name/note */
@media (max-width: 768px) {
  .product {
    grid-template-columns: 48px 1fr auto;
    gap: 0.75rem;
  }
  .product__icon {
    width: 48px;
    height: 48px;
  }
  .product__icon svg {
    width: 30px;
    height: 30px;
  }
}

/* ---------- Get seen: audience tiles ---------- */
.audience {
  position: relative;
  overflow: hidden;
  background: var(--accent-dark);
}
.audience__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.audience > .container {
  position: relative;
  z-index: 1;
}
.audience::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(19, 22, 41, 0.82);
}
.audience .section-head {
  position: relative;
  z-index: 0;
  display: inline-block;
  overflow: hidden;
  padding: 1.75rem 2rem;
  background: var(--secondary);
  border-radius: var(--radius);
  box-shadow: 12px 12px 0 var(--accent-dark), 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}
.audience .section-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Crect x='14' y='14' width='20' height='20' fill='%23fff3cf' fill-opacity='0.55' transform='rotate(45 24 24)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 68px 68px;
}
.audience .btn--ghost {
  border-color: var(--line-on-dark);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}
.audience .btn--ghost:hover { background: rgba(255, 255, 255, 0.5); }

/* Mobile: the gold box's hard offset shadow (12px) reads as too heavy on a
   narrow card, and full padding eats into limited width — scale both down */
@media (max-width: 768px) {
  .audience .section-head {
    padding: 1.25rem 1.5rem;
    box-shadow: 7px 7px 0 var(--accent-dark), 0 16px 32px -18px rgba(0, 0, 0, 0.6);
  }
}

.audience__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.audience__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: 600 0.98rem/1.25 var(--font-head);
  color: var(--ink);
}
.audience__item svg {
  flex: none;
  width: 42px;
  height: 42px;
  color: var(--primary);
}

/* Mobile: 4-across tiles → 2-across, each tile stacks icon above label */
@media (max-width: 768px) {
  .audience__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audience__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1rem;
    font-size: 0.9rem;
  }
}

.audience__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.audience__actions .btn {
  padding: 1.1rem 1.75rem;
  font-size: 1.05rem;
}

/* Mobile: trim the enlarged CTA buttons back down so both fit comfortably */
@media (max-width: 768px) {
  .audience__actions .btn {
    padding: 0.9rem 1.35rem;
    font-size: 0.95rem;
  }
}

.testimonial {
  max-width: 56rem;
  margin: 3rem 0 0;
  padding: 2rem 2.25rem;
  background: var(--primary);
  border-radius: var(--radius);
}
.testimonial__heading {
  font: 700 1.15rem/1.4 var(--font-head);
  color: var(--secondary);
}
.testimonial__quote {
  margin: 1.25rem 0 0;
}
.testimonial__quote p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--surface);
}
.testimonial__cite {
  margin-top: 1rem;
  font: 700 0.9rem/1.3 var(--font-head);
  color: var(--surface);
}

.testimonial__cite em {
  font-style: italic;
  font-weight: 500;
  color: var(--secondary);
}

/* Mobile: a narrow card doesn't have room for the desktop padding/type scale */
@media (max-width: 768px) {
  .testimonial { padding: 1.5rem 1.35rem; }
  .testimonial__heading { font-size: 1rem; }
  .testimonial__quote p { font-size: 1rem; }
}

/* ---------- Jockeys leaderboard ---------- */
.jockeys__list {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

.jockey {
  display: grid;
  grid-template-columns: 52px 1.5fr 0.75fr 1fr 1fr;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cloth {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid transparent;
  border-radius: 6px;
  font: 800 1.35rem/1 var(--font-head);
}
.cloth--1 { background: var(--cloth-1); color: var(--surface); }
.cloth--2 { background: var(--cloth-2); color: var(--ink); border-color: var(--ink); }
.cloth--3 { background: var(--cloth-3); color: var(--surface); }
.cloth--4 { background: var(--cloth-4); color: var(--ink); }
.cloth--5 { background: var(--cloth-5); color: var(--surface); }

.jockey__name { font: 700 1.05rem/1.2 var(--font-head); }

.jockey__stats { display: contents; }
.stat strong {
  display: block;
  font: 700 1.05rem/1.1 var(--font-head);
  font-variant-numeric: tabular-nums;
}
.stat span {
  font: 600 0.6rem/1.4 var(--font-head);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.jockey__phone a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.jockey__phone a svg { width: 15px; height: 15px; }
.jockey__phone a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.jockeys__foot { margin-top: 1.5rem; }

/* Mobile: 5 columns (cloth, name, weight, agent, phone) won't fit a phone
   width. Redo the card as its own small grid: the cloth badge runs down
   the full left edge, the name spans the top, Weight + Agent sit side by
   side underneath it, and Phone becomes a clear tap-to-call row set off
   by a divider — instead of five items just stacked flat top to bottom. */
@media (max-width: 768px) {
  .jockey {
    grid-template-columns: 52px 1fr 1fr;
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 0.5rem 0.85rem;
    padding: 0.9rem 1rem;
  }

  .cloth {
    grid-row: 1 / -1;
    grid-column: 1;
    align-self: center;
  }

  .jockey__name {
    grid-row: 1;
    grid-column: 2 / -1;
  }

  /* .jockey__stats is `display: contents` on desktop (its .stat child is
     the real grid item) — cancel that here so the grid placement below
     applies to the element itself instead of being silently ignored. */
  .jockey__stats {
    display: block;
    grid-row: 2;
    grid-column: 2;
    align-self: center;
  }
  .jockey__agent {
    grid-row: 2;
    grid-column: 3;
    align-self: center;
  }

  .jockey__phone {
    grid-row: 3;
    grid-column: 2 / -1;
    margin-top: 0.15rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
  }
  .jockey__phone a {
    font-size: 1rem;
  }
}
