/* ============================================================
 * 南时悠COS摄影基地 · 公共样式
 * 亮 / 暗主题（CSS 变量） · 电脑 / 平板 / 手机响应式
 * ============================================================ */

:root {
  --accent: #6d5bd0;
  --accent-strong: #5847b8;
  --accent-soft: rgba(109, 91, 208, 0.12);
  --bg: #f7f6f4;
  --bg-card: #ffffff;
  --bg-soft: #efeeeb;
  --text: #22201d;
  --text-2: #5c574f;
  --text-3: #8f897f;
  --border: rgba(34, 32, 29, 0.1);
  --shadow: 0 6px 24px rgba(34, 32, 29, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --accent: #9d8df1;
  --accent-strong: #b3a6f6;
  --accent-soft: rgba(157, 141, 241, 0.16);
  --bg: #131216;
  --bg-card: #1c1b21;
  --bg-soft: #242229;
  --text: #eceaf2;
  --text-2: #b3aebd;
  --text-3: #7d7887;
  --border: rgba(236, 234, 242, 0.1);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 顶部滚动公告 ---------- */
.announce {
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 13px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.announce-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  width: max-content;
  padding: 8px 0;
  animation: announce-scroll 32s linear infinite;
}

.announce:hover .announce-track { animation-play-state: paused; }

.announce-item { display: inline-flex; align-items: center; gap: 10px; }
.announce-item .sep { color: var(--accent); opacity: 0.8; }
.announce-item a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

@keyframes announce-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.topbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.topbar-brand .thin { font-weight: 400; color: var(--text-3); margin-left: 8px; font-size: 12px; }

/* 顶栏 / 管理页 · 官网同款 logo 图形标（外链，亮暗主题通用） */
.brand-logo {
  display: inline-block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 9px;
  flex: none;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: transform 0.15s ease;
}
.theme-btn:hover { transform: translateY(-1px); }

/* 顶栏 · 返回工作室主页入口 */
.topbar-home {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.topbar-home:hover {
  transform: translateY(-1px);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background:
    radial-gradient(1100px 380px at 50% -120px, var(--accent-soft), transparent 70%);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5.4vw, 52px);
  letter-spacing: 0.06em;
  font-weight: 800;
}

.hero .subtitle {
  margin: 0;
  font-size: clamp(14px, 2.2vw, 18px);
  color: var(--text-2);
  letter-spacing: 0.12em;
}

.hero .divider {
  width: 56px;
  height: 3px;
  margin: 26px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ---------- 区块通用 ---------- */
.section { padding: 54px 0 22px; }

.section-head { margin-bottom: 26px; }

.section-head .eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 30px);
  letter-spacing: 0.05em;
}

.section-head p.desc {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

/* ---------- 场地轮播 ---------- */
.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 8;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carousel-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 22px 18px;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.06em;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  z-index: 2;
}
.carousel-btn:hover { background: rgba(0, 0, 0, 0.55); }
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}
.carousel-dots button.active { width: 22px; background: #fff; }

/* ---------- 图片占位（尚未配置外链时） ---------- */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: 0.12em;
  background:
    repeating-linear-gradient(45deg,
      var(--bg-soft), var(--bg-soft) 12px,
      color-mix(in srgb, var(--bg-soft) 82%, var(--text) 6%) 12px,
      color-mix(in srgb, var(--bg-soft) 82%, var(--text) 6%) 24px);
  padding: 12px;
}

/* ---------- 客样平铺 ---------- */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.sample-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sample-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.sample-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-soft);
}

.sample-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.sample-card:hover .sample-thumb img { transform: scale(1.04); }

.sample-meta { padding: 10px 12px 12px; }

.sample-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 2px 10px;
  margin-bottom: 6px;
}

.sample-title {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-wrap { text-align: center; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 99px;
  font-size: 14px;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.18s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

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

/* ---------- 价格 / 须知（Markdown） ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch; /* 三张卡片等高，以内容最多的一张为准 */
}

.md-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 12px;
  box-shadow: var(--shadow);
}

