/* ============================================================
 * Vivia IVF UI 深度改造 V2.0 - 严格按照 Manus AI 方案执行
 * Top Bar: #F5F5F5 浅灰 | 主色: #1A2B4C | 辅色: #4A90E2
 * 按钮圆角: 4px | 行高: 1.8 | 区块间距: 80px
 * ============================================================ */

/* ===== 0. CSS 变量与重置 ===== */
:root {
  --primary: #1A2B4C;
  --secondary: #4A90E2;
  --success: #5CB85C;
  --white: #FFFFFF;
  --bg-light: #F8F8F8;
  --topbar-bg: #F5F5F5;
  --border: #E0E0E0;
  --text-body: #666666;
  --text-heading: #333333;
  
  --radius: 4px;
  --radius-lg: 8px;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  
  --space-unit: 8px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-section: 80px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-body);
  background: var(--white);
}

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

a { text-decoration: none; color: inherit; }

ul, ol { list-style: none; }

/* ===== 1. Top Bar (浅灰背景) ===== */
.top-bar {
  height: 40px;
  background: var(--topbar-bg);
  color: var(--text-body);
  font-size: 14px;
}

.top-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.lang-switcher {
  display: flex;
  gap: var(--space-md);
}

.lang-switcher .lang-btn {
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.2s;
}

.lang-switcher .lang-btn:hover,
.lang-switcher .lang-btn.active {
  color: var(--primary);
  font-weight: 600;
}

.top-bar-phone {
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
}

.top-bar-phone:hover {
  color: var(--primary);
}

/* ===== 2. Main Header ===== */
.main-header {
  height: 80px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

.header-logo img {
  max-height: 50px;
  display: block;
}

/* 导航 */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-nav ul li a {
  display: block;
  font-size: 16px;
  color: var(--text-heading);
  text-decoration: none;
  padding: 0 15px;
  line-height: 80px;
  position: relative;
  transition: color 0.2s;
}

.header-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15px;
  right: 15px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.header-nav ul li a:hover,
.header-nav ul li.active a {
  color: var(--primary);
}

.header-nav ul li a:hover::after,
.header-nav ul li.active a::after {
  transform: scaleX(1);
}

/* CTA 按钮 */
.header-cta {
  display: inline-block;
  padding: 12px 24px;
  background: var(--secondary);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.header-cta:hover {
  background: #2D7DD2;
}

/* 汉堡菜单 */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-heading);
  transition: all 0.3s ease;
}

/* ===== 3. Banner ===== */
.banner_owl { position: relative; overflow: hidden; }

.banner .item {
  height: 560px;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.2));
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 680px;
  padding: 20px;
}

