/* =========================================================
   REN AI CRAM SCHOOL - theme.css
   完整整理版（2026-03）
   重點：
   1. 桌機版選單 active 改為橘色底線
   2. 手機版選單 active 維持左側橘色直線
   3. 保留 dropdown、hero、news、footer、RWD
   4. 移除衝突的舊 active 規則
   ========================================================= */


/* =========================================================
   01. CSS 變數
   ========================================================= */
:root {
  --ra-orange: #f59e0b;
  --ra-orange-dark: #d97706;
  --ra-blue: #1f6a88;
  --ra-blue-dark: #13285d;
  --ra-blue-soft: #eef3ff;
  --ra-blue-deeper: #0f255c;
  --ra-green: #67b56d;

  --ra-text: #1f2937;
  --ra-muted: #6b7280;
  --ra-bg: #f8fafc;
  --ra-card: #ffffff;
  --ra-border: #e5e7eb;

  --ra-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  --ra-shadow-lg: 0 20px 50px rgba(19, 40, 93, 0.16);
  --ra-radius: 22px;
}


/* =========================================================
   02. 全域基礎
   ========================================================= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', sans-serif;
  color: var(--ra-text);
  background: linear-gradient(180deg, #ffffff 0%, var(--ra-bg) 100%);
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}


/* =========================================================
   03. Header / Navbar
   ========================================================= */
.site-header .navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31, 60, 136, 0.06);
}

.site-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.brand-title {
  color: var(--ra-blue-dark);
  font-weight: 800;
  line-height: 1.1;
  font-size: 1.55rem;
}

.brand-subtitle {
  color: var(--ra-orange-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.top-contact {
  color: var(--ra-orange-dark);
  font-weight: 700;
  gap: .45rem;
}

/* 主選單基本 */
.navbar .nav-link {
  color: var(--ra-blue-dark);
  font-weight: 700;
  padding: .9rem .95rem !important;
  position: relative;
  transition: color .25s ease, background .25s ease;
}

.navbar .nav-link:hover {
  color: var(--ra-blue);
}

.navbar .nav-link.active {
  color: var(--ra-blue);
}

/* 滑鼠在 navbar 上時，active 連結暫時回到深色，離開後恢復 active 色 */
.navbar:hover .nav-link.active {
  color: var(--ra-blue-dark) !important;
}

/* ===== 桌機版：hover / active 底線 ===== */
@media (min-width: 992px) {
  .navbar .nav-link::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: .35rem;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--ra-orange);
    transform: translateX(-50%);
    transition: width .3s cubic-bezier(.4, 0, .2, 1);
  }

  .navbar .nav-link:hover::before,
  .navbar .nav-link.active::before {
    width: calc(100% - 1.9rem);
  }

  /* 滑鼠移入時先隱藏正在作用中的 active 橘線，離開再還原 */
  .navbar:hover .nav-link.active::before {
    width: 0 !important;
  }

  .navbar .nav-item.dropdown:hover .nav-link.dropdown-toggle,
  .navbar .nav-item.dropdown.show .nav-link.dropdown-toggle {
    color: var(--ra-blue);
  }

  .navbar .nav-item.dropdown:hover .nav-link.dropdown-toggle::before,
  .navbar .nav-item.dropdown.show .nav-link.dropdown-toggle::before {
    width: calc(100% - 1.9rem);
  }
}

/* Bootstrap 原生箭頭先關閉，改用自訂 */
.navbar .dropdown-toggle::after {
  display: none !important;
}

/* ===== 桌機版：有子選單顯示小箭頭 ===== */
@media (min-width: 992px) {
  .navbar .nav-item.dropdown > .nav-link.dropdown-toggle::after {
    display: inline-block !important;
    content: "";
    margin-left: .45rem;
    vertical-align: .12rem;
    width: .42rem;
    height: .42rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
    background: transparent;
  }

  .navbar .nav-item.dropdown:hover > .nav-link.dropdown-toggle::after,
  .navbar .nav-item.dropdown.show > .nav-link.dropdown-toggle::after {
    transform: rotate(225deg) translateY(-1px);
  }
}

/* dropdown 外觀 */
.dropdown-menu {
  border: 1px solid rgba(31, 60, 136, 0.08) !important;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.10) !important;
  padding: .55rem !important;
  border-radius: 20px;
}

