/* ========== 全局設定 ========== */
body {
    background-color: #fff;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 16px; /* 1rem = 16px */
    padding-top: 60px; /* 確保內容不會被固定導覽列遮擋 */
}

/* ========== 導覽列 ========== */
.custom-navbar {
    background-color: #ffc107 !important;
    color: #212529;
}

.custom-navbar .navbar-brand {
    color: #212529;
    font-weight: bold;
}

.custom-navbar .nav-link {
    color: #212529;
    font-size: 1.1rem;
    font-weight: bold;
}

.custom-navbar .nav-link:hover {
    color: #fff;
}

/* ========== HERO 輪播區塊 ========== */
#heroCarousel {
    position: relative;
    width: 100%;
    max-height: 55vh;
    overflow: hidden;
}

/* 每個輪播 Slide 背景 */
.hero-slide {
    width: 100%;
    background-size: cover;
    background-position: center;
}

/* Slide 1 */
.hero-slide-1 {
    background-image: url('img/background.jpg');
}

/* Slide 2 */
.hero-slide-2 {
    background: rgb(33,212,253);
    background: linear-gradient(90deg, rgba(33,212,253,1) 0%, rgba(183,33,255,1) 100%);
}

/* Slide 3 */
.hero-slide-3 {
    background: rgb(82,172,255);
    background: linear-gradient(90deg, rgba(82,172,255,1) 0%, rgba(255,227,44,1) 75%);
}

/* Slide 3 */
.hero-slide-4 {
    background: #000;
}

/* 文字內容 */
.text-container {
    text-align: center;
    color: white;
    max-width: 50%;
}

.text-container h1 {
    font-size: 4em; /* 放大標題 */
    font-weight: bold;
    opacity: 0;
    transform: translateX(-3em);
    animation: slideIn 1s ease-out forwards;
}

.text-container h3 {
    font-size: 2em; /* 放大標題 */
    font-weight: bold;
    opacity: 0;
    transform: translateX(-3em);
    animation: slideIn 1s ease-out forwards;
}

.hero-slide-4 .text-container h3 {
    color: #fff;
}

/* Slide-in 動畫 */
.slide-in-left {
    opacity: 0;
    transform: translateX(-3em);
    animation: slideIn 1s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-3em);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 人物圖片 */
.image-container img {
    width: 90%;
    height: auto;
    opacity: 0;
    animation: slideIn 1.5s ease-out forwards;
}

/* 淡入動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== 響應式設計 ========== */
@media (max-width: 992px) { /*電腦*/
    .text-container {
        max-width: 80%;
    }

    .text-container h1 {
        font-size: 3rem;
    }

    .text-container h3 {
        font-size: 2rem;
    }

    .image-container img {
        max-width: 100%;
    }
}

@media (max-width: 850px) { /*平板*/
    .hero-slide {
        max-height: 30vh;
    }

    .text-container {
        max-width: 80%;
        text-align: center;  /* 確保標題置中 */
        margin: 0 auto;
    }

    .text-container h1 {
        font-size: 2rem; /* 調整標題字體 */
        margin-bottom: 0.5rem; /* 避免 h1 和 h3 貼太近 */
    }

    .text-container h3 {
        font-size: 1.5rem; /* 調整副標題大小 */
    }

    .image-container {
        text-align: center; /* 讓圖片置中 */
    }

    .image-container img {
        max-width: 100%; /* 讓圖片最大不超過區塊 */
        height: auto;
    }
}

@media (max-width: 450px) { /*手機*/
    
    .hero-slide{
        max-height: 30vh;
    }

    .text-container {
        padding-top: 1em;
        max-width: 90%;
        margin: 0 auto;  /* 移除可能的偏移 */
    }

    .text-container h1 {
        font-size: 2rem;
    }

    .text-container h3 {
        font-size: 1.5rem;
    }

    .image-container img {
        max-width: 100%;
    }
}

