/* ==========================================================================
   TASID Flagship Medical Portal - Enterprise Standard CSS Architecture
   社團法人台灣腸道醫學會 旗艦入口網標準化樣式架構庫
   規範：全面採用語意化 Class 與專業元件庫（Button, Form, Badge, Card, Modal），
         嚴格落實視圖零行內 style (Zero Inline Styles)
   ========================================================================== */

/* ==========================================================================
   1. 設計代碼與變數系統 (Design Tokens & CSS Variables)
   ========================================================================== */
:root {
  /* 品牌核心色彩 (Brand Palette) */
  --tasid-teal: #0a7e8c;
  --tasid-teal-hover: #086b77;
  --tasid-teal-dark: #004663;
  --tasid-teal-deep: #003049;
  --tasid-teal-light: #e6f7f8;
  --tasid-teal-mid: #5cb8d5;

  --tasid-navy: #1a5276;
  --tasid-navy-hover: #13405d;
  --tasid-navy-dark: #0f2b3c;
  --tasid-navy-deep: #091924;

  --tasid-amber: #f0a030;
  --tasid-amber-hover: #d97706;
  --tasid-amber-dark: #b45309;
  --tasid-amber-light: #fef7e6;

  --tasid-coral: #e07a5f;
  --tasid-coral-hover: #c95f44;
  --tasid-coral-light: #fdf2ef;

  --tasid-success: #10b981;
  --tasid-danger: #ef4444;
  --tasid-info: #0284c7;

  /* 中性色與介面背景 (Neutrals & Surfaces) */
  --portal-bg: #f4f8fb;
  --portal-card-bg: #ffffff;
  --portal-card-border: #e9eef2;
  --portal-border-subtle: #f1f5f9;
  --text-main: #1e293b;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* 陰影與圓角規範 (Elevations & Radii) */
  --shadow-xs: 0 1px 3px rgba(10, 126, 140, 0.05);
  --shadow-sm: 0 2px 6px rgba(10, 126, 140, 0.06);
  --shadow-md: 0 6px 18px rgba(10, 126, 140, 0.08), 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 12px 32px rgba(10, 126, 140, 0.12), 0 4px 8px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 16px 36px rgba(10, 126, 140, 0.16), 0 6px 12px rgba(0, 0, 0, 0.04);
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;

  /* 動畫轉場 (Transitions) */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. 全域基礎重設與排版 (Base Reset & Typography)
   ========================================================================== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--portal-bg);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.portal-container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 4rem;
  padding-right: 4rem;
}

.font-serif {
  font-family: 'DM Serif Display', Georgia, serif;
}

/* 實用文字與色彩類 (Utility Colors) */
.text-amber { color: var(--tasid-amber) !important; }
.text-teal { color: var(--tasid-teal) !important; }
.text-navy { color: var(--tasid-navy) !important; }
.text-coral { color: var(--tasid-coral) !important; }
.bg-amber-light { background-color: var(--tasid-amber-light) !important; }
.bg-teal-light { background-color: var(--tasid-teal-light) !important; }
.bg-coral-light { background-color: var(--tasid-coral-light) !important; }

.hover-teal {
  transition: var(--transition-fast);
}
.hover-teal:hover {
  color: var(--tasid-teal) !important;
}

/* ==========================================================================
   3. 全域 UI 核心元件庫：按鈕系統 (Global Button Component System)
   ========================================================================== */
.btn {
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
}

.btn:focus,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.25);
}

/* --- 實心主要按鈕 (Solid Buttons) --- */

