:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --muted: #f6f7f9;
  --text: #11151c;
  --text-soft: #5b6472;
  --border: #eceff3;
  --accent: #0a7d4a;
  --accent-soft: #e7f5ee;
  --gold: #c9a24a;
  --gold-soft: #fff7e3;
  --danger: #d92d20;
  --success: #0a7d4a;
  --warning: #b7791f;
  --shadow: 0 6px 24px rgba(17,21,28,.06);
  --shadow-hover: 0 12px 36px rgba(17,21,28,.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  line-height: 1.8;
  overflow-x: clip;
}

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

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(10, 125, 74, .35);
  outline-offset: 3px;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--accent);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: .94rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
}

.main {
  min-height: 70vh;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 42px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 72% 20%, rgba(10, 125, 74, .18), transparent 32%),
    radial-gradient(circle at 18% 30%, rgba(201, 162, 74, .22), transparent 30%),
    linear-gradient(180deg, #fff 0%, #f8fbf9 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 36px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(10, 125, 74, .12);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: .88rem;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  max-width: 820px;
  letter-spacing: 0;
}

.hero p,
.page-hero p,
.section-head p {
  color: var(--text-soft);
  margin: 14px 0 0;
}

.hero p {
  max-width: 760px;
  font-size: 1.08rem;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  min-height: 310px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(17, 21, 28, .04), rgba(17, 21, 28, .18)),
    url('../img/hero-stadium.png') center/cover;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  padding: 22px;
}

.visual-stat {
  width: 100%;
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .75);
  padding: 18px;
  backdrop-filter: blur(10px);
}

.visual-stat strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px rgba(10, 125, 74, .22);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.page-hero {
  padding: 48px 0 24px;
  background:
    radial-gradient(circle at 78% 12%, rgba(10, 125, 74, .12), transparent 28%),
    var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.section {
  padding: 42px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.record-card,
.match-card,
.team-card,
.stadium-card,
.timeline-card,
.source-card,
.widget-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover,
.record-card:hover,
.match-card:hover,
.team-card:hover,
.stadium-card:hover,
.timeline-card:hover,
.source-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(10, 125, 74, .18);
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  color: var(--text-soft);
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 2rem;
}

.record-card,
.match-card,
.team-card,
.stadium-card,
.timeline-card,
.source-card {
  padding: 20px;
}

.record-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.record-card h3,
.match-card h3,
.team-card h3,
.stadium-card h3,
.timeline-card h3,
.source-card h3 {
  font-size: 1.08rem;
}

.meta-row,
.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill,
.source-label,
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--muted);
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 800;
}

.source-label {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(10, 125, 74, .14);
}

.status-finished {
  background: var(--accent-soft);
  color: var(--success);
}

.status-scheduled {
  background: var(--gold-soft);
  color: var(--warning);
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(160px, auto));
  gap: 12px;
  margin: 22px 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: .86rem;
  color: var(--text-soft);
  font-weight: 800;
}

.input,
.select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 13px;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
}

.team-side {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.team-side.away {
  justify-content: flex-end;
}

.team-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(10, 125, 74, .14);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
}

.score {
  min-width: 70px;
  text-align: center;
  border-radius: 14px;
  background: var(--text);
  color: #fff;
  padding: 8px 10px;
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

th {
  background: var(--muted);
  color: var(--text-soft);
  font-size: .86rem;
}

tr:last-child td {
  border-bottom: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
}

.detail-block {
  padding: 22px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.detail-list span {
  color: var(--text-soft);
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--gold-soft);
  border: 1px solid rgba(201, 162, 74, .24);
  color: #7a5a12;
  font-weight: 800;
  margin: 18px 0;
}

.brand-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 30px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 20%, rgba(201, 162, 74, .24), transparent 28%),
    linear-gradient(135deg, #f7fbf8 0%, #ffffff 52%, #edf8f2 100%);
  border: 1px solid rgba(10, 125, 74, .14);
  box-shadow: var(--shadow);
}

.brand-panel h2 {
  margin-top: 14px;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.brand-panel p {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--text-soft);
}

.mini-standings {
  min-width: 0;
  padding: 18px;
  overflow: hidden;
}

.mini-standings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.compact-table {
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
}

.compact-table table {
  min-width: 0;
  table-layout: fixed;
}

.compact-table th,
.compact-table td {
  padding: 10px 8px;
  white-space: normal;
}

.compact-table th:first-child,
.compact-table td:first-child {
  width: 44%;
}

.compact-table th:not(:first-child),
.compact-table td:not(:first-child) {
  width: 18.66%;
  text-align: center;
}

.standings-list {
  display: grid;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.standings-row {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(42px, .55fr) minmax(46px, .6fr) minmax(48px, .65fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.standings-row:last-child {
  border-bottom: 0;
}

.standings-row span,
.standings-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.standings-row span:not(:first-child),
.standings-row strong:not(:first-child) {
  text-align: center;
}

.standings-row-head {
  background: var(--muted);
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 900;
}

.empty-state,
.error-state,
.loading-state {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--muted);
  text-align: center;
}

.error-state {
  border-color: rgba(217, 45, 32, .25);
  color: var(--danger);
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-soft);
  font-weight: 800;
}

.loader {
  width: 18px;
  height: 18px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.timeline {
  position: relative;
  display: grid;
  gap: 16px;
}

.timeline-card {
  position: relative;
}

.team-logo {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--muted);
  padding: 8px;
  margin-bottom: 12px;
}

.flag {
  width: 34px;
  height: 24px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(17, 21, 28, .08);
  background: #fff;
  flex: 0 0 auto;
}

.team-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.team-card-head .team-logo {
  margin-bottom: 0;
}

.team-title-block {
  min-width: 0;
}

.stadium-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
}

.stadium-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  margin-bottom: 14px;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(255, 255, 255, .7) 0 8%, transparent 9%),
    linear-gradient(180deg, #18212c 0 42%, #0a7d4a 43% 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stadium-art::before {
  content: "";
  position: absolute;
  inset: 48% 12% 14%;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
}

.stadium-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, .12) 28px 30px);
}

.widget-card {
  overflow: hidden;
}

.widget-head {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.widget-card iframe {
  width: 100%;
  min-height: 430px;
  border: 0;
  display: block;
}

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  padding: 46px 0 22px;
  background:
    radial-gradient(circle at 82% 0%, rgba(10, 125, 74, .34), transparent 30%),
    radial-gradient(circle at 18% 100%, rgba(201, 162, 74, .22), transparent 30%),
    #0f1720;
  color: #fff;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr .75fr .75fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-brand,
.footer-note,
.footer-col {
  position: relative;
  z-index: 1;
}

.footer-logo {
  color: #fff;
}

.footer-logo img {
  border-radius: 14px;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, .72);
}

.site-footer a {
  display: block;
  margin-top: 8px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-title {
  display: block;
  font-weight: 900;
  margin-bottom: 8px;
  color: #fff;
}

.footer-brand p {
  max-width: 520px;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.footer-badges span,
.footer-domain {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
  padding: 6px 11px;
  color: rgba(255, 255, 255, .84);
  font-weight: 800;
  font-size: .84rem;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .58);
  font-size: .9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s ease, transform .45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