/* ========== 主頁區域樣式 ========== */
/* 預設的 hero 樣式 */
.hero {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 活動成果頁面背景 */
.page-results .hero {
    background-image: url("img/活動Backgorund_V2.jpg");
}

/* 關於我們頁面背景 */
.page-about .hero {
    background-image: url("img/理念Hero.jpg");
}

/* 最新消息頁面背景 */
.page-news .hero {
    background-image: url("img/News_Backgorund.jpg");
}

/* 最新消息頁面背景 */
.page-group .hero {
    background-image: url("img/group/group_hero.jpg");
}

/* RAB頁面背景 */
.page-rabboni .hero {
    background-image: url("img/News_Backgorund.jpg");
}

.hero h1 {
    font-size: 3rem; /* 標題字體大小 */
    font-weight: bold; /* 標題粗體 */
    margin-top: 20px; /* 上邊距 */
    color:#fff
}

.page-results .hero h1, .page-about .hero h1 {
    font-size: 4rem; /* 標題字體大小 */
    font-weight: bold; /* 標題粗體 */
    margin-top: 10px; /* 上邊距 */
    color:#fff;
}

/* ========== 關於區域樣式 ========== */
.about-section {
    background-color: #fff; /* 背景色 */
}

.logo-wrapper img {
    max-width: 100%; /* 圖片最大寬度 */
    height: auto; /* 自動調整高度 */
    margin-bottom: 20px; /* 與下方文字間距 */
}

.about-section h2 {
    font-size: 1.8rem; /* 標題大小 */
    font-weight: bold; /* 標題粗體 */
    margin-bottom: 20px; /* 與下方段落間距 */
    color: #333; /* 標題顏色 */
}

.about-section p {
    font-size: 1rem; /* 段落字體大小 */
    color: #555; /* 段落文字顏色 */
    line-height: 1.8; /* 行高 */
}

/* ========== 卡片區域 (Cards) ========== */
h2 {
    font-size: 2rem; /* 標題字體大小 */
    font-weight: bold; /* 標題粗體 */
    color: #333; /* 標題顏色 */
}

h3 {
    font-size: 1.5rem; /* 標題字體大小 */
    font-weight: bold; /* 標題粗體 */
    color: #333; /* 標題顏色 */
}

.card {
    transition: transform 0.3s, box-shadow 0.3s; /* 卡片放大和陰影動畫 */
}

.card:hover {
    transform: scale(1.05); /* 滑鼠懸停時放大 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* 增加陰影 */
}

.card-body {
    padding: 10px; /* 內邊距 */
    font-size: 1rem; /* 卡片文字大小 */
    font-weight: bold; /* 文字粗體 */
    text-align: center; /* 文字置中 */
}

.card-img-top {
    max-height: 200px; /* 圖片最大高度 */
    object-fit: cover; /* 圖片填充方式 */
}

/* 確保輪播圖片適應容器 */
.news-image {
    max-height: 500px; /* 限制圖片最大高度，避免超出 */
    object-fit: cover; /* 保持圖片完整填滿 */
}

.page-results .news-image {
    max-width: 600px !important;  /* 固定寬度 */
    height: cover !important; /* 固定高度 */
    object-fit: cover; /* 確保圖片填滿框架不變形 */
}

/* ========== 家教部門內容區 ========== */
/* Team Features Section */
.team-features {
    margin: 50px 0;
}

.team-features h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.team-features h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #f0ad4e;
}

.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.feature-header {
    color: #f0ad4e;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.feature-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.feature-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon img {
    max-width: 100%;
    max-height: 100%;
}

.feature-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.feature-content li {
    color: #000;
    margin-bottom: 10px;
}

/* Comparison Sections */
.comparison-section {
    margin: 50px 0;
}

.comparison-image {
    width: 100%;
    margin: 20px 0;
    text-align: center;
}

.comparison-image img {
    max-width: 100%;
    height: auto;
}

.comparison-text {
    margin: 20px 0;
}

.comparison-text p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* ========== AI-Tutor 內容區 ========== */
.page-aitutor .ai-section {
    background: rgb(17,12,70);
    background: linear-gradient(90deg, rgba(17,12,70,1) 0%, rgba(91,2,193,1) 73%, rgba(144,33,255,1) 100%);
}
  
.page-aitutor h1 {
    color: #fff;
    font-size: 3.5rem;
    letter-spacing: 0.2rem;
    margin: 0.5rem 0;
}

.page-aitutor h4 {
    color: #fff;
    font-size: 2rem;
    letter-spacing: 0.2rem;
    margin: 0.5rem 0;
}
  