/* btn-primary (品牌藍綠 TASID Teal) */
.btn-primary {
  background: var(--tasid-teal);
  border-color: var(--tasid-teal);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(10, 126, 140, 0.25);
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.btn-primary:focus {
  background: var(--tasid-teal-hover) !important;
  border-color: var(--tasid-teal-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(10, 126, 140, 0.35) !important;
  transform: translateY(-1px);
}

/* btn-secondary (深海軍藍 TASID Navy) */
.btn-secondary {
  background: var(--tasid-navy);
  border-color: var(--tasid-navy);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(26, 82, 118, 0.25);
}
.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary.active,
.btn-secondary:focus {
  background: var(--tasid-navy-hover) !important;
  border-color: var(--tasid-navy-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.35) !important;
  transform: translateY(-1px);
}

/* btn-warning (琥珀金 TASID Amber) */
.btn-warning {
  background: var(--tasid-amber);
  border-color: var(--tasid-amber);
  color: var(--text-heading);
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(240, 160, 48, 0.25);
}
.btn-warning:hover,
.btn-warning:active,
.btn-warning.active,
.btn-warning:focus {
  background: var(--tasid-amber-hover) !important;
  border-color: var(--tasid-amber-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(240, 160, 48, 0.35) !important;
  transform: translateY(-1px);
}

/* btn-danger (珊瑚紅 TASID Coral) */
.btn-danger {
  background: var(--tasid-coral);
  border-color: var(--tasid-coral);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(224, 122, 95, 0.25);
}
.btn-danger:hover,
.btn-danger:active,
.btn-danger.active,
.btn-danger:focus {
  background: var(--tasid-coral-hover) !important;
  border-color: var(--tasid-coral-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.35) !important;
  transform: translateY(-1px);
}

/* btn-success */
.btn-success {
  background: var(--tasid-success);
  border-color: var(--tasid-success);
  color: #ffffff;
}
.btn-success:hover,
.btn-success:active,
.btn-success:focus {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

/* btn-dark */
.btn-dark {
  background: var(--tasid-navy-dark);
  border-color: var(--tasid-navy-dark);
  color: #ffffff;
}
.btn-dark:hover,
.btn-dark:active,
.btn-dark:focus {
  background: var(--tasid-navy-deep) !important;
  border-color: var(--tasid-navy-deep) !important;
  color: #ffffff !important;
}

/* btn-light */
.btn-light {
  background: #f8fafc;
  border-color: var(--portal-card-border);
  color: var(--text-main);
}
.btn-light:hover,
.btn-light:active,
.btn-light:focus {
  background: var(--tasid-teal-light) !important;
  border-color: var(--tasid-teal-mid) !important;
  color: var(--tasid-teal) !important;
}

/* --- 外框按鈕 (Outline Buttons) --- */
.btn-outline-primary {
  border-color: var(--tasid-teal);
  color: var(--tasid-teal);
  background: transparent;
}
.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary:focus {
  background: var(--tasid-teal) !important;
  border-color: var(--tasid-teal) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(10, 126, 140, 0.25);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  border-color: #cbdbe6;
  color: var(--text-muted);
  background: transparent;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:active,
.btn-outline-secondary.active,
.btn-outline-secondary:focus {
  background: #e2ecf2 !important;
  border-color: #b0c9d9 !important;
  color: var(--text-heading) !important;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  background: transparent;
}
.btn-outline-light:hover,
.btn-outline-light:active,
.btn-outline-light:focus {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: var(--tasid-navy-dark) !important;
}

.btn-outline-warning {
  border-color: var(--tasid-amber);
  color: var(--tasid-amber-dark);
  background: transparent;
}
.btn-outline-warning:hover,
.btn-outline-warning:active,
.btn-outline-warning:focus {
  background: var(--tasid-amber) !important;
  border-color: var(--tasid-amber) !important;
  color: #ffffff !important;
}

/* --- 尺寸與形狀工具 (Button Sizes & Modifiers) --- */
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

/* ==========================================================================
   4. 全域 UI 核心元件庫：表單與輸入控制項 (Form Controls)
   ========================================================================== */
.form-control,
.portal-form-control {
  background-color: #f8fafc;
  border: 1px solid #dbe5ec;
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-main);
  transition: var(--transition-fast);
}

/* 全域 Placeholder 柔和清晰提示色 (明確區隔已填寫深色字與提示字) */
::placeholder,
.form-control::placeholder,
.portal-form-control::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

::-webkit-input-placeholder {
  color: #94a3b8 !important;
}
::-moz-placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}
:-ms-input-placeholder {
  color: #94a3b8 !important;
}

.form-control:focus,
.portal-form-control:focus {
  background-color: #ffffff;
  border-color: var(--tasid-teal);
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.15);
  outline: none;
}

.form-select {
  background-color: #f8fafc;
  border: 1px solid #dbe5ec;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  padding: 0.6rem 2.25rem 0.6rem 0.9rem;
}

.form-select:focus {
  border-color: var(--tasid-teal);
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.15);
}

.input-group-text {
  background-color: #f1f5f9;
  border: 1px solid #dbe5ec;
  color: var(--text-muted);
}

.form-check-input:checked {
  background-color: var(--tasid-teal);
  border-color: var(--tasid-teal);
}

/* ==========================================================================
   4.1 全域 Select2 下拉選單元件庫 (完美對齊 .form-control / .form-select)
   ========================================================================== */
.select2-container {
  width: 100% !important;
  display: block !important;
}

.select2-container .select2-selection--single {
  min-height: calc(1.5em + 1.2rem + 2px) !important;
  height: calc(1.5em + 1.2rem + 2px) !important;
  background-color: #f8fafc !important;
  border: 1px solid #dbe5ec !important;
  border-radius: var(--radius-md) !important;
  padding: 0.6rem 2.25rem 0.6rem 0.9rem !important;
  font-size: 0.88rem !important;
  font-family: inherit !important;
  color: var(--text-main) !important;
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  transition: var(--transition-fast) !important;
  box-sizing: border-box !important;
}

.select2-container--default .select2-selection--single:hover {
  border-color: #cbd5e1 !important;
  background-color: #f1f5f9 !important;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  background-color: #ffffff !important;
  border-color: var(--tasid-teal) !important;
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.15) !important;
  outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text-main) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  line-height: normal !important;
  font-size: 0.88rem !important;
  font-family: inherit !important;
  display: block !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  top: 0 !important;
  right: 12px !important;
  width: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  display: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow::after {
  content: '' !important;
  display: block !important;
  width: 12px !important;
  height: 12px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  transition: transform 0.2s ease !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow::after {
  transform: rotate(180deg) !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  position: absolute !important;
  right: 32px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  color: #94a3b8 !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 0 4px !important;
  transition: var(--transition-fast) !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: #ef4444 !important;
}

.select2-dropdown {
  background-color: #ffffff !important;
  border: 1px solid #dbe5ec !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
  font-size: 0.88rem !important;
  overflow: hidden !important;
  z-index: 1055 !important;
  margin-top: 4px !important;
}

.select2-search--dropdown {
  padding: 8px 10px !important;
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.select2-search--dropdown .select2-search__field {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 12px !important;
  font-size: 0.88rem !important;
  color: var(--text-main) !important;
  outline: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: var(--transition-fast) !important;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: var(--tasid-teal) !important;
  box-shadow: 0 0 0 2px rgba(10, 126, 140, 0.15) !important;
}

.select2-results__options {
  max-height: 240px !important;
  padding: 4px 0 !important;
}

.select2-results__option {
  padding: 8px 14px !important;
  font-size: 0.88rem !important;
  color: var(--text-main) !important;
  transition: var(--transition-fast) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: rgba(10, 126, 140, 0.08) !important;
  color: var(--tasid-teal) !important;
  font-weight: 500 !important;
}

.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--default .select2-results__option--selected {
  background-color: var(--tasid-teal) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   5. 全域 UI 核心元件庫：標籤與徽章系統 (Badges & Tags)
   ========================================================================== */
.badge {
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.35em 0.65em;
  border-radius: var(--radius-xs);
}

.badge.bg-primary {
  background-color: var(--tasid-teal) !important;
  color: #ffffff;
}

.badge.bg-secondary {
  background-color: var(--tasid-navy) !important;
  color: #ffffff;
}

.badge.bg-warning {
  background-color: var(--tasid-amber) !important;
  color: #192a38;
}

.badge.bg-danger {
  background-color: var(--tasid-coral) !important;
  color: #ffffff;
}

/* 輕量柔和標籤 (Label Badges) */
.badge-label-primary {
  background-color: var(--tasid-teal-light);
  color: var(--tasid-teal);
}

.badge-label-warning {
  background-color: var(--tasid-amber-light);
  color: var(--tasid-amber-dark);
}

.badge-label-danger {
  background-color: var(--tasid-coral-light);
  color: var(--tasid-coral);
}

/* ==========================================================================
   6. 頂部狀態與實用工具列 (Top Utility Bar)
   ========================================================================== */
.top-utility-bar {
  background: linear-gradient(90deg, var(--tasid-navy-dark) 0%, #163e54 100%);
  color: #cbdbe6;
  font-size: 0.78rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-utility-bar a {
  color: #cbdbe6;
  text-decoration: none;
  transition: var(--transition-fast);
}

.top-utility-bar a:hover {
  color: var(--tasid-amber);
}

.utility-font-ctrl {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
}

.utility-login-link {
  color: var(--tasid-amber) !important;
  font-weight: 700;
}

/* ==========================================================================
   7. 品牌標頭區 (Main Brand Header)
   ========================================================================== */
.main-brand-header {
  background: #ffffff;
  border-bottom: 1px solid var(--portal-card-border);
  padding: 14px 0;
}

.brand-logo-img {
  height: 64px;
  max-height: 72px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.header-contact-chip {
  background: #f8fafc;
  border: 1px solid var(--portal-card-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-fast);
}

.header-contact-chip:hover {
  background: var(--tasid-teal-light);
  border-color: var(--tasid-teal-mid);
}

.contact-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tasid-teal-light);
  color: var(--tasid-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.contact-chip-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-heading);
}

.contact-chip-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==========================================================================
   8. 浮動毛玻璃主導覽列 (Sticky Glassmorphic Mega Navbar)
   ========================================================================== */
.sticky-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #004663 0%, #0a7e8c 100%);
  box-shadow: 0 4px 20px rgba(0, 70, 99, 0.18);
  backdrop-filter: blur(12px);
}

.main-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.nav-menu-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu-item {
  position: relative;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 13px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.91rem;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-menu-item:hover > .nav-menu-link,
.nav-menu-link:hover,
.nav-menu-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-menu-link i.dropdown-arrow {
  font-size: 0.65rem;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.nav-menu-item:hover .nav-menu-link i.dropdown-arrow {
  transform: rotate(180deg);
}

/* 下拉選單 (純文字動態分類架構) */
.mega-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #ffffff;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--portal-card-border);
  list-style: none;
  padding: 6px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  z-index: 1010;
}

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

.mega-dropdown-item {
  margin: 0;
  padding: 0;
}

.mega-dropdown-item a {
  display: block;
  padding: 9px 18px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.mega-dropdown-item a:hover,
.mega-dropdown-item a.active {
  background: var(--tasid-teal-light);
  color: var(--tasid-teal);
  padding-left: 22px;
  font-weight: 700;
}

.portal-mobile-drawer {
  max-width: 320px;
  width: 85vw;
  background-color: #ffffff !important;
  color: var(--text-main);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-drawer-logo {
  height: 42px;
  max-height: 46px;
  width: auto;
  object-fit: contain;
}

/* 行動版手風琴與雙層選單 (Mobile Accordion 2-Level Nav) */
.mobile-accordion-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav-item {
  border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  color: var(--text-heading);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--tasid-teal-light);
  color: var(--tasid-teal-dark);
}

.mobile-nav-accordion-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-accordion-btn {
  background: transparent;
  box-shadow: none !important;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.mobile-accordion-btn:not(.collapsed) {
  background: var(--tasid-teal-light);
  color: var(--tasid-teal-dark);
}

.mobile-accordion-btn::after {
  background-size: 0.85rem;
  transition: transform 0.25s ease;
}

.mobile-subnav-list {
  list-style: none;
  padding: 4px 0 8px 18px;
  margin: 0;
  background: #f8fafc;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.mobile-subnav-list li a {
  display: block;
  padding: 8px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}

.mobile-subnav-list li a:hover,
.mobile-subnav-list li a.active {
  color: var(--tasid-teal);
  background: rgba(10, 126, 140, 0.08);
  padding-left: 18px;
  font-weight: 700;
}

/* ==========================================================================
   9. 旗艦 Hero 輪播舞台 (Hero Stage)
   ========================================================================== */
.hero-stage-section {
  position: relative;
  background: #0d2838;
  overflow: hidden;
}

.hero-swiper {
  width: 100%;
  height: 420px;
  position: relative;
}

.hero-swiper .swiper-slide {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.9);
  transition: transform 6s ease;
}

.hero-swiper .swiper-slide-active .hero-slide-bg img {
  transform: scale(1.05);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 43, 60, 0.95) 0%, rgba(10, 126, 140, 0.8) 55%, rgba(15, 43, 60, 0.35) 100%);
  display: flex;
  align-items: center;
  z-index: 2;
}

.hero-gradient-overlay .portal-container {
  padding: 0 4.5rem;
}

.hero-caption-content {
  max-width: 780px;
  color: #ffffff;
}


.hero-title-main {
  font-family: var(--font-sans);
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.32;
  margin-bottom: 14px;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 680px;
}

.hero-cta-btn {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.6rem;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(240, 160, 48, 0.35);
  transition: all 0.25s ease;
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(240, 160, 48, 0.45);
}

.poly-shape {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.poly-hex-1 {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, rgba(92, 184, 213, 0.25) 0%, rgba(10, 126, 140, 0.1) 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  top: 15%;
  right: 12%;
  animation: floatSlow 6s ease-in-out infinite alternate;
}

.poly-tri-1 {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, rgba(240, 160, 48, 0.22) 0%, rgba(224, 122, 95, 0.1) 100%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  bottom: 20%;
  right: 22%;
  animation: floatSlow 8s ease-in-out infinite alternate-reverse;
}

.poly-diamond-1 {
  width: 70px;
  height: 70px;
  background: rgba(10, 126, 140, 0.3);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  bottom: 12%;
  right: 6%;
  transform: rotate(18deg);
}

@keyframes floatSlow {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-15px) rotate(6deg); }
}

/* Swiper Pagination & Navigation Controls */
.hero-swiper-pagination {
  position: absolute;
  bottom: 50px !important;
  left: 0;
  width: 100% !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 25;
}

.hero-swiper-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  opacity: 1;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 !important;
  cursor: pointer;
}

.hero-swiper-pagination .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.15);
}