.dropdown-item {
  font-weight: 700;
  color: var(--ra-blue-dark);
  padding: .7rem .9rem;
  transition: all .2s ease;
  border-radius: 12px;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--ra-blue-soft);
  color: var(--ra-blue);
  transform: translateX(2px);
}

.dropdown-item.active,
.dropdown-item:active {
  background: var(--ra-blue-soft);
  color: var(--ra-blue);
  font-weight: 800;
}

/* 桌機 hover dropdown */
@media (min-width: 1200px) {
  .navbar .dropdown {
    position: relative;
  }

  .navbar .dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
  }

  .navbar .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    margin-top: 0;
  }

  .navbar .dropdown:hover > .dropdown-menu,
  .navbar .dropdown-menu:hover,
  .navbar .dropdown.show > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}


/* =========================================================
   04. 區塊標題 / 共用文字
   ========================================================= */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ra-blue-dark);
  margin-bottom: .8rem;
}

.section-subtitle {
  color: var(--ra-muted);
  max-width: 760px;
}

.section-space {
  padding: 4rem 0;
}

/* =========================================================
   05. HOME HERO CAROUSEL
   中間固定 + 左右模糊延伸版
   ========================================================= */

.hero-section {
  padding: 0;
  background: #fff;
}

.hero-carousel {
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

/* 外層：滿版，負責模糊背景 */
.hero-slide {
  width: 100%;
  aspect-ratio: 1920 / 600;
  height: auto;
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  background: none !important;
}


.hero-slide::before {
  display: none !important;
}
.hero-slide::after {
  display: none !important;
}

/* 中間清楚主圖容器 */
.hero-slide-img {
  position: relative;
  z-index: 3;

  width: 100%;
  max-width: 1920px;
  height: 100%;
 
  aspect-ratio: 1920 / 600; /* ⭐ 關鍵：保持圖片容器的寬高比，避免變形 */
 
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 中間清楚主圖 */
.hero-slide-img img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 不裁切，完整顯示整張 Banner */
}

/* 左右控制 */
.hero-control {
  width: 64px;
  opacity: 1;
  z-index: 5;
}

.hero-control-icon {
  width: 52px;
  height: 52px;
  background: rgba(5, 21, 58, .68);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.hero-control:hover .hero-control-icon {
  background: rgba(245, 158, 11, .92);
}

.hero-control-icon i {
  font-size: 20px;
}

/* 指示點 */
.hero-indicators {
  bottom: 15px;
  z-index: 6;
}

.hero-indicators button {
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px;
  background: #fff;
  opacity: 0.4;
}

.hero-indicators .active {
  opacity: 1;
  width: 26px;
  border-radius: 20px;
}
/* 平板 */
@media (max-width: 991.98px) {
  .hero-slide {
    aspect-ratio: 1920 / 600;
    height: auto;
  }

  .hero-slide-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 600;
  }

  .hero-slide-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .hero-control {
    width: 48px;
  }

  .hero-control-icon {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }
}

/* 手機 */
@media (max-width: 576px) {
  .hero-slide {
    aspect-ratio: 1920 / 600;
    height: auto;
  }

  .hero-slide-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 600;
  }

  .hero-slide-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .hero-control {
    width: 38px;
  }

  .hero-control-icon {
    width: 32px;
    height: 32px;
    font-size: .95rem;
  }

  .hero-indicators {
    bottom: .45rem;
  }

  .hero-indicators [data-bs-target] {
    width: 8px !important;
    height: 8px !important;
  }

  .hero-indicators .active {
    width: 22px !important;
  }
}
/* =========================================================
   06. 浮動視窗 FLOATING ACTIONS
   ========================================================= */
.floating-contact-card{
  position:fixed;
  right:1rem;
  bottom:1rem;
  z-index:999;

  width:100px;
  padding:.65rem;

  border-radius:10px;
  background:#faf8f3;
  box-shadow:0 10px 24px rgba(15,23,42,.12);
}

.floating-contact-title{
  color:#102a66;
  font-weight:900;
  font-size:.82rem;
  margin-bottom:.45rem;
  text-align:center;
}