.page-aitutor .subtitle {
    color: #fff;
    letter-spacing: 0.4rem;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* 輪播容器樣式 */
#newsCarousel {
    border-radius: 10px; /* 讓輪播圖片圓角 */
    overflow: hidden; /* 防止邊界溢出 */
}
  
/* 進度條 */
.page-aitutor .progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-aitutor .progress-container span {
    color: #fff;
}
  
.page-aitutor .progress-bar {
    background-color: #ccc;
    height: 0.7rem;
    width: 30%;
    border-radius: 5px;
    overflow: hidden;
}
  
.page-aitutor .progress-fill {
    background-color: #8ab4f8;
    height: 100%;
    transition: width 0.5s ease-in-out;
}

/* ========== 人物卡片基本樣式 ========== */
.page-group .hero {
    background: #333 url('img/group/group_hero.jpg') no-repeat center center; /* 英雄區域背景圖片 */
    background-size: cover; /* 背景填充模式 */
    color: #000; /* 文字顏色 */
    height: 300px; /* 高度為視窗高度的一半 */
}

.page-group .hero h1 {
    font-size: 3.5rem; /* 標題文字大小 */
    font-weight: bold; /* 標題粗體 */
}

.page-group .person-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 300px;
    margin: 0 auto;
}

.page-group .team-card img {
    width: 300px; /* 圖片寬度適配父容器 */
    height: auto; /* 設置統一高度 */
    object-fit: cover; /* 圖片裁剪以適應容器，保持比例 */
    padding: 15px; /* 內邊距 */
}

.page-group .card-body {
    padding: 15px;
    color: #ffc107;
    cursor: pointer;
    transition: transform 0.3s;
}

.page-group .card-details {
    padding: 15px;
    display: none; /* 初始隱藏詳細內容 */
    font-size: 0.9rem;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
}

/* ========== 故障排除項目樣式 ========== */

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9的比例 */
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.pdf-download-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: Arial, sans-serif;
}
  
.download-section-title {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center;
    color: #333;
}
  
.pdf-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
  
.pdf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
  
.pdf-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
  
.pdf-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
  
.pdf-icon {
    width: 50px;
    height: 50px;
    color: #e74c3c;
}
  
.pdf-icon svg {
    width: 100%;
    height: 100%;
}
  
.pdf-details {
    display: flex;
    flex-direction: column;
}
  
.pdf-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #333;
}
  
.pdf-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 5px 0;
}
  
.pdf-size {
    font-size: 12px;
    color: #888;
}
  
.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
  
.download-btn:hover {
    background-color: #2980b9;
}
  
.download-btn svg {
    width: 20px;
    height: 20px;
}

/* 卡片內容樣式 */
.card-body {
    padding: 1.5rem;
    background-color: #fafafa;
}

.card h5 {
    font-size: 1rem;
}

