/* 发烧友交流群网 - 主站 行业入口目录 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --text: #1a1a1a;
  --text-soft: #54595f;
  --text-faint: #72777d;
  --link: #0645ad;
  --link-hover: #0b0080;
  --link-visited: #663366;
  --border: #c8ccd1;
  --border-soft: #eaecf0;
  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --red: #b32424;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: var(--link-visited); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Brand header ---------- */
.brand { border-bottom: 1px solid var(--border); }
.brand-inner {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 26px 0 20px;
}
.brand-logo {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.1;
}
.brand-logo .mark { color: var(--red); }
.brand-tagline {
  font-size: 13px;
  color: var(--text-faint);
  padding-bottom: 4px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
.brand-search {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg);
}
.brand-search input {
  width: 280px;
  border: 0;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.brand-search button {
  border: 0;
  background: var(--bg-soft);
  border-left: 1px solid var(--border);
  padding: 0 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}
.brand-search button:hover { background: var(--border-soft); }

/* ---------- Channel nav ---------- */
.channelnav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.channelnav-inner {
  display: flex;
  align-items: stretch;
  font-size: 14px;
  overflow-x: auto;
}
.channelnav a {
  padding: 11px 14px;
  color: var(--text);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.channelnav a:visited { color: var(--text); }
.channelnav a:hover { background: var(--bg-soft); text-decoration: none; }
.channelnav a.active { border-bottom-color: var(--red); color: var(--text); font-weight: 500; }

/* ---------- Industry directory ---------- */
.directory { padding: 28px 0 8px; }

.directory-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--text);
}
.directory-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}
.directory-head .en {
  font-size: 13px;
  color: var(--text-faint);
  font-weight: 400;
}
.directory-head .legend {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-faint);
  display: flex;
  gap: 16px;
}
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.legend .dot.live { background: #2a7d2a; }
.legend .dot.draft { background: #b8b8b8; }

/* category groups */
.group { margin-bottom: 26px; }
.group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 1px;
  margin: 0 0 10px;
  text-transform: uppercase;
}

/* industry card grid - 一行 3-4 个 */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: transparent;
  border: 0;
}
.card {
  background: var(--bg);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: background 0.1s;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.cards .card:nth-child(4n) { border-right: 0; }
/* last row: remove bottom border so trailing empty slots look clean */
.cards .card:nth-last-child(-n+4):not(:nth-child(4n+1)):nth-child(4n+1) ~ .card { border-bottom: 0; }
.card:hover { background: var(--bg-soft); }
.card a.card-link { position: absolute; inset: 0; }
.card .card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.card .status {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 2px;
  flex-shrink: 0;
  font-weight: 500;
}
.card.is-live .status {
  color: #2a7d2a;
  background: #eef6ee;
  border: 1px solid #cfe3cf;
}
.card.is-draft .status {
  color: var(--text-faint);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}
.card .desc {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.45;
}
.card.is-draft .desc { color: var(--text-faint); }
.card .meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card .arrow { color: var(--link); font-size: 13px; }
.card.is-draft .arrow { color: var(--text-faint); }

/* draft cards: no hover underline on title since not clickable */
.card.is-draft:hover { background: var(--bg-soft); cursor: default; }

/* responsive: re-tile borders for 3-col / 2-col / 1-col */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards .card:nth-child(4n) { border-right: 1px solid var(--border-soft); }
  .cards .card:nth-child(3n) { border-right: 0; }
}
@media (max-width: 760px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards .card { border-right: 1px solid var(--border-soft); }
  .cards .card:nth-child(2n) { border-right: 0; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .cards .card { border-right: 0 !important; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 24px;
}
.footer-inner { padding: 22px 0 26px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 18px;
}
.footer h4 { margin: 0 0 8px; font-size: 13px; color: var(--text); font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 2px 0; }
.footer a { color: var(--text-soft); }
.footer a:visited { color: var(--text-soft); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .brand-search { display: none; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .brand-tagline { display: none; }
  .brand-logo { font-size: 24px; }
  body { font-size: 14px; }
  .directory-head .legend { display: none; }
}
