/* ==========================================================
   博业体育官网CN — 共享 Site Kit
   文件位置：/assets/site.css
   覆盖：reset、变量、排版、头部、页脚、按钮、面包屑、
         正文容器、网格、基础组件、响应式与无障碍动效
========================================================== */

/* ---------- 1. Reset 与变量 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --color-primary: #1E4E8C;
  --color-bg: #F8F9FA;
  --color-gray: #6C757D;
  --color-green: #3D6B4F;
  --color-red: #B85C3C;
  --color-orange: #E07B39;
  --color-ink: #212529;
  --color-cream: #FAF3E8;
  --font-heading: "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --container: 1240px;
  --space-section: clamp(2.5rem, 6vw, 5rem);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-ink);
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-orange);
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
}

/* ---------- 2. 布局与工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.main-content {
  min-height: calc(100vh - 220px);
  padding: 2.5rem 0 4rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 1rem;
  z-index: 300;
  padding: 0.65rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- 3. 按钮与面包屑 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
  border: 2px solid transparent;
  background: var(--color-orange);
  color: #fff;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  color: #fff;
}

.btn-primary {
  background: var(--color-primary);
}

.btn-orange {
  background: var(--color-orange);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  clip-path: none;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--color-gray);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-inline: 0.5rem;
  color: var(--color-gray);
  opacity: 0.5;
}

.breadcrumb-link {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-item[aria-current="page"] {
  color: var(--color-ink);
  font-weight: 700;
}

/* ---------- 4. 区块与页面头部 ---------- */
.section {
  padding-block: var(--space-section);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-orange);
}

.section-kicker::before {
  content: "";
  width: 18px;
  height: 4px;
  background: var(--color-orange);
  flex: 0 0 auto;
}

.section-title {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.2;
}

.section-desc {
  max-width: 560px;
  color: var(--color-gray);
  font-size: 0.95rem;
}

.section-cta {
  flex: 0 0 auto;
}

.page-head {
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-orange);
}

.page-kicker::before {
  content: "";
  width: 20px;
  height: 4px;
  background: var(--color-orange);
}

.page-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.page-desc {
  max-width: 640px;
  color: var(--color-gray);
  font-size: 1rem;
}

/* ---------- 5. 网格与资料卡 ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}

.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 {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--color-cream);
  border: 1px solid rgba(30, 78, 140, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary) 0 72%, var(--color-orange) 72% 100%);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(30, 78, 140, 0.12);
  border-color: rgba(224, 123, 57, 0.35);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-gray);
}

.card-title {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.35;
}

.card-text {
  font-size: 0.9rem;
  color: var(--color-gray);
  line-height: 1.7;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  color: var(--color-primary);
  background: rgba(30, 78, 140, 0.08);
  border-left: 3px solid var(--color-primary);
}

.score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-red);
}

/* ---------- 6. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-primary);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(225deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%) 0 0 / 20px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- 7. 筛选组件 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border-bottom: 2px solid rgba(30, 78, 140, 0.2);
}

.filter-button {
  position: relative;
  padding: 0.55rem 1.1rem;
  background: transparent;
  border: 0;
  color: var(--color-gray);
  font-size: 0.85rem;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.filter-button + .filter-button {
  margin-left: 0.25rem;
}

.filter-button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--color-orange);
  transform: scaleX(0) skewX(-30deg);
  transform-origin: 0 50%;
  transition: transform 0.22s ease;
}

.filter-button:hover {
  color: var(--color-primary);
}

.filter-button.is-active,
.filter-button[aria-pressed="true"] {
  color: var(--color-primary);
  background: rgba(30, 78, 140, 0.08);
}

.filter-button.is-active::after,
.filter-button[aria-pressed="true"]::after {
  transform: scaleX(1) skewX(-30deg);
}

.is-hidden {
  display: none !important;
}

/* ---------- 8. 头部与导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  box-shadow: 0 2px 14px rgba(30, 78, 140, 0.06);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0 30%, var(--color-orange) 30% 55%, var(--color-red) 55% 80%, var(--color-green) 80% 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover {
  opacity: 0.9;
  color: inherit;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-orange);
  clip-path: polygon(50% 0%, 100% 55%, 85% 100%, 50% 45%, 15% 100%, 0% 55%);
}

.brand-mark-core {
  position: absolute;
  inset: 3px;
  background: var(--color-primary);
  clip-path: polygon(50% 0%, 100% 55%, 85% 100%, 50% 45%, 15% 100%, 0% 55%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-primary);
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-gray);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.65rem 0.1rem;
  color: var(--color-ink);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  transform: scaleX(0) skewX(-35deg);
  transform-origin: 0 50%;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1) skewX(-35deg);
}

.nav-link[aria-current="page"] {
  color: var(--color-primary);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 250;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-orange));
  pointer-events: none;
}

.nav-toggle {
  display: none;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 8px;
  background: var(--color-primary);
  border: 0;
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 255, 255, 0.04) 14px 28px);
  pointer-events: none;
}

.footer-ridge {
  position: relative;
  z-index: 1;
  height: 20px;
  background: var(--color-bg);
  clip-path: polygon(
    0 100%, 3.333% 0, 6.667% 100%, 10% 0,
    13.333% 100%, 16.667% 0, 20% 100%, 23.333% 0,
    26.667% 100%, 30% 0, 33.333% 100%, 36.667% 0,
    40% 100%, 43.333% 0, 46.667% 100%, 50% 0,
    53.333% 100%, 56.667% 0, 60% 100%, 63.333% 0,
    66.667% 100%, 70% 0, 73.333% 100%, 76.667% 0,
    80% 100%, 83.333% 0, 86.667% 100%, 90% 0,
    93.333% 100%, 96.667% 0, 100% 100%
  );
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding: 3rem 0 2.5rem;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
}

.footer-logo:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--color-orange);
  text-underline-offset: 4px;
}

.footer-desc {
  max-width: 320px;
  font-size: 0.85rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-orange);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-link:hover {
  color: #fff;
  padding-left: 4px;
  text-decoration: underline;
  text-decoration-color: var(--color-orange);
  text-underline-offset: 4px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-contact-item {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  word-break: break-all;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 0 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 991px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

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

@media (max-width: 767px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: var(--color-bg);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 18px 30px rgba(30, 78, 140, 0.14);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  .site-nav[data-open] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle[data-open] .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[data-open] .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[data-open] .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-link {
    display: block;
    padding: 0.75rem 0.1rem;
    border-bottom: 1px solid rgba(30, 78, 140, 0.12);
    font-size: 1rem;
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .main-content {
    padding-top: 1.5rem;
  }
}

/* ---------- 11. 无障碍动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
