/* ============================================================
   洛阳牡丹妇产医院 - 前台样式
   主题：牡丹粉 · 现代大气 · 多端自适应
   ============================================================ */
:root {
  --primary: #e23e6f;
  --primary-dark: #c62f5b;
  --primary-light: #fdeef3;
  --gradient: linear-gradient(135deg, #f06292 0%, #c2185b 100%);
  --dark: #232a35;
  --dark-2: #2d3542;
  --text: #3d4451;
  --text-2: #666e7d;
  --muted: #9aa1ae;
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #eceef2;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(35, 42, 53, 0.06);
  --shadow-hover: 0 14px 34px rgba(194, 47, 91, 0.14);
  --header-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

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

a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

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

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 12px rgba(35, 42, 53, 0.06);
  z-index: 999;
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-img {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 22px;
  box-shadow: 0 4px 12px rgba(226, 62, 111, 0.3);
}
.logo-text h1 { font-size: 20px; font-weight: 700; color: var(--dark); letter-spacing: 1px; line-height: 1.25; }
.logo-text p { font-size: 12px; color: var(--muted); letter-spacing: 2px; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 14px;
  font-size: 15px;
  color: var(--text-2);
  border-radius: 8px;
  position: relative;
  white-space: nowrap;
}
.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 20px; height: 3px;
  border-radius: 3px;
  background: var(--gradient);
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.search-box { position: relative; }
.search-box input {
  width: 200px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0 38px 0 16px;
  font-size: 14px;
  outline: none;
  background: var(--bg);
  transition: all .25s ease;
}
.search-box input:focus { border-color: var(--primary); background: #fff; width: 240px; box-shadow: 0 0 0 3px rgba(226,62,111,.08); }
.search-box button {
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: none; background: var(--gradient);
  color: #fff; border-radius: 50%;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: #fff; border-radius: 10px;
  cursor: pointer; font-size: 20px; color: var(--dark);
  align-items: center; justify-content: center;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  background: #fff;
  box-shadow: 0 12px 24px rgba(35,42,53,.12);
  padding: 12px 20px 20px;
  z-index: 998;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--text-2);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active { color: var(--primary); font-weight: 600; }
.mobile-search { display: flex; gap: 8px; margin-top: 12px; }
.mobile-search input {
  flex: 1; height: 40px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; font-size: 14px; outline: none;
}
.mobile-search button {
  width: 72px; border: none; border-radius: 10px;
  background: var(--gradient); color: #fff; font-size: 14px; cursor: pointer;
}

/* ---------------- Banner 轮播 ---------------- */
.banner { position: relative; margin-top: var(--header-h); overflow: hidden; }
.banner-track { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.banner-slide { position: relative; min-width: 100%; }
.banner-slide img { width: 100%; height: 460px; object-fit: cover; }
.banner-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 70px 0 44px;
  background: linear-gradient(180deg, transparent, rgba(20,24,32,.72));
  color: #fff;
}
.banner-caption .container { position: relative; }
.banner-caption h2 { font-size: 34px; font-weight: 700; letter-spacing: 1px; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.banner-caption p { margin-top: 6px; font-size: 15px; opacity: .92; }
.banner-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  border: none; cursor: pointer;
  font-size: 18px; color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: all .3s ease;
  z-index: 5;
}
.banner:hover .banner-arrow { opacity: 1; }
.banner-arrow.prev { left: 24px; }
.banner-arrow.next { right: 24px; }
.banner-arrow:hover { background: var(--primary); color: #fff; }
.banner-dots {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 5;
}
.banner-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: all .3s ease;
}
.banner-dots span.active { width: 26px; border-radius: 6px; background: #fff; }

/* ---------------- 首页栏目 Tab ---------------- */
.section { padding: 56px 0 0; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head .section-tag {
  display: inline-block;
  font-size: 12px; color: var(--primary);
  background: var(--primary-light);
  padding: 4px 14px; border-radius: 20px;
  letter-spacing: 2px;
}
.section-head h2 { margin-top: 12px; font-size: 28px; color: var(--dark); font-weight: 700; letter-spacing: 1px; }
.section-head p { margin-top: 8px; color: var(--muted); font-size: 14px; }

.home-tabs {
  background: #fff;
  margin-top: 28px;
  padding: 40px 0 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tabs-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding: 0 20px;
}
.tab-btn {
  padding: 9px 24px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .25s ease;
}
.tab-btn:hover { color: var(--primary); border-color: var(--primary); }
.tab-btn.active { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(226,62,111,.28); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 32px;
}

/* 文章卡片 */
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .3s ease;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.article-card .card-img {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--primary-light);
}
.article-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.article-card:hover .card-img img { transform: scale(1.06); }
.article-card .card-cat {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 12px;
  color: #fff;
  background: rgba(226,62,111,.92);
  padding: 3px 12px;
  border-radius: 14px;
}
.article-card .card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.article-card .card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
}
.article-card:hover .card-title { color: var(--primary); }
.article-card .card-desc {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.article-card .card-meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.article-card .card-meta .views::before { content: "👁"; margin-right: 4px; font-size: 11px; }

/* 首页双栏 */
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 32px; padding-bottom: 56px; }
.panel-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
}
.panel-card .panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.panel-card .panel-title { font-size: 20px; font-weight: 700; color: var(--dark); position: relative; padding-left: 14px; }
.panel-card .panel-title::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 20px;
  border-radius: 4px;
  background: var(--gradient);
}
.panel-card .panel-more { font-size: 13px; color: var(--muted); }
.panel-card .panel-more:hover { color: var(--primary); }

.news-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.news-list li:last-child { border-bottom: none; }
.news-list a { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.news-list .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.news-list .n-title {
  font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.news-list a:hover .n-title { color: var(--primary); }
.news-list .n-time { font-size: 12px; color: var(--muted); flex-shrink: 0; }

.hot-list .rank { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; flex-shrink: 0; }
.hot-list li:nth-child(-n+3) .rank { background: var(--gradient); color: #fff; }

/* ---------------- 子页横幅 ---------------- */
.page-banner {
  margin-top: var(--header-h);
  padding: 54px 0;
  background: linear-gradient(135deg, #fdeef3 0%, #fff 60%);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-banner h2 { font-size: 30px; color: var(--dark); font-weight: 700; letter-spacing: 1px; }
.page-banner .crumb { margin-top: 10px; font-size: 13px; color: var(--muted); }
.page-banner .crumb a:hover { color: var(--primary); }
.page-banner .crumb .sep { margin: 0 8px; color: var(--line); }

/* ---------------- 列表页 ---------------- */
.list-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 40px 0 60px; }
.list-main { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 32px; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 2px solid var(--primary-light); margin-bottom: 6px; }
.list-head h3 { font-size: 20px; color: var(--dark); display: flex; align-items: center; gap: 10px; }
.list-head h3::before { content: ""; width: 4px; height: 20px; border-radius: 4px; background: var(--gradient); }
.list-head .total { font-size: 13px; color: var(--muted); }

.list-item {
  display: flex; gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
.list-item .item-img {
  width: 220px; height: 140px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
}
.list-item .item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.list-item:hover .item-img img { transform: scale(1.05); }
.list-item .item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-item .item-title { font-size: 17px; font-weight: 600; color: var(--dark); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.list-item:hover .item-title { color: var(--primary); }
.list-item .item-desc { margin-top: 8px; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-item .item-meta { margin-top: auto; padding-top: 10px; display: flex; gap: 20px; font-size: 12px; color: var(--muted); }
.list-item .item-meta .cat { color: var(--primary); }
.list-item .item-meta .tag { background: var(--primary-light); color: var(--primary); padding: 1px 10px; border-radius: 10px; }

/* 侧边栏 */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.side-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.side-title { font-size: 17px; font-weight: 700; color: var(--dark); padding-left: 12px; position: relative; margin-bottom: 16px; }
.side-title::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 16px; border-radius: 4px; background: var(--gradient); }
.side-links { display: flex; flex-direction: column; gap: 2px; }
.side-links a { padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
.side-links a:hover { background: var(--primary-light); color: var(--primary); }
.side-links a.active { background: var(--gradient); color: #fff; }
.side-links a .cnt { font-size: 12px; color: var(--muted); }
.side-links a.active .cnt { color: rgba(255,255,255,.8); }

.side-hot li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.side-hot li:last-child { border-bottom: none; }
.side-hot .h-title { font-size: 13px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-hot a:hover .h-title { color: var(--primary); }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; flex-wrap: wrap; gap: 12px; }
.pagination ul { display: flex; gap: 6px; }
.pagination li a, .pagination li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px; color: var(--text-2);
  background: #fff;
  transition: all .2s ease;
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.pagination li.active span { background: var(--gradient); color: #fff; border-color: transparent; }
.pagination .page-info { font-size: 13px; color: var(--muted); }

/* ---------------- 文章详情 ---------------- */
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 40px 0 60px; }
.detail-main { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 44px; }
.article-title { font-size: 26px; color: var(--dark); font-weight: 700; line-height: 1.5; }
.article-meta { display: flex; flex-wrap: wrap; gap: 22px; margin: 18px 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.article-meta .cat { color: var(--primary); }
.article-content { font-size: 15.5px; line-height: 1.95; color: #444b58; word-break: break-word; }
.article-content p { margin: 14px 0; }
.article-content img { max-width: 100%; border-radius: 8px; margin: 12px auto; }
.article-content h2, .article-content h3 { margin: 22px 0 12px; color: var(--dark); }
.article-content h2 { font-size: 20px; }
.article-content h3 { font-size: 17px; }
.article-content ul, .article-content ol { padding-left: 22px; margin: 12px 0; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content blockquote { border-left: 4px solid var(--primary); background: var(--primary-light); padding: 12px 18px; margin: 14px 0; border-radius: 0 8px 8px 0; color: var(--text-2); }
.article-content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.article-content table td, .article-content table th { border: 1px solid var(--line); padding: 8px 12px; }
.article-content a { color: var(--primary); }

.article-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.article-pager a { color: var(--text-2); max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-pager a:hover { color: var(--primary); }
.article-pager .no { color: var(--muted); }

/* ---------------- 搜索页 ---------------- */
.search-empty { text-align: center; padding: 80px 0; color: var(--muted); }
.search-empty .icon { font-size: 56px; margin-bottom: 16px; opacity: .5; }
.search-empty h3 { font-size: 20px; color: var(--text-2); margin-bottom: 8px; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--dark); color: #aab2c0; margin-top: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 48px 20px 36px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; position: relative; padding-bottom: 12px; }
.footer-col h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 3px; border-radius: 3px; background: var(--gradient); }
.footer-col p { font-size: 13.5px; line-height: 2; }
.footer-col .f-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-col .f-logo .logo-img { width: 40px; height: 40px; font-size: 18px; }
.footer-col .f-logo b { color: #fff; font-size: 17px; letter-spacing: 1px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.footer-links a { font-size: 13.5px; padding: 4px 0; }
.footer-links a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; padding: 6px 0; font-size: 13.5px; }
.footer-contact .k { color: var(--muted); flex-shrink: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #8b93a3; }
.footer-bottom a:hover { color: #fff; }

/* 回到顶部 */
.back-top {
  position: fixed; right: 26px; bottom: 40px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(226,62,111,.35);
  cursor: pointer; z-index: 99;
  opacity: 0; transform: translateY(16px);
  transition: all .3s ease;
  border: none;
}
.back-top.show { opacity: 1; transform: translateY(0); }

/* 图片占位符 */
.img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  background: linear-gradient(135deg, #fdeef3, #f7f0f5);
  color: #d9a8bc;
  font-size: 13px;
  gap: 6px;
}
.img-placeholder .ph-icon { font-size: 26px; opacity: .7; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .search-box { display: none; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .logo-text h1 { font-size: 17px; }
  .logo-text p { display: none; }
  .banner-slide img { height: 300px; }
  .banner-caption h2 { font-size: 22px; }
  .banner-caption p { font-size: 13px; }
  .section { padding: 36px 0 0; }
  .section-head h2 { font-size: 22px; }
  .home-tabs { padding: 28px 0 36px; }
  .article-grid { grid-template-columns: 1fr; gap: 16px; padding: 0 20px; }
  .article-card .card-img { height: 190px; }
  .home-cols { grid-template-columns: 1fr; gap: 20px; padding-bottom: 36px; }
  .list-layout, .detail-layout { grid-template-columns: 1fr; gap: 20px; padding: 24px 0 40px; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .side-card { flex: 1; min-width: 46%; }
  .list-main, .detail-main { padding: 22px 18px; }
  .list-item { flex-direction: column; gap: 12px; }
  .list-item .item-img { width: 100%; height: 180px; }
  .detail-main { padding: 26px 20px; }
  .article-title { font-size: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 28px; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .banner-arrow { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .logo-img { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; }
  .tab-btn { padding: 7px 16px; font-size: 13px; }
  .article-card .card-img { height: 170px; }
  .side-card { min-width: 100%; }
  .page-banner { padding: 40px 0; }
  .page-banner h2 { font-size: 24px; }
}
