/* 共用站点导航与页脚 — page-gallery 多页模板 */

:root {
  --theme: #1f6feb;
  --theme-hover: #1558c0;
  --theme-light: #eef5ff;
  --text: #3d4a5c;
  --text-light: #6b7c93;
  --title: #0f1c2e;
  --bg-white: #ffffff;
  --bg-gray: #eef2f7;
  --border: #e4e9f0;
  --shadow: 0 4px 24px rgba(15, 28, 46, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 28, 46, 0.1);
  --radius-sm: 8px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 233, 240, 0.9);
}

.header-inner {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 12px;
  color: var(--title);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.site-mark .mark-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--theme), #3b82f6);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(31, 111, 235, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  list-style: none;
}

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

.main-nav > li > a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  border-radius: 8px;
}

.main-nav > li > a:hover {
  color: var(--theme);
  background: var(--theme-light);
}

.main-nav > li.is-active > a {
  color: var(--theme);
  background: var(--theme-light);
}

.main-nav > li:has(.dropdown) > a::after {
  content: "▾";
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.45;
}

.main-nav > li > .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px 0;
  z-index: 100;
}

.main-nav > li:hover > .dropdown { display: block; }

.main-nav > li > .dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.main-nav > li > .dropdown a:hover {
  background: var(--bg-gray);
  color: var(--theme);
}

.main-nav > li > .dropdown a .dd-icon {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.main-nav > li > .dropdown .dd-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-search { position: relative; }

.header-search .search-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 50%;
  border: none;
  background: none;
  padding: 0;
}

.header-search .search-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.header-search .search-icon:hover {
  background: var(--bg-gray);
  color: var(--theme);
}

.header-search .search-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  display: none;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  height: 40px;
  box-shadow: var(--shadow);
}

.header-search .search-dropdown.show { display: flex; }

.header-search .search-dropdown input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 180px;
  color: var(--text);
  background: transparent;
}

.header-search .search-dropdown button {
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 8px;
  display: grid;
  place-items: center;
}

.header-search .search-dropdown button svg {
  width: 16px;
  height: 16px;
  display: block;
}

.btn-login {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--theme);
  border: 1px solid rgba(31, 111, 235, 0.35);
  border-radius: 999px;
  background: none;
  cursor: pointer;
}

.btn-login:hover { background: var(--theme-light); }

.btn-register {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--theme);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(31, 111, 235, 0.25);
}

.btn-register:hover {
  background: var(--theme-hover);
  transform: translateY(-1px);
}

/* Footer */
.footer-links {
  background: #152033;
  padding: 52px 24px 40px;
}

.footer-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}

.footer-grid h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
}

.footer-grid ul { list-style: none; }

.footer-grid ul li { margin-bottom: 8px; }

.footer-grid ul li a {
  font-size: 13px;
  color: #8b98ad;
}

.footer-grid ul li a:hover { color: #fff; }

.footer-contact {
  font-size: 13px;
  color: #8b98ad;
  line-height: 2;
}

.copyright {
  background: #101827;
  padding: 16px 20px;
  text-align: center;
  font-size: 12px;
  color: #6b7c93;
}

.copyright a { color: #8b98ad; }
.copyright a:hover { color: #fff; }
.copyright .sep { margin: 0 8px; color: #3a4458; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header { height: 64px; }
  .main-nav { display: none; }
  .header-search { display: none; }
  .btn-login { padding: 6px 10px; font-size: 12px; }
  .btn-register { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
  .header { height: 56px; }
  .header-inner { padding: 0 14px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