/* 問題描述標題樣式 */
.problem-title {
    color: #fd7e14;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

/* 解決方案標題樣式 */
.solution-title {
    color: #198754;
    font-weight: bold;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

/* 操作步驟標題樣式 */
.steps-title {
    color: #0d6efd;
    font-weight: bold;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

/* 列表項目樣式 */
.card-body ol li,
.card-body ul li {
    margin-bottom: 0.5rem;
}

.card-body ul {
    padding-left: 1.5rem;
}

/* 連結樣式 */
.card-body a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.card-body a:hover {
    text-decoration: underline;
}

/* ========== 頁尾 (Footer) ========== */
.footer {
    border-top: 1px solid #ffc107; /* 頁尾上方邊框 */
}

.footer img {
    max-width: 100%; /* 圖片最大寬度 */
    height: auto; /* 自動調整高度 */
}

.footer h6 {
    font-size: 1rem; /* 小標題字體大小 */
    margin-bottom: 10px; /* 下邊距 */
    color: #000; /* 小標題顏色 */
}

.footer p {
    font-size: 0.9rem; /* 段落字體大小 */
    margin-bottom: 5px; /* 下邊距 */
    color: #333; /* 段落顏色 */
}

.footer small {
    font-size: 0.8rem; /* 版權字體大小 */
    color: #fff; /* 版權文字顏色 */
}

.footer h5 {
    font-weight: bold; /* 標題粗體 */
}

/* ========== 頁尾連結區域 ========== */
.foot-title {
    font-size: 1.25rem; /* 標題文字大小 */
    font-weight: bold; /* 標題粗體 */
    margin-bottom: 1rem; /* 與列表的間距 */
    color: #2c3e50; /* 標題文字顏色 */
}

.foot-list {
    list-style: none; /* 去掉列表標記 */
    padding: 0; /* 去掉內距 */
    margin: 0; /* 去掉外距 */
}

.foot-list li {
    margin-bottom: 0.8rem; /* 列表項之間的間距 */
}

.foot-list a {
    text-decoration: none; /* 移除連結下劃線 */
    color: black; /* 連結文字顏色 */
    transition: color 0.3s ease; /* 添加顏色過渡效果 */
}

.foot-list a:hover {
    color: white !important; /* 鼠標懸停時的顏色 */    
}

.foot-list .date {
    display: block; /* 日期單獨換行 */
    font-size: 0.85rem; /* 日期文字大小 */
    color: #2c3e50; /* 日期文字顏色 */
    margin-top: 0.2rem; /* 與標題的間距 */
}

/* 社群媒體icon樣式 */
.social-links {
    display: flex;
    align-items: center;
}

.social-icon {
    font-size: 35px;
    transition: color 0.3s ease;
}

/* ========== 回到頂部按鈕 (Back to Top Button) ========== */
#backToTop {
    position: fixed; /* 固定在頁面 */
    bottom: 20px; /* 距離底部 20px */
    right: 20px; /* 距離右側 20px */
    display: none; /* 初始隱藏 */
    z-index: 1000; /* 提升層級 */
    width: 60px; /* 按鈕寬度 */
    height: 60px; /* 按鈕高度 */
    background-color: #ffc107; /* 按鈕背景顏色 */
    color: #212529; /* 按鈕文字顏色 */
    border: none; /* 無邊框 */
    border-radius: 50%; /* 圓形按鈕 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* 陰影效果 */
    font-size: 1.5rem; /* 按鈕圖標大小 */
    transition: all 0.3s ease-in-out; /* 動畫過渡效果 */
}

/* 滑鼠懸停效果 */
#backToTop:hover {
    background-color: #ff9800; /* 懸停時背景顏色 */
    color: white; /* 懸停時文字顏色 */
    transform: scale(1.1); /* 放大效果 */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5); /* 增強陰影 */
}

/* 動畫效果 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0); /* 原始位置 */
    }
    40% {
        transform: translateY(-10px); /* 向上移動 */
    }
    60% {
        transform: translateY(-5px); /* 輕微向下 */
    }
}

/* 出現時的動畫 */
#backToTop.show {
    animation: bounce 1.5s; /* 彈跳動畫 */
}

/* AI解題家教主要樣式 */
.ai-tutor-section {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
}

.ai-tutor-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.ai-tutor-section .subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* AI解題家教進度容器 */
.ai-tutor-section .progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    margin: 30px 0;
}

/* 插圖容器 */
.illustration-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.illustration-wrapper img {
    max-width: 100%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.notification-badge {
    position: absolute;
    top: 15%;
    right: 20%;
    background-color: var(--accent-color);
    color: #333;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    animation: pulse 2s infinite;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 額外動畫效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ========== 響應式設計 (Responsive Design) ========== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem; /* 小螢幕標題大小 */
    }

    .hero p {
        font-size: 1rem; /* 小螢幕段落大小 */
    }
    
    .page-aitutor h1 {
        font-size: 2.5rem;
    }
      
    .page-aitutor .progress-bar {
        width: 60%;
    }
    
    .ai-tutor-section h1 {
        font-size: 2.5rem;
    }
    
    .ai-tutor-section .hero-section {
        text-align: center;
        padding: 40px 0;
    }
    
    .ai-tutor-section .progress-container {
        flex-direction: row;
        justify-content: center;
    }
}

.page-tutor .hero {
    height: 45vh;
    background: rgb(251,227,126);
    background: linear-gradient(90deg, rgba(251,227,126,1) 0%, rgba(255,152,0,1) 100%);
}