/* ==========================================================================
   傑羅資訊有限公司 (JL INFORMATION CO., LTD.) 官方正式 CI 設計系統
   精準對齊 https://www.jl.com.tw/ 正式機品牌色彩：
   - 企業天藍色 (jL Sky Blue):     #48BCE7 / #00A0E9
   - 品牌高亮/懸停色 (Accent Pink): #E21E79
   - 尊貴金棕色 (Accent Gold):      #9D7C4D / #C5AB5F
   - 頁尾上層咖啡暖棕 (Footer Warm): #83685C
   - 頁尾下層深炭黑 (Footer Dark):   #2C2B2F
   - 主體文字黑 (Body Text):        #1E1E1E / #231815
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&family=Open+Sans:wght@400;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
  /* 品牌色彩系統 (Brand Color Tokens) */
  --jl-sky: #48bce7;
  --jl-sky-hover: #29a8df;
  --jl-sky-light: #eef8fc;
  --jl-pink: #e21e79;
  --jl-gold: #9d7c4d;
  --jl-gold-light: #c5ab5f;
  --jl-gold-gradient: linear-gradient(to right, #635630, #c5ab5f);
  --jl-footer-bg: #0b2546;
  --jl-footer-bottom: #061528;

  /* 背景與表面 */
  --bg-page: #f8fafc;
  --bg-white: #ffffff;
  --text-main: #231815;
  --text-muted: #64748b;

  /* 浮動工具列專用色彩 */
  --color-line: #06c755;
  --color-contact: #fa6400;
  --color-gotop: #83685c;

  /* 陰影與圓角 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(72, 188, 231, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.25s ease-in-out;
}

/* 基礎重設 (避免破壞 Bootstrap 格線與排版系統) */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans TC', 'Open Sans', Arial, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--jl-pink);
}

/* ==========================================================================
   前台頂部導覽列 (Official Brand Navbar)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border-top: 4px solid var(--jl-sky);
  transition: var(--transition);
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo-link {
  display: flex;
  align-items: center;
}

.brand-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: clamp(0.75rem, 1.25vw, 1.5rem);
  flex-wrap: nowrap;
  margin-bottom: 0;
  padding-left: 0;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  font-weight: 500;
  font-size: 1.02rem;
  color: #2b2b2b;
  padding: 0.5rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--jl-pink);
}

.nav-icon-mobile {
  display: none;
  font-size: 1.15rem;
  color: var(--jl-sky);
  margin-right: 0.65rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-consult-pill {
  background: linear-gradient(135deg, var(--jl-sky) 0%, var(--jl-sky-hover) 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.48rem 1.25rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 12px rgba(72, 188, 231, 0.35);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-consult-pill:hover {
  background: linear-gradient(135deg, var(--jl-sky-hover) 0%, #1d8ebd 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(72, 188, 231, 0.5);
  color: #ffffff !important;
}


.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--jl-sky);
  cursor: pointer;
}

/* ==========================================================================
   首頁 Hero 輪播橫幅 (Official Carousel Banner)
   ========================================================================== */

.hero-banner-section {
  position: relative;
  background: linear-gradient(135deg, #e3f4fc 0%, #ffffff 50%, #f3f9fd 100%);
  border-bottom: 1px solid #eef2f6;
  overflow: hidden;
}

.hero-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(72, 188, 231, 0.15);
  color: var(--jl-sky-hover);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  color: #1e293b;
  margin-bottom: 1.25rem;
}

.hero-subhead {
  font-size: 1.12rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-capabilities {
  list-style: none;
  margin-bottom: 2.25rem;
}

.hero-capabilities li {
  font-size: 1.02rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-capabilities li i {
  color: var(--jl-sky);
  font-size: 1.15rem;
}

.hero-btn-main {
  background: var(--jl-sky);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(72, 188, 231, 0.4);
  transition: var(--transition);
}

.hero-btn-main:hover {
  background: var(--jl-sky-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(72, 188, 231, 0.5);
}

.btn-outline-custom {
  border: 2px solid var(--jl-sky);
  color: var(--jl-sky);
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition);
}

.btn-outline-custom:hover {
  background: var(--jl-sky);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.hero-illustration-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem;
  border: 1px solid rgba(72, 188, 231, 0.2);
  text-align: center;
  position: relative;
}

.hero-card-badge {
  position: absolute;
  top: -14px;
  right: 24px;
  background: var(--jl-gold);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
}

.hero-solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .hero-illustration-card {
    padding: 1.5rem 1rem !important;
  }
  .hero-solution-grid {
    gap: 0.5rem;
  }
}


/* ==========================================================================
   內容區段與金色標題條 (Content Sections & Gold Divider)
   ========================================================================== */

.content-section {
  padding: 4.5rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-title-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid #deb94e;
  margin-bottom: 2.5rem;
}

.section-title-text {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2b2b2b;
  position: relative;
}

.section-more-link {
  font-size: 0.95rem;
  font-family: 'Open Sans', sans-serif;
  color: var(--jl-gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.section-more-link:hover {
  color: var(--jl-pink);
}

/* 文章卡片網格 */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
}

.article-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--jl-sky);
}

