/* ============================================
 * 开封市中心医院 - 完整响应式样式文件
 * 整合：通用样式 + 导航栏 + 页脚 + 按钮组件
 * 版本: 4.0.0 (完全响应式优化)
 * 最后更新: 2025-12-10
 ============================================ */

/* ============================================
   1. CSS变量定义 - 统一主题色
   ============================================ */
:root {
  /* 主题颜色 */
  --theme-color: #0083b6;
  --hover-color: #005a87;
  --footer-bg: #0083b6;

  /* 背景颜色 */
  --page-bg-light: #F8F9FA;
  --page-bg-lighter: #FFFEFA;
  --card-bg: #FAF0E8;
  --dept-bg: #EDF5FF;
  --doctor-bg-light: #FAF7ED;
  --doctor-bg-lighter: #FFFEFA;
  --doctor-card-bg: #FAF0E8;
  --doctor-image-bg: #FCE4D3;

  /* 边框和文字颜色 */
  --border-color: #bfbfbf;
  --dept-border-color: #D5DFE3;
  --text-color: #333;
  --secondary-color: #666;
  --light-color: #999;
}

/* ============================================
   2. 基础样式
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

main {
  flex: 1;
}

/* 分页样式 */
.pagination-container {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.pagination-custom .page-link {
  color: var(--theme-color);
  border: 1px solid #ddd;
  padding: 8px 16px;
  margin: 0 2px;
  border-radius: 4px;
}

.pagination-custom .page-item.active .page-link {
  background-color: var(--theme-color);
  border-color: var(--theme-color);
  color: white;
}

.pagination-custom .page-link:hover {
  background-color: #f8f9fa;
  border-color: #ddd;
}

/* ============================================
   3. 布局类
   ============================================ */

/* 1200px宽度的自定义容器 */
.container-1200 {
  max-width: 1200px;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* 顶部栏样式 */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 15px 25px;
}

.header-logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 面包屑导航 */
.breadcrumb-container {
  background-color: #f8f9fa;
  padding: 15px 0;
}

.breadcrumb-item+.breadcrumb-item::before {
  content: ">";
  color: #6c757d;
}

.breadcrumb-item a {
  color: var(--theme-color);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* ============================================
   4. 标题样式
   ============================================ */

/* 页面标题样式 */
.page-title {
  color: var(--text-color);
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin: 30px 0 40px;
  position: relative;
}

.page-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--theme-color);
  margin: 10px auto 0;
}

/* 部分标题样式 */
.section-title {
  color: var(--text-color);
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--theme-color);
  margin: 10px auto 0;
}

.section-subtitle {
  color: var(--text-color);
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--theme-color);
  display: inline-block;
}

/* ============================================
   5. 导航栏组件样式
   ============================================ */

.nav-container {
  background-color: var(--theme-color);
  position: relative;
  z-index: 1000;
}

.custom-navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  height: auto;
  min-height: 70px;
}

.custom-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  height: 100%;
}

.custom-nav-item {
  flex: 1;
  min-width: 110px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-nav-item:last-child {
  border-right: none;
}

.custom-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  text-decoration: none;
  height: 70px;
  padding: 0 5px;
  position: relative;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
}

.custom-nav-link:hover {
  background-color: var(--hover-color);
  text-decoration: none;
}

/* 下滑白线效果 - 纯CSS实现 */
.custom-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  opacity: 0;
}

.custom-nav-link:hover::after {
  width: 80%;
  opacity: 1;
}

/* 当前页面高亮 */
.custom-nav-link.active::after {
  width: 80%;
  opacity: 1;
  background-color: #ffcc00;
}

/* 首页高亮 */
.nav-home .custom-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 80%;
  height: 3px;
  background-color: #ffcc00;
  transform: translateX(-50%);
  opacity: 1;
}

/* 新闻动态高亮 */
.nav-news .custom-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 80%;
  height: 3px;
  background-color: #ffcc00;
  transform: translateX(-50%);
  opacity: 1;
}

/* 科室导航高亮 */
.nav-dept .custom-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 80%;
  height: 3px;
  background-color: #ffcc00;
  transform: translateX(-50%);
  opacity: 1;
}

/* ============================================
   6. 按钮组件样式
   ============================================ */

/* 查看更多按钮 */
.view-more-btn {
  background-color: var(--theme-color);
  color: white;
  border: none;
  padding: 10px 30px;
  font-size: 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: block;
  margin: 30px auto 0;
  text-decoration: none;
  text-align: center;
  width: 200px;
  max-width: 100%;
  cursor: pointer;
}

.view-more-btn:hover {
  background-color: var(--hover-color);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   7. 页脚组件样式
   ============================================ */

.footer {
  background-color: var(--footer-bg);
  background-image: url(/kfsybyy/assets/images/footerBg.png);
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: cover;
  color: #fff;
  padding-top: 32px;
  margin-top: auto;
}

.footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #ffcc00;
  text-decoration: none;
}

.footer-divider {
  width: 2px;
  height: 20px;
  background-color: #fff;
  margin: 0 15px;
  flex-shrink: 0;
}

.footer-logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.footer-contact {
  line-height: 1.8;
}

.footer-contact div {
  margin-bottom: 20px;
}

.footer-copyright {
  line-height: 1.8;
}

.footer-icp {
  position: relative;
  padding-left: 27px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
  justify-content: center;
}

.footer-links a {
  margin: 5px 15px;
  white-space: nowrap;
}

/* ============================================
   8. 响应式设计
   ============================================ */

