@charset "utf-8";
/* CSS Document */
 :root {
            --primary-color: #1a365d;
            --secondary-color: #2b6cb0;
            --accent-color: #ed8936;
            --bg-color: #f7fafc;
            --text-color: #2d3748;
			--accent-color2:#d4af37;
        }

	  /* ================= 2. 導覽列滾動特效 ================= */
    #mainNav {
      transition: all 0.3s ease-in-out;
      padding: 15px 0;
    }

    /* 滾動後的樣式 */
    #mainNav.scrolled {
      background-color: #ffffff !important;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      padding: 10px 0; /* 縮小導覽列高度 */
    }

    /* ================= 3. 桌機版選單 Hover 展開特效 ================= */
    @media (min-width: 992px) {
      .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.3s ease;
      }
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ================= 4. 手機側邊選單 (Offcanvas) 樣式 ================= */
    /* 讓側選單選項的底線、間距更好看 */
    .offcanvas-body .nav-link {
      font-size: 1.1rem;
      padding: 12px 15px;
      border-bottom: 1px solid #f0f0f0;
      color: #333 !important; /* 強制文字為深色 */
    }
    .offcanvas-body .nav-link:hover {
      background-color: #f8f9fa;
      color: #0d6efd !important;
    }
    
    /* 設定前方圖示的固定寬度，讓後面的文字對齊更整齊 */
    .nav-link i {
      display: inline-block;
      width: 30px; 
      text-align: center;
      margin-right: 5px;
      color: #6c757d; /* 圖示預設顏色 */
    }
    .nav-link:hover i {
      color: #0d6efd; /* 滑鼠移過去圖示變色 */
    }

    /* 消除最後一個項目的底線 */
    .offcanvas-body .nav-item:last-child .nav-link {
      border-bottom: none;
    }
 
	  
    /* 全局與醫療視覺風格設定 */
    body {
      font-family: 'Noto Sans TC', sans-serif;
      background-color: #f8fbfc;
      color: #333;
      scroll-behavior: smooth;
    }
    
    /* 區塊標題設計 */
    .section-title {
	  text-align: center;
      position: relative;
      font-weight: 800;
      color: #1a4d65;
      padding-bottom: 12px;
      margin-bottom: 40px;
      margin-top: 60px;
	  scroll-margin-top: 80px; /* 新增這行：預留頂部導覽列的空間 */
    }
    .section-title::after {
	  text-align: center;
      content: '';
      position: absolute;
      left: 45%;
      bottom: 0;
      width: 60px;
      height: 4px;
      background-color: #ff9800;
      border-radius: 2px;
    }

    /* 養成計畫流程圖卡片 */
    .timeline-card {
      border: none;
      border-radius: 12px;
      transition: all 0.3s ease;
      color: white;
    }
    .timeline-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 12px 24px rgba(0,0,0,0.15) !important;
    }
    .timeline-step {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      font-size: 1.1rem;
      font-weight: 500;
    }
    
    /* 數據圖表與表格設計 (數據分析視覺化) */
    .data-table-wrapper {
      background: white;
      border-radius: 12px;
      padding: 15px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      margin-bottom: 20px;
    }
    .table-medical thead th {
      background-color: #278590;
      color: white;
      text-align: center;
      font-weight: 500;
      border: none;
    }
    .table-medical-alt thead th {
      background-color: #CDBBA5;
      color: white;
    }
    .table-medical tbody td, .table-medical-alt tbody td {
      vertical-align: middle;
      color: #4a5568;
    }
    
    /* 互動式手風琴 (Accordion) */
    .accordion-button {
      font-weight: 700;
      color: #1a4d65;
      background-color: #eef5f9;
    }
    .accordion-button:not(.collapsed) {
      background-color: #278590;
      color: white;
    }

    /* 課程與師資卡片 */
    .course-card {
      border: 2px solid transparent;
      border-radius: 16px;
      transition: all 0.3s;
      background: white;
    }
    .course-card:hover {
      border-color: #278590;
      box-shadow: 0 8px 20px rgba(39, 133, 144, 0.15);
    }
    .testimonial-card {
      background: white;
      border-left: 5px solid #278590;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.05);
      height: 100%;
    }

    /* 導覽分頁 (Tabs) 優化 */
    .nav-pills .nav-link {
      color: #4a5568;
      font-weight: 600;
      border-radius: 30px;
      margin: 0 5px 10px 0;
      border: 1px solid #e2e8f0;
      background: white;
    }
    .nav-pills .nav-link.active {
      background-color: #278590;
      color: white;
      border-color: #278590;
    }

    /* CTA Section */
    .cta-section {
      background: linear-gradient(135deg, #1a4d65 0%, #278590 100%);
      color: white;
      padding: 60px 20px;
      text-align: center;
      margin-top: 80px;
    }
    .cta-btn {
      background-color: #ffc107;
      color: #333;
      font-weight: 700;
      padding: 12px 30px;
      border-radius: 30px;
      text-decoration: none;
      display: inline-block;
      margin-top: 20px;
      transition: transform 0.2s;
    }
    .cta-btn:hover {
      transform: scale(1.05);
      color: #000;
    }
    
    footer {
      background-color: #2d3748;
      color: #e2e8f0;
      padding: 40px 0 20px;
      font-size: 0.9rem;
    }
	  table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 40px;
        }
        th, td {
            border: 1px solid #cbd5e1;
            padding: 12px;
            text-align: center;
        }
        th {
            background-color: #f8fafc;
            color: #475569;
            font-weight: bold;
        }
        tr:nth-child(even) td {
            background-color: #fbfbfc;
        }
        tr:hover td {
            background-color: #f1f5f9;
        }
        .total-row td {
            background-color: #fff3e0 !important;
            font-weight: bold;
            color: #d35400;
        }