.article-banner-mock {
  height: 180px;
  background: linear-gradient(135deg, #38b4e7 0%, #00a0e9 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.article-banner-mock h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.article-body {
  padding: 1.5rem;
  flex: 1;
}

.article-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

.article-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   右側固定懸浮工具列 (Official Floating Toolset)
   ========================================================================== */

.floating-tools-container {
  position: fixed;
  right: 24px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1050;
}

.float-tool-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.float-tool-btn:hover {
  transform: scale(1.1);
}

.float-btn-line {
  background-color: var(--color-line);
}

.float-btn-contact {
  background-color: var(--color-contact);
}

.float-btn-gotop {
  background-color: var(--color-gotop);
}

/* ==========================================================================
   官方正式雙層頁尾 (Official Two-tier Footer)
   ========================================================================== */

.official-footer {
  margin-top: auto;
  border-top: 3px solid var(--jl-sky);
}

.footer-top-tier {
  background-color: var(--jl-footer-bg);
  color: #ffffff;
  padding: 3.5rem 1.5rem;
}

.text-sky {
  color: var(--jl-sky) !important;
}

.footer-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
}

.footer-yt-btn:hover {
  background: rgba(255, 0, 0, 0.18);
  border-color: #ff0000;
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-yt-icon {
  background: #ff0000;
  color: #ffffff;
  width: 32px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.footer-top-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.footer-info-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.35rem;
}

.footer-info-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.4);
}

.footer-contact-list {
  list-style: none;
  font-size: 0.95rem;
  line-height: 2;
  color: rgba(255, 255, 255, 0.9);
}

.footer-bottom-tier {
  background-color: var(--jl-footer-bottom);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.footer-bottom-tier a {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   前台 RWD 深度適配與行動端極致美化系統 (Mobile First Optimization)
   ========================================================================== */

/* 橫向可滑動分類容器 (App 級流暢滑動體驗) */
.category-scroll-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
}

.category-scroll-container::-webkit-scrollbar {
  display: none;
}

.category-scroll-container .btn {
  flex-shrink: 0;
}

/* 行動版選單滑下展開動畫 */
@keyframes mobileMenuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 平板與手機版尺寸 (<= 992px) */
@media (max-width: 992px) {
  .hero-banner-inner {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 2.5rem;
    padding: 3rem 1.25rem;
  }
  
  .hero-capabilities li {
    justify-content: flex-start;
  }
  
  .footer-top-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .nav-menu {
    display: none;
  }
  
  .mobile-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* 行動選單精緻展開效果 (固定全幅抽屜，支援獨立平滑滾動) */
  .nav-menu.active,
  .nav-menu.show {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #ffffff;
    padding: 1rem 1.25rem 2.5rem;
    box-shadow: 0 20px 40px rgba(11, 37, 70, 0.18);
    border-bottom: 3px solid var(--jl-sky);
    border-radius: 0 0 16px 16px;
    z-index: 999;
    gap: 0.35rem;
    animation: mobileMenuSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  .nav-icon-mobile {
    display: inline-block;
    font-size: 1.15rem;
    color: var(--jl-sky);
    margin-right: 0.65rem;
  }
  
  .nav-item {
    width: 100%;
  }

  .nav-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 8px;
    transition: background-color 0.2s ease;
  }

  .nav-link-wrapper:hover,
  .nav-link-wrapper:focus-within {
    background-color: var(--jl-sky-light);
  }
  
  .nav-link {
    width: auto;
    flex-grow: 1;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    border-bottom: none !important;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: transparent;
    color: var(--jl-sky-hover);
  }

  /* 移除預設的右向箭頭偽元素，改為專屬展開鈕控制 */
  .nav-link::after {
    display: none !important;
  }

  .mobile-submenu-toggle {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.15rem;
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.25s ease;
  }

  .mobile-submenu-toggle:hover,
  .mobile-submenu-toggle:active {
    background-color: rgba(72, 188, 231, 0.15);
    color: var(--jl-sky-hover);
  }

  .has-dropdown.dropdown-open > .nav-link-wrapper .mobile-submenu-toggle > i {
    transform: rotate(180deg);
    color: var(--jl-pink);
  }

  .has-dropdown.dropdown-open > .dropdown-menu {
    display: block !important;
    animation: navMenuFadeIn 0.2s ease-out;
  }

  .dropdown-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .dropdown-submenu.dropdown-open > .dropdown-menu {
    display: block !important;
  }

  .dropdown-submenu.dropdown-open > .dropdown-item-wrapper .mobile-submenu-toggle > i {
    transform: rotate(180deg);
  }
}

/* 手機版尺寸 (<= 768px)：重點解決懸浮工具擋住文字、Hero 字體排版 */
@media (max-width: 768px) {
  /* 懸浮按鈕微型化與側邊避讓，徹底防遮擋 */
  .floating-tools-container {
    right: 12px;
    bottom: 24px;
    gap: 8px;
  }

  .float-tool-btn {
    width: 38px;
    height: 38px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  }

  .float-btn-line i {
    font-size: 1.2rem !important;
  }

  .float-btn-contact i {
    font-size: 1.05rem !important;
  }

  .float-btn-gotop i {
    font-size: 1.1rem !important;
  }

  /* 首頁 Hero 行動端排版美化 */
  .hero-banner-inner {
    padding: 2.25rem 1rem 2.5rem;
    gap: 2rem;
  }

  .hero-badge-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .hero-headline {
    font-size: clamp(1.4rem, 6vw, 1.85rem) !important;
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  .hero-subhead {
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
  }

  .hero-capabilities {
    padding-left: 0;
    margin-bottom: 1.5rem;
  }

  .hero-capabilities li {
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }

  .hero-capabilities li i {
    font-size: 1rem;
    margin-right: 0.5rem;
  }

  .hero-btn-main {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.25rem;
  }

  .btn-outline-custom {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* 內頁橫幅在手機版的美化 */
  .page-banner-section {
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
  }

  .page-banner-section h1 {
    font-size: 1.45rem !important;
  }

  .gold-decor-line {
    display: none;
  }

  /* 行動端卡片與容器內邊距微調 */
  .card-body {
    padding: 1.2rem !important;
  }

  .content-section {
    padding: 2.5rem 0;
  }
}

/* 極窄手機尺寸 (<= 480px) */
@media (max-width: 480px) {
  .navbar-container {
    padding: 0.5rem 0.85rem;
  }

  .brand-logo-img {
    height: 38px;
  }

  .btn-consult-pill {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    gap: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .btn-consult-text {
    font-size: 0.8rem;
  }

  .btn-consult-pill i {
    font-size: 0.82rem;
  }


  .mobile-toggle-btn {
    font-size: 1.6rem;
    padding: 0.2rem;
  }
}

/* ==========================================================================
   CMS 前台專屬視覺樣式 (News, Article, Film, Contact, About)
   ========================================================================== */

.text-primary-jl {
  color: var(--jl-sky) !important;
}

.text-cyan {
  color: #38bdf8 !important;
}

.bg-gold {
  background-color: var(--jl-gold) !important;
}

.link-more-gold {
  color: var(--jl-gold) !important;
  transition: var(--transition);
}

.link-more-gold:hover {
  color: var(--jl-pink) !important;
  text-decoration: underline !important;
}

.hover-primary:hover {
  color: var(--jl-sky) !important;
}

.hover-shadow:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

.transition-all {
  transition: all 0.25s ease-in-out;
}

/* 多行省略截斷 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片懸停動態效果 */
.news-card-hover:hover,
.article-card-hover:hover,
.film-card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--jl-sky) !important;
  box-shadow: 0 12px 24px -6px rgba(0, 160, 233, 0.15) !important;
}

/* 富文本閱讀體驗排版 */
.rich-text-content {
  color: #334155;
  line-height: 1.85;
}

.rich-text-content p {
  margin-bottom: 1.25rem;
}

.rich-text-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4 {
  color: #0f172a;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.rich-text-content blockquote {
  border-left: 4px solid var(--jl-sky);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #475569;
  font-style: italic;
  background: #f8fafc;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-radius: 0 8px 8px 0;
}

.rich-text-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.rich-text-content table th,
.rich-text-content table td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}

.rich-text-content table th {
  background: #f1f5f9;
  font-weight: 600;
}

/* 分頁器樣式覆寫 */
.pagination .page-link {
  color: var(--jl-slate);
  border-color: #e2e8f0;
  padding: 0.5rem 0.85rem;
}

.pagination .page-item.active .page-link {
  background-color: var(--jl-sky);
  border-color: var(--jl-sky);
  color: #ffffff;
}

.pagination .page-link:hover {
  background-color: #f1f5f9;
  color: var(--jl-sky);
}

/* 海軍藍深色卡片文字高對比度保證 */
.bg-navy-card {
  background-color: #0b2546 !important;
  color: #ffffff !important;
}

.bg-navy-card h1,
.bg-navy-card h2,
.bg-navy-card h3,
.bg-navy-card h4,
.bg-navy-card h5,
.bg-navy-card h6 {
  color: #ffffff !important;
}

/* 官方輪播橫幅專用樣式 */
.banner-carousel-section {
  width: 100%;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.banner-carousel-container {
  max-width: 1200px;
  margin: 0 auto;
}
.carousel-img {
  max-height: 480px;
  object-fit: cover;
  background-color: #0f172a;
}
@media (max-width: 768px) {
  .carousel-img {
    max-height: 240px;
  }
}

/* 富文本內文排版美化 (簡介、隱私權、產品與服務說明) */
.rich-text-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  margin: 1rem 0;
}
.rich-text-content table {
  width: 100% !important;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}
.rich-text-content th,
.rich-text-content td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
}
.rich-text-content th {
  background-color: #f1f5f9;
  font-weight: 700;
}

/* ==========================================================================
   官網三級全動態下拉導覽選單 (Desktop Hover & Mobile Accordion)
   ========================================================================== */
.dropdown-menu-modern {
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
  min-width: 200px;
  background: #ffffff;
  border-radius: 12px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu-modern .dropdown-item {
  font-size: 0.96rem;
  font-weight: 500;
  color: #334155;
  transition: all 0.15s ease-in-out;
}

.dropdown-menu-modern .dropdown-item:hover,
.dropdown-menu-modern .dropdown-item:focus {
  background-color: #fff1f2;
  color: var(--jl-pink);
  transform: translateX(4px);
}

/* 手機選單半透明暗色遮罩 (防止滾動穿透與點擊遮罩關閉) */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease-in-out;
}

.mobile-menu-backdrop.show {
  opacity: 1;
  visibility: visible;
}

body.mobile-menu-open {
  overflow: hidden !important;
}

@media (min-width: 992px) {
  .mobile-submenu-toggle {
    display: none !important;
  }

  .mobile-menu-backdrop {
    display: none !important;
  }

  .nav-link-wrapper {
    display: contents;
  }

  /* 桌面版懸停即展開，提升操作流暢度 */
  .nav-item.has-dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: navMenuFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-item.has-dropdown > .dropdown-menu {
    display: none;
    opacity: 0;
    visibility: hidden;
  }

  /* 多層子下拉選單 */
  .dropdown-submenu {
    position: relative;
  }

  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
    position: absolute;
    top: 0;
    left: 100%;
    margin-top: -6px;
    opacity: 1;
    visibility: visible;
    animation: navSubMenuFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes navMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navSubMenuFadeIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 行動裝置選單內部下拉樣式 */
@media (max-width: 991.98px) {
  .nav-menu .dropdown-menu {
    display: none;
    position: static !important;
    float: none;
    width: 100%;
    box-shadow: none !important;
    border: none !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem !important;
    margin-top: 0.35rem;
    border-left: 3px solid var(--jl-sky) !important;
    transform: none !important;
  }

  .dropdown-item-head {
    font-size: 0.9rem !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding-bottom: 0.4rem !important;
    margin-bottom: 0.4rem !important;
  }

  .nav-menu .dropdown-item {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.94rem !important;
    border-radius: 6px;
    white-space: normal;
  }

  .nav-menu .dropdown-item:hover,
  .nav-menu .dropdown-item:active {
    background-color: #e0f2fe !important;
    color: var(--jl-sky-hover) !important;
  }
}

/* 自訂圖文頁面通用排版樣式 */
.cms-page-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin: 1.25rem 0;
}

.cms-page-content table {
  width: 100% !important;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

.cms-page-content th,
.cms-page-content td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}

.cms-page-content th {
  background-color: #f8fafc;
  font-weight: 600;
}