/* ==========================================================================
   广州市黄埔区中医医院官网样式表
   Guangzhou Huangpu Traditional Chinese Medicine Hospital
   ========================================================================== */

:root {
  --primary: #0A5C55;
  --primary-dark: #06423D;
  --primary-light: #11786F;
  --primary-50: #EBF5F3;
  --primary-100: #D3EBE7;
  
  --gold: #C69234;
  --gold-dark: #A77722;
  --gold-light: #DFB15B;
  --gold-50: #FCF8EE;
  
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  
  --bg-warm: #FAF9F6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", STSong, "SimSun", serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--slate-800);
  background-color: #FFFFFF;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 优雅宋体类 */
.font-tcm {
  font-family: var(--font-serif);
  letter-spacing: 0.02em;
}

/* 顶部细进度条 */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--primary-light));
  z-index: 100;
  width: 0%;
  transition: width 0.05s linear;
  will-change: width;
}

/* 导航栏毛玻璃 */
.nav-blur {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(10, 92, 85, 0.08);
}

/* 渐变遮罩 */
.hero-gradient-overlay {
  background: linear-gradient(180deg, rgba(6, 66, 61, 0.85) 0%, rgba(10, 92, 85, 0.72) 50%, rgba(6, 66, 61, 0.92) 100%);
}

.tcm-gold-gradient {
  background: linear-gradient(135deg, #DFB15B 0%, #C69234 100%);
}

.tcm-primary-gradient {
  background: linear-gradient(135deg, #11786F 0%, #0A5C55 100%);
}

/* 卡片阴影与悬浮 */
.tcm-card {
  background: #FFFFFF;
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.tcm-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-100);
}

/* 徽章 Badge（绝对防挤压防变形） */
.tcm-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  line-height: 1;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.tcm-badge-primary {
  background-color: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-100);
}

.tcm-badge-gold {
  background-color: var(--gold-50);
  color: var(--gold-dark);
  border: 1px solid rgba(198, 146, 52, 0.25);
}

/* 标签切换按钮 */
.tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--slate-200);
  background-color: #FFFFFF;
  color: var(--slate-600);
  cursor: pointer;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(10, 92, 85, 0.25);
}

/* 概况轮播组件 (Carousel - 纯硬件加速轻量化) */
.overview-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.overview-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  pointer-events: none;
  will-change: opacity;
}

.overview-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.5);
  transition: all 0.25s ease;
  cursor: pointer;
}

.carousel-dot.active {
  width: 24px;
  background-color: #FFFFFF;
}

/* 抽屉 Drawer (科室详情) */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-content {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 640px;
  background-color: #FFFFFF;
  z-index: 1001;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.drawer-backdrop.active .drawer-content {
  transform: translateX(0);
}

/* 模态框 Modal (挂号与指引) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.97);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

/* 全屏 Lightbox (资质证书与大图浏览) */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img-wrapper {
  max-width: 90vw;
  max-height: 80vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 时间线 */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
}

/* 自定义细滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* 打印样式 */
@media print {
  #scroll-progress,
  header,
  footer,
  .no-print {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
  .tcm-card {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
}
