/* ── Global Design Tokens (article-detail style) ── */
:root {
  --bg: #f7f8f3;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --line: rgba(148, 163, 184, 0.28);
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #0f766e;
  --primary-strong: #0b5954;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #f5f6fa;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.site-content {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

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

h1, h2, h3, p { margin: 0; }

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── Site Header ── */
.site-header {
  position: relative;
  z-index: 1000;
  background: linear-gradient(135deg, #0c5c56 0%, #0a4f4a 50%, #083f3b 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 16px rgba(8, 63, 59, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.site-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: grayscale(1) brightness(4.5) contrast(0.7);
  opacity: 0.95;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.site-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.header-search {
  display: flex;
  align-items: center;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  max-width: 360px;
  flex: 1;
}

.header-search:focus-within {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.header-search input {
  border: none;
  background: transparent;
  padding: 9px 14px;
  font-size: 16px;
  color: #ffffff;
  outline: none;
  flex: 1;
  min-width: 0;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search input::-webkit-search-cancel-button {
  filter: brightness(0) invert(1);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.15s;
}

.header-search input::-webkit-search-cancel-button:hover {
  opacity: 1;
}

.header-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}

.header-search button:hover {
  color: #ffffff;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
}

/* ── Site Footer ── */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 50px 0;
  background: linear-gradient(135deg, #0a4f4a 0%, #083f3b 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 40px;
}

.site-footer-brand {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 8px;
}

.site-footer-brand strong {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 1.08rem;
}

.site-footer-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer-copyright {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.82rem;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .site-footer-inner {
    grid-template-columns: 1fr auto;
    gap: 14px 28px;
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }
}

/* ── Shared Components ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.3);
}
.btn-primary:hover { background: var(--primary-strong); }

.btn-secondary {
  border-color: var(--line);
  color: var(--text);
  background: #fff;
}

.section-head {
  margin-top: 8px;
  margin-bottom: 18px;
}

.section-head--compact { margin-bottom: 12px; }
.section-head--spacious { margin-bottom: 14px; }

.section-head--accent {
  position: relative;
  padding: 0 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head--accent::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: var(--primary);
}

.section-head--accent h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.78rem);
  color: #1f302d;
  margin: 0;
}

.section-head--accent p {
  margin: 0;
  font-size: 0.95rem;
  color: #6b7d76;
  max-width: 760px;
}

.empty-state {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
}

/* ── Section Head (generic) ── */
.section-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.2;
}

.section-head p {
  margin-top: 8px;
  color: var(--muted);
}

/* ── Section (detail pages) ── */
.section { margin-bottom: 32px; }
@media (min-width: 769px) { .section { margin-bottom: 56px; } }
.section h2 {
  margin-bottom: 16px;
  color: #374151;
  border-bottom: 2px solid #d1d5db;
  padding-bottom: 8px;
  font-size: 20px;
}
.section h2.section-title-no-underline {
  border-bottom: none;
  padding-bottom: 6px;
  width: fit-content;
  box-shadow: inset 0 -2px 0 0 #0f766e;
}

/* ── Shared Company Identity ── */
.company-logo-plain {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  border: 1px solid #e1e8e2;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.company-logo-plain img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.company-logo-plain span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #0f766e;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.company-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.company-brand {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: #22312e;
  white-space: nowrap;
}

.company-area {
  font-size: 0.82rem;
  color: #71817a;
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Series Showcase ── */
.series-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.series-band {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  padding: 0;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #dce5df;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.series-band:hover {
  transform: scale(1.02);
}

.series-band-image {
  width: 90px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 10px 0 0 10px;
  overflow: hidden;
  background: #ecf4ef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.series-band-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-band-image span {
  font-size: 0.82rem;
  color: #6c7c76;
  font-weight: 600;
}

.series-band-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 14px;
}

.series-band-content h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.28;
  color: #1f302d;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-band-content p {
  margin: 0;
  font-size: 14px;
  color: #60716b;
  line-height: 1.35;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  gap: 16px;
}

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

.card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 100%;
}

.card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
}

.media {
  height: 210px;
  background: linear-gradient(145deg, #ecf6f4 0%, #fff3d7 100%);
  display: flex;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: center;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.2);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 1.1rem;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-body h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  font-weight: 600;
}