.hero-swiper-pagination .swiper-pagination-bullet-active {
  width: 32px;
  border-radius: 12px;
  background: var(--tasid-amber) !important;
  border-color: var(--tasid-amber) !important;
  box-shadow: 0 0 12px rgba(240, 160, 48, 0.7);
}

.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  z-index: 25;
  transition: all 0.25s ease;
  opacity: 0.85;
}

.hero-stage-section:hover .hero-nav-btn {
  opacity: 1;
}

.hero-swiper-button-prev {
  left: 20px;
}

.hero-swiper-button-next {
  right: 20px;
}

.hero-nav-btn:hover {
  background: var(--tasid-teal);
  border-color: var(--tasid-teal);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 14px rgba(10, 126, 140, 0.4);
}

/* ==========================================================================
   10. 焦點共識指引懸浮條 (Floating Consensus Banner)
   ========================================================================== */
.consensus-floating-bar {
  background: linear-gradient(90deg, #ffffff 0%, var(--tasid-teal-light) 100%);
  border: 1px solid var(--portal-card-border);
  border-left: 5px solid var(--tasid-teal);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  box-shadow: var(--shadow-md);
  margin-top: -30px;
  position: relative;
  z-index: 20;
  transition: var(--transition-smooth);
}

.consensus-floating-bar:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.consensus-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tasid-teal);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 4px;
}

.consensus-badge {
  background: var(--tasid-teal);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}


.consensus-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--tasid-navy-dark);
  margin-bottom: 2px;
}

.consensus-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   11. 核心資訊中樞通用卡片 (Portal Hub Cards)
   ========================================================================== */
.portal-card {
  background: var(--portal-card-bg);
  border: 1px solid #edf2f7;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(10, 46, 68, 0.04);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.portal-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--portal-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-card-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-card-title i {
  color: var(--tasid-teal);
}

/* ==========================================================================
   12. ITASID 2026 國際年會精緻橫幅與常用快捷 (Congress Banner & Quick Services)
   ========================================================================== */
.itasid-congress-banner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ffffff 0%, #edf7fb 100%);
  border: 1.5px solid #bee0ec;
  border-radius: var(--radius-lg);
  color: var(--text-main);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(10, 126, 140, 0.08);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.itasid-congress-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--tasid-teal) 0%, var(--tasid-navy) 100%);
}

.itasid-congress-banner:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--tasid-teal-mid);
  color: var(--text-main);
}

.congress-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.congress-banner-logo {
  height: 38px;
  max-width: 140px;
  display: flex;
  align-items: center;
}

.congress-banner-logo img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(10, 126, 140, 0.1));
  transition: transform 0.3s ease;
}

.itasid-congress-banner:hover .congress-banner-logo img {
  transform: scale(1.05);
}

.congress-banner-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.congress-banner-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--tasid-navy-dark);
  line-height: 1.35;
  margin-bottom: 0;
}

.congress-banner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed #d1e5ed;
}

.congress-banner-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tasid-teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.itasid-congress-banner:hover .congress-banner-link {
  color: var(--tasid-teal-dark);
  transform: translateX(3px);
}

/* 常用會員快捷服務磚 (2x2 Matrix) */
.quick-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-service-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: #ffffff;
  border: 1px solid var(--portal-card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-smooth);
  text-align: center;
}

.quick-service-tile:hover {
  background: var(--tasid-teal-light);
  border-color: var(--tasid-teal-mid);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  color: var(--tasid-teal-dark);
}

.tile-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.quick-service-tile:hover .tile-icon-box {
  transform: scale(1.1);
}

.tile-label {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.member-action-footer {
  background: #f8fafc;
  border-top: 1px solid var(--portal-border-subtle);
  padding: 10px 16px;
}

/* ==========================================================================
   13. 互動式學術月曆 (Interactive Mini Calendar Widget)
   ========================================================================== */
.calendar-widget-wrapper {
  background: #ffffff;
}

.cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--tasid-navy-dark) 0%, var(--tasid-navy) 100%);
  color: #ffffff;
}

.cal-month-title {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0;
}

.cal-table {
  width: 100%;
  text-align: center;
  font-size: 0.76rem;
  border-collapse: collapse;
}

.cal-table th {
  padding: 8px 4px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.7rem;
  border-bottom: 1px solid var(--portal-border-subtle);
}

.cal-table td {
  padding: 6px 2px;
  font-weight: 600;
  color: var(--text-main);
  position: relative;
  cursor: pointer;
  transition: var(--transition-fast);
}

.cal-table td .day-inner {
  width: 28px;
  height: 28px;
  line-height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  display: inline-block;
  transition: var(--transition-fast);
}

.cal-table td:hover .day-inner {
  background: #e2e8f0;
}

.cal-table td.is-today .day-inner {
  background: #e2e8f0;
  color: var(--text-heading);
  font-weight: 800;
}

.cal-table td.has-event .day-inner {
  background: var(--tasid-amber);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(240, 160, 48, 0.4);
}

.cal-table td.is-today.has-event .day-inner {
  background: var(--tasid-amber);
  color: #ffffff;
  box-shadow: 0 0 0 2px var(--tasid-teal);
}

.cal-table td .day-inner.ring-active {
  box-shadow: 0 0 0 1px var(--tasid-teal);
}

.cal-table td.dimmed {
  opacity: 0.3;
  cursor: default;
}

.cal-event-preview-box {
  background: var(--tasid-amber-light);
  border: 1px solid rgba(240, 160, 48, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 0.78rem;
}

.cal-preview-badge {
  font-size: 0.68rem;
}

.cal-preview-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-heading);
}



/* ==========================================================================
   16. 多標籤消息總匯與清單 (Multi-Tab News Directory & Feed)
   ========================================================================== */
.multi-tab-header,
.seamless-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--portal-border-subtle);
  padding: 0 16px;
  background: var(--portal-card-bg);
}

.portal-tab-content-area {
  padding: 8px 16px;
}

.news-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-muted);
  position: relative;
  cursor: pointer;
  transition: var(--transition-fast);
}

.news-tab-btn:hover {
  color: var(--tasid-teal);
}

.news-tab-btn.active {
  color: var(--tasid-teal-dark);
  font-weight: 800;
}

.news-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--tasid-teal);
  border-radius: 3px 3px 0 0;
}

.news-more-link {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}

.news-more-link:hover {
  color: var(--tasid-teal);
}