/* 中等屏幕 (992px - 1199px) */
@media (max-width: 1199px) {
  .header-container,
  .custom-navbar,
  .container-1200 {
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .custom-nav-item {
    min-width: 100px;
  }
  
  .custom-nav-link {
    font-size: 15px;
    padding: 0 3px;
  }
}

/* 平板设备 (768px - 991px) */
@media (max-width: 991px) {
  .custom-navbar {
    min-height: 60px;
  }
  
  .custom-nav-list {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .custom-nav-list::-webkit-scrollbar {
    display: none;
  }
  
  .custom-nav-item {
    flex: 0 0 auto;
    min-width: 120px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .custom-nav-link {
    height: 60px;
    padding: 0 10px;
    font-size: 15px;
  }
  
  .footer-divider {
    margin: 0 10px;
  }
  
  .footer-links {
    justify-content: flex-start;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .footer-links a {
    margin: 5px 10px;
  }
  
  .page-title,
  .section-title {
    font-size: 26px;
  }
  
  .section-subtitle {
    font-size: 22px;
  }
}

/* 大手机设备 (576px - 767px) */
@media (max-width: 767px) {
  .header-container {
    padding: 10px 15px;
    text-align: center;
  }
  
  .custom-navbar {
    min-height: 50px;
    position: relative;
  }
  
  .custom-nav-list {
    height: 50px;
  }
  
  .custom-nav-item {
    min-width: 100px;
  }
  
  .custom-nav-link {
    height: 50px;
    font-size: 14px;
    padding: 0 8px;
  }
  
  .custom-nav-link::after {
    height: 2px;
  }
  
  .page-title {
    font-size: 24px;
    margin: 20px 0 30px;
    padding: 0 15px;
  }
  
  .section-title {
    font-size: 22px;
    margin-bottom: 30px;
    padding: 0 15px;
  }
  
  .section-subtitle {
    font-size: 20px;
    margin-left: 15px;
    margin-right: 15px;
  }
  
  .footer {
    padding-top: 25px;
  }
  
  .footer .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
    padding-right: 0;
  }
  
  .footer-links span {
    margin-bottom: 10px;
    display: block;
    width: 100%;
  }
  
  .footer-links a {
    margin: 0 0 10px 0;
    display: block;
    width: 100%;
    padding: 5px 0;
  }
  
  .footer-divider {
    display: none;
  }
  
  .footer-contact,
  .footer-copyright {
    text-align: center;
    margin-bottom: 25px;
  }
  
  .footer-contact div {
    margin-bottom: 15px;
  }
  
  .footer-logo {
    margin-bottom: 20px;
    max-width: 200px;
  }
  
  .view-more-btn {
    width: 90%;
    max-width: 300px;
    padding: 12px 20px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .container-1200 {
    padding: 0 15px;
  }
}

/* 小手机设备 (小于576px) */
@media (max-width: 575px) {
  .header-container {
    padding: 8px 10px;
  }
  
  .header-logo img {
    max-width: 180px;
  }
  
  .custom-navbar {
    min-height: 45px;
  }
  
  .custom-nav-list {
    height: 45px;
  }
  
  .custom-nav-item {
    min-width: 90px;
  }
  
  .custom-nav-link {
    height: 45px;
    font-size: 13px;
    padding: 0 5px;
  }
  
  .page-title {
    font-size: 22px;
    margin: 15px 0 25px;
  }
  
  .section-title {
    font-size: 20px;
    margin-bottom: 25px;
  }
  
  .section-subtitle {
    font-size: 18px;
  }
  
  .footer {
    padding-top: 20px;
    background-image: none;
  }
  
  .footer .row {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-contact div {
    margin-bottom: 10px;
  }
  
  .footer-icp {
    padding-left: 0;
    display: block;
    margin-top: 10px;
  }
  
  .footer-links a {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .footer-links a:last-child {
    border-bottom: none;
  }
  
  .pagination-custom .page-link {
    padding: 6px 12px;
    font-size: 14px;
    margin: 0 1px;
  }
  
  .view-more-btn {
    padding: 10px 15px;
    font-size: 15px;
  }
}

/* 超小手机设备 (小于400px) */
@media (max-width: 400px) {
  .custom-nav-item {
    min-width: 80px;
  }
  
  .custom-nav-link {
    font-size: 12px;
    padding: 0 3px;
  }
  
  .footer-contact div,
  .footer-copyright {
    font-size: 14px;
  }
  
  .page-title {
    font-size: 20px;
  }
  
  .section-title {
    font-size: 18px;
  }
  
  .section-subtitle {
    font-size: 16px;
  }
}

/* 大屏幕设备 (大于1200px) */
@media (min-width: 1200px) {
  .container-1200,
  .header-container,
  .custom-navbar {
    max-width: 1200px;
  }
}

/* 打印样式 */
@media print {
  .nav-container,
  .footer,
  .view-more-btn {
    display: none !important;
  }
  
  body {
    display: block;
  }
}

/* 防止移动端点击时出现蓝色高亮 */
a, button {
  -webkit-tap-highlight-color: transparent;
}

/* 确保图片响应式 */
img {
  max-width: 100%;
  height: auto;
}

/* 通用工具类 */
.text-center {
  text-align: center;
}

.mb-20 {
  margin-bottom: 20px;
}

.mt-20 {
  margin-top: 20px;
}

.d-block {
  display: block;
}

.d-none {
  display: none;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.align-items-center {
  align-items: center;
}

.justify-content-center {
  justify-content: center;
}

.w-100 {
  width: 100%;
}