/* ==================================================
   Homepage
   Mobile: one column (intro, results, table, fixtures,
   scorers, about). Desktop: intro, then main column
   (results, fixtures) + aside (table, scorers), then about.
================================================== */

/* ── Intro ──────────────────────────────────────────────────── */
.home_intro {
  margin-bottom: var(--space-6);
}

.home_title {
  margin-top: var(--space-3);
  padding-left: 0;
  font-size: var(--fs-h1-m);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.home_title::before {
  display: none;
}

.home_lead {
  margin-top: var(--space-3);
  max-width: 820px;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Layout ─────────────────────────────────────────────────── */
.home_grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Mobile order: results, table, fixtures, scorers */
.home_main,
.home_side {
  display: contents;
}

.home_main > .home_section:first-child {
  order: 1;
}

.home_side > .home_section:first-child {
  order: 2;
}

.home_main > .home_section:nth-child(2) {
  order: 3;
}

.home_side > .home_section:nth-child(2) {
  order: 4;
}

/* ── Results ────────────────────────────────────────────────── */
.match_rows .match_row:last-child {
  border-bottom: none;
}

/* ── Fixtures: one card grouped by day (mobile) ─────────────── */
.fixture_list {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.fixture_date {
  display: none;
  background: var(--surface-sunken);
  padding: 10px 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.fixture_item.is_first_of_day .fixture_date {
  display: block;
}

.fixture_item:last-child .match_row {
  border-bottom: none;
}

/* ── Table snapshot: base .mini_table styles live in components.css ── */

/* ── Top scorers: .scorer_list (leader list) lives in components.css ── */

/* ── About band ─────────────────────────────────────────────── */
.home_about {
  margin-top: var(--space-6);
  padding: var(--space-5) var(--space-4);
}

.home_about_text p {
  margin-top: var(--space-3);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-secondary);
}

.home_features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.home_feature {
  background: var(--dark-secondary);
  border-radius: var(--radius-md);
  padding: 14px;
}

.home_feature i {
  font-size: 16px;
  color: var(--brand);
}

.home_feature h3 {
  margin-top: 10px;
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
}

.home_feature p {
  margin-top: 4px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── Desktop ────────────────────────────────────────────────── */
@media screen and (min-width: 820px) {
  .home_intro {
    margin-bottom: var(--space-7);
  }

  .home_title {
    font-size: var(--fs-h1-d);
    max-width: 900px;
  }

  .home_lead {
    font-size: 17px;
  }

  .home_grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
  }

  .home_main,
  .home_side {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-width: 0;
  }

  /* When one column has no modules, the other takes the full width */
  .home_main:only-child,
  .home_side:only-child {
    grid-column: 1 / -1;
  }

  /* Table: top 8 rows from tablet width */
  .mini_table .mt_extra {
    display: table-row;
  }

  .home_about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: var(--space-6);
    align-items: center;
    margin-top: var(--space-7);
    padding: var(--space-6);
  }

  .home_features {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 0;
  }

  .home_feature {
    padding: 18px;
  }

  .home_feature h3 {
    font-size: var(--fs-base);
  }

  .home_feature p {
    font-size: 13px;
  }
}

/* ── Wide desktop: two-column results and fixtures, table form ── */
@media screen and (min-width: 1200px) {
  /* Results: two columns of rows per day */
  .match_rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .match_rows .match_row:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .match_rows .match_row:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }

  /* Fixtures: separate cards, two per row, date in each */
  .fixture_list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    background: none;
    border: none;
    border-radius: 0;
  }

  .fixture_item {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .fixture_date,
  .fixture_item.is_first_of_day .fixture_date {
    display: block;
    background: none;
    padding: 12px 18px 0;
    text-transform: none;
    letter-spacing: 0;
  }

  .fixture_item .match_row {
    border-bottom: none;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    column-gap: 6px;
  }

  /* Table: form instead of played */
  .mini_table .mt_played {
    display: none;
  }

  .mini_table .mt_form {
    display: table-cell;
  }

  .home_features {
    grid-template-columns: repeat(4, 1fr);
  }
}