.banner-title {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.banner-subtitle {
  font-size: 20px;
  margin-bottom: var(--space-xl);
  line-height: 1.4;
  opacity: 0.95;
}

/* 轮播指示点 */
.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.banner-dots .owl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.banner-dots .owl-dot.active {
  background: var(--white);
}

/* ===== 4. 统计数字 ===== */
.page_top {
  padding: var(--space-section) 0;
  background: var(--bg-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  color: var(--secondary);
}

.stat-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.stat-unit {
  font-size: 20px;
  color: var(--secondary);
}

.stat-label {
  font-size: 14px;
  color: var(--text-body);
  margin-top: var(--space-sm);
}

/* ===== 5. 页面标题 ===== */
.page_tit {
  padding: var(--space-section) 0 var(--space-xl);
  text-align: center;
}

.page_tit h2 {
  font-size: 30px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.page_tit h2 span {
  color: var(--secondary);
}

.page_tit p {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.8;
}

/* ===== 6. 服务列表 ===== */
.page1 {
  padding-bottom: var(--space-section);
}

.course_list .list_box ul li {
  margin-bottom: var(--space-xl);
}

.course_list .list_box ul li .list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.course_list .list_box ul li .img {
  width: 40%;
  min-width: 300px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.course_list .list_box ul li .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.course_list .list_box ul li .list:hover .img img {
  transform: scale(1.05);
}

.course_list .list_box ul li .text {
  flex: 1;
  min-width: 300px;
}

.course_list .list_box ul li .text h3 {
  font-size: 24px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.course_list .list_box ul li .text h3 a:hover {
  color: var(--secondary);
}

.div_tips {
  margin-bottom: var(--space-md);
}

.div_tips label {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(74, 144, 226, 0.1);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
}

.course_list .list_box ul li .text p {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

/* 按钮 - 4px 圆角 */
.btn a,
.course_list .list_box ul li .text .btn a {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn a:hover,
.course_list .list_box ul li .text .btn a:hover {
  background: #003366;
}

/* ===== 7. 专家团队 ===== */
.page2 {
  padding: var(--space-section) 0;
  background: var(--bg-light);
}

.team_owl .owl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.team_owl .item {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team_owl .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.team_owl .item .img {
  position: relative;
  overflow: hidden;
}

.team_owl .item .img img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.4s;
}

.team_owl .item:hover .img img {
  transform: scale(1.05);
}

.team_owl .item .img p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(26, 43, 76, 0.8));
  color: var(--white);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  font-size: 14px;
}

.team_owl .item .text {
  padding: var(--space-lg);
}

.team_owl .item .text h3 {
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.team_owl .item .text p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.8;
}

/* ===== 8. 服务国家 ===== */
.page3 {
  padding: var(--space-section) 0;
}

.honor_list ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  list-style: none;
}

.honor_list ul li {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.honor_list ul li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.honor_list ul li .img {
  overflow: hidden;
}

.honor_list ul li .img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s;
}

.honor_list ul li:hover .img img {
  transform: scale(1.05);
}

.honor_list ul li .text {
  padding: var(--space-lg);
}

.honor_list ul li .text h3 {
  font-size: 22px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.honor_list ul li .text p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

/* 次要按钮 */
.honor_list ul li .text .btn a {
  display: inline-block;
  padding: 10px 20px;
  background: var(--secondary);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.honor_list ul li .text .btn a:hover {
  background: #2D7DD2;
}

/* ===== 9. CTA 板块 ===== */
.page4 {
  background: var(--primary) !important;
  padding: var(--space-section) 0 !important;
  color: var(--white);
  text-align: center;
}

.cta-box {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

.cta-box h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.cta-box p {
  font-size: 18px;
  margin-bottom: var(--space-xl);
  line-height: 1.8;
  opacity: 0.9;
}

.cta-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--secondary);
  color: var(--white);
  font-size: 18px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.cta-btn:hover {
  background: #2D7DD2;
}

.cta-contact {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  font-size: 14px;
  opacity: 0.8;
}

/* ===== 10. Footer ===== */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: var(--space-section) 0 var(--space-lg);
}

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

.footer .foot {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer h4 {
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.footer a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 2;
  display: block;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--white);
}

.footer .f_tel {
  margin-top: var(--space-md);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.foot2 {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ===== 11. 悬浮栏 (右下角现代设计) ===== */
.form_right {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form_right > div {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background-color 0.3s, transform 0.3s;
  font-size: 20px;
}

.form_right > div:hover {
  background: #003366;
  transform: translateY(-3px);
}

.form_right .go_top {
  background: var(--text-body);
}

.form_right .go_top:hover {
  background: var(--text-heading);
}

/* ===== 12. 面包屑 ===== */
.page_dqwz {
  padding: var(--space-md) 0;
  font-size: 14px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.page_dqwz a {
  color: var(--text-body);
}

.page_dqwz a:hover {
  color: var(--secondary);
}

.page_dqwz a::after {
  content: '>';
  margin: 0 5px;
  color: var(--border);
}

.page_dqwz span {
  color: var(--text-heading);
  font-weight: 600;
}

/* ===== 13. 详情页 ===== */
.page.page12 {
  padding: var(--space-lg) 0 var(--space-section);
}

.news_details .tit {
  background: var(--white);
  padding: var(--space-xl);
  border-bottom: 3px solid var(--secondary);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.news_details .tit h1 {
  font-size: 28px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.news_details .tit p {
  font-size: 14px;
  color: var(--text-body);
}

.news_details .web {
  background: var(--white);
  padding: var(--space-xl);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-body);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.news_details .web p {
  margin-bottom: var(--space-lg);
}

.news_details .web h2 {
  font-size: 28px;
  color: var(--primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
  line-height: 1.2;
}

.news_details .web h3 {
  font-size: 22px;
  color: var(--primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-weight: 600;
  line-height: 1.2;
}

.news_details .web img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: var(--space-lg) 0;
}

/* 右侧热门文章 */
.hot_news .tit {
  background: var(--primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hot_news .tit p {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
}

.hot_news ul {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.hot_news ul li {
  border-bottom: 1px solid var(--border);
}

.hot_news ul li:last-child {
  border-bottom: none;
}

.hot_news ul li a {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  gap: var(--space-md);
  transition: background 0.2s;
}

.hot_news ul li a:hover {
  background: var(--bg-light);
}

.hot_news .img1 {
  width: 70px;
  height: 55px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

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

.hot_news .web h4 {
  font-size: 14px;
  color: var(--text-heading);
  font-weight: 500;
  line-height: 1.4;
}

.hot_news .web p {
  font-size: 12px;
  color: var(--text-body);
}

/* ===== 14. 分页 ===== */
.page_size {
  text-align: center;
  padding: var(--space-xl) 0;
}

.page-numbers {
  display: inline-block;
  height: 44px;
  line-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 4px;
  font-size: 14px;
  color: var(--text-heading);
  background: var(--white);
  transition: all 0.25s ease;
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

/* ===== 15. 响应式 ===== */
@media (max-width: 1024px) {
  .header-nav ul li a {
    padding: 0 10px;
    font-size: 14px;
  }
  .header-cta {
    padding: 10px 18px;
    font-size: 14px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-bar .wrap {
    padding: 0 15px;
  }
  .top-bar-welcome {
    display: none;
  }
  
  .main-header .wrap {
    padding: 0 15px;
  }
  .header-logo img {
    max-height: 40px;
  }
  .header-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    margin: 0;
  }
  .header-nav ul {
    flex-direction: column;
    width: 100%;
  }
  .header-nav ul li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .header-nav ul li a {
    line-height: 56px;
    padding: 0 20px;
  }
  .header-nav ul li a::after {
    display: none;
  }
  .header-cta {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  
  .banner .item {
    height: 400px;
  }
  .banner-title {
    font-size: 28px;
  }
  .banner-subtitle {
    font-size: 16px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  .stat-num {
    font-size: 28px;
  }
  
  .page_tit h2 {
    font-size: 24px;
  }
  
  .course_list .list_box ul li .list {
    flex-direction: column;
    padding: var(--space-lg);
  }
  .course_list .list_box ul li .img {
    width: 100%;
    min-width: auto;
  }
  .course_list .list_box ul li .img img {
    height: 200px;
  }
  .course_list .list_box ul li .text {
    min-width: auto;
  }
  .course_list .list_box ul li .text h3 {
    font-size: 20px;
  }
  
  .team_owl .item .img img {
    height: 240px;
  }
  
  .footer .foot {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  
  .page4 {
    padding: var(--space-xl) 0 !important;
  }
  .cta-box h2 {
    font-size: 24px;
  }
  .cta-contact {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .news_l, .news_r {
    width: 100%;
    float: none;
  }
  .news_r {
    margin-top: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .banner .item {
    height: 320px;
  }
  .banner-title {
    font-size: 24px;
  }
  .footer .foot {
    grid-template-columns: 1fr;
  }
  .team_owl .owl,
  .honor_list ul {
    grid-template-columns: 1fr;
  }
}

/* 菜单展开状态 */
body.menu-open .header-nav {
  display: flex;
}

body.menu-open .mobile-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
body.menu-open .mobile-toggle span:nth-child(2) {
  opacity: 0;
}
body.menu-open .mobile-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 16. 隐藏旧结构 ===== */
.head, .head2, .menu {
  display: none !important;
}

/* 隐藏旧版banner控制 */
.banner_owl .cur {
  display: none !important;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 可访问性 */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}