.md-card h2 {
  margin: 0 0 12px;
  font-size: 19px;
  letter-spacing: 0.04em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.md-card h3 { font-size: 16px; margin: 14px 0 8px; }
.md-card h4 { font-size: 14px; margin: 12px 0 6px; }

.md-card p { margin: 8px 0; font-size: 14px; color: var(--text-2); }

.md-card ul, .md-card ol { margin: 8px 0; padding-left: 20px; color: var(--text-2); font-size: 14px; }
.md-card li { margin: 5px 0; }
.md-card strong { color: var(--text); }

.md-card blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  font-size: 14px;
}

.md-card code {
  font-size: 12.5px;
  background: var(--bg-soft);
  border-radius: 5px;
  padding: 2px 6px;
}

.md-card pre {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow-x: auto;
}
.md-card pre code { background: none; padding: 0; }

.md-table-wrap { overflow-x: auto; margin: 10px 0; }

.md-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.md-card th, .md-card td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}

.md-card th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 600;
}

.md-card hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ---------- 导航指引 ---------- */
.nav-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.map-panel {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

#map { width: 100%; height: 360px; }

.map-fallback {
  height: 360px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  color: var(--text-2);
  background: var(--bg-soft);
}

.map-fallback.show { display: flex; }

.map-info {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}

.map-info .addr { color: var(--text); font-weight: 600; display: block; margin-bottom: 4px; }

.guide-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-desc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text-2);
  box-shadow: var(--shadow);
}

.guide-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
}

.guide-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
  min-height: 150px;
}

.guide-item .ph { flex: 1; min-height: 130px; }
.guide-item img { width: 100%; height: 100%; object-fit: cover; flex: 1; }

.guide-item .cap {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
}

/* ---------- 联系方式 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.contact-card .icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card .icon svg { width: 22px; height: 22px; }

.contact-card .label { font-size: 12px; color: var(--text-3); letter-spacing: 0.12em; margin-bottom: 4px; }

.contact-card .value {
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
  font-weight: 600;
}

.contact-card .value.empty { color: var(--text-3); font-weight: 400; font-style: italic; }

.contact-card .qr-link { font-size: 12px; display: inline-block; margin-top: 6px; }

/* ---------- 页尾 ---------- */
.footer {
  margin-top: 60px;
  padding: 30px 0 36px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
  letter-spacing: 0.05em;
}

.footer .brand-line { color: var(--text-2); margin-bottom: 8px; letter-spacing: 0.12em; }
.footer .icp a { color: var(--text-3); }
.footer .icp a:hover { color: var(--accent); }
.footer .sep { margin: 0 8px; opacity: 0.5; }

/* ---------- 灯箱 ---------- */
.ns-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ns-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 14, 0.86);
  backdrop-filter: blur(4px);
}

.ns-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 24px;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ns-lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.ns-lightbox-figure figcaption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.ns-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 17px;
}
.ns-lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }

/* ---------- 页面通用（gallery 等） ---------- */
.page-head {
  padding: 44px 0 26px;
  background: radial-gradient(900px 300px at 50% -100px, var(--accent-soft), transparent 70%);
}

.page-head h1 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 36px); letter-spacing: 0.06em; }
.page-head p { margin: 0; color: var(--text-2); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 26px; }

.chip {
  padding: 7px 16px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 13px;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-bottom: 40px;
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1024px) {
  .sample-grid, .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-grid { grid-template-columns: 1fr; }
  #map, .map-fallback { height: 320px; }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 640px) {
  .hero { padding: 52px 0 40px; }
  .section { padding: 40px 0 16px; }
  .sample-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-images { grid-template-columns: 1fr 1fr; }
  .carousel { aspect-ratio: 4 / 3; }
  .carousel-btn { width: 34px; height: 34px; font-size: 15px; }
  .carousel-caption { font-size: 13px; padding: 28px 14px 12px; }
  .topbar-brand .thin { display: none; }
  .brand-logo { width: 26px; height: 26px; margin-right: 7px; }
  .topbar-home { height: 34px; padding: 0 12px; font-size: 12px; }
  #map, .map-fallback { height: 280px; }
  .md-card { padding: 18px 16px 8px; }
}
