/* ========================================
   新星靓医美 - 前台样式（最终版）
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ===== 自定义字体 HarmonyOS Sans ===== */
@font-face {
  font-family: 'HarmonyOS Sans';
  src: url('../fonts/HarmonyOS_Sans_SC_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-color: #1a1a1a;
  --secondary-color: #2c2c2c;
  --accent-color: #c9a96e;
  --accent-light: #d4b896;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-white: #fff;
  --bg-light: #f8f8f8;
  --bg-lighter: #fafafa;
  --border-color: #e5e5e5;
  --shadow-light: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-medium: 0 5px 20px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
  --font-main: 'HarmonyOS Sans', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--text-color); line-height: 1.6; background-color: var(--bg-white);
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }

/* 主导航 */
.main-header { background: #a90005; position: sticky; top: 0; z-index: 1000; transition: background 0.3s ease; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; height: 90px; }
.logo { display: flex; align-items: center; gap: 15px; }
.logo img { width: 227px; height: 88px; object-fit: contain; }
.main-nav { display: flex; gap: 40px; }
.main-nav a { font-size: 14px; font-weight: 500; color: #fff; position: relative; padding: 10px 0; transition: color 0.3s ease; }
.main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: #fff; transition: var(--transition); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.appointment-btn { padding: 8px 20px; background: transparent; border: 1px solid #fff; color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all 0.3s ease; border-radius: 50px; }
.appointment-btn:hover { background: #fff; color: #a90005; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; }
.menu-toggle span { width: 25px; height: 2px; background: #fff; transition: var(--transition); }

.main-header:hover { background: #fff; }
.main-header:hover .main-nav a { color: #333; }
.main-header:hover .main-nav a:hover { color: #a90005; }
.main-header:hover .main-nav a.active { color: #a90005; }
.main-header:hover .main-nav a::after { background: var(--accent-color); }
.main-header:hover .appointment-btn { border-color: #333; color: #333; }
.main-header:hover .appointment-btn:hover { background: #333; color: #fff; }
.main-header:hover .menu-toggle span { background: #333; }

.main-header.scrolled { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.main-header.scrolled .main-nav a { color: #333; }
.main-header.scrolled .main-nav a:hover { color: #a90005; }
.main-header.scrolled .main-nav a.active { color: #a90005; }
.main-header.scrolled .main-nav a::after { background: var(--accent-color); }
.main-header.scrolled .appointment-btn { border-color: #333; color: #333; }
.main-header.scrolled .appointment-btn:hover { background: #333; color: #fff; }
.main-header.scrolled .menu-toggle span { background: #333; }

/* =========================================
   轮播图（用 padding-bottom 兼容所有浏览器）
   ========================================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 36.458%; /* 1920:700 比例 */
  overflow: hidden;
  background: #000;
}
.hero-slider .slides {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.hero-slider .slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slider .slide.active { opacity: 1; }
.hero-slider .slide-image { width: 100%; height: 100%; object-fit: cover; }
.slider-nav { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; z-index: 20; }
.slider-nav .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); background: transparent; cursor: pointer; transition: var(--transition); }
.slider-nav .dot.active, .slider-nav .dot:hover { background: #fff; border-color: #fff; }

/* 品牌资讯（原特色服务） */
.banners { padding: 100px 0 50px; background: #fff; }
.banners-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.banner-card { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.06); transition: all 0.4s ease; }
.banner-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.15); }
.banner-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.banner-card:hover img { transform: scale(1.08); }
.banner-card .banner-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 45%, transparent 75%); transition: background 0.3s ease; z-index: 1; }
.banner-card:hover .banner-overlay { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 55%, transparent 85%); }
.banner-card .banner-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 28px 26px; color: #fff; z-index: 2; }
.banner-card h3 { font-size: 24px; font-weight: 600; color: #fff; margin-bottom: 8px; line-height: 1.3; letter-spacing: 0.5px; text-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.banner-card p { font-size: 14px; color: rgba(255,255,255,0.88); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* 科室 */
.departments { padding: 50px 0; background: var(--bg-white); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .section-title { font-size: 42px; font-weight: 600; color: var(--primary-color); margin-bottom: 15px; letter-spacing: 2px; }
.section-header .section-subtitle { font-size: 14px; color: var(--text-muted); letter-spacing: 3px; text-transform: uppercase; }

.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 30px;
}
.department-card { background: #fff; padding: 40px 20px; text-align: center; border: none; transition: var(--transition); }
.department-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-medium); }
.department-card .icon {
  font-size: 50px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
}
.department-card .icon img {
  max-width: 64px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.department-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; color: var(--primary-color); }
.department-card p { font-size: 13px; color: var(--text-light); line-height: 1.8; }

/* 荣誉专利 */
.honors-section { padding: 50px 0; background: #fff; }
.honors-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; align-items: stretch; }
.honors-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 20px; }
.honor-thumb { position: relative; overflow: hidden; width: 100%; aspect-ratio: 200/288; background: var(--bg-light); }
.honor-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.honor-thumb:hover img { transform: scale(1.05); }
.honors-right-image { position: relative; width: 100%; height: 100%; min-height: 100%; overflow: hidden; background: #f5f5f5; }
.honors-right-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.honors-more-btn { display: inline-block; padding: 12px 40px; border: 1px solid var(--primary-color); color: var(--primary-color); border-radius: 50px; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; transition: all 0.3s ease; margin-top: 60px; grid-column: 1 / -1; justify-self: center; }
.honors-more-btn:hover { background: var(--primary-color); color: #fff; }

/* 医生 */
.doctors-section { padding: 50px 0; background: #fff; }
.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.doctor-card { background: #fff; overflow: hidden; transition: var(--transition); }
.doctor-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-medium); }
.doctor-card .photo { position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; }
.doctor-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.doctor-card:hover .photo img { transform: scale(1.1); }
.doctor-card .photo .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26,26,26,0.8); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.doctor-card:hover .photo .overlay { opacity: 1; }
.doctor-card .photo .overlay a { padding: 12px 30px; background: var(--accent-color); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.doctor-card .info { padding: 25px; text-align: center; }
.doctor-card .info h3 { font-size: 20px; font-weight: 600; margin-bottom: 5px; }
.doctor-card .info .title { color: var(--accent-color); font-size: 14px; margin-bottom: 10px; }
.doctor-card .info .position { color: var(--text-muted); font-size: 13px; margin-bottom: 15px; }
.doctor-card .info .specialty { font-size: 13px; color: var(--text-light); line-height: 1.8; }

/* 关于我们 */
.about-section { padding: 50px 0; background: #fff; }
.about-section .section-header { text-align: center; margin-bottom: 60px; }
.about-section .section-title { font-size: 42px; font-weight: 600; color: var(--primary-color); margin-bottom: 15px; letter-spacing: 2px; }
.about-section .section-subtitle { font-size: 14px; color: var(--text-muted); letter-spacing: 3px; text-transform: uppercase; }
.about-wrapper { width: 100%; }
.about-tabs { display: flex; justify-content: flex-start; width: 50%; position: relative; z-index: 2; margin-left: 0; margin-bottom: 0; }
.about-tab { flex: 1; padding: 18px 0; font-size: 18px; font-weight: 600; color: #666; cursor: pointer; background: #e5e5e5; border: 1px solid transparent; border-bottom: none; border-radius: 0; position: relative; white-space: nowrap; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; }
.about-tab:first-child { border-radius: 16px 0 0 0; }
.about-tab:last-child { border-radius: 0 16px 0 0; }
.about-tab:only-child { border-radius: 16px 16px 0 0; }
.about-tab + .about-tab::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 22px; background: #bbb; }
.about-tab.active::before, .about-tab.active + .about-tab::before { display: none; }
.about-tab.active { background: #fff; color: #a90005; border: 1px solid #e5e5e5; border-bottom: none; position: relative; z-index: 3; }
.about-content-box { background: #fff; padding: 40px; display: flex; gap: 40px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); position: relative; z-index: 1; align-items: stretch; min-height: 420px; }
.about-image-box { flex: 1; border-radius: 12px; overflow: hidden; display: flex; align-items: stretch; min-height: 0; }
.about-image-box img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 12px; }
.about-text-box { flex: 1; display: flex; flex-direction: column; justify-content: space-between; height: 100%; min-height: 0; }
.about-text-box h3 { font-size: 32px; font-weight: 700; color: #1a1a1a; margin-bottom: 24px; }
.about-text-box p { font-size: 16px; line-height: 1.8; color: #666; margin-bottom: 24px; }
.about-divider { height: 1px; background: #e5e5e5; margin-bottom: 24px; }
.about-info p { font-size: 16px; color: #333; margin-bottom: 16px; display: flex; align-items: flex-start; }
.about-info .info-label { font-weight: 700; color: #1a1a1a; width: 100px; flex-shrink: 0; }

/* 一键导航按钮 —— hover 黑底白字 */
.about-nav-btn { display: inline-block; padding: 14px 50px; background: #f0f0f0; color: #333; font-size: 16px; font-weight: 600; border-radius: 40px; margin-top: 20px; align-self: flex-start; transition: all 0.3s ease; border: 1px solid transparent; cursor: pointer; text-align: center; }
.about-nav-btn:hover { background: #1a1a1a; color: #fff; }

/* 品牌资讯（原资讯中心） */
.articles-section { padding: 50px 0; background: #fff; }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.article-card { background: #fff; overflow: hidden; transition: var(--transition); }
.article-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-medium); }
.article-card .image { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.article-card .image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.article-card:hover .image img { transform: scale(1.1); }
.article-card .category { position: absolute; top: 20px; left: 20px; padding: 6px 15px; background: var(--accent-color); color: #fff; font-size: 12px; font-weight: 500; }
.article-card .content { padding: 30px; }
.article-card .date { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.article-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card p { font-size: 14px; color: var(--text-light); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.articles-more { display: flex; justify-content: center; margin-top: 60px; }
.articles-more a { display: inline-block; padding: 12px 40px; border: 1px solid var(--primary-color); color: var(--primary-color); border-radius: 50px; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; transition: all 0.3s ease; }
.articles-more a:hover { background: var(--primary-color); color: #fff; }

/* =========================================
   页脚
   ========================================= */
.main-footer { background: #f5f5f5; color: #333; padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 60px; align-items: start; }
.footer-brand { margin-top: 0; padding-top: 0; }
.footer-brand .logo { margin-bottom: 25px; }
.footer-brand p { font-size: 14px; line-height: 2; color: #666; }
.footer-column h4 { font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 25px; color: #a90005; line-height: 1.6; }
.footer-column ul li { margin-bottom: 15px; }
.footer-column ul a { font-size: 14px; color: #666; }
.footer-column ul a:hover { color: #a90005; }
.footer-column .contact-item { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; font-size: 14px; color: #666; }

#footerQuickLinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 24px;
}
#footerQuickLinks li { margin-bottom: 0; }

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-bottom p { font-size: 13px; color: #999; }
.footer-bottom a { color: #999; transition: color 0.3s ease; }
.footer-bottom a:hover { color: #a90005; }

/* =========================================
   页面通用 Banner —— 高度 150px
   ========================================= */
.page-banner { height: 150px; background-size: cover; background-position: center; background-repeat: no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; text-align: center; }
.page-banner h1 { font-size: 36px; font-weight: 600; letter-spacing: 4px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.page-banner p { font-size: 13px; opacity: 0.9; margin-top: 8px; text-shadow: 0 1px 5px rgba(0,0,0,0.5); letter-spacing: 3px; }

.page-content { padding: 80px 0; }
.doctors-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.doctor-detail-card { background: #fff; border: 1px solid var(--border-color); }
.doctor-detail-card .photo { aspect-ratio: 1; }
.articles-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.article-detail { max-width: 800px; margin: 0 auto; }
.article-detail .article-header { text-align: center; margin-bottom: 40px; }
.article-detail .article-header h1 { font-size: 36px; margin-bottom: 20px; }
.article-detail .article-header .meta { color: var(--text-muted); font-size: 14px; }
.article-detail .article-image { margin-bottom: 40px; }
.article-detail .article-image img { width: 100%; border-radius: 4px; }
.article-detail .article-body { font-size: 16px; line-height: 2; color: var(--text-light); }
.article-detail .article-body p { margin-bottom: 20px; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 25px; background: var(--primary-color); color: #fff; font-size: 14px; margin-bottom: 30px; border-radius: 50px; }
.back-btn:hover { background: var(--accent-color); }

@media (max-width: 1200px) {
  .container { padding: 0 30px; }
  .banners-grid { grid-template-columns: repeat(3, 1fr); }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .honors-layout { grid-template-columns: 1fr 1.5fr; }
}
@media (max-width: 992px) {
  .hero-slider { padding-bottom: 56.25%; } /* 16:9 */
  .banners-grid { grid-template-columns: repeat(2, 1fr); }
  .honors-layout { grid-template-columns: 1fr; justify-items: center; }
  .honors-thumbs { grid-template-columns: repeat(2, 200px); grid-template-rows: repeat(2, 288px); }
  .honor-thumb { width: 200px; height: 288px; }
  .honors-right-image { width: 400px; height: 576px; min-height: 0; }
  .about-content-box { flex-direction: column; min-height: 0; }
  .about-image-box { width: 100%; }
  .about-image-box img { height: auto; max-height: 300px; }
  .about-text-box { height: auto; }
  .about-tabs { width: 100%; margin-left: 0; }
  .about-tab { padding: 14px 0; font-size: 16px; }
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .departments-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }
  .section-header .section-title { font-size: 32px; }
  .banners-grid, .doctors-grid, .articles-grid { grid-template-columns: 1fr; }
  .honors-thumbs { grid-template-columns: 1fr; grid-template-rows: auto; }
  .honor-thumb { width: 100%; height: auto; aspect-ratio: 200/288; }
  .honors-right-image { width: 100%; height: auto; aspect-ratio: 400/576; min-height: 0; position: relative; }
  .honors-right-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .page-banner { height: 120px; }
  .page-banner h1 { font-size: 26px; letter-spacing: 2px; }
  .page-banner p { font-size: 11px; letter-spacing: 2px; }
}

/* =========================================
   全局取消粗体（只保留 Regular 字重）
   ========================================= */
* { font-weight: 400 !important; }