.news-feed-item {
  padding: 14px 10px;
  border-bottom: 1px solid var(--portal-border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.news-feed-item:last-child {
  border-bottom: none;
}

.news-feed-item:hover {
  background: rgba(10, 126, 140, 0.04);
  transform: translateX(4px);
}

/* 置頂項目高亮專屬樣式 (淡雅漸層微光，無邊條) */
.news-feed-item.is-pinned {
  background: linear-gradient(90deg, rgba(254, 242, 242, 0.65) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.news-feed-item.is-pinned:hover {
  background: linear-gradient(90deg, rgba(254, 242, 242, 0.88) 0%, rgba(254, 242, 242, 0.4) 100%);
  transform: translateX(4px);
}

.news-date-badge {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-date-badge.news-date-pinned {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 800;
}

.news-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--tasid-teal-light);
  color: var(--tasid-teal);
}

.news-tag.tag-pin {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.news-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 3px;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.news-title-text .news-pinned-icon {
  color: #dc2626;
  font-size: 0.85rem;
  margin-right: 6px;
}

.news-feed-item:hover .news-title-text {
  color: var(--tasid-teal);
}

.news-snippet-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   17. 近期學術活動行事曆 (Academic Events Spotlight)
   ========================================================================== */
.academic-event-card {
  background: #ffffff;
  border: 1px solid var(--portal-card-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.academic-event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--tasid-teal);
}

.academic-event-card.card-navy::before {
  background: var(--tasid-navy);
}

.academic-event-card.card-amber::before {
  background: var(--tasid-amber);
}

.academic-event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.event-date-block {
  display: inline-flex;
  flex-direction: column;
  color: #ffffff;
  background: linear-gradient(135deg, #0a7e8c 0%, #065f6d 100%);
  box-shadow: 0 3px 8px rgba(10, 126, 140, 0.25);
  border-radius: 8px;
  padding: 5px 12px;
  line-height: 1;
}

/* 依卡片序號呈現品牌同色系 (沉穩海藍 → 品牌深青 → 活力青綠) 漸進漸層循環 */
.academic-event-col:nth-child(3n+1) .event-date-block,
.col-12:nth-child(3n+1) .event-date-block {
  background: linear-gradient(135deg, #086370 0%, #004663 100%);
  box-shadow: 0 3px 8px rgba(0, 70, 99, 0.28);
}

.academic-event-col:nth-child(3n+2) .event-date-block,
.col-12:nth-child(3n+2) .event-date-block {
  background: linear-gradient(135deg, #0a7e8c 0%, #065f6d 100%);
  box-shadow: 0 3px 8px rgba(10, 126, 140, 0.25);
}

.academic-event-col:nth-child(3n) .event-date-block,
.col-12:nth-child(3n) .event-date-block {
  background: linear-gradient(135deg, #0d9488 0%, #0a7e8c 100%);
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.25);
}

.event-date-block .event-year {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.85;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.event-date-block .event-date-num {
  display: flex;
  align-items: baseline;
  line-height: 1;
}

.event-date-block .event-date-num .month {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.event-date-block .event-date-num .sep {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 2px 0 3px;
  opacity: 0.75;
}

.event-date-block .event-date-num .day {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

.event-scope-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: 2px;
  margin-right: 4px;
  background: #e6f4f6;
  color: #086370;
  border: 1px solid rgba(8, 99, 112, 0.2);
  line-height: 1.3;
}

.event-scope-badge.scope-intl {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid rgba(3, 105, 161, 0.22);
}

.event-tag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  background: var(--tasid-teal-light);
  color: var(--tasid-teal);
}

.event-card-body {
  flex-grow: 1;
}

.event-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 10px;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-meta-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta-item i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.event-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}


/* ==========================================================================
   19. 旗艦頁尾 (Flagship Footer)
   ========================================================================== */
.portal-main-footer {
  background: linear-gradient(180deg, #112836 0%, #091924 100%);
  color: #9ab4c7;
  font-size: 0.84rem;
  padding-top: 48px;
  padding-bottom: 24px;
  border-top: 4px solid var(--tasid-teal);
}

.footer-brand-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-badge-logo {
  height: 56px;
  width: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}

.footer-badge-logo:hover {
  transform: scale(1.08);
}

.footer-brand-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.footer-brand-en {
  font-size: 0.75rem;
  color: #728fa3;
  margin-bottom: 16px;
}

.footer-desc-text {
  font-size: 0.82rem;
  line-height: 1.7;
  color: #8faec4;
}

.footer-heading {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--tasid-amber);
}

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

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

.footer-links-list a {
  color: #9ab4c7;
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links-list a:hover {
  color: var(--tasid-amber);
  transform: translateX(4px);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.82rem;
  color: #9ab4c7;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-contact-item i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-item span {
  flex: 1;
  line-height: 1.5;
}

.footer-analytics-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 6px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  white-space: nowrap;
  max-width: 100%;
}

.footer-analytics-divider {
  width: 1px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 36px;
  padding-top: 24px;
  font-size: 0.76rem;
  color: #637f93;
}

.footer-copyright-text {
  line-height: 1.6;
}

/* ==========================================================================
   20. 互動彈窗 (Modals)
   ========================================================================== */
.modal-header-navy {
  background: linear-gradient(135deg, var(--tasid-navy) 0%, var(--tasid-navy-dark) 100%);
  color: #ffffff;
  padding: 24px;
  position: relative;
}

.modal-header-darkteal {
  background: linear-gradient(135deg, var(--tasid-teal-dark) 0%, var(--tasid-teal) 100%);
  color: #ffffff;
  padding: 24px;
  position: relative;
}

.modal-guideline-box {
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--portal-card-border);
  padding: 16px;
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ==========================================================================
   21. 學會活動翦影相片流 (Photo Gallery Swiper Carousel & Lightbox)
   ========================================================================== */
#gallery {
  position: relative;
}

.gallery-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--portal-card-border);
  background: #ffffff;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.gallery-nav-btn:hover {
  background: var(--tasid-teal);
  border-color: var(--tasid-teal);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(10, 126, 140, 0.25);
}

.gallery-nav-btn.swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Swiper 容器與卡片 */
.gallery-swiper {
  width: 100%;
  padding-top: 4px;
  padding-bottom: 8px;
  cursor: grab;
}

.gallery-swiper:active {
  cursor: grabbing;
}

.gallery-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.gallery-photo-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--portal-card-border);
  box-shadow: 0 3px 10px rgba(10, 46, 68, 0.08);
  background: var(--tasid-navy-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  user-select: none;
}

.gallery-photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(10, 46, 68, 0.16);
  border-color: var(--tasid-teal-mid);
}

.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}

.gallery-photo-card:hover .gallery-card-img {
  transform: scale(1.08);
}

.gallery-card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 14px 12px;
  background: linear-gradient(180deg, rgba(10, 46, 68, 0) 0%, rgba(10, 46, 68, 0.75) 40%, rgba(10, 46, 68, 0.98) 100%);
  color: #ffffff;
  z-index: 2;
  transition: background 0.3s ease;
}

.gallery-photo-card:hover .gallery-card-caption {
  background: linear-gradient(180deg, rgba(10, 46, 68, 0) 0%, rgba(10, 126, 140, 0.85) 50%, rgba(10, 46, 68, 0.98) 100%);
}

.gallery-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
  color: #ffffff;
  margin-bottom: 0;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}


/* --- Lightbox 彈窗樣式 (Gallery Lightbox Styles) --- */
.lightbox-modal-header {
  background: rgba(15, 23, 42, 0.95);
}

.lightbox-modal-body {
  background: #020617;
  min-height: 420px;
  max-height: 72vh;
  overflow: hidden;
}

