/* ===== Shared CSS for ad88 Header & Footer ===== */
:root {
  --primary: #26A9E0;
  --secondary: #FFFFFF;
  --login-color: #EA7C07;
  --bg-color: #FFFFFF;
  --text-dark: #000000;
  --header-offset: 122px;
}

/* ---------- Header (Fixed / Floating) ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  background-color: var(--primary);
}

body {
  padding-top: var(--header-offset);
}

/* Header Top Bar */
.header-top {
  box-sizing: border-box;
  min-height: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary);
  width: 100%;
}

.header-container {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 30px;
  padding-right: 30px;
}

/* Logo */
.logo {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--secondary);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.logo:hover {
  text-decoration: none;
  opacity: 0.92;
}
.logo img {
  display: block;
  max-height: 60px;
  height: auto;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* Desktop Buttons */
.desktop-nav-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  text-align: center;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.btn-login {
  background: var(--login-color);
  color: #FFFFFF;
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(234,124,7,0.4);
}
.btn-register {
  background: #000000;
  color: #FFFFFF;
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Mobile Buttons (hidden on desktop) */
.mobile-nav-buttons {
  box-sizing: border-box;
  display: none;
  min-height: 48px;
}

/* Hamburger (hidden desktop) */
.hamburger-menu {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger-menu span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--secondary);
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Main Nav */
.main-nav {
  box-sizing: border-box;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #0B3B4D;
  width: 100%;
}
.nav-container {
  box-sizing: border-box;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
}
.nav-link {
  display: inline-block;
  color: var(--secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-link:hover,
.nav-link.active {
  background-color: var(--primary);
  color: #FFFFFF;
}

/* Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0B3B4D;
  color: #E6F4FA;
  margin-top: 40px;
}
.footer-top {
  padding: 40px 20px 24px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.footer-col {
  min-width: 0;
}
.footer-logo {
  display: inline-block;
  font-size: 30px;
  font-weight: 800;
  color: #FFFFFF;
  text-decoration: none;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.footer-logo:hover {
  text-decoration: none;
  color: var(--primary);
}
.footer-description {
  font-size: 14px;
  line-height: 1.7;
  color: #C5E4EF;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0;
}
.footer-title {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li {
  margin-bottom: 10px;
}
.footer-nav a {
  color: #C5E4EF;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-nav a:hover {
  color: var(--primary);
  padding-left: 4px;
}
.footer-dynamic-col {
  min-height: 10px;
}
.footer-mid {
  margin-top: 24px;
}
.footer-mid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.footer-slot-anchor-inner {
  min-height: 0;
}
.footer-bottom {
  background: #072A38;
  text-align: center;
  padding: 18px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom p {
  margin: 0;
  font-size: 14px;
  color: #C5E4EF;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  :root {
    --header-offset: 110px;
  }

  .header-top {
    min-height: 60px !important;
    height: 60px !important;
  }
  .header-container {
    width: 100%;
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    height: 100%;
    box-sizing: border-box;
  }
  .logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px;
    max-width: calc(100% - 100px);
  }
  .logo img {
    display: block !important;
    max-width: 100%;
    height: auto;
    max-height: 56px !important;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .mobile-nav-buttons {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
    gap: 10px;
    flex-wrap: nowrap;
    background-color: var(--primary);
  }
  .mobile-nav-buttons .btn {
    flex: 1;
    min-width: 0;
    max-width: calc(50% - 5px);
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hamburger-menu {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    padding: 6px;
  }
  .hamburger-menu span {
    width: 22px;
  }
  .hamburger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    min-height: 100vh;
    background-color: #0B3B4D;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 80px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    box-sizing: border-box;
  }
  .main-nav.active {
    display: flex;
    transform: translateX(0);
  }
  .nav-container {
    width: 100%;
    max-width: none;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 16px;
  }
  .nav-link {
    display: block;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 6px;
  }

  .nav-overlay.active {
    display: block;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .footer-mid-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}

body.no-scroll {
  overflow: hidden;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
/* 内容保护（系统追加，请勿删除） */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