.floating-contact-link{
  display:flex;
  align-items:center;
  gap:.45rem;
  padding:.5rem;
  border-radius:.85rem;
  color:#102a66;
  text-decoration:none;
  background:#faf8f3;
  font-weight:800;
  font-size:.82rem;
  transition:background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.floating-contact-link + .floating-contact-link{
  margin-top:.45rem;
}

.floating-contact-link small{
  display:block;
  color:#64748b;
  font-size:.66rem;
  font-weight:600;
  margin-top:.05rem;
  transition:color .2s ease;
}

.floating-contact-icon{
  width:1.8rem;
  height:1.8rem;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  flex-shrink:0;
  font-size:.9rem;
  transition:background .2s ease, transform .2s ease;
}

.floating-contact-icon.trial{
  background:linear-gradient(135deg,#3ba4df,#0f4c81);
}

.floating-contact-icon.line{
  background:linear-gradient(135deg,#06c755,#02a344);
}

/* 預約試聽 hover */
.floating-contact-link:hover{
  background:linear-gradient(135deg,#3ba4df,#0f4c81);
  color:#fff;
  transform:translateY(-2px);
  box-shadow:0 10px 20px rgba(15,76,129,.22);
}

.floating-contact-link:hover small{
  color:rgba(255,255,255,.9);
}

.floating-contact-link:hover .floating-contact-icon{
  background:rgba(255,255,255,.18);
  transform:scale(1.04);
}

/* LINE hover */
.floating-contact-link.line:hover{
  background:linear-gradient(135deg,#06c755,#02a344);
  color:#fff;
  box-shadow:0 10px 20px rgba(2,163,68,.22);
}

.floating-contact-link.line:hover small{
  color:rgba(255,255,255,.9);
}

/* 手機版：保留文字，不只顯示 icon */
@media (max-width:576px){
  .floating-contact-card{
    right:.7rem;
    bottom:.7rem;
    width:135px;
    padding:.55rem;
    display:block;
  }

  .floating-contact-title{
    display:block;
    font-size:.74rem;
    margin-bottom:.4rem;
  }

  .floating-contact-link{
    padding:.5rem;
    gap:.4rem;
    font-size:.74rem;
    border-radius:.7rem;
  }

  .floating-contact-link + .floating-contact-link{
    margin-top:.4rem;
  }

  .floating-contact-link small{
    display:block;
    font-size:.6rem;
  }

  .floating-contact-icon{
    width:1.7rem;
    height:1.7rem;
    font-size:.8rem;
  }
}

/* =========================================================
   07. 按鈕
   ========================================================= */
.btn-ra-primary,
.btn-ra-secondary,
.btn-ra-success {
  border-radius: 999px;
  padding: .9rem 1.35rem;
  font-weight: 800;
  border: 0;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.btn-ra-primary:hover,
.btn-ra-secondary:hover,
.btn-ra-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.12);
}

.btn-ra-primary {
  background: linear-gradient(180deg, #ffb433, var(--ra-orange-dark));
  color: #fff;
}

.btn-ra-secondary {
  background: #fff;
  color: var(--ra-blue-dark);
}

.btn-ra-success {
  background: var(--ra-green);
  color: #fff;
}


/* =========================================================
   08. 首頁課程卡片
   ========================================================= */
.course-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 20px;
  padding: 28px 20px;
  height: 100%;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}

.course-link-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.course-link-card .course-mini-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  background: #eaf2ff;
  color: #2f80ed;
  font-size: 28px;
  transition: all .25s ease;
}

.course-link-card:hover .course-mini-icon {
  background: #2f80ed;
  color: #fff;
}

.course-link-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.course-link-card p {
  font-size: .9rem;
  color: #6b7280;
  line-height: 1.5;
}

.course-link-card:hover::after {
  transform: translateX(4px);
  background: #f59e0b;
  color: #fff;
}

.course-link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}

.course-link-card:hover::before {
  opacity: 1;
}


/* =========================================================
   09. 共用卡片
   ========================================================= */
.content-card,
.info-card,
.article-card,
.contact-card,
.list-card {
  background: var(--ra-card);
  border-radius: var(--ra-radius);
  box-shadow: var(--ra-shadow);
  border: 1px solid var(--ra-border);
}

.news-card {
  background: var(--ra-card);
  border-radius: var(--ra-radius);
  box-shadow: var(--ra-shadow);
  border: 1px solid var(--ra-border);
  padding: 1.2rem 1.25rem;
  margin-bottom: 1rem;
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.10);
}

.news-card .news-title {
  color: var(--ra-blue-dark);
  font-weight: 800;
  font-size: 1.1rem;
}

.news-excerpt {
  color: var(--ra-muted);
}


/* =========================================================
   10. 類別卡 / 花絮卡
   ========================================================= */
.category-card,
.course-card,
.gallery-card,
.honor-card,
.parent-card {
  background: var(--ra-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--ra-shadow);
  border: 1px solid var(--ra-border);
  height: 100%;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.category-card:hover,
.course-card:hover,
.gallery-card:hover,
.honor-card:hover,
.parent-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
  border-color: rgba(31, 60, 136, 0.10);
}

.card-cover {
  height: 180px;
  background: #f4f8ff !important;
}

.card-cover.blue {
  background: #f4f8ff !important;
}

.card-body-custom {
  padding: 1.3rem;
}

.card-eyebrow {
  display: inline-block;
  margin-bottom: .6rem;
  color: var(--ra-orange-dark);
  font-weight: 800;
  font-size: .85rem;
}

.card-title-custom {
  color: var(--ra-blue-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.card-text-custom {
  color: var(--ra-muted);
}


/* =========================================================
   11. 文字連結
   ========================================================= */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 800;
  color: var(--ra-blue);
  transition: color .2s ease;
}

.link-arrow:hover {
  color: var(--ra-orange-dark);
}

.link-arrow i {
  display: none;
}


/* =========================================================
   12. 子頁 Hero / 麵包屑
   ========================================================= */
.page-hero {
  padding: 1.5rem 0 1rem;
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.page-breadcrumb {
  color: var(--ra-muted);
}

.page-breadcrumb a {
  color: var(--ra-blue);
}


/* =========================================================
   13. 清單 / 功能列表
   ========================================================= */
.feature-list,
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li,
.check-list li {
  padding-left: 1.75rem;
  margin-bottom: .75rem;
  position: relative;
  color: var(--ra-text);
}

.feature-list li::before,
.check-list li::before {
  content: '\F26A';
  font-family: bootstrap-icons;
  position: absolute;
  left: 0;
  top: .05rem;
  color: var(--ra-green);
}

.info-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--ra-orange-dark);
}


/* =========================================================
   14. 表單
   ========================================================= */
.form-control,
.form-select {
  border-radius: 16px;
  padding: .85rem 1rem;
  border-color: #d6dbe5;
}

.form-control:focus,
.form-select:focus {
  border-color: #7ba2ff;
  box-shadow: 0 0 0 .25rem rgba(59,130,246,.13);
}

.form-hint {
  font-size: .9rem;
  color: var(--ra-muted);
}

.dynamic-fields {
  padding: 1rem;
  border: 1px solid var(--ra-border);
  border-radius: 18px;
  background: #fbfdff;
}


/* =========================================================
   15. Footer
   ========================================================= */
.site-footer {
  background: linear-gradient(180deg, var(--ra-blue-dark) 0%, #0d1b43 100%);
  color: rgba(255,255,255,.9);
}

.footer-title,
.footer-subtitle {
  color: #fff;
  font-weight: 800;
}

.footer-list li {
  margin-bottom: .55rem;
}

.footer-contact a{
  color:#fff;
  text-decoration:none;
  transition:.2s ease;
}

.footer-contact a:hover{
  color:#f6b333;
}
.footer-contact li{
  display:flex;
  align-items:flex-start;
  gap:.8rem;
  margin-bottom:1.15rem;
  line-height:1.8;
}

.footer-contact i{
  margin-top:.2rem;
  color:#f1f0ed;
  flex-shrink:0;
}

.footer-links{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.8rem 1.5rem;
}

.footer-links a{
  color:rgba(255,255,255,.92);
  text-decoration:none;
  transition:.2s ease;
}

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

.footer-socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.16);
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  transition: .2s;
}

