/* Unified Layout & Component Styles */

/* ===== General Layout ===== */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 80px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #C8102E;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 40px);
  margin-bottom: 16px;
  color: #0B1F33;
}

.section-head p {
  color: #64748B;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.text-center {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #C8102E;
}

/* ===== Page Banner ===== */
.page-banner {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #1B3A5C 0%, #2E5A8A 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.page-banner .wrap {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
  background: transparent;
  border-bottom: none;
  padding: 0;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb .sep {
  opacity: 0.5;
}

.breadcrumb .current {
  color: #fff;
}

.banner-content {
  max-width: 800px;
}

.banner-content .eyebrow {
  color: #C8102E;
  margin-bottom: 16px;
}

.banner-content h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.banner-content p {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: #C8102E;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #9B0C24;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(200, 16, 46, 0.5);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1.5px solid currentColor;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(27, 58, 92, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header.scrolled {
  background: rgba(15, 40, 67, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-container {
  max-width: 100%;
  margin: 0;
  padding: 0 32px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 56px;
  width: auto;
}

/* Navigation */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Dropdown */
.nav-list .caret {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.6;
  transition: transform 0.3s ease;
}

.nav-list > li:hover .caret {
  transform: rotate(225deg);
  margin-top: 2px;
}

.nav-list > li > .dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: rgba(15, 40, 67, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.4);
  padding: 10px;
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  list-style: none;
  margin: 0;
  display: block;
}

.nav-list > li:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-list .dropdown li a {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.nav-list .dropdown li a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-list .dropdown li a strong {
  font-size: 13.5px;
  font-weight: 600;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* User Dropdown (logged-in state) */
.user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid rgba(255,255,255,.35);
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: all .25s ease;
  font-family: inherit;
}
.user-btn:hover, .user-btn.active {
  border-color: #fff;
  background: rgba(255,255,255,.1);
}
.user-btn .bi-person-circle { font-size: 18px; }
.user-btn .user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .caret {
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255,255,255,.6);
  transition: transform .2s;
}
.user-btn.active .caret { transform: rotate(180deg); }

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px -6px rgba(0,0,0,.18);
  border: 1px solid #E2E8F0;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
  z-index: 1000;
  list-style: none;
  margin: 0;
}
.user-menu.open { opacity: 1; visibility: visible; transform: none; }
.user-menu li { margin: 0; }
.user-menu li.divider { border-top: 1px solid #E2E8F0; margin: 4px 0; }
.user-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 14px;
  color: #0B1F33;
  text-decoration: none;
  transition: background .15s;
}
.user-menu li a:hover { background: rgba(27,58,92,.06); color: #1B3A5C; }
.user-menu li a i { font-size: 16px; color: #6B7C93; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* 语言按钮的三种文案：图标与短标签只在移动端出现，桌面端仍是纯文字胶囊 */
.lang-toggle .bi {
  display: none;
  font-size: 15px;
}

.lang-toggle .lang-short {
  display: none;
}

/* 移动端抽屉底部的语言分段控件，桌面端不占位 */
.nav-mobile-actions {
  display: none;
}

.nav-lang-switch {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 20px;
  padding-top: 16px;
}

.nls-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}

.nls-label .bi {
  font-size: 14px;
}

.nls-seg {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  overflow: hidden;
}

.nls-opt {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nls-opt.active {
  background: #C8102E;
  color: #fff;
}

.nls-seg .nls-opt:not(.active):hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: #C8102E;
  color: #fff;
}

.btn-primary:hover {
  background: #9B0C24;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(200, 16, 46, 0.45);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Header placeholder */
.header-placeholder {
  display: none;
}

/* ===== Footer ===== */
.site-footer {
  background: rgba(27, 58, 92, 0.95);
  color: rgba(255, 255, 255, 0.8);
}

.footer-top {
  padding: 72px 0 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top .container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  max-width: 400px;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  height: 48px;
  width: auto;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.25s ease;
}

.footer-social a:hover {
  background: #C8102E;
  color: #fff;
  transform: translateY(-3px);
}

.footer-social i {
  font-size: 18px;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #C8102E;
}

.footer-col a i {
  font-size: 16px;
  color: #C8102E;
}

.footer-bottom {
  padding: 24px 0;
}

.footer-bottom .container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: #C8102E;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(200, 16, 46, 0.4);
  z-index: 999;
}

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

.back-to-top:hover {
  background: #9B0C24;
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(200, 16, 46, 0.5);
}

.back-to-top i {
  font-size: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .mobile-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    background: rgba(15, 40, 67, 0.98);
    padding: 20px;
    display: none;
    flex-direction: column;
  }

  .site-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
  }

  .nav-list > li > a {
    width: 100%;
    padding: 12px 16px;
  }

  .nav-list > li > .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
    margin-top: 8px;
    min-width: auto;
    border-radius: 10px;
    padding: 8px;
    display: none;
  }

  .nav-list > li > .dropdown.open {
    display: block;
  }

  /* 语言切换是高频功能，移动端不再隐藏；页头右侧控件整体缩小，避免与 Logo / 汉堡按钮挤成两行 */
  .header-actions {
    gap: 8px;
  }

  .site-header .header-actions .lang-toggle {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 14px;
    gap: 4px;
  }

  .lang-toggle .bi,
  .lang-toggle .lang-short {
    display: inline-block;
  }

  .lang-toggle .bi {
    font-size: 13px;
  }

  .lang-toggle .lang-full {
    display: none;
  }

  .user-btn {
    padding: 4px 10px;
    font-size: 12px;
    gap: 5px;
    border-radius: 16px;
  }

  .user-btn .bi-person-circle {
    font-size: 15px;
  }

  .user-btn .user-name {
    max-width: 72px;
  }

  .mobile-toggle {
    padding: 5px;
  }

  .mobile-toggle span {
    width: 20px;
  }

  /* 线条变短后，× 形变换的位移量同步收窄 */
  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(-4px, -4px);
  }

  /* 登录按钮与语言胶囊同尺寸，常驻页头（显式复写 display，避开旧版 .header 规则的残留影响） */
  .site-header .header-actions .btn-outline {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 14px;
  }

  .nav-mobile-actions {
    display: block;
  }

  .site-nav.open {
    overflow-y: auto;
    max-height: calc(100vh - 100px);
  }

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

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

@media (max-width: 576px) {
  .header-container {
    padding: 0 16px;
    height: 64px;
  }

  /* Logo 内联写死 56px，页头压到 64px 后需要同步缩小，给右侧按钮腾横向空间 */
  .site-logo {
    min-width: 0; /* 极窄屏允许 Logo 收缩，右侧按钮优先保证不折行 */
    flex-shrink: 1;
  }

  .site-logo img {
    height: 36px !important;
    max-width: 100%;
  }

  /* 窄屏只留头像图标，用户名与语言长文案一样收起来 */
  .user-btn .user-name {
    display: none;
  }

  /* 页头变矮，抽屉起点跟随，避免与页头之间留出空隙 */
  .site-nav {
    top: 64px;
  }

  .site-nav.open {
    max-height: calc(100vh - 64px);
  }

  .header-placeholder {
    display: none;
  }

  .footer-top {
    padding: 48px 0 32px;
  }

  .footer-grid {
    gap: 28px;
  }
}
