/* ============================================
   彩娱乐汇 全站共享样式
   ============================================ */

/* ---------- 设计变量 ---------- */
:root {
  --c-hl: #1B3A6B;
  --c-lake: #3498DB;
  --c-deep: #0B1D39;
  --c-sun: #E67E22;
  --c-red: #C0392B;
  --c-white: #F2F6F9;
  --c-sand: #D5D8DC;
  --c-gold: #D4AF37;
  --c-ink: #2C3E50;

  --font-head: 'Rajdhani', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;

  --container: 1240px;
  --header-h: 72px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 30px rgba(11, 29, 57, 0.08);
  --shadow-glow: 0 0 24px rgba(52, 152, 219, 0.25);
}

/* ---------- 重置与基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-ink);
  background-color: var(--c-white);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--c-lake);
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

p {
  margin-bottom: 1em;
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- 中文排版 ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-hl);
  line-height: 1.25;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: 1px;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0.5px;
}

h3 {
  font-size: 22px;
}

h4 {
  font-size: 18px;
}

/* ---------- 内容容器与分节 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 72px 0;
}

.section--alt {
  background-color: var(--c-white);
  border-top: 1px solid var(--c-sand);
  border-bottom: 1px solid var(--c-sand);
}

/* ---------- 通用卡片 ---------- */
.sb-card {
  background: var(--c-white);
  border: 1px solid var(--c-sand);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sb-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 152, 219, 0.5);
  box-shadow: var(--shadow-soft);
}

/* ---------- 通用按钮 ---------- */
.sb-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, var(--c-sun) 0%, #d35400 100%);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 4px 16px rgba(230, 126, 34, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 126, 34, 0.35);
}

.sb-btn:active {
  transform: scale(0.96);
}

.sb-btn--blue {
  background: linear-gradient(135deg, var(--c-lake) 0%, var(--c-hl) 100%);
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.25);
}

.sb-btn--ghost {
  background: transparent;
  border-color: var(--c-lake);
  color: var(--c-hl);
  box-shadow: none;
}

.sb-btn--ghost:hover {
  background: rgba(52, 152, 219, 0.08);
  box-shadow: none;
}

/* ---------- 面包屑 ---------- */
.crumbs {
  margin-bottom: 24px;
}

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--c-ink);
}

.crumbs__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crumbs__list li:not(:last-child)::after {
  content: '/';
  color: var(--c-sand);
}

.crumbs a {
  color: var(--c-lake);
  font-weight: 500;
}

.crumbs a:hover {
  text-decoration: underline;
}

/* ---------- 响应式网格 ---------- */
.sb-grid {
  display: grid;
  gap: 24px;
}

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

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

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

@media (max-width: 1024px) {
  .sb-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* ---------- 图片占位容器 ---------- */
.sb-figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-hl) 0%, var(--c-deep) 100%);
  border: 1px solid rgba(52, 152, 219, 0.2);
  min-height: 200px;
  display: grid;
  place-items: center;
}

.sb-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(52, 152, 219, 0.08) 1px, transparent 1px) 0 0 / 100% 32px,
    repeating-linear-gradient(90deg, rgba(52, 152, 219, 0.06) 0 1px, transparent 1px 64px);
  pointer-events: none;
  mix-blend-mode: screen;
}

.sb-figure > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-figure--wide {
  aspect-ratio: 21 / 9;
}

.sb-figure--landscape {
  aspect-ratio: 16 / 10;
}

.sb-figure--card {
  aspect-ratio: 4 / 3;
}

.sb-figure--tall {
  aspect-ratio: 3 / 4;
}

@media (max-width: 680px) {
  .sb-figure--wide {
    aspect-ratio: 16 / 10;
  }
}

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 300;
  background: var(--c-sun);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(11, 29, 57, 0.95);
  border-bottom: 1px solid rgba(52, 152, 219, 0.25);
  transition: box-shadow 0.3s ease;
}

.site-header[data-scrolled] {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-lake) 0%, var(--c-gold) 60%, var(--c-sun) 100%);
  z-index: 220;
  pointer-events: none;
}