.footer-socials a:hover {
  background: var(--ra-orange);
  color: #fff;
  transform: translateY(-2px);
}

.copyright {
  color: rgba(255,255,255,.7);
}


/* =========================================================
   16. 其他小元件
   ========================================================= */
.gallery-tile {
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--ra-shadow);
}

.notice-box {
  background: #fff8ec;
  border: 1px solid #ffe2a5;
  border-radius: 22px;
  padding: 1.15rem 1.25rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.article-cover {
  max-height: 520px;
  object-fit: cover;
  width: 100%;
}


/* =========================================================
   17. 最新消息（列表升級版）
   ========================================================= */
.news-section {
  background: transparent;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.news-more {
  color: var(--ra-blue);
  font-weight: 800;
  text-decoration: none;
  transition: color .2s ease;
}

.news-more:hover {
  color: var(--ra-orange-dark);
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border: 1px solid #edf0f4;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05);
  overflow: hidden;
}

.news-item {
  position: relative;
  border-bottom: 1px solid #eef2f6;
}

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

.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ra-orange), var(--ra-orange-dark));
  transition: width .2s ease;
}

.news-item:hover::before {
  width: 4px;
}

.news-link {
  display: block;
  padding: 1rem 1.15rem 1rem 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: background .2s ease;
}

.news-item:hover .news-link {
  background: #fcfcfd;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  margin-bottom: .4rem;
}

.news-list .news-date {
  color: #7b8794;
  font-size: .92rem;
  font-weight: 700;
  min-width: 88px;
}

.news-pin {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700;
  font-size: .8rem;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: #fff3e1;
  color: #b45309;
  font-weight: 700;
  font-size: .8rem;
}

.news-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.news-title-line {
  color: var(--ra-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
  transition: color .2s ease;
}

.news-item:hover .news-title-line {
  color: var(--ra-blue);
}

.news-arrow {
  flex: 0 0 auto;
  color: #9aa5b1;
  font-size: .95rem;
  transition: transform .2s ease, color .2s ease;
}

.news-item:hover .news-arrow {
  color: var(--ra-orange-dark);
  transform: translateX(2px);
}

.news-item.is-pinned .news-title-line {
  font-weight: 800;
}


/* =========================================================
   18. 跑馬燈 / 橫向滑動
   ========================================================= */
.marquee-section {
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .4rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.marquee-track::-webkit-scrollbar {
  height: 8px;
}

.marquee-track::-webkit-scrollbar-thumb {
  background: #d7dee8;
  border-radius: 999px;
}

.marquee-item {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
}

.marquee-item.video-card {
  flex-basis: min(420px, 92vw);
}

.gallery-card,
.video-card-shell {
  height: 100%;
}

/* =========================================================
   19. 關於我們
   ========================================================= */

.about-anchor-section {
  scroll-margin-top: 140px;
}

/* =========================================================
   20. RWD
   ========================================================= */
@media (max-width: 1199px) {
  .top-contact {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

@media (max-width: 1199.98px) {
  .hero-control {
    width: 52px;
  }

  .hero-control-icon {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
  }
}

@media (max-width: 991px) {
  .navbar-collapse {
    margin-top: .6rem;
    padding: .4rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
  }

  .navbar .nav-link {
    position: relative;
    padding: .65rem .8rem .65rem 1.2rem !important;
    border-radius: 10px;
    font-size: .95rem;
    line-height: 1.3;
  }

  /* 手機版不要底線 */
  .navbar .nav-link::before {
    display: none !important;
  }

  .navbar .nav-link.active {
    background: transparent !important;
    color: var(--ra-blue);
  }

  /* 手機版 active 左側橘線（使用 ::before，避免 dropdown ::after 覆蓋） */
  .navbar .nav-link.active::before {
    display: block !important;
    content: '';
    position: absolute;
    left: .3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 55%;
    background: var(--ra-orange);
    border-radius: 999px;
  }

  .nav-item.dropdown > .nav-link {
    padding-right: 2rem !important;
  }

  .nav-item.dropdown > .nav-link.dropdown-toggle::after {
    display: block !important;
    content: '';
    position: absolute;
    right: .7rem;
    top: 50%;
    width: .45rem;
    height: .45rem;
    border-right: 2px solid var(--ra-blue-dark);
    border-bottom: 2px solid var(--ra-blue-dark);
    transform: translateY(-65%) rotate(45deg);
    transition: transform .22s ease, border-color .22s ease;
    background: transparent;
  }

  .nav-item.dropdown.show > .nav-link.dropdown-toggle::after {
    transform: translateY(-35%) rotate(-135deg);
    border-color: var(--ra-blue);
  }

  .dropdown-menu {
    display: block;
    border: 0 !important;
    box-shadow: none !important;
    background: #f8fbff;
    padding: .2rem !important;
    margin: .2rem 0 .3rem 0 !important;
    border-radius: 12px;
  }

  .dropdown-menu:not(.show) {
    display: none;
  }

  .dropdown-item {
    padding: .55rem .7rem .55rem 1.1rem;
    font-size: .9rem;
    border-radius: 8px;
  }

  .dropdown-item:hover {
    padding-left: 1.2rem;
    transform: none;
  }

  .dropdown-item.active {
    background: transparent;
    color: var(--ra-blue);
    font-weight: 800;
  }

  .hero-section {
    padding: .5rem 0 .75rem;
  }



  .hero-control {
    width: 48px;
  }

  .hero-control-icon {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }

  .floating-trial-btn {
    right: 16px;
    bottom: 18px;
    padding: .82rem .9rem;
    border-radius: 16px;
  }
}

@media (max-width: 576px) {
  .site-logo {
    width: 46px;
    height: 46px;
  }

  .brand-title {
    font-size: .96rem;
  }

  .brand-subtitle {
    font-size: .5rem;
  }

  .navbar-collapse {
    margin-top: .7rem;
    padding: .55rem;
    border-radius: 18px;
  }

  .navbar .nav-link {
    font-size: .96rem;
    padding: .8rem .9rem .8rem .95rem !important;
  }

  .nav-item.dropdown > .nav-link {
    padding-right: 1.9rem !important;
  }

  .nav-item.dropdown > .nav-link.dropdown-toggle::after {
    right: .82rem;
    width: .4rem;
    height: .4rem;
  }

  .dropdown-item {
    font-size: .93rem;
  }


  .hero-control {
    width: 42px;
  }

  .hero-control-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .hero-indicators {
    left: .95rem;
    bottom: .75rem;
  }

  .hero-indicators [data-bs-target] {
    width: 9px;
    height: 9px;
  }

  .hero-indicators .active {
    width: 24px;
  }

  .floating-trial-btn {
    right: 12px;
    bottom: 14px;
    gap: .55rem;
    padding: .72rem .8rem;
    border-radius: 14px;
  }

  .floating-trial-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 1rem;
  }

  .floating-trial-text strong {
    font-size: .9rem;
  }

  .floating-trial-text small {
    font-size: .72rem;
  }

  .course-mini-card {
    padding: 1rem .9rem 1rem;
    border-radius: 20px;
  }

  .course-mini-card h3 {
    font-size: 1rem;
  }

  .course-mini-card p {
    font-size: .88rem;
    line-height: 1.55;
    min-height: auto;
  }

  .course-mini-icon {
    width: 64px;
    height: 64px;
    margin-bottom: .8rem;
  }

  .news-header {
    margin-bottom: .85rem;
  }

  .news-link {
    padding: .9rem .9rem .9rem 1rem;
  }

  .news-meta {
    gap: .45rem;
    margin-bottom: .35rem;
  }

  .news-list .news-date {
    min-width: auto;
    font-size: .82rem;
  }

  .news-title-line {
    font-size: .95rem;
  }

  .news-arrow {
    font-size: .85rem;
  }
}

/* ===== 相簿燈箱圖片修正 ===== */
#lightbox {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 70px;
  box-sizing: border-box;
}

#lightbox img {
  display: block;
  max-width: min(90vw, 1200px);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
/* =========================================================
   COURSE IMAGE / ICON FALLBACK
   統一尺寸精緻版
   ========================================================= */

.course-media-card{
  color:inherit;
  overflow:hidden;
}

/* 圖片區：固定高度，讓有圖/沒圖一樣高 */
.course-card-image{
  width:100%;
  height:150px;
  overflow:hidden;
  border-radius:1.25rem 1.25rem 0 0;
  background:#f3f4f6;
}

.course-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}

.course-media-card:hover .course-card-image img{
  transform:scale(1.04);
}

/* icon fallback：固定高度，跟圖片區一致 */
.course-card-icon-wrap{
  width:100%;
  height:150px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:1.25rem 1.25rem 0 0;

  background:
    radial-gradient(circle at top right, rgba(255,255,255,.65), transparent 35%),
    linear-gradient(135deg,#fff7ed,#ffedd5);
}

.course-card-icon{
  width:56px;
  height:56px;
  border-radius:50%;
  background:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  box-shadow:
    0 10px 24px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.7);
}

.course-card-icon i{
  font-size:1.45rem;
  color:#f97316;
  line-height:1;
}

/* 詳細頁大圖 */
.course-detail-image{
  width:100%;
  border-radius:1.25rem;
  overflow:hidden;
  background:#f3f4f6;
}

.course-detail-image img{
  width:100%;
  max-height:420px;
  object-fit:cover;
  display:block;
}

/* 手機 */
@media (max-width:575.98px){
  .course-card-image,
  .course-card-icon-wrap{
    height:120px;
  }

  .course-card-icon{
    width:48px;
    height:48px;
  }

  .course-card-icon i{
    font-size:1.25rem;
  }
}