/* 輔大醫院臨床技術中心 - 專屬客製化 CSS 樣式檔 */

/* ==========================================================================
   1. 全局字體與渲染優化 (極致易讀性與學術專業感)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

:root {
  --color-medblue-50: #f0f5fa;
  --color-medblue-100: #e1ebf4;
  --color-medblue-600: #2c5d88;
  --color-medblue-800: #143A5A; /* 主色深藍 */
  --color-medblue-900: #0d283f;
  --color-tealaccent: #2A9D8F;  /* 青綠色 */
  --color-goldaccent: #C9A227;  /* 金色 */
  --color-lightbg: #F5F7FA;     /* 淺灰背景 */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.035em; /* 寬鬆的大氣字距 */
  line-height: 1.75;       /* 舒適的閱讀行高 */
}

/* 針對英文與數字採用 Outfit 字型，中文採用 Noto Sans TC */
.font-number {
  font-family: 'Outfit', sans-serif;
}

/* 標題字距加寬與精緻渲染 */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.05em;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   2. 自訂高級滾動條
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-medblue-800);
  border-radius: 9999px;
  border: 2px solid #F1F5F9;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-tealaccent);
}

/* ==========================================================================
   3. 微動畫與互動效果 (Micro-interactions)
   ========================================================================== */

/* 導覽列選單滑過底線動畫 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-tealaccent);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* 下拉選單平滑過渡 */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 卡片 Hover 浮起與光暈陰影 */
.hover-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(20, 58, 90, 0.1), 0 10px 10px -5px rgba(20, 58, 90, 0.04);
  border-color: rgba(42, 157, 143, 0.3);
}

/* CTA 流光動畫 */
@keyframes shimmer {
  100% {
    left: 125%;
  }
}

.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
}

.btn-shimmer:hover::after {
  animation: shimmer 1s ease-in-out;
}

/* ==========================================================================
   4. Glassmorphism 磨砂玻璃特效 (模擬控制台專用)
   ========================================================================== */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-panel-dark {
  background: rgba(13, 40, 63, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   5. 常見問題 (FAQ) 手風琴動畫
   ========================================================================== */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-content {
  max-height: 500px; /* 足以容納內容的高度 */
  opacity: 1;
}

.faq-arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

/* ==========================================================================
   6. 骨架與間距優化
   ========================================================================== */
.section-padding {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}
