/* Фан-сайт ФК «Спартак» Москва — красно-белая тема */
:root {
  --red: #c8102e;
  --red-dark: #9a0c23;
  --dark: #161616;
  --ink: #222;
  --muted: #666;
  --line: #e6e6e6;
  --bg: #fafafa;
  --card: #fff;
  --win: #1e7e34;
  --draw: #8a8a8a;
  --loss: #b02a37;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--red); }

/* Шапка */
.site-header { background: var(--dark); color: #fff; }
.header-inner { display: flex; align-items: center; padding: 18px 20px; }
.brand { display: flex; gap: 14px; align-items: center; text-decoration: none; color: #fff; }
.brand-logo { width: 58px; height: 58px; object-fit: contain; background: #fff; border-radius: 10px; padding: 5px; }
.brand-text { font-size: 26px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.15; }
.brand-text small { display: block; font-size: 12px; font-weight: 400; color: #bbb; letter-spacing: .5px; }

/* Вкладки */
.tabs {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.tabs .wrap { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px; }
.tabs a {
  display: block; padding: 13px 16px; text-decoration: none;
  color: #444; font-weight: 600; border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--red); }
.tabs a.active { color: var(--red); border-bottom-color: var(--red); }

/* Герой */
.hero { position: relative; color: #fff; background: #333; }
.hero img { width: 100%; height: 340px; object-fit: cover; display: block; filter: brightness(.55); }
.hero-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { margin: 0 0 8px; font-size: 40px; letter-spacing: 1px; }
.hero p { margin: 0; font-size: 18px; color: #eee; max-width: 700px; }

main { padding: 28px 0 48px; }
h2 { font-size: 26px; margin: 34px 0 14px; padding-left: 12px; border-left: 4px solid var(--red); }
h2:first-child { margin-top: 0; }
h3 { font-size: 19px; margin: 22px 0 10px; }

/* Карточки */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.card .label { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.card .value { font-size: 18px; font-weight: 700; margin-top: 4px; }
.card .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.banner {
  background: linear-gradient(120deg, var(--red), var(--red-dark));
  color: #fff; border-radius: 12px; padding: 20px 24px; margin: 20px 0;
}
.banner h3 { margin: 0 0 6px; color: #fff; }
.banner p { margin: 0; }
.banner a { color: #fff; }

/* Таблицы */
.table-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.match { white-space: normal; min-width: 220px; }
th { background: #f3f3f3; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: #555; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fdf3f4; }
tr.future td { color: #555; }
.score { font-weight: 800; }

.badge {
  display: inline-block; min-width: 26px; text-align: center;
  padding: 2px 8px; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 700;
}
.badge.win { background: var(--win); }
.badge.draw { background: var(--draw); }
.badge.loss { background: var(--loss); }
.badge.soon { background: #444; }
.badge.cap { background: var(--red); font-size: 11px; min-width: auto; vertical-align: middle; }
.legend { font-size: 13px; color: var(--muted); margin: 10px 0; }
.legend .badge { margin-right: 4px; }
.legend span { margin-right: 16px; white-space: nowrap; }

/* Фото */
figure { margin: 22px 0; }
figure img { width: 100%; border-radius: 12px; display: block; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* Ближайший матч */
.next-match {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--red);
  border-radius: 10px; padding: 14px 20px; margin: 14px 0;
}
.next-match .when { font-weight: 800; white-space: nowrap; }
.next-match .teams { font-size: 17px; font-weight: 700; }
.next-match .comp { font-size: 13px; color: var(--muted); }

/* История */
.timeline { list-style: none; margin: 10px 0; padding: 0 0 0 6px; border-left: 3px solid var(--red); }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -11px; top: 4px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--red);
}
.timeline .year { font-weight: 800; color: var(--red); font-size: 17px; }

/* Трофеи */
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 18px 0; }
.trophy { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 10px; padding: 18px; }
.trophy .count { font-size: 42px; font-weight: 800; color: var(--red); line-height: 1; }
.trophy .name { font-weight: 700; margin: 8px 0 6px; font-size: 17px; }
.trophy .years { font-size: 13px; color: var(--muted); }

.note { font-size: 13px; color: var(--muted); }
ul.plain { margin: 8px 0; padding-left: 20px; }
ul.plain li { margin: 4px 0; }

/* Подвал */
.site-footer { background: var(--dark); color: #aaa; font-size: 13px; padding: 26px 0; margin-top: 20px; }
.site-footer a { color: #ddd; }
.site-footer p { margin: 6px 0; }

@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .hero img { height: 240px; }
  .brand-text { font-size: 20px; }
  .tabs a { padding: 11px 10px; font-size: 14px; }
}