.card-body p {
  color: var(--muted);
  font-size: 0.97rem;
}

.meta {
  margin-top: auto;
  color: var(--primary-strong);
  font-size: 0.86rem;
  font-weight: 600;
}

/* ── Image Carousel ── */
.image-carousel { overflow: hidden; max-width: 100%; }
.carousel-wrapper { position: relative; width: 100%; overflow: hidden; }
.images-scroll-container { width: 100%; height: auto; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-color: transparent transparent; }
.images-scroll-container.has-scroll { padding-bottom: 8px; }
.images-scroll-container::-webkit-scrollbar { height: 6px; }
.images-scroll-container::-webkit-scrollbar-track { background: transparent; }
.images-scroll-container::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; transition: background 0.3s; }
.images-scroll-container::-webkit-scrollbar-thumb:hover { background: #a0aec0; }
.images-scroll-container.is-scrolling { scrollbar-color: #cbd5e0 transparent; }
.images-scroll-container.is-scrolling::-webkit-scrollbar-thumb { background: #cbd5e0; }
.images-grid { display: inline-flex; gap: 16px; padding: 0; height: 200px; align-items: center; }
.image-item { flex: 0 0 200px; height: 200px; min-width: 200px; cursor: pointer; }
.image-item:hover .image-box { opacity: 0.85; }
.image-box { width: 100%; height: 100%; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.image-thumbnail { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.6); border: none; border-radius: 50%; width: 40px; height: 40px; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; transition: background 0.2s; font-size: 18px; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.carousel-btn:hover { background: rgba(0, 0, 0, 0.8); }
.carousel-btn:active { transform: translateY(-50%) scale(0.95); }
.carousel-btn-prev { left: 8px; opacity: 0; pointer-events: none; }
.carousel-btn-next { right: 8px; }
.carousel-btn.hidden { display: none !important; }

/* ── Lightbox ── */
.lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 1100; justify-content: center; align-items: center; }
.lightbox.active { display: flex; }
.lightbox-close { position: absolute; top: 20px; right: 20px; background: transparent; border: none; color: #fff; font-size: 28px; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s; z-index: 1101; }
.lightbox-close:hover { opacity: 0.7; }
.lightbox-content { display: flex; flex-direction: column; align-items: center; max-width: 90%; max-height: 90%; pointer-events: none; position: relative; z-index: 1; }
.lightbox-blur { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 90%; max-height: calc(90vh - 60px); object-fit: contain; filter: blur(20px); opacity: 0; transition: opacity 0.25s ease; pointer-events: none; display: none; border-radius: 4px; }
.lightbox-image { max-width: 100%; max-height: calc(90vh - 60px); object-fit: contain; border-radius: 4px; pointer-events: auto; opacity: 0; transition: opacity 0.25s ease; }
.lightbox-image.loaded { opacity: 1; }
.lightbox-spinner { display: none; width: 48px; height: 48px; border: 4px solid rgba(255,255,255,0.2); border-top-color: #fff; border-radius: 50%; animation: lightbox-spin 0.7s linear infinite; position: absolute; }
@keyframes lightbox-spin { to { transform: rotate(360deg); } }
.lightbox-caption { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); color: #fff; font-size: 16px; text-align: center; pointer-events: auto; background: rgba(0,0,0,0.45); padding: 6px 16px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.55); border: none; border-radius: 50%; width: 50px; height: 50px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; transition: all 0.2s; z-index: 1101; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.lightbox-nav:hover { background: rgba(0, 0, 0, 0.78); }
.lightbox-nav:active { transform: translateY(-50%) scale(0.95); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-nav.hidden { display: none; }

/* ── Lightbox video & iframe ── */
.lightbox-video { max-width: min(90vw, 960px); max-height: calc(80vh - 60px); display: none; border-radius: 4px; outline: none; pointer-events: auto; background: #000; }
.lightbox-iframe { width: min(90vw, 960px); aspect-ratio: 16/9; display: none; border-radius: 4px; pointer-events: auto; border: none; background: #000; }

/* ── Video thumbnails in carousel ── */
.video-item .image-box { position: relative; }
.video-thumb { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.video-thumb-placeholder { width: 100%; height: 100%; background: #1c1c2e; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.35); font-size: 32px; }
.video-play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; background: rgba(0,0,0,0.65); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; pointer-events: none; transition: background 0.2s; padding-left: 3px; box-sizing: border-box; }
.image-item:hover .video-play-overlay { background: rgba(0,0,0,0.88); }
.video-ext-box { background: #1c1c2e; flex-direction: column; gap: 8px; }
.video-ext-icon { font-size: 36px; color: rgba(255,255,255,0.5); }
.video-ext-label { color: rgba(255,255,255,0.7); font-size: 11px; text-align: center; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ── Child Series List ── */
.child-series-list { list-style: none; margin: 0; padding: 0; }
.child-series-item { border-bottom: 1px solid #ddd; }
.child-series-item:last-child { border-bottom: none; }
.child-series-link { display: flex; align-items: center; padding: 16px; text-decoration: none; color: inherit; border-radius: 8px; transition: background 0.2s; }
.child-series-link:hover { background: rgba(15, 118, 110, 0.12); }
.child-series-thumb { width: 60px; height: 60px; flex-shrink: 0; margin-left: 14px; border-radius: 6px; overflow: hidden; }
.child-series-thumb img { width: 100%; height: 100%; object-fit: cover; }
.child-series-info { flex: 1; min-width: 0; min-height: 60px; display: flex; flex-direction: column; justify-content: center; }
.child-series-name { margin: 0; font-size: 16px; line-height: 1.6; font-weight: 500; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.child-series-summary { margin: 4px 0 0; font-size: 14px; color: #6b7280; line-height: 1.4; display: -webkit-box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Shared Responsive ── */
@media (max-width: 980px) {
  .series-showcase { grid-template-columns: 1fr; }

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

@media (max-width: 768px) {
  .image-item { flex: 0 0 150px; height: 150px; min-width: 150px; }
  .images-grid { height: 150px; }
  .carousel-btn { width: 36px; height: 36px; font-size: 16px; }
  .carousel-btn-prev { left: 4px; }
  .carousel-btn-next { right: 4px; }
}

@media (max-width: 640px) {
  .company-logo-plain { width: 44px; height: 44px; }

  .series-band {
    grid-template-columns: 86px 1fr;
    gap: 10px;
    padding: 0;
  }

  .series-band-image {
    width: 86px;
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .series-band-content h3 { font-size: 15px; }
  .series-band-content p { font-size: 13px; }

  .card-grid--three { grid-template-columns: 1fr; }

  .image-item { flex: 0 0 120px; height: 120px; min-width: 120px; }
  .images-grid { gap: 10px; height: 120px; }
  .carousel-btn { width: 32px; height: 32px; font-size: 14px; }
  .carousel-btn-prev { left: 2px; }
  .carousel-btn-next { right: 2px; }

  .container {
    width: calc(100% - 20px);
    padding-left: 0;
    padding-right: 0;
  }
}

/* ── Draft status ── */
.draft-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45em;
  padding: 0.18em 0.55em;
  border: 1px solid #d97706;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.68em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ── Mobile Menu ── */
@media (max-width: 768px) {
  .header-inner {
    height: 72px;
  }

  .site-logo {
    gap: 8px;
  }

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

  .site-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .site-header.menu-open .site-nav,
  .site-header.menu-open .header-search {
    display: flex;
  }

  .site-header.menu-open .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 4px;
    padding-bottom: 14px;
  }

  .site-header.menu-open .site-nav {
    order: 10;
    width: 100%;
    flex-direction: column;
    gap: 2px;
  }

  .site-header.menu-open .site-nav a {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .site-header.menu-open .header-search {
    order: 11;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .site-footer {
    padding: 48px 0;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-footer-brand {
    grid-column: auto;
    flex-direction: column;
    gap: 2px;
  }

  .site-footer-brand span {
    overflow: visible;
    white-space: normal;
  }

  .site-footer-links {
    gap: 22px;
  }

  .site-footer-copyright {
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* 触摸设备：禁用 hover 颜色残留 */
@media (hover: none) {
  .carousel-btn:hover { background: rgba(0, 0, 0, 0.6); }
  .lightbox-nav:hover { background: rgba(0, 0, 0, 0.55); }
}
