/*
Theme Name: Footballoria
Theme URI: https://footballoria.com/
Author: Footballoria
Description: Editorial and database-first theme for Footballoria.
Version: 0.1.4
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: footballoria
*/

:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-muted: #eef2ec;
  --ink: #152019;
  --muted: #607066;
  --line: #dce3dc;
  --primary: #0b6b4a;
  --primary-dark: #084b36;
  --accent: #c9a227;
  --result-win: #0b6b4a;
  --result-draw: #7a6a2b;
  --result-live: #b7372f;
  --shadow: 0 16px 40px rgba(21, 32, 25, 0.08);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 227, 220, 0.9);
  background: rgba(245, 247, 244, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-size: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 6px;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.page-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 30px 0 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.hero-grid > *,
.content-grid > * {
  min-width: 0;
}

.lead-story {
  width: 100%;
  min-height: 430px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 24, 18, 0.18), rgba(10, 24, 18, 0.9)),
    url("assets/stadium-board.svg") center/cover no-repeat,
    #173326;
  color: #fff;
  box-shadow: var(--shadow);
}

.lead-story-content {
  position: absolute;
  inset: auto 0 0;
  padding: 32px;
}

.kicker,
.section-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead-story h1 {
  max-width: 720px;
  margin: 10px 0 12px;
  font-size: clamp(31px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
  line-break: strict;
  overflow-wrap: anywhere;
}

.lead-story p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.latest-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.section-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.mini-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.news-list li:last-child {
  border-bottom: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tag {
  color: var(--primary-dark);
}

.news-list h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.score-strip {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.score-card {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.score-card strong {
  display: block;
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.25;
}

.score-card small {
  color: var(--muted);
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--result-win);
  font-size: 12px;
  font-weight: 800;
}

.status.live {
  background: var(--result-live);
}

.status.next {
  background: var(--primary-dark);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.section {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.article-card {
  min-height: 190px;
  padding: 20px;
  background: var(--surface);
}

.article-card h3 {
  margin: 8px 0 10px;
  font-size: 18px;
  line-height: 1.42;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.database-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.database-link {
  min-height: 142px;
  padding: 22px;
  background: var(--surface);
}

.database-link h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.database-link p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.side-module {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.rank-list li:last-child {
  border-bottom: 0;
}

.rank-list span:first-child {
  color: var(--muted);
}

.rank-list span:last-child {
  color: var(--primary);
}

.site-footer {
  margin-top: 44px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.entity-hero {
  margin: 28px 0 22px;
  padding: 34px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 75, 54, 0.96), rgba(17, 48, 35, 0.96)),
    url("assets/stadium-board.svg") center/cover no-repeat;
}

.entity-hero h1 {
  margin: 8px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.entity-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.empty-state {
  padding: 22px;
  color: var(--muted);
}

.entity-content {
  padding: 24px;
}

.data-list {
  margin: 0;
  padding: 0;
}

.data-list dt,
.data-list dd {
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.data-list dt {
  padding-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-list dd {
  padding-top: 4px;
  font-size: 14px;
  font-weight: 700;
}

.match-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.match-list li,
.entity-link-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.match-list li:last-child,
.entity-link-list li:last-child {
  border-bottom: 0;
}

.match-list a,
.entity-link-list a {
  font-weight: 800;
}

.match-list span,
.entity-link-list span {
  min-width: 58px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.entity-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .score-strip,
  .article-grid,
  .database-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell,
  .header-inner,
  .footer-inner {
    width: min(100% - 20px, var(--max));
  }

  .lead-story {
    min-height: 500px;
    background:
      linear-gradient(180deg, rgba(10, 24, 18, 0.1), rgba(10, 24, 18, 0.92)),
      radial-gradient(circle at 50% 18%, rgba(201, 162, 39, 0.18), transparent 34%),
      linear-gradient(156deg, #103827 0%, #0b251a 52%, #092015 100%);
  }

  .lead-story-content {
    padding: 24px 20px;
  }

  .lead-story h1 {
    max-width: 310px;
    font-size: 28px;
    line-height: 1.18;
    word-break: break-all;
  }

  .lead-story p {
    max-width: 310px;
    font-size: 14px;
    line-height: 1.75;
    word-break: break-all;
  }

  .score-strip,
  .article-grid,
  .database-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .match-list li,
  .entity-link-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .match-list span,
  .entity-link-list span {
    width: fit-content;
  }
}