/* ================= 5. 多頁廣告圖輪播 (手機滑動、桌機拖曳) ================= */
.ad-carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px 0; /* 預留陰影空間 */
}

.ad-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  /* 隱藏預設捲軸，讓視覺更乾淨 */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  cursor: grab;
  /* CSS Scroll Snap：讓手機手指滑動時有卡點對齊感 */
  scroll-snap-type: x mandatory;
}

/* 隱藏 Chrome, Safari and Opera 的捲軸 */
.ad-carousel::-webkit-scrollbar {
  display: none;
}

/* 當滑鼠按住拖曳時的狀態 */
.ad-carousel:active {
  cursor: grabbing;
  scroll-behavior: auto; /* 拖曳時取消平滑滾動，提升跟手流暢度 */
  scroll-snap-type: none; /* 拖曳時暫時取消卡點，避免卡頓 */
}

.ad-slide {
  /* 手機版預設：顯示約 85% 寬度，露出下一張圖的邊緣 */
  flex: 0 0 calc(85% - 20px); 
  scroll-snap-align: center; /* 讓當前圖片置中對齊 */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
  user-select: none; /* 防止拖曳時文字被反白 */
}

.ad-slide:hover {
  transform: translateY(-3px);
}

.ad-slide img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none; /* 重要：避免滑鼠拖曳時，觸發瀏覽器預設的圖片拖曳行為 */
}

/* 桌機版 (搭配你原本的 @media 設定) */
@media (min-width: 992px) {
  .ad-slide {
    /* 桌機版顯示 3 張calc(33.333% - 13.33px)。若想顯示 4 張，可改為 calc(25% - 15px) */
    flex: 0 0 calc(25% - 15px); 
    scroll-snap-align: start; /* 桌機改為靠左對齊 */
  }
}

/* ================= 6. 廣告圖左右控制按鈕 (桌機版專用) ================= */
.ad-carousel-container {
  position: relative;
}

.carousel-control-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #4a5568;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  color: #dc3545; /* 這裡改成紅色 */
}

.carousel-control-btn:hover {
  background-color: #278590; /* 呼應原本網站的醫療主色 */
  color: white;
  border-color: #278590;
  box-shadow: 0 6px 15px rgba(39, 133, 144, 0.3);
}

