/* ==========================================================================
   文心診所 (Wen Clinic) - 客製化現代醫療風格樣式表
   ========================================================================== */

:root {
  /* 品牌色系 - 清新自然草木綠 (#78AC62) */
  --primary-color: #78AC62;       /* 主品牌草綠 */
  --primary-light: #93C47D;       /* 亮草綠 */
  --primary-dark: #3D6B2C;        /* 深草綠 (高對比文字與標題) */
  --primary-darker: #26431C;      /* 極深草木墨綠 */
  --primary-soft: #F1F7EE;        /* 柔和草綠底色 */
  --primary-subtle: #D9E8D4;      /* 淡淡綠襯底與邊線 */

  /* 選單專屬色彩 - 與草木綠深度融合的高雅沉穩色系 */
  --menu-bg: #5E9449;             /* 選單按鈕基底綠 */
  --menu-bg-hover: #6EAA54;       /* 選單懸停亮草綠 */
  --menu-bg-active: #2B471F;      /* 選單作用中深草綠 */
  --menu-border-accent: #8DC777;  /* 左側微光修飾條 */
  --menu-active-accent: #E5962B;  /* 作用中暖金修飾條 */

  --secondary-color: #3F7285;     /* 沉穩石青藍 (專業醫療互補色) */
  --accent-color: #E28424;        /* 溫暖琥珀橘金 */
  --accent-soft: #FCF4EB;         /* 暖杏白底色 */

  --bg-page: #F6F8F5;             /* 頁面溫潤底色 */
  --bg-card: #FFFFFF;             /* 卡片白底 */
  --bg-subtle: #EDF3EB;           /* 區塊微底色 */
  --border-color: #DEE7DC;        /* 柔和邊框色 */

  --text-main: #2A3328;           /* 主要文字 (深炭墨綠) */
  --text-muted: #5E6D5B;          /* 次要文字 (灰綠) */
  --text-light: #8E9C8B;          /* 弱化提示文字 */

  --shadow-sm: 0 2px 8px rgba(45, 75, 35, 0.06);
  --shadow-md: 0 6px 20px rgba(45, 75, 35, 0.09);
  --shadow-lg: 0 12px 32px rgba(45, 75, 35, 0.13);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 50px;

  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.75;
  font-size: 15.5px;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.4;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

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

/* 頂部公告列 */
.top-announcement-bar {
  background: linear-gradient(90deg, #375928 0%, #4D7E3A 100%);
  color: #FFFFFF;
  font-size: 0.86rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* 主 Header 區塊 (LOGO 2/5 即 40%, BG01 3/5 即 60%) */
.main-header {
  background: #FFFFFF;
  padding: 8px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

/* Header 容器：左右完美對齊主內容容器 (.custom-main-container) */
.main-header .container-xxl,
.header-banner-container {
  max-width: 1320px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

.header-banner-grid {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  min-height: 230px;
  position: relative;
  border: 6px solid #5E9449;
  box-sizing: border-box;
}

.header-logo-col {
  flex: 0 0 40%;
  width: 40%;
  min-height: 218px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #FFFFFF;
  overflow: hidden;
}

.clinic-logo-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.header-logo-img {
  width: 100%;
  height: 100%;
  max-height: 195px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.header-bg-col {
  flex: 0 0 60%;
  width: 60%;
  min-height: 218px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.header-bg-img {
  width: 100%;
  height: 100%;
  min-height: 218px;
  object-fit: cover;
  object-position: right center;
  display: block;
}

/* iPad 與手機專屬選單按鈕 */
.mobile-menu-toggle-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1030;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: var(--transition-fast);
}

.mobile-menu-toggle-btn i {
  font-size: 1.35rem;
  line-height: 1;
}

.mobile-menu-toggle-btn:hover,
.mobile-menu-toggle-btn:active {
  background: var(--primary-color);
  color: #FFFFFF;
}

/* 主容器（桌機加寬 1320px） */
.custom-main-container {
  max-width: 1320px;
  margin: 24px auto 48px;
  padding: 0 16px;
}

/* ==========================================================================
   左側選單 (Sidebar) - 無圓角俐落洗鍊風格 (Flat & Modern Architectural Style)
   ========================================================================== */
.sidebar-sticky-wrap {
  position: sticky;
  top: 20px;
  z-index: 10;
}

.sidebar-nav-card {
  background: transparent;
  padding: 0;
  margin-bottom: 18px;
}

.sidebar-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* 無圓角矩形俐落設計 */
.sidebar-menu-item a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 18px 9px 18px;
  background: linear-gradient(90deg, #4A7A38 0%, #5E9449 100%);
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 0px !important; /* 移除圓角 */
  border-left: 6px solid #8DC777;  /* 左側俐落立體飾條 */
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 5px rgba(45, 75, 35, 0.1);
  transition: all 0.22s ease-in-out;
  position: relative;
}

.sidebar-menu-item a .menu-main-text {
  font-size: 1.13rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.06em;
  line-height: 1.25;
  margin-bottom: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.sidebar-menu-item a .menu-en-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

/* Hover 懸停動態 */
.sidebar-menu-item a:hover {
  background: linear-gradient(90deg, #598F44 0%, #6EAA54 100%);
  border-left-color: #C1ECAD;
  padding-left: 22px; /* 柔順微右移 */
  box-shadow: 0 4px 12px rgba(45, 75, 35, 0.2);
}

/* Active 當前作用中選單狀態 */
.sidebar-menu-item.active a {
  background: linear-gradient(90deg, #2B471F 0%, #375928 100%);
  border-left-color: #E5962B; /* 暖琥珀金色左標 */
  padding-left: 20px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3), 0 4px 10px rgba(0,0,0,0.15);
}

.sidebar-menu-item.active a .menu-main-text {
  color: #FFEBB0; /* 金黃高亮 */
}

.sidebar-menu-item.active a .menu-en-sub {
  color: #FFFFFF;
}

.sidebar-info-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.sidebar-info-card h6 {
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.sidebar-facebook-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1877F2;
  color: #FFFFFF;
  font-weight: 600;
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 0.92rem;
}

.sidebar-facebook-btn:hover {
  background: #0e63d8;
  color: #FFFFFF;
}

/* 右側主內容區卡片 */
.main-content-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  margin-bottom: 22px;
}

/* 跑馬燈快訊 */
.ticker-news-wrap {
  display: flex;
  align-items: center;
  background: #FFFDF8;
  border: 1px solid #FCE4C8;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: 18px;
}

.ticker-badge {
  background: var(--accent-color);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  margin-right: 12px;
}

.ticker-marquee {
  flex-grow: 1;
  overflow: hidden;
  color: #85490F;
  font-weight: 500;
  font-size: 0.95rem;
}

/* 標語引言區塊 */
.philosophy-banner-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 22px;
}

.philosophy-banner-box .title {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.philosophy-banner-box .text {
  color: var(--text-main);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.7;
}

/* ==========================================================================
   最新消息表格 - 詳情按鈕固定寬度防變形保護
   ========================================================================== */
.custom-news-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.custom-news-table tr {
  background: #FFFFFF;
}

.custom-news-table tr:hover {
  background: var(--primary-soft);
}

.custom-news-table td {
  padding: 10px 14px;
  vertical-align: middle;
  border: 1px solid var(--border-color);
}

.custom-news-table td:first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
  border-right: none;
  width: 72px;
  white-space: nowrap;
}

.custom-news-table td:nth-child(2) {
  border-left: none;
  border-right: none;
}

/* 詳情欄位防變形保護 */
.custom-news-table td:last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  border-left: none;
  width: 86px;
  min-width: 86px;
  white-space: nowrap;
  text-align: right;
}

.news-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--primary-color);
  color: #FFFFFF;
  white-space: nowrap;
}

.news-title-link {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.news-title-link:hover {
  color: var(--primary-color);
}

/* 詳情按鈕專屬樣式 (絕不變形) */
.btn-news-detail-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  flex-shrink: 0;
  min-width: 62px;
  height: 29px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: var(--transition-fast);
}

/* 區塊標題 */
.section-heading-custom {
  position: relative;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--primary-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading-custom::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

/* 人文金句引言 */
.quotes-card-box {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.quotes-card-box .quote-item {
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.quotes-card-box .quote-source {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 門診時間表原圖 RWD 容器 */
.hours-image-wrapper {
  max-width: 660px;
  width: 100%;
}

.schedule-original-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.2s ease;
}

.hours-img-link {
  cursor: pointer;
  outline: none;
}

.hours-img-link:hover .schedule-original-img {
  transform: scale(1.01);
}

.hours-img-link:active .schedule-original-img {
  transform: scale(0.99);
}

/* 門診時程表格 */
.schedule-table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.schedule-table-custom th {
  background: var(--primary-color);
  color: #FFFFFF;
  padding: 10px 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.schedule-table-custom td {
  padding: 12px 6px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-size: 0.9rem;
  background: #FFFFFF;
}

.schedule-table-custom td:last-child {
  border-right: none;
}

.schedule-table-custom tr:nth-child(even) td {
  background: #F8FBF7;
}

.schedule-table-custom .time-col {
  background: var(--primary-soft);
  font-weight: 700;
  color: var(--primary-dark);
}

.badge-open {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary-subtle);
  display: inline-block;
}

.badge-close {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* 心理師個人卡片 */
.therapist-profile-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.therapist-title-badge {
  background: #6FA85B;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 6px;
}

.therapist-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

/* 頁尾 */
.main-footer {
  background: linear-gradient(135deg, #243D1A 0%, #152410 100%);
  color: #FFFFFF;
  padding: 40px 0 20px;
  margin-top: 40px;
  border-top: 4px solid var(--primary-color);
}

.main-footer h5 {
  color: #FFFFFF;
  font-size: 1.05rem;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  display: inline-block;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: #FFFFFF;
  font-size: 0.9rem;
  display: inline-block;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.footer-legal-notice {
  color: #FFFFFF;
  font-size: 0.84rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  margin-top: 24px;
  font-size: 0.82rem;
  color: #FFFFFF;
}

/* 返回頂端懸浮按鈕 */
.btn-scroll-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary-color);
  color: #FFFFFF;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.btn-scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-scroll-top:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
}

/* 手機底部行動條 (Mobile Bottom Bar) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.09);
  z-index: 1035;
  border-top: 1px solid var(--border-color);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  pointer-events: auto;
}

.mobile-bottom-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  gap: 4px;
}

.mobile-action-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 4px 2px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  gap: 3px;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

.mobile-action-btn i {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--primary-color);
  pointer-events: none;
  transition: transform 0.15s ease;
}

.mobile-action-btn span {
  pointer-events: none;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.mobile-action-btn:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.mobile-action-btn:active {
  transform: scale(0.92);
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.mobile-action-btn.active {
  color: var(--primary-dark);
  font-weight: 700;
  background-color: rgba(120, 172, 98, 0.14);
  border-radius: var(--radius-sm);
}

.mobile-action-btn.active i {
  color: var(--primary-dark);
  transform: scale(1.08);
}

.mobile-action-btn.active span {
  color: var(--primary-dark);
  font-weight: 700;
}

.mobile-action-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 0 0 3px 3px;
}

/* 電話預約按鈕：移除常駐底色，保持平時透明乾淨，不干擾頁面停駐狀態辨識 */
.mobile-action-btn.btn-call-highlight {
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  padding: 4px 2px;
  border-radius: var(--radius-sm);
}

.mobile-action-btn.btn-call-highlight i {
  color: var(--primary-color);
}

.mobile-action-btn.btn-call-highlight span {
  color: var(--text-muted);
}

.mobile-action-btn.btn-call-highlight:hover {
  color: var(--primary-color);
  opacity: 1;
}

.mobile-action-btn.btn-call-highlight:hover span {
  color: var(--primary-color);
}

.mobile-action-btn.btn-call-highlight:active {
  transform: scale(0.92);
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

/* 抽屜選單底部邊距強化 */
.offcanvas-body {
  padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px));
}

/* 響應式斷點 (iPad 平板與手機版 - 維持 4:6 比例) */
@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .sidebar-sticky-wrap {
    display: none;
  }
  .main-header {
    padding: 6px 0;
  }
  .main-header .container-xxl,
  .header-banner-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* 外框高度由圖片比例決定，避免固定高度的子元素蓋住底框。 */
  .header-banner-grid {
    min-height: 0;
    height: auto;
  }
  .header-bg-col,
  .header-logo-col {
    min-height: 0;
  }
  .header-logo-col {
    flex: 0 0 40% !important;
    width: 40% !important;
    max-width: 40% !important;
    padding: 6px 12px;
  }
  .header-bg-col {
    flex: 0 0 60% !important;
    width: 60% !important;
    max-width: 60% !important;
  }
  .clinic-logo-link {
    height: auto;
  }
  .header-logo-img {
    height: auto;
    max-height: none;
  }
  .header-bg-img {
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }
  .mobile-menu-toggle-btn {
    display: inline-flex !important;
    top: 6px;
    right: 6px;
    transform: none;
  }
  .custom-main-container {
    margin-top: 14px;
    margin-bottom: 24px;
    padding: 0 12px;
  }
  .main-content-card {
    padding: 16px 14px;
  }
  .mobile-bottom-bar {
    display: block;
  }
  .btn-scroll-top {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  /* 當 Offcanvas 側欄或彈窗展開時隱藏，避免重疊 */
  .offcanvas.show ~ .mobile-bottom-bar,
  body.modal-open .mobile-bottom-bar {
    display: none !important;
  }
}

@media (max-width: 575.98px) {
  .header-logo-col {
    padding: 4px 8px;
  }
  .mobile-menu-toggle-btn span {
    display: none; /* 超小螢幕僅顯示精緻漢堡圖示 */
  }
  .mobile-menu-toggle-btn {
    padding: 4px 7px;
    right: 6px;
  }
  .mobile-menu-toggle-btn i {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   衛教專欄 (心理衛教 / 醫師衛教) - 列表與文章頁樣式
   ========================================================================== */
.breadcrumb-custom {
  background: transparent;
  padding: 0;
  margin-bottom: 20px;
  font-size: 0.88rem;
}

.breadcrumb-custom .breadcrumb-item a {
  color: var(--primary-dark);
  font-weight: 500;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: var(--text-muted);
}

.article-card-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.article-card-item.article-card-with-cover {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 24px;
  align-items: start;
}

.article-card-cover {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.article-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 12px;
  color: var(--primary-dark);
  text-align: center;
  font-size: 0.85rem;
}

.article-card-cover-placeholder i {
  font-size: 2rem;
}

.article-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-card-with-cover .article-card-footer {
  flex-wrap: wrap;
  gap: 12px;
}

.article-card-with-cover .btn-read-article {
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .article-card-item.article-card-with-cover {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px !important;
  }
}

.article-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.article-category-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid var(--primary-subtle);
}

.article-date-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.article-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.45;
  transition: var(--transition-fast);
}

.article-card-item:hover .article-card-title {
  color: var(--primary-dark);
}

.article-card-summary {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-bottom: 16px;
  flex-grow: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  font-size: 0.88rem;
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary-dark);
}

.btn-read-article {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary-subtle);
  transition: var(--transition-fast);
}

.btn-read-article:hover {
  background: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
}

/* 頁碼導覽 (Pagination) */
.custom-pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 10px;
}

.custom-pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
  align-items: center;
}

.custom-pagination .page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
}

.custom-pagination .page-item .page-link:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: var(--primary-color);
}

.custom-pagination .page-item.active .page-link {
  background: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(120, 172, 98, 0.35);
}

.custom-pagination .page-item.disabled .page-link {
  color: var(--text-light);
  pointer-events: none;
  background: var(--bg-subtle);
  border-color: var(--border-color);
}

/* 衛教內容頁 (Article Detail Page) */
.article-detail-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.article-detail-header {
  border-bottom: 2px solid var(--primary-subtle);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.article-detail-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.38;
  margin-bottom: 14px;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.article-detail-cover {
  margin: 0;
}

.article-detail-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.article-detail-body {
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--text-main);
}

.article-detail-body p {
  margin-bottom: 20px;
}

.article-detail-body h4 {
  font-size: 1.25rem;
  color: var(--primary-dark);
  margin-top: 28px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
}

.article-highlight-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 24px 0;
}

.article-author-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.article-author-card img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.article-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}