.lightbox-img-wrapper {
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-main-img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s ease;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lightbox-nav-btn:hover {
  background: var(--tasid-teal);
  border-color: var(--tasid-teal);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-btn.btn-prev {
  left: 18px;
}

.lightbox-nav-btn.btn-next {
  right: 18px;
}

.lightbox-modal-footer {
  background: rgba(15, 23, 42, 0.98);
}

/* ==========================================================================
   22. 響應式佈局適配 (Responsive Breakpoints)
   ========================================================================== */

/* --- 平板與中小型螢幕適配 (Tablets & Mobile < 992px) --- */
@media (max-width: 991.98px) {
  .portal-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* 品牌標頭區 (平板版置頂) */
  .main-brand-header {
    position: sticky;
    top: 0;
    z-index: 1005;
    padding: 8px 0;
    background: #ffffff;
  }
  .brand-logo-img {
    height: 44px;
    max-height: 48px;
  }

  /* 導覽列與選單 (平板版緊隨 Logo 下方置頂) */
  .sticky-nav-wrapper {
    position: sticky;
    top: 61px;
    z-index: 1000;
    box-shadow: 0 4px 18px rgba(0, 70, 99, 0.15);
    padding: 0;
  }
  .main-navbar {
    min-height: 42px;
  }

  /* Hero 輪播舞台 */
  .hero-swiper {
    height: 360px;
  }
  .hero-gradient-overlay {
    background: linear-gradient(180deg, rgba(15, 43, 60, 0.92) 0%, rgba(10, 126, 140, 0.85) 60%, rgba(15, 43, 60, 0.95) 100%);
  }
  .hero-gradient-overlay .portal-container {
    padding: 0 3.25rem;
  }
  .hero-caption-content {
    max-width: 100%;
  }
  .hero-title-main {
    font-size: 1.45rem;
    line-height: 1.35;
    margin-bottom: 10px;
    font-weight: 800;
  }
  .hero-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-cta-btn {
    font-size: 0.88rem;
    padding: 7px 18px;
  }
  .poly-shape {
    display: none;
  }
  .hero-swiper-pagination {
    bottom: 16px !important;
  }
  .hero-nav-btn {
    display: flex;
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.6);
    opacity: 0.9;
  }
  .hero-swiper-button-prev {
    left: 12px;
  }
  .hero-swiper-button-next {
    right: 12px;
  }

  /* 焦點共識懸浮條 */
  .consensus-floating-bar {
    margin-top: 16px;
    margin-bottom: 10px;
    padding: 16px 20px;
  }
  .consensus-title {
    font-size: 1.02rem;
    line-height: 1.4;
  }
  .consensus-subtitle {
    font-size: 0.82rem;
    line-height: 1.5;
  }
}

/* --- 手機版深層適配 (Mobile Screens < 768px) --- */
@media (max-width: 767.98px) {
  .portal-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* 品牌標頭區 (手機版置頂調校) */
  .main-brand-header {
    padding: 6px 0;
  }
  .brand-logo-img {
    height: 38px;
    max-height: 40px;
  }
  .sticky-nav-wrapper {
    top: 51px;
  }
  .main-navbar {
    min-height: 38px;
  }

  /* Hero 輪播舞台 */
  .hero-swiper {
    height: 330px;
  }
  .hero-gradient-overlay .portal-container {
    padding: 0 2.75rem;
  }
  .hero-title-main {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: 8px;
    font-weight: 800;
  }
  .hero-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-cta-btn {
    font-size: 0.82rem;
    padding: 6px 16px;
  }
  .hero-swiper-pagination {
    bottom: 12px !important;
  }
  .hero-swiper-pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
  }
  .hero-swiper-pagination .swiper-pagination-bullet-active {
    width: 20px;
    height: 7px;
  }
  .hero-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0.85;
  }
  .hero-swiper-button-prev {
    left: 8px;
  }
  .hero-swiper-button-next {
    right: 8px;
  }

  /* 焦點共識條在手機上的全寬卡片化 */
  .consensus-floating-bar {
    margin-top: 14px;
    margin-bottom: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
  }
  .consensus-icon-circle {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    margin-top: 2px;
  }
  .consensus-title {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 4px;
  }
  .consensus-subtitle {
    font-size: 0.78rem;
    line-height: 1.45;
  }
  .consensus-floating-bar .btn {
    width: 100%;
    text-align: center;
    margin-top: 6px;
    padding: 7px 16px;
    font-size: 0.84rem;
  }

  /* ITASID 年會橫幅 */
  .itasid-congress-banner {
    padding: 14px 14px;
    gap: 10px;
    border-radius: var(--radius-md);
  }
  .congress-banner-logo {
    height: 32px;
    max-width: 120px;
  }
  .congress-banner-title {
    font-size: 0.92rem;
  }
  .congress-banner-link {
    font-size: 0.76rem;
  }

  /* 月曆小工具 */
  .cal-month-header {
    padding: 10px 14px;
  }
  .cal-month-title {
    font-size: 0.84rem;
  }
  .cal-table th {
    padding: 6px 2px;
    font-size: 0.68rem;
  }
  .cal-table td {
    padding: 4px 1px;
    font-size: 0.74rem;
  }
  .cal-table td .day-inner {
    width: 26px;
    height: 26px;
    line-height: 26px;
    font-size: 0.74rem;
  }
  .cal-event-preview-box {
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.75rem;
  }

  /* 消息總匯 Tab 與清單 */
  .multi-tab-header {
    padding: 0 8px;
  }
  .news-tab-btn {
    padding: 10px 10px;
    font-size: 0.85rem;
  }
  .portal-tab-content-area {
    padding: 6px 8px;
  }
  .news-feed-item {
    padding: 10px 8px;
    gap: 8px;
  }
  .news-date-badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    min-width: 74px;
    text-align: center;
  }
  .news-title-text {
    font-size: 0.88rem;
    line-height: 1.4;
    margin-bottom: 2px;
  }
  .news-snippet-text {
    font-size: 0.76rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 近期學術活動卡片 */
  .portal-card-header {
    padding: 12px 14px;
  }
  .portal-card-title {
    font-size: 0.95rem;
  }
  .event-filter-btn {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
  .academic-event-card {
    padding: 14px 16px;
  }
  .event-card-header {
    margin-bottom: 10px;
  }
  .event-title {
    font-size: 0.95rem;
    min-height: auto;
    margin-bottom: 8px;
  }
  .event-meta-info {
    font-size: 0.78rem;
    gap: 5px;
    margin-bottom: 12px;
  }
  .event-card-footer {
    padding-top: 10px;
  }
  .event-card-footer .btn {
    font-size: 0.82rem;
    padding: 6px 14px;
  }

  /* 相片翦影 */
  .gallery-card-caption {
    padding: 20px 8px 6px;
  }
  .gallery-card-title {
    font-size: 0.76rem;
    line-height: 1.35;
  }


  /* 頁尾 */
  .portal-main-footer {
    padding-top: 32px;
    padding-bottom: 20px;
  }
  .footer-brand-title {
    font-size: 1.05rem;
  }
  .footer-heading {
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 12px;
  }
  .footer-analytics-box {
    padding: 5px 14px;
    gap: 12px;
    font-size: 0.78rem;
  }
}

/* --- 超小螢幕特別微調 (Extra Small < 400px) --- */
@media (max-width: 399.98px) {
  .hero-swiper {
    height: 310px;
  }
  .hero-title-main {
    font-size: 1.15rem;
  }
  .news-date-badge {
    min-width: 68px;
    font-size: 0.68rem;
  }
  .event-date-block .event-date-num .month {
    font-size: 1.35rem;
  }
  .footer-analytics-box {
    padding: 5px 10px;
    gap: 8px;
    font-size: 0.72rem;
  }
  .footer-analytics-divider {
    display: block;
  }
}

/* ==========================================================================
   21. 內頁共用版型 (Inner Page Layout & Subpage Navigation)
   ========================================================================== */
.page-hero-banner {
  background: linear-gradient(135deg, #091924 0%, #004663 55%, #0a7e8c 100%);
  color: #ffffff;
  padding: 42px 0 38px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--tasid-teal);
}

.page-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(10, 126, 140, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .page-hero-banner {
    padding: 32px 0 28px;
  }
}

.page-hero-inner {
  position: relative;
  z-index: 2;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.page-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: var(--transition-fast);
}

.page-breadcrumb a:hover {
  color: var(--tasid-amber);
}

.page-breadcrumb .separator {
  color: rgba(255, 255, 255, 0.4);
}

.page-breadcrumb .current {
  color: #ffffff;
  font-weight: 600;
}

.page-title-main {
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   21. 側邊欄次級導覽 (Sidebar Sub-Navigation - Pure Typography & Wave Spine)
   ========================================================================== */
.subpage-wave-spine-nav {
  position: sticky;
  top: 90px;
  background: transparent;
  padding: 8px 0;
}

.spine-nav-header {
  margin-bottom: 24px;
  padding-left: 4px;
}

.spine-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tasid-navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.spine-header-accent {
  width: 60px;
  height: 6px;
  margin-top: 8px;
}

.spine-header-accent svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 垂直直線導軌與選單本體 (Modern Timeline Vertical Rail) */
.spine-nav-body {
  position: relative;
  padding-left: 24px;
}

.spine-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}

/* 筆直極簡時間軸導軌 (Straight Timeline Rail) */
.spine-menu-list::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -15px;
  width: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  z-index: 1;
}

.spine-menu-item {
  margin: 0;
}

.spine-menu-item a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px 7px 10px;
  text-decoration: none;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #475569;
  transition: all 0.2s ease;
  border-radius: 8px;
}

/* 節點圓點 (Node Dot - 現代時間軸節點風格) */
.spine-node-dot {
  position: absolute;
  left: -19px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  z-index: 2;
  transition: all 0.22s ease;
}

.spine-menu-item a .menu-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #475569;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Hover 狀態：平滑底色微亮與節點藍綠外環 */
.spine-menu-item a:hover {
  background: rgba(10, 126, 140, 0.05);
}

.spine-menu-item a:hover .menu-name {
  color: var(--tasid-teal);
  font-weight: 600;
}

.spine-menu-item a:hover .spine-node-dot {
  background: var(--tasid-teal);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.2);
}

/* Active 作用中狀態：湖水綠節點微光與醒目文字 */
.spine-menu-item.active a {
  background: rgba(10, 126, 140, 0.08);
}

.spine-menu-item.active a .menu-name {
  color: var(--tasid-teal);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.spine-menu-item.active .spine-node-dot {
  background: var(--tasid-teal);
  border-color: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(10, 126, 140, 0.28);
}

/* 手機版次級導航 (水平滑動膠囊托盤 - 具備平滑滾動與自適應寬度，徹底解決擠壓重疊問題) */
@media (max-width: 767.98px) {
  .subpage-wave-spine-nav {
    position: static;
    padding: 0;
    margin-bottom: 20px;
    width: 100%;
  }
  
  .spine-nav-header {
    display: none !important;
  }
  
  .spine-nav-body {
    padding: 0 !important;
    position: relative;
    width: 100%;
  }
  
  .spine-menu-list::before {
    display: none !important;
  }

  .spine-node-dot {
    display: none !important;
  }
  
  /* 淺灰分段托盤：水平平滑滑動，隱藏滾動條，觸控滑順不擠壓 */
  .spine-menu-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* Firefox */
    gap: 6px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    background: #f1f5f9 !important;
    border-radius: 9999px !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  }
  
  .spine-menu-list::-webkit-scrollbar {
    display: none !important; /* Chrome / Safari */
  }
  
  .spine-menu-item {
    flex: 0 0 auto !important;
    min-width: auto !important;
    margin: 0 !important;
    text-align: center !important;
    list-style: none !important;
  }
  
  .spine-menu-item a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 18px !important;
    background: transparent !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    position: relative !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
  }

  .spine-menu-item a .menu-name {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    white-space: nowrap !important;
    transition: color 0.2s ease !important;
  }

  /* Active 選中標籤：乾淨浮起的白色膠囊卡片 + 湖水綠加粗文字與立體微陰影 */
  .spine-menu-item.active a {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(10, 126, 140, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  }

  .spine-menu-item.active a .menu-name {
    color: var(--tasid-teal, #0a7e8c) !important;
    font-weight: 700 !important;
  }

  .spine-node-dot {
    display: none !important;
  }
}

/* ==========================================================================
   22. 內頁共用內容卡片樣式 (Subpage Shared Paper Card Styles)
   ========================================================================== */
.subpage-paper-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 14px;
  box-shadow: 0 4px 20px -2px rgba(0, 45, 66, 0.04), 0 2px 6px -1px rgba(0, 45, 66, 0.02);
  padding: 38px 46px;
}

@media (max-width: 767.98px) {
  .subpage-paper-card {
    padding: 24px 20px;
  }
}

.subpage-heading {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--tasid-navy);
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
}

.subpage-heading::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--tasid-teal);
  border-radius: 2px;
}

.subpage-lead-text {
  font-size: 1.02rem;
  line-height: 2;
  color: #334155;
  margin-bottom: 28px;
}

/* 學會簡介沿革 - 精緻時間軸 (Timeline Style) */
.history-dl {
  position: relative;
  padding-left: 28px;
  margin: 32px 0 28px;
  border-top: none;
}

.history-dl::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--tasid-teal) 0%, rgba(10, 126, 140, 0.15) 100%);
  border-radius: 2px;
}

.history-dl dt {
  position: relative;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--tasid-navy);
  margin-bottom: 6px;
  padding: 0;
  float: none;
  width: auto;
  clear: none;
}

.history-dl dt::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--tasid-teal);
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.15);
}

.history-dl dd {
  font-size: 0.94rem;
  line-height: 1.85;
  color: #475569;
  margin-left: 0;
  margin-bottom: 22px;
  padding: 0 0 18px 0;
  border-bottom: 1px dashed #edf2f7;
}

.history-dl dd:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* 劃撥帳戶 - TASID 專屬典雅卡片 */
.allocation-account-box {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
  border: 1px solid rgba(10, 126, 140, 0.2);
  border-left: 5px solid var(--tasid-teal, #0a7e8c);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 32px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  position: relative;
}

.account-box-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tasid-navy, #091924);
  margin: 0 0 12px;
}

.account-info {
  font-size: 0.98rem;
  line-height: 2;
  color: #334155;
}

.account-info strong {
  color: var(--tasid-navy, #091924);
}

/* ==========================================================================
   23. 組織章程樣式 (Constitution Styles)
   ========================================================================== */
.constitution-chapter-heading {
  background: #f0f7f7;
  color: var(--tasid-navy);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 8px 16px;
  margin: 32px 0 16px;
  border-radius: 6px;
  border-left: 4px solid var(--tasid-teal);
}

.constitution-chapter-heading:first-of-type {
  margin-top: 0;
}

.constitution-dl {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.9;
}

.constitution-dl dt {
  float: left;
  width: 90px;
  text-align: right;
  padding: 8px 0;
  color: #1e293b;
  font-weight: 700;
  clear: left;
}

.constitution-dl dd {
  margin-left: 110px;
  padding: 8px 0 12px 10px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  margin-bottom: 8px;
  min-height: 38px;
}

.sub-indent-block {
  margin: 8px 0;
  padding-left: 12px;
}

.sub-indent-item {
  padding-left: 1.8em;
  text-indent: -1.8em;
  margin-bottom: 4px;
}

@media (max-width: 767.98px) {
  .constitution-dl dt {
    float: none;
    width: auto;
    text-align: left;
    padding-bottom: 2px;
    color: var(--tasid-teal);
  }
  .constitution-dl dd {
    margin-left: 0;
    padding-left: 0;
    padding-bottom: 14px;
  }
}

/* ==========================================================================
   24. 組織成員樣式 (Directorate Styles)
   ========================================================================== */
.directorate-part-title {
  background: #f0f7f7;
  color: var(--tasid-navy);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 8px 16px;
  margin: 32px 0 16px;
  border-radius: 6px;
  border-left: 4px solid var(--tasid-teal);
}

.directorate-part-title:first-of-type {
  margin-top: 0;
}

.directorate-dl {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.9;
}

.directorate-dl dt {
  float: left;
  width: 140px;
  text-align: right;
  padding: 8px 0;
  color: #1e293b;
  font-weight: 700;
  clear: left;
}

.directorate-dl dd {
  margin-left: 160px;
  padding: 8px 0 12px 10px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  margin-bottom: 8px;
  min-height: 38px;
}

.directorate-dl u {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  color: var(--tasid-teal);
}

.subgroup-dd div {
  margin-bottom: 4px;
}

.directorate-note {
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 767.98px) {
  .directorate-dl dt {
    float: none;
    width: auto;
    text-align: left;
    padding-bottom: 2px;
    color: var(--tasid-teal);
  }
  .directorate-dl dd {
    margin-left: 0;
    padding-left: 0;
    padding-bottom: 14px;
  }
}

/* ==========================================================================
   25. 相關網站樣式 (Related Links Styles)
   ========================================================================== */
.links-part-title {
  background: #f0f7f7;
  color: var(--tasid-navy);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 8px 16px;
  margin: 32px 0 16px;
  border-radius: 6px;
  border-left: 4px solid var(--tasid-teal);
}

.links-part-title:first-of-type {
  margin-top: 0;
}

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

.links-list li {
  border-bottom: 1px solid #edf2f7;
}

.links-list li:last-child {
  border-bottom: none;
}

.links-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 10px;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.links-list li a:hover {
  background-color: #f8fafc;
  color: var(--tasid-teal);
  padding-left: 14px;
}

.links-list li a:hover .link-domain {
  color: var(--tasid-teal-dark);
}

.links-list .link-name {
  color: inherit;
}

.links-list .link-domain {
  color: var(--tasid-teal);
  font-size: 0.9rem;
  white-space: nowrap;
  font-weight: 600;
}

@media (max-width: 767.98px) {
  .links-list li a {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 6px;
  }

  .links-list .link-domain {
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   26. 最新消息樣式 (News Styles - List & Detail Pages)
   ========================================================================== */

/* 標籤徽章 (Badges / Tags) */
.news-tag-pinned {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #dc2626;
  background-color: #fee2e2;
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.news-tag-category {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tasid-teal, #0a7e8c);
  background-color: rgba(10, 126, 140, 0.08);
  border: 1px solid rgba(10, 126, 140, 0.18);
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

/* 列表容器 */
.subpage-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subpage-news-item {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.subpage-news-item:last-child {
  border-bottom: none;
}

.subpage-news-item.is-pinned {
  background-color: #fffdfa;
  border-left: 3px solid #ef4444;
  border-radius: 0 8px 8px 0;
}

/* 列表項目連結 */
.news-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 14px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-item-link:hover {
  background-color: rgba(10, 126, 140, 0.04);
  padding-left: 18px;
}

.news-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.news-item-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.news-item-title-wrapper {
  flex: 1 1 0%;
  min-width: 0;
}

.news-item-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.55;
  transition: color 0.2s ease;
  word-break: break-word;
}

.news-item-link:hover .news-item-title {
  color: var(--tasid-teal, #0a7e8c);
}

.news-item-date {
  flex-shrink: 0;
  font-size: 0.88rem;
  color: #94a3b8;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .news-item-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 10px;
  }
  
  .news-item-main {
    width: 100%;
  }
  
  .news-item-date {
    font-size: 0.82rem;
    color: #94a3b8;
  }
}

/* ==========================================================================
   26.2 消息詳情頁 (News Detail Page)
   ========================================================================== */
.news-detail-header {
  position: relative;
}

.news-detail-meta {
  font-size: 0.88rem;
}

.news-detail-date {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.news-detail-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #091924;
  line-height: 1.42;
  letter-spacing: -0.01em;
  margin: 12px 0 0;
}

@media (max-width: 767.98px) {
  .news-detail-title {
    font-size: 1.35rem;
  }
}

.news-lead-box {
  background: #f8fafc;
  border-left: 4px solid var(--tasid-teal);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #475569;
  font-weight: 500;
}

/* ==========================================================================
   26.3 全站富文本通用排版系統 (Universal Editor Content Styles)
   通用類別：.editor-content
   ========================================================================== */
.editor-content {
  font-size: 1.02rem;
  line-height: 2;
  color: #334155;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 段落與文字排版 */
.editor-content p {
  margin-bottom: 1.4rem;
}

.editor-content p:last-child {
  margin-bottom: 0;
}

/* 標題層級 */
.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6 {
  color: #091924;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.editor-content h2 {
  font-size: 1.4rem;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(10, 126, 140, 0.2);
}

.editor-content h3 {
  font-size: 1.25rem;
}

.editor-content h4 {
  font-size: 1.12rem;
}

/* 超連結樣式 (Hyperlinks - 清晰明亮的專用藍 #1789CB 與微底線) */
.editor-content a {
  color: #1789CB;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  word-break: break-all;
  transition: all 0.2s ease;
}

.editor-content a:hover {
  color: #0c5c8a;
  text-decoration-thickness: 2px;
}

/* 粗體與強調 */
.editor-content strong,
.editor-content b {
  font-weight: 700;
  color: #0f172a;
}

.editor-content mark {
  background-color: #fef08a;
  padding: 2px 6px;
  border-radius: 4px;
}

/* 清單樣式 (Lists) */
.editor-content ul {
  list-style-type: disc;
  padding-left: 1.6rem;
  margin-bottom: 1.4rem;
}

.editor-content ol {
  list-style-type: decimal;
  padding-left: 1.6rem;
  margin-bottom: 1.4rem;
}

.editor-content li {
  margin-bottom: 0.5rem;
  line-height: 1.85;
}

.editor-content ul ul,
.editor-content ol ol,
.editor-content ul ol,
.editor-content ol ul {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

/* 引用區塊 (Blockquotes) */
.editor-content blockquote {
  border-left: 4px solid var(--tasid-teal, #0a7e8c);
  background-color: #f8fafc;
  padding: 14px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  color: #475569;
  font-style: normal;
}

.editor-content blockquote p:last-child {
  margin-bottom: 0;
}

/* 表格樣式 (Tables - 完整清晰外框、內格線與自適應) */
.editor-content table {
  width: 100%;
  max-width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 24px;
  margin-bottom: 24px;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff;
  font-size: 0.95rem;
}

.editor-content table th {
  background-color: #f1f5f9 !important;
  font-weight: 700;
  color: #1e293b;
  padding: 12px 16px !important;
  border: 1px solid #cbd5e1 !important;
  text-align: left;
}

.editor-content table td {
  padding: 12px 16px !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155;
  line-height: 1.6;
}

.editor-content table tr:hover td {
  background-color: rgba(10, 126, 140, 0.03) !important;
}

/* 圖片與圖說 (Images & Captions) */
.editor-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.editor-content figure {
  margin: 24px 0;
  text-align: center;
}

.editor-content figure img {
  margin: 0 auto 8px;
}

.editor-content figcaption {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

/* 嵌入式影片與多媒體 (iFrames / Videos) */
.editor-content iframe {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
}

/* 分隔線 (HR) */
.editor-content hr {
  border: 0;
  height: 1px;
  background-color: #e2e8f0;
  margin: 32px 0;
}

/* 程式碼與預格式化 (Code / Pre) */
.editor-content code {
  font-size: 0.9em;
  color: #0f172a;
  background-color: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.editor-content pre {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 附件下載區塊 */
.news-attachments-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
}

.attachments-title {
  font-size: 1rem;
  font-weight: 700;
  color: #091924;
  margin-bottom: 16px;
}

.attachment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.attachment-link-card:hover {
  border-color: var(--tasid-teal);
  box-shadow: 0 4px 14px rgba(10, 126, 140, 0.08);
  transform: translateY(-1px);
}

.attachment-info {
  min-width: 0;
  margin-right: 16px;
}

.attachment-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  word-break: break-all;
}

.attachment-size {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
}

.attachment-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tasid-teal);
  background: rgba(10, 126, 140, 0.06);
  border: 1px solid rgba(10, 126, 140, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.attachment-link-card:hover .attachment-btn {
  background: var(--tasid-teal);
  color: #ffffff;
  border-color: var(--tasid-teal);
}

/* 相鄰文章卡片 */
.adjacent-post-card {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  height: 100%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.adjacent-post-card:hover {
  border-color: var(--tasid-teal);
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 45, 66, 0.04);
}

.adjacent-label {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 4px;
  font-weight: 500;
}

.adjacent-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.adjacent-post-card:hover .adjacent-title {
  color: var(--tasid-teal) !important;
}

.adjacent-post-empty {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
  height: 100%;
}

/* 返回消息列表按鈕 */
.btn-back-news {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tasid-teal);
  background: transparent;
  border: 1.5px solid var(--tasid-teal);
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-back-news:hover {
  color: #ffffff;
  background: var(--tasid-teal);
  box-shadow: 0 4px 12px rgba(10, 126, 140, 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   27. 前台分頁器樣式 (Frontend Pagination Styles)
   ========================================================================== */
.portal-pagination-nav {
  display: flex;
  align-items: center;
}

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

.pagination-portal .page-item {
  margin: 0;
}

.pagination-portal .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pagination-portal .page-link:hover {
  color: var(--tasid-teal);
  background-color: #f0fdfa;
  border-color: var(--tasid-teal);
  transform: translateY(-1px);
}

.pagination-portal .page-item.active .page-link {
  color: #ffffff !important;
  background-color: var(--tasid-teal) !important;
  border-color: var(--tasid-teal) !important;
  box-shadow: 0 2px 8px rgba(10, 126, 140, 0.3);
  pointer-events: none;
}

.pagination-portal .page-item.disabled .page-link {
  color: #cbd5e1;
  background-color: #f8fafc;
  border-color: #f1f5f9;
  pointer-events: none;
  box-shadow: none;
}

.news-pagination-footer,
.event-pagination-footer {
  border-color: #edf2f7 !important;
}

/* ==========================================================================
   28. 學術活動樣式 (Academic Events Styles - List & Detail Pages)
   ========================================================================== */

/* 活動日曆方塊小卡 (Event Calendar Badge Tile) */
.event-cal-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  background: #ffffff;
  border: 1px solid rgba(10, 126, 140, 0.22);
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  text-align: center;
  user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.event-cal-tile-header {
  width: 100%;
  background: var(--tasid-teal, #0a7e8c);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 6px;
  line-height: 1.25;
  white-space: nowrap;
}

.event-cal-tile-body {
  width: 100%;
  background: #ffffff;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}

.event-cal-tile-day {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--tasid-navy, #002d42);
  line-height: 1.1;
  font-family: var(--font-monospace, monospace);
  white-space: nowrap;
}

.event-cal-tile-day.is-range {
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.event-cal-tile-day.is-cross-month {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* 活動標籤徽章 (Event Badges) */
.event-tag-nature {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.event-tag-nature.is-domestic {
  color: #047857;
  background-color: #ecfdf5;
  border: 1px solid rgba(4, 120, 87, 0.2);
}

.event-tag-nature.is-intl {
  color: #0369a1;
  background-color: #e0f2fe;
  border: 1px solid rgba(3, 105, 161, 0.22);
}

.event-tag-category {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tasid-teal, #0a7e8c);
  background-color: rgba(10, 126, 140, 0.08);
  border: 1px solid rgba(10, 126, 140, 0.18);
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.3;
  flex-shrink: 0;
}

.event-tag-society {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #b45309;
  background-color: #fef3c7;
  border: 1px solid rgba(180, 83, 9, 0.22);
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.3;
  flex-shrink: 0;
}

/* 活動列表容器 */
.subpage-event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subpage-event-item {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.subpage-event-item:last-child {
  border-bottom: none;
}

/* 列表項目連結 */
.event-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 14px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-item-link:hover {
  background-color: rgba(10, 126, 140, 0.04);
  padding-left: 18px;
}

.event-item-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.event-item-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.event-item-title-wrapper {
  min-width: 0;
}

.event-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.5;
  transition: color 0.2s ease;
  word-break: break-word;
}

.event-item-link:hover .event-item-title {
  color: var(--tasid-teal, #0a7e8c);
}

.event-item-snippets {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: #64748b;
  margin-top: 2px;
}

.snippet-item {
  display: inline-flex;
  align-items: center;
}

.snippet-label {
  color: #94a3b8;
  margin-right: 2px;
}

.event-item-date-box {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .event-item-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 10px;
  }
  
  .event-item-date-box {
    font-size: 0.82rem;
    color: #94a3b8;
  }
}

/* ==========================================================================
   28.2 活動詳情頁 (Event Detail Page - Tabular Layout)
   ========================================================================== */
.event-detail-header {
  border-bottom: 1px solid #e2e8f0;
}

.event-detail-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #091924;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin: 12px 0 0;
}

@media (max-width: 767.98px) {
  .event-detail-title {
    font-size: 1.35rem;
  }
}

/* 活動表格外框容器 */
.event-table-wrapper {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.03);
}

.event-info-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}

.event-info-table thead th.event-table-header-title {
  background: linear-gradient(135deg, #091924 0%, #0a7e8c 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 13px 18px;
  border: none;
}

.event-info-table tbody th.event-th-label {
  width: 130px;
  min-width: 110px;
  white-space: nowrap;
  background-color: #f8fafc;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.02em;
}

.event-info-table tbody td.event-td-value {
  background-color: #ffffff;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.65;
  vertical-align: middle;
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
  word-break: break-word;
}

.event-info-table tbody tr:hover td.event-td-value {
  background-color: #fafcfc;
}

.event-info-table tbody td.event-td-value a {
  word-break: break-all;
  transition: color 0.15s ease;
}

.event-info-table tbody td.event-td-value a:hover {
  text-decoration: underline !important;
}

.event-info-table .align-top {
  vertical-align: top !important;
}

.event-memo-content {
  color: #475569;
  line-height: 1.7;
}

.btn-outline-teal {
  color: var(--tasid-teal, #0a7e8c);
  border-color: var(--tasid-teal, #0a7e8c);
}

.btn-outline-teal:hover {
  color: #ffffff;
  background-color: var(--tasid-teal, #0a7e8c);
  border-color: var(--tasid-teal, #0a7e8c);
}

@media (max-width: 575.98px) {
  .event-info-table tbody th.event-th-label {
    width: 95px;
    min-width: 95px;
    padding: 10px 8px;
    font-size: 0.85rem;
  }
  .event-info-table tbody td.event-td-value {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   28.3 全版學術活動行事曆 (Full Academic Calendar Styles)
   ========================================================================== */
.full-calendar-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.full-cal-header {
  background: #f8fafc;
}

.full-cal-legend .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.full-cal-legend .legend-dot.bg-domestic {
  background-color: #047857;
}

.full-cal-legend .legend-dot.bg-intl {
  background-color: #0284c7;
}

.full-cal-table {
  table-layout: fixed;
}

.full-cal-table th.cal-th {
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 6px;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.cal-day-cell {
  min-height: 110px;
  height: auto;
  vertical-align: top;
  padding: 8px 6px !important;
  transition: background-color 0.2s ease;
  position: relative;
  background-color: #ffffff;
}

@media (max-width: 767.98px) {
  .cal-day-cell {
    min-height: 80px;
    padding: 4px 2px !important;
  }
}

.cal-day-cell:hover {
  background-color: #f8fafc;
}

.cal-day-cell.is-dimmed {
  background-color: #fafbfc;
  opacity: 0.35;
  cursor: default;
}

.cal-day-cell.is-today {
  background-color: rgba(10, 126, 140, 0.03);
}

.cal-day-cell.is-today .day-num {
  background-color: var(--tasid-teal, #0a7e8c);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(10, 126, 140, 0.25);
}

.day-cell-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.day-num {
  font-size: 0.86rem;
  font-weight: 600;
  color: #475569;
  align-self: flex-end;
  margin-bottom: 4px;
}

.day-event-dots {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-pill-item {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: normal;
  word-break: break-word;
  text-align: left;
  line-height: 1.35;
  display: block;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.event-pill-item:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.event-pill-item.dot-domestic {
  color: #047857;
  background-color: #ecfdf5;
  border: 1px solid rgba(4, 120, 87, 0.2);
}

.event-pill-item.dot-intl {
  color: #0369a1;
  background-color: #e0f2fe;
  border: 1px solid rgba(3, 105, 161, 0.22);
}

.event-pill-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.85);
  color: #1e293b;
  margin-bottom: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.event-pill-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

/* ==========================================================================
   29. 會員專區樣式 (Member Zone Styles)
   ========================================================================== */
.member-instruction-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.member-instruction-header {
  background: linear-gradient(135deg, rgba(10, 126, 140, 0.08) 0%, rgba(13, 148, 136, 0.03) 100%);
  border-bottom: 1px solid rgba(10, 126, 140, 0.15);
  padding: 18px 24px;
}

.member-instruction-body {
  padding: 20px 24px;
  background: #ffffff;
}

.member-qualify-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-qualify-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.member-qualify-row .qualify-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--tasid-teal, #0a7e8c);
  margin-top: 8px;
  flex-shrink: 0;
}

.member-qualify-row .qualify-text {
  font-size: 0.98rem;
  color: #334155;
  line-height: 1.75;
}

.member-qualify-row strong {
  color: #091924;
  font-weight: 700;
}

.section-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #091924;
}

.section-title-bar .title-bar-accent {
  width: 4px;
  height: 18px;
  background-color: var(--tasid-teal, #0a7e8c);
  border-radius: 2px;
  display: inline-block;
}

.attachment-download-card {
  transition: all 0.2s ease;
}

.attachment-download-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  border-color: rgba(10, 126, 140, 0.3) !important;
}

/* 入會申請書官方格式表格 (採用 TASID 標準深青漸層配色) */
.event-info-table.member-join-table th.event-th-label {
  width: auto;
  min-width: auto;
  padding: 10px 6px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.event-info-table.member-join-table td.event-td-value {
  padding: 10px 10px;
  min-height: 42px;
  font-size: 0.92rem;
}

/* ==========================================================================
   22. 現代化一體式輸入框群組 (Unified Seamless Input Group)
   ========================================================================== */
.input-group-seamless {
  display: flex;
  align-items: stretch;
  border: 1px solid #dbe5ec;
  border-radius: var(--radius-md);
  background-color: #f8fafc;
  transition: var(--transition-fast);
  overflow: hidden;
  position: relative;
  min-height: calc(1.5em + 1.2rem + 2px);
  box-sizing: border-box;
}

.input-group-seamless:focus-within {
  border-color: var(--tasid-teal) !important;
  box-shadow: 0 0 0 3px rgba(10, 126, 140, 0.15) !important;
  background-color: #ffffff;
}

.input-group-seamless .input-group-text {
  background: transparent !important;
  border: none !important;
  color: #64748b;
  padding-left: 14px;
  padding-right: 6px;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.input-group-seamless:focus-within .input-group-text {
  color: var(--tasid-teal) !important;
}

.input-group-seamless .form-control {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding-left: 8px;
  padding-right: 12px;
  color: var(--text-main);
  font-size: 0.88rem;
  min-height: 100%;
}

.input-group-seamless .form-control:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

.input-group-seamless .btn {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #64748b;
  padding-left: 12px;
  padding-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.input-group-seamless .btn:hover {
  color: var(--tasid-teal, #0a7e8c);
  background: rgba(10, 126, 140, 0.08) !important;
}

.input-group-seamless .btn:active,
.input-group-seamless .btn:focus {
  outline: none !important;
  box-shadow: none !important;
}

.member-section-divider-title {
  position: relative;
  text-align: center;
  margin: 20px 0 38px;
}

.member-section-divider-title::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(203, 213, 225, 0) 0%, rgba(203, 213, 225, 1) 15%, rgba(203, 213, 225, 1) 85%, rgba(203, 213, 225, 0) 100%);
  z-index: 1;
}

.member-section-divider-title span {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding: 0 32px;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--tasid-navy, #002d42);
  letter-spacing: 0.08em;
}

@media (min-width: 768px) {
  .member-login-left-col {
    border-right: 1px solid #e2e8f0;
    padding-right: 3rem;
  }
  .member-login-right-col {
    padding-left: 3rem;
  }
}

/* ==========================================================================
   30. 學會資源專區樣式 (Member Documents & Resources Standard System)
   ========================================================================== */

/* 分類篩選頁籤 (Category Filter Tabs) */
.doc-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.doc-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  color: var(--text-muted, #64748b);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-filter-tab:hover {
  background-color: var(--tasid-teal-light, #e6f7f8);
  border-color: var(--tasid-teal-mid, #5cb8d5);
  color: var(--tasid-teal, #0a7e8c);
}

.doc-filter-tab.active {
  background: var(--tasid-teal, #0a7e8c);
  border-color: var(--tasid-teal, #0a7e8c);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(10, 126, 140, 0.25);
}

/* 專業學術文件資料表 (Academic Resource Archive Table) */
.doc-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.doc-archive-table {
  margin-bottom: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.doc-archive-table thead th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.doc-archive-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  vertical-align: middle;
  transition: background-color 0.15s ease;
}

.doc-archive-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-archive-table tbody tr:hover td {
  background-color: rgba(10, 126, 140, 0.03);
}

.doc-archive-table tbody tr.is-pinned td {
  background-color: #fffcf8;
}

.doc-archive-table tbody tr.is-pinned:hover td {
  background-color: #fff6eb;
}

.doc-archive-table tbody tr.is-pinned .doc-table-title {
  color: #ea580c;
  font-weight: 700;
}

.doc-archive-table tbody tr.is-pinned .doc-table-title:hover {
  color: #c2410c;
}

/* 分類標籤 (Teal Badge) */
.doc-table-badge-cat {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tasid-teal, #0a7e8c);
  background-color: rgba(10, 126, 140, 0.08);
  border: 1px solid rgba(10, 126, 140, 0.18);
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

/* 附件數量統計標籤 */
.doc-badge-att-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--tasid-teal, #0a7e8c);
  background-color: var(--tasid-teal-light, #e6f7f8);
  border: 1px solid rgba(10, 126, 140, 0.18);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* 置頂標籤 (Ruby Badge) */
.doc-tag-pinned {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #dc2626;
  background-color: #fee2e2;
  border: 1px solid rgba(220, 38, 38, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.2;
  white-space: nowrap;
}

/* 文件標題連結 */
.doc-table-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.18s ease;
}

.doc-table-title:hover {
  color: var(--tasid-teal, #0a7e8c);
}

/* 行動端自適應卡片流 (Mobile Responsive Cards) */
.doc-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-mobile-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: inherit;
}

a.doc-mobile-card:hover {
  border-color: rgba(10, 126, 140, 0.35);
  box-shadow: 0 4px 12px rgba(10, 126, 140, 0.08);
  transform: translateY(-1px);
}

a.doc-mobile-card:hover .doc-mobile-title {
  color: var(--tasid-teal, #0a7e8c);
}

a.doc-mobile-card:active {
  transform: scale(0.99);
}

.doc-mobile-card.is-pinned {
  background: #fffcf8;
  border-color: #fed7aa;
}

.doc-mobile-card.is-pinned:hover {
  background: #fff6eb;
}

.doc-mobile-card.is-pinned .doc-mobile-title,
.doc-mobile-card.is-pinned .doc-mobile-title a {
  color: #ea580c;
  font-weight: 700;
}

.doc-mobile-card.is-pinned:hover .doc-mobile-title,
.doc-mobile-card.is-pinned .doc-mobile-title a:hover {
  color: #c2410c;
}

.doc-mobile-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0;
  color: #1e293b;
  transition: color 0.18s ease;
}

.doc-mobile-title a {
  color: #1e293b;
  text-decoration: none;
  transition: color 0.18s ease;
}

.doc-mobile-title a:hover {
  color: var(--tasid-teal, #0a7e8c);
}

/* 活動專屬行動卡片時程區塊 (Event Mobile Schedule Info Box) */
.event-mobile-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.event-mobile-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.event-mobile-info-date {
  color: #0f766e;
  font-weight: 600;
  font-family: var(--bs-font-monospace, monospace);
  letter-spacing: -0.01em;
}

.event-mobile-info-location {
  color: #475569;
}

.event-mobile-info-organizer {
  font-size: 0.82rem;
  color: #64748b;
  padding-left: 23px;
  line-height: 1.4;
}

/* ==========================================================================
   31. 會員會費收據專屬樣式 (Member Receipts Standard System)
   ========================================================================== */

/* 收據基本資訊網格 (Receipt Info Grid) */
.receipt-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
}

.receipt-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.receipt-info-label {
  color: var(--text-muted, #64748b);
  font-weight: 500;
  min-width: 72px;
}

.receipt-info-value {
  color: var(--text-heading, #0f172a);
  font-weight: 700;
}

@media (max-width: 576px) {
  .receipt-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px;
  }

  .receipt-info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .receipt-info-label {
    font-size: 0.8rem;
    min-width: unset;
  }

  .receipt-info-value {
    font-size: 0.95rem;
    word-break: break-word;
  }
}