/* 微調按鈕位置，讓它稍微懸浮在圖片外緣或邊緣 */
.prev-btn {
  left: -20px;
}

.next-btn {
  right: -20px;
}

/* 在手機與平板 (小於 992px) 自動隱藏按鈕，維持版面乾淨，讓用戶自然使用手指滑動 */
@media (max-width: 991px) {
  .carousel-control-btn {
    display: none;
  }
}
/* ================= 7. 廣告圖按鈕消失特效 ================= */
.carousel-control-btn.is-hidden {
  opacity: 0;
  pointer-events: none; /* 隱藏時讓滑鼠無法點擊與觸發 hover */
  transform: translateY(-50%) scale(0.8); /* 稍微縮小一點點，讓消失更動態 (非必須，但視覺效果更好) */
}


 /* 師資介紹 */
        .teachers-section { 
            padding: 80px 20px; 
            text-align: center; 
            background: white;
        }
        
        .section-title {
            font-size: 2.5em;
            color: var(--primary-color);
            margin-bottom: 50px;
            position: relative;
            display: inline-block;
		    scroll-margin-top: 80px; /* 新增這行：預留頂部導覽列的空間 */

        }
        
        .section-title::after {
            content: '';
            width: 60%;
            height: 4px;
            background: var(--accent-color);
            position: absolute;
            bottom: -10px;
            left: 20%;
            border-radius: 2px;
        }

        .teachers-grid { 
            display: grid; 
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
            gap: 40px; 
            max-width: 1200px; 
            margin: 0 auto; 
        }

        .teacher-card { 
            background: var(--bg-color); 
            border-radius: 15px; 
            overflow: hidden; 
            box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
            transition: all 0.4s ease; 
            position: relative; 
            border: 1px solid #e2e8f0;
        }

        .teacher-card:hover { 
            box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
            transform: translateY(-5px); 
        }

        .img-container {
            width: 100%;
            height: 300px;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border-bottom: 3px solid #e2e8f0;
        }

        .teacher-img { 
            height: 100%; 
            object-fit: contain;
            transition: transform 0.5s ease;
        }
        
        .teacher-card:hover .teacher-img {
            transform: scale(1.05);
        }

        .teacher-info { 
            padding: 25px; 
            text-align: left; 
        }

        .subject-badge { 
            background: var(--primary-color); 
            color: white; 
            padding: 6px 12px; 
            border-radius: 20px; 
            font-size: 0.85em; 
            font-weight: bold; 
            display: inline-block;
            margin-bottom: 10px;
        }

        .teacher-name { 
            font-size: 1.5em; 
            font-weight: bold; 
            margin: 5px 0 15px 0; 
            color: var(--text-color);
        }
        
        .teacher-tagline {
            font-size: 0.65em;
            color: #718096;
            margin-left: 10px;
            font-weight: normal;
            border-left: 2px solid var(--accent-color);
            padding-left: 8px;
        }

        .teacher-desc { 
            font-size: 0.95em; 
            color: #4a5568; 
            line-height: 1.7; 
        }
        .btn-try {
            margin-top: 20px;
            display: block;
            width: 100%;
            padding: 12px;
            background-color: var(--accent-color2);
            color: white;
            text-align: center;
            border: none;
            border-radius: 8px;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.3s;
			text-decoration: none; 
        }

        .btn-try:hover {
            background-color: #b8962e;
        }

/* 表格標題固定語法 */
.sticky-table-header {
    position: sticky;
    /* 這裡的數值 (80px) 需配合您上方 fixed-top 導覽列的實際高度微調 */
    top:80px; 
    /* 必須設定不透明背景色，否則往下捲動時文字會與表格內容疊在一起 */
    background-color: #9DBA9A !important; 
    color: #ffffff !important; 
    /* 確保標題層級高於表格內容，但低於 offcanvas 等彈出視窗 */
    z-index: 1020; 
    /* 選擇性：加上底線讓視覺更清晰 */
    border-bottom: 2px solid #dee2e6; 
}