/* ============================================================
   TG-Web 前台样式 — 基于 UI_DESIGN.md 规范
   ============================================================ */

/* ── Reset & 全局 ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #C0306A;
  background: #FFFFFF;
  line-height: 1.6;
}
a { color: #C0306A; text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #F04273; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ── 导航栏 ── */
.navbar {
  background: #FFF0F5;
  border-bottom: 0.5px solid #FFBDD5;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  max-width: 1100px;
  margin: 0 auto;
}
.navbar-left { display: flex; align-items: center; gap: 8px; }
.navbar-logo { width: 32px; height: 32px; border-radius: 8px; }
.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #8B1A4A;
}
.navbar-center {
  font-size: 18px;
  font-weight: 500;
  color: #C0306A;
}
.navbar-right { display: flex; gap: 16px; }
.navbar-right a {
  font-size: 14px;
  color: #C0306A;
  text-decoration: none;
  transition: color 0.15s ease;
}
.navbar-right a:hover {
  color: #F04273;
  border-bottom: 1px solid #F04273;
}

/* ── 首页 Hero 区（第一部分） ── */
.hero {
  background: #FFF0F5;
  border-radius: 16px;
  max-width: 1100px;
  margin: 24px auto;
  padding: 40px 48px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.hero-text { line-height: 1.7; }
.hero-image { text-align: center; }
.hero-image img {
  border-radius: 12px;
  width: 100%;
  object-fit: cover;
}

/* Hero 内部可用 class（后台 HTML 配置） */
.intro-tag {
  display: inline-block;
  background: #F04273;
  color: white;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.intro-title {
  font-size: 30px;
  font-weight: 500;
  color: #8B1A4A;
  line-height: 1.4;
  margin-bottom: 8px;
}
.intro-sub-title {
  font-size: 25px;
  color: #C0306A;
  line-height: 1.7;
}
.intro-sub {
  font-size: 18px;
  color: #C0306A;
  line-height: 1.7;
}
.intro-highlight {
  color: #F04273;
  font-weight: 500;
}
.intro-title2 {
  font-size: 20px;
  font-weight: 500;
  color: #8B1A4A;
  line-height: 1.4;
  margin-bottom: 8px;
}
.intro-tag2 {
  display: inline-block;
  background: #F04273;
  color: white;
  font-size: 18px;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── 首页导语（第二部分） ── */
.intro {
  background: #FFE4EF;
  border-radius: 16px;
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 28px 48px;
  text-align: center;
}
.intro p {
  font-size: 14px;
  color: #A0305A;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

/* ── 首页本站特色（第三部分） ── */
.section-title {
  font-size: 20px;
  font-weight: 500;
  color: #8B1A4A;
  text-align: center;
  margin-bottom: 20px;
}
.features {
  background: #FFF0F5;
  border-radius: 16px;
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 40px 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.feedbacks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.feature-item {
  background: #FFE4EF;
  border-radius: 10px;
  border: 0.5px solid #FFBDD5;
  padding: 16px;
  line-height: 1.7;
  transition: transform 0.18s ease, background 0.18s ease;
}
.feature-item:hover {
  transform: translateY(-2px);
  background: #FFD6E8;
}

/* 特色块内部可用 class */
.feature-title-text {
  font-size: 15px;
  font-weight: 500;
  color: #8B1A4A;
  margin-bottom: 6px;
}
.feature-body {
  font-size: 13px;
  color: #A0305A;
  line-height: 1.7;
}
.feature-highlight {
  color: #F04273;
  font-weight: 500;
}

/* ── 首页省份/城市导航（第四部分） ── */
.region-nav {
  background: #FFE4EF;
  border-radius: 16px;
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 32px 48px;
}

/* 直辖市/热门城市行 */
.region-hotcities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid #FFBDD5;
}
.region-hot {
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: #F04273;
  padding: 5px 16px;
  border-radius: 20px;
  border: 0.5px solid #F04273;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.region-hot:hover {
  background: #8B1A4A;
  border-color: #8B1A4A;
  color: white;
  text-decoration: none;
}

/* 省份+城市分组行 */
.region-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid #FFBDD5;
}
.region-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.region-province-label {
  font-size: 13px;
  font-weight: 600;
  color: #F04273;
  background: #FFF0F5;
  border: 1.5px solid #F04273;
  border-radius: 20px;
  padding: 4px 14px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.region-province-label:hover {
  background: #F04273;
  color: white;
}
.region-divider {
  width: 2px;
  height: 20px;
  background: #F04273;
  border-radius: 1px;
  flex-shrink: 0;
  align-self: center;
}
.region-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.region-city {
  font-size: 13px;
  color: #C0306A;
  padding: 3px 10px;
  border-radius: 12px;
  border: 0.5px solid #FFBDD5;
  background: white;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.region-city:hover {
  background: #F04273;
  color: white;
  border-color: #F04273;
  text-decoration: none;
}
.region-city.extra { display: none; }
.region-city.extra.visible { display: inline-block; }
.region-more {
  font-size: 13px;
  color: #F04273;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 12px;
  border: 0.5px solid #F04273;
  background: white;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  user-select: none;
}
.region-more:hover {
  background: #F04273;
  color: white;
}

/* ── 首页资源展示（第五部分） ── */
.showcase {
  background: #FFF0F5;
  border-radius: 16px;
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 40px 48px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.showcase-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.showcase-image {
  position: relative;
  padding-top: 133%; /* 3:4 */
  background: #FFD6E8;
}
.showcase-image img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.showcase-item:hover .showcase-image img {
  transform: scale(1.04);
}
.showcase-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(139, 26, 74, 0.6);
  padding: 6px 8px;
  font-size: 12px;
  color: white;
  line-height: 1.4;
}

/* ── 页面内容区 ── */
.page-content { padding: 24px 0; }

/* ── 面包屑 ── */
.breadcrumb {
  font-size: 13px;
  color: #C0306A;
  margin-bottom: 12px;
}
.breadcrumb a {
  color: #C0306A;
  text-decoration: none;
}
.breadcrumb a:hover { color: #F04273; }
.breadcrumb span {
  margin: 0 6px;
  color: #FFBDD5;
}
/* 当前页（最后一项，不可点击） */
.breadcrumb span:last-child {
  color: #F04273;
  font-weight: 500;
}

/* ── 列表页 H1 ── */
.page-content h1 {
  font-size: 22px;
  font-weight: 500;
  color: #8B1A4A;
  margin-bottom: 16px;
}

/* ── 列表页筛选栏 ── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.filter-label {
  font-size: 14px;
  color: #8B1A4A;
  white-space: nowrap;
  font-weight: 500;
}
.filter-chip {
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  border: 0.5px solid #F04273;
  color: #F04273;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-chip:hover,
.filter-chip.active {
  background: #F04273;
  color: white;
  text-decoration: none;
}

/* ── 列表页导语 ── */
.list-intro {
  font-size: 14px;
  color: #A0305A;
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #FFF8FB;
  border-radius: 8px;
  border-left: 3px solid #F04273;
}

/* ── 内容卡片网格 ── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* ── 内容卡片 ── */
.content-card {
  display: block;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 0.5px solid #FFBDD5;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.content-card:hover {
  transform: translateY(-2px);
  border-color: #F04273;
  text-decoration: none;
}

/* 卡片图片区 */
.card-img-wrap {
  position: relative;
  overflow: hidden;
}
.card-img-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.content-card:hover .card-img-wrap img {
  transform: scale(1.04);
}
.card-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #FFD6E8;
}

/* 图片数量角标 */
.card-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* 卡片摘要区 */
.card-summary {
  padding: 8px 10px;
  font-size: 12px;
  color: #A0305A;
  line-height: 1.5;
}

/* 摘要内部可用 class（AI 生成的 HTML） */
.summary-location {
  font-size: 14px;
  font-weight: 500;
  color: #8B1A4A;
  margin-bottom: 3px;
}
.summary-age,
.summary-job,
.summary-body {
  font-size: 13px;
  color: #A0305A;
  margin-bottom: 3px;
}
.summary-intro {
  font-size: 13px;
  color: #A0305A;
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}
.tag {
  font-size: 12px;
  padding: 1px 6px;
  border: 0.5px solid #F04273;
  border-radius: 4px;
  color: #F04273;
}

.empty-text {
  text-align: center;
  color: #A0305A;
  grid-column: 1 / -1;
  padding: 40px;
}

/* ── 分页 ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
}
.page-btn {
  padding: 6px 18px;
  background: #FFE4EF;
  border: 0.5px solid #FFBDD5;
  border-radius: 20px;
  color: #F04273;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}
.page-btn:hover {
  background: #F04273;
  color: white;
  text-decoration: none;
}
.page-btn.active {
  background: #F04273;
  color: white;
}
.page-dots {
  color: #A0305A;
  padding: 0 4px;
}
.pagination span {
  font-size: 12px;
  color: #A0305A;
}

/* ── 详情页媒体 ── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.media-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.media-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.media-item:hover img {
  transform: scale(1.04);
}
.media-item video {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* ── 详情页正文 ── */
.detail-text {
  background: white;
  border-radius: 10px;
  border: 0.5px solid #FFBDD5;
  padding: 16px 20px;
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 14px;
  color: #C0306A;
}

/* ── 详情页分隔线 ── */
.detail-divider {
  border: none;
  border-top: 1px dashed #FFBDD5;
  margin: 16px 0;
}

/* ── 详情页正文补充 ── */
.detail-supplement {
  background: #FFF8FB;
  border-radius: 10px;
  border: 1px dashed #F04273;
  padding: 16px 20px;
  margin-bottom: 20px;
  line-height: 1.8;
}
.detail-supplement-label {
  font-size: 11px;
  font-weight: 500;
  color: #F04273;
  margin-bottom: 8px;
}
.detail-supplement p,
.detail-supplement div {
  font-size: 14px;
  color: #A0305A;
  line-height: 1.8;
}

/* ── 相关推荐 ── */
.recommendations { margin-top: 32px; }
.recommend-title {
  font-size: 15px;
  font-weight: 500;
  color: #8B1A4A;
  margin-bottom: 12px;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
}

/* ── 底部 ── */
.footer {
  background: #FFE4EF;
  padding: 20px 24px;
  text-align: center;
  margin-top: 40px;
}
.footer p {
  font-size: 14px;
  color: #A0305A;
}
.footer a {
  color: #F04273;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* ── 响应式 ── */

/* -- 平板 & 小屏 -- */
@media (max-width: 768px) {
  /* 全局 */
  .container { padding: 0 12px; }

  /* 导航栏 */
  .navbar-inner { padding: 10px 12px; }
  .navbar-center { display: none; }
  .brand-name { font-size: 15px; }
  .navbar-logo { width: 28px; height: 28px; }
  .navbar-right { gap: 10px; }
  .navbar-right a { font-size: 13px; }

  /* 首页 Hero */
  .hero { padding: 24px 16px; margin: 12px auto; border-radius: 12px; }
  .hero-inner { grid-template-columns: 1fr; gap: 16px; }
  .intro-title { font-size: 22px; }
  .intro-sub-title { font-size: 18px; }
  .intro-sub { font-size: 15px; }

  /* 首页导语 */
  .intro { padding: 16px 16px; margin: 0 auto 12px; border-radius: 12px; }

  /* 首页特色 */
  .features { padding: 24px 16px; border-radius: 12px; }
  .features-grid { grid-template-columns: 1fr; }
  .feedbacks-grid { grid-template-columns: 1fr; }

  /* 首页导航 */
  .region-nav { padding: 20px 16px; border-radius: 12px; }
  .region-hotcities { gap: 6px; margin-bottom: 14px; padding-bottom: 12px; }
  .region-hot { font-size: 12px; padding: 4px 12px; }
  .region-group { flex-direction: column; gap: 6px; }
  .region-province-label { text-align: left; min-width: unset; }
  .region-divider { display: none; }

  /* 首页展示 */
  .showcase { padding: 24px 16px; border-radius: 12px; }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }

  /* 列表页 */
  .page-content { padding: 16px 0; }
  .page-content h1 { font-size: 18px; margin-bottom: 12px; }
  .filter-bar { gap: 6px; margin-bottom: 12px; }
  .filter-chip { font-size: 12px; padding: 3px 10px; }
  .list-intro { padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
  .content-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .card-summary { padding: 6px 8px; font-size: 12px; }
  .summary-location { font-size: 13px; }
  .pagination { gap: 10px; padding: 16px 0; }
  .page-btn { padding: 5px 14px; font-size: 12px; }

  /* 详情页 */
  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .detail-text { padding: 12px 14px; font-size: 13px; border-radius: 8px; }
  .detail-supplement { padding: 12px 14px; border-radius: 8px; }
  .recommendations .content-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* 底部 */
  .footer { padding: 16px 12px; margin-top: 24px; }
  .footer p { font-size: 12px; }
}

/* -- 手机竖屏 -- */
@media (max-width: 480px) {
  /* 导航栏 */
  .navbar-left { gap: 4px; }
  .brand-name { font-size: 14px; }

  /* 首页 Hero */
  .hero { padding: 20px 12px; }
  .intro-title { font-size: 20px; }
  .intro-sub-title { font-size: 16px; }

  /* 列表页 */
  .content-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* 详情页 */
  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .recommendations .content-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* 展示 */
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}