/* ---------- 品牌 ---------- */
.brand {
  position: relative;
  z-index: 210;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-lake) 0%, var(--c-hl) 100%);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 12px rgba(52, 152, 219, 0.3);
}

.brand__text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--c-white);
  line-height: 1.1;
}

.brand__tagline {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(242, 246, 249, 0.45);
  white-space: nowrap;
}

/* ---------- 头部轴线 ---------- */
.site-header__axis {
  flex: 1;
  height: 1px;
  min-width: 40px;
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.4), rgba(242, 246, 249, 0.05));
}

/* ---------- 主导航 ---------- */
.site-nav {
  flex-shrink: 0;
  position: static;
  transform: none;
}

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

.site-nav__link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: rgba(242, 246, 249, 0.7);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.site-nav__link:hover {
  color: var(--c-white);
  background: rgba(52, 152, 219, 0.12);
  border-color: rgba(52, 152, 219, 0.5);
  box-shadow: 0 0 16px rgba(52, 152, 219, 0.2);
}

.site-nav__link[aria-current="page"] {
  color: #ffffff;
  background: rgba(52, 152, 219, 0.2);
  border-color: var(--c-lake);
}

.site-nav__link--cta {
  background: linear-gradient(135deg, var(--c-sun), #d35400);
  color: #ffffff;
  border-color: transparent;
  margin-left: 8px;
}

.site-nav__link--cta:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--c-sun), #d35400);
  box-shadow: 0 4px 18px rgba(230, 126, 34, 0.4);
  transform: translateY(-1px);
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  position: relative;
  z-index: 210;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(242, 246, 249, 0.06);
  border: 1px solid rgba(242, 246, 249, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(52, 152, 219, 0.15);
  border-color: rgba(52, 152, 219, 0.5);
}

.nav-toggle__bar {
  width: 20px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--c-deep) 0%, var(--c-hl) 100%);
  color: rgba(242, 246, 249, 0.7);
}

.site-footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.6), var(--c-gold) 50%, rgba(230, 126, 34, 0.6));
  opacity: 0.35;
}

.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 32px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.site-footer__brand {
  max-width: 320px;
}

.site-footer__trust {
  margin: 16px 0 0;
  font-size: 14px;
  color: rgba(242, 246, 249, 0.55);
  line-height: 1.65;
}

.site-footer__cta {
  margin-top: 20px;
}

.site-footer__col {
  min-width: 0;
}

.site-footer__heading {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 2px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}

.site-footer__links li + li {
  margin-top: 10px;
}

.site-footer__links a {
  color: rgba(242, 246, 249, 0.68);
  font-size: 14px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__links a:hover {
  color: var(--c-white);
  padding-left: 4px;
}

.site-footer__contacts li {
  position: relative;
  font-size: 14px;
  color: rgba(242, 246, 249, 0.65);
  line-height: 1.6;
  padding-left: 18px;
}

.site-footer__contacts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-lake);
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
}

.site-footer__contacts li + li {
  margin-top: 10px;
}

.site-footer__bottom {
  border-top: 1px solid rgba(242, 246, 249, 0.1);
}

.site-footer__bottom-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: rgba(242, 246, 249, 0.45);
}

.site-footer__bottom-inner p {
  margin: 0;
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(11, 29, 57, 0.88);
  border: 1px solid rgba(52, 152, 219, 0.5);
  color: var(--c-lake);
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.to-top:hover {
  color: var(--c-white);
  background: var(--c-hl);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--c-sun);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .site-header__axis {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 190;
    height: 100vh;
    width: min(340px, 86vw);
    padding: calc(var(--header-h) + 32px) 28px 32px;
    background: rgba(11, 29, 57, 0.98);
    border-left: 1px solid rgba(52, 152, 219, 0.25);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 0.68, 0, 1);
    overflow-y: auto;
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .site-nav__link {
    display: block;
    padding: 12px 20px;
    font-size: 17px;
    border-radius: var(--radius-md);
    white-space: normal;
  }

  .site-nav__link--cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer__brand {
    max-width: 100%;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .site-header__inner {
    padding: 0 16px;
  }

  .section {
    padding: 48px 0;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ---------- 减少动态偏好 ---------- */
@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;
  }
}
