/* --- 通用 & 首頁優化樣式 --- */

.carousel-caption-bg {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: .5rem;
  padding: 0.5rem;
  bottom: 5%; 
}

.btn-carousel {
  font-size: 1.1rem !important;
  padding: 0.5rem 1.5rem !important;
}

.team-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  background-color: #f8f9fa; /* 淺灰色背景 */
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.team-icon {
  font-size: 3rem;
  color: #007bff; /* 主題藍色 */
}

/* --- 專業團隊介紹頁面樣式 --- */

.nav-pills .nav-link {
  color: #6c757d; /* 灰色文字 */
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  padding: .75rem 1rem; /* 增加點擊區域 */
}
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
  color: #fff;
  background-color: #007bff; /* 主題藍色 */
  border-color: #007bff;
}
.nav-pills .nav-link:hover:not(.active) {
  color: #0056b3;
}

.nav-pills-container {
  width: 100%;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.nav-pills-container::-webkit-scrollbar {
  display: none;
}
.nav-pills-container .nav-pills {
  flex-wrap: nowrap;
  padding-bottom: 10px;
}
.nav-pills-container .nav-item {
  white-space: nowrap;
}

/* --- 聯絡交通頁面樣式 --- */

.map-container {
  position: relative;
  overflow: hidden;
  padding-top: 100%; 
  height: 100%;
}
@media (min-width: 992px) {
  .map-container {
      padding-top: 120%;
  }
}
.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.info-card .list-group-item {
  border: none;
  padding-left: 0;
  padding-right: 0;
}
.info-card .list-group-item i {
  width: 25px;
}

/* --- 特色課程頁面樣式 --- */

.lesson-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e9ecef;
}
.lesson-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.lesson-card-img {
  width: 120px;
  height: 120px;
  object-fit: cover; /* 確保圖片不變形 */
}
.lesson-card .list-group {
  text-align: left;
  font-size: 0.95rem;
}
.lesson-card .list-group-item {
  border:none;
  padding: .4rem 0.25rem; /* 調整行距與邊距 */
}
.section-title-container {
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
  margin-bottom: 2.5rem !important; /* 增加與下方卡片的距離 */
}
.list-group-item-action .bi-chevron-right {
  color: #6c757d; /* 灰色 */
  font-size: 0.8em;
  transition: color 0.2s;
}
.list-group-item-action:hover .bi-chevron-right {
   color: #007bff; /* 滑鼠移上去時變藍色 */
}

/* --- Floating Action Button (FAB) Styles --- */

.fab-container {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1050;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  transition: transform 0.4s ease-in-out;
}
.fab-toggle {
  width: 60px;
  height: 60px;
  background-color: #06C755; 
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.fab-toggle:hover {
  transform: scale(1.1);
  color: white;
  background-color: #05a546; 
}
.fab-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}
.fab-container.is-open .fab-menu {
  transform: scaleY(1);
}
.fab-container.is-open .fab-toggle {
  transform: rotate(45deg);
}
.fab-menu li {
  margin-bottom: 10px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(20px);
}
.fab-container.is-open .fab-menu li {
  opacity: 1;
  transform: translateY(0);
}
.fab-container.is-open .fab-menu li:nth-child(1) { transition-delay: 0.1s; }
.fab-container.is-open .fab-menu li:nth-child(2) { transition-delay: 0.15s; }
.fab-container.is-open .fab-menu li:nth-child(3) { transition-delay: 0.2s; }
.fab-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f8f9fa;
  color: #343a40;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background-color 0.2s;
}
.fab-item:hover {
  transform: scale(1.1);
  background-color: #e9ecef;
  color: #343a40;
}
.fab-item[title*="LINE"] { background-color: #06C755; color: white; }
.fab-item[title*="LINE"]:hover { background-color: #05a546; color: white; }
.fab-item[title*="Messenger"] { background-color: #0084ff; color: white; }
.fab-item[title*="Messenger"]:hover { background-color: #006bce; color: white; }

/* --- 衛教資訊頁面手風琴樣式 (Accordion) --- */

.accordion .card {
  border: 1px solid #e9ecef;
  border-radius: .25rem;
  margin-bottom: -1px; /* 讓邊框重疊 */
}

.accordion .card:first-of-type {
  border-top-left-radius: .25rem;
  border-top-right-radius: .25rem;
}

.accordion .card:last-of-type {
  margin-bottom: 0;
  border-bottom-left-radius: .25rem;
  border-bottom-right-radius: .25rem;
}

.accordion .card-header {
  padding: 0;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.accordion .btn-link {
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  color: #343a40;
  font-weight: 500;
  text-decoration: none !important; /* 強制移除底線 */
  transition: background-color 0.2s ease;
}

.accordion .btn-link:hover {
  background-color: #e9ecef;
}

.accordion .btn-link .bi-chevron-down {
  transition: transform 0.3s ease;
}

.accordion .btn-link[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.accordion .list-group-item-action i {
    transition: color 0.2s;
}

.accordion .list-group-item-action:hover i {
    color: #007bff;
}

/* --- Footer Styles --- */
.footer-social-icons a {
  color: white;
  font-size: 1.5rem; /* Replaces inline style */
  transition: color 0.2s ease-in-out;
}

.footer-social-icons a:hover {
  color: #c0c0c0; /* Hover effect: light grey */
  text-decoration: none;
}