@charset "UTF-8";

/* =========================================
   1. 全域變數 (CSS Variables) - 專業風格配色
   ========================================= */
:root {
  --top-h: 60px;     
  --total-h: 60px;  
  --banner-h-pc: 30vw;
  --banner-h-mb: 100vw; 

  /* [淺色模式 Light Mode] - 現代商務風格 */
  --accent: #0056b3;          /* 專業海軍藍 (取代原本的紅) */
  --accent-hover: #004494;    /* 深一點的藍 (Hover用) */
  
  --page-bg: #f8f9fa;         /* 極淺灰 (比純白更有質感) */
  --header-bg: #ffffff;       /* 純白導航 */
  --card-bg: #ffffff;         /* 卡片背景 */
  --search-section-bg: #e9ecef; /* 搜尋區塊背景 */
  
  /* 文字顏色 - 使用深灰而非純黑，閱讀更舒適 */
  --text-primary: #2d3748;    /* 深岩灰 */
  --text-secondary: #718096;  /* 中岩灰 */
  --text-on-dark: #ffffff;    /* 深底白字 */
  
  --border-color: #e2e8f0;    /* 淺藍灰邊框 */
  --shadow-color: rgba(0, 0, 0, 0.08); /* 更柔和的陰影 */
  
  --mega-menu-bg: rgba(15, 23, 42, 0.95); /* 深藍色半透明背景 */
  --footer-bg: #0f172a;       /* 深邃岩灰 Footer */
}

/* --- [深色模式 Dark Mode] - 高對比科技感 --- */
[data-theme="dark"] {
  --accent: #3b82f6;          /* 明亮科技藍 (在黑底更清晰) */
  --accent-hover: #60a5fa;    
  
  --page-bg: #0f172a;         /* 深邃岩灰背景 (非純黑) */
  --header-bg: #1e293b;       /* 稍亮的岩灰 */
  --card-bg: #1e293b;         /* 卡片背景 */
  --search-section-bg: #111827; 
  
  --text-primary: #f1f5f9;    /* 亮灰白 */
  --text-secondary: #94a3b8;  /* 藍灰字 */
  
  --border-color: #334155;    /* 深色邊框 */
  --shadow-color: rgba(0, 0, 0, 0.6); /* 深色模式陰影加重 */
  
  --mega-menu-bg: rgba(15, 23, 42, 0.98);
  --footer-bg: #020617;       /* 極深 Footer */
}

/* 深色模式下的圖片濾鏡 (稍微調暗以護眼) */
[data-theme="dark"] img { filter: brightness(0.85); transition: 0.3s; }
[data-theme="dark"] img:hover { filter: brightness(1); }

/* Theme Toggle Button */
.theme-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  margin-left: 10px;
  transition: all 0.3s;
}
.theme-btn:hover {
  background-color: var(--border-color); /* Hover 時背景微亮 */
  color: var(--accent);
  transform: scale(1.05);
}

/* Base Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
  /* 升級字體堆疊，優先使用系統原生字體，提升渲染速度與清晰度 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft JhengHei", sans-serif;
  padding-top: var(--total-h); 
  background: var(--page-bg);       
  color: var(--text-primary);       
  transition: background 0.3s ease, color 0.3s ease, padding-top 0.3s; 
  min-height: 100vh;
  display: flex; flex-direction: column;
  line-height: 1.6; /* 增加行距，提升閱讀感 */
}

.content { flex: 1; width: 100%; }

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--accent); }

h1#page-main-title {
  text-align: center; margin: 50px auto 30px; font-size: 2rem; /* 字體加大一點 */
  color: var(--text-primary);       
  font-weight: 800; width: 100%; max-width: 1200px; padding: 0 20px;
  letter-spacing: -0.5px; /* 字距微調，更現代 */
}

/* 麵包屑 */
.breadcrumb-wrapper {
  width: 100%; max-width: 1200px;
  margin: 20px auto 40px; padding: 0 20px;
  text-align: center;
}
.breadcrumb {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  list-style: none; font-size: 14px; 
  color: var(--text-secondary);     
  background: var(--card-bg);       
  padding: 10px 25px; border-radius: 50px;
  box-shadow: 0 4px 6px var(--shadow-color); /* 陰影更柔和 */
  border: 1px solid var(--border-color); /* 增加細微邊框 */
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin: 0 12px; color: var(--border-color); }
.breadcrumb a { color: var(--text-secondary); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb li.active { color: var(--accent); font-weight: bold; pointer-events: none; }

/* Active State */
.menu-item.active-page > .menu-link {
  background-color: var(--accent) !important;
  color: white !important;
}

/* Header */
#site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 4px 20px var(--shadow-color); /* Header 陰影加深 */
  background: var(--header-bg);     
  border-bottom: 1px solid var(--border-color); /* 增加底線 */
}
#site-header.scroll-hide { transform: translateY(calc(var(--top-h) * -1)); }

.top-bar {
  height: var(--top-h); 
  background: var(--header-bg);     
  color: var(--text-primary);       
  display: flex; align-items: center; justify-content: space-between; 
  position: relative; padding: 0 20px; z-index: 2000;
}
.brand-logo { flex-shrink: 0; width: 150px; height: 100%; display: flex; align-items: center; }
.logo-img { height: 32px; width: auto; display: block; }

.main-nav { height: 100%; }
.menu-list { list-style: none; height: 100%; }

.top-right-area { display: flex; align-items: center; gap: 12px; width: auto; justify-content: flex-end; }

.social-group { display: flex; gap: 8px; }
.sq-icon {
  display: block; width: 32px; height: 32px;
  border-radius: 6px; /* 圓角稍微加大 */
  overflow: hidden; transition: opacity 0.2s, transform 0.2s;
}
.sq-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sq-icon:hover { opacity: 0.9; transform: translateY(-2px); }

.hamburger-btn { 
  display: none; font-size: 24px; background: none; border: none; 
  color: var(--text-primary);       
  cursor: pointer; padding-left: 10px; 
}

/* Mega Menu */
.mega-menu { 
  background: var(--mega-menu-bg);  
  color: var(--text-on-dark);       
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); /* 模糊度增加 */
  overflow: hidden; z-index: 999; 
  border-bottom: 3px solid var(--accent); /* 底部增加強調色線條 */
}
.mega-split-layout { display: flex; max-width: 1200px; margin: 0 auto; padding: 40px; gap: 50px; }
.mega-cat-title { 
  font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-on-dark);       
  margin-bottom: 20px; padding-bottom: 8px; 
  border-bottom: 1px solid rgba(255,255,255,0.2); 
}
.mega-img-grid { display: grid; gap: 20px; } /* 間距加大 */

.img-card {
  position: relative; display: block; height: 110px; /* 卡片高度微增 */
  background-size: cover; background-position: center;
  border-radius: 8px; overflow: hidden; text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
}
.img-card::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.4); transition: background 0.3s; }
.img-card span {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center;
  height: 100%; width: 100%; color: #fff; /* 強制白色 */
  font-weight: 600; font-size: 16px; letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8); text-align: center; padding: 10px;
}
.img-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.img-card:hover::before { background: rgba(0,0,0,0.2); } /* Hover 時變亮一點 */

.accordion-toggle { display: none; }

/* Slider */
.hero-slider {
  position: relative; width: 100%; height: var(--banner-h-pc);
  overflow: hidden; background: #000; user-select: none; -webkit-user-select: none;
}
.slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; z-index: 1;
  transition: opacity 1s ease-in-out, transform 1s ease-in-out, clip-path 1s ease-in-out, filter 1s ease-in-out;
}
.slide.active { opacity: 1; z-index: 2; }
.full-slide-link { display: block; width: 100%; height: 100%; text-decoration: none; color: inherit; cursor: pointer; }
.slide picture { width: 100%; height: 100%; display: block; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4)); pointer-events: none; } /* 改用漸層遮罩，更有質感 */

.slide-content { 
  position: absolute; top: 50%; left: 10%; transform: translateY(-50%); 
  z-index: 10; color: #fff; max-width: 600px; pointer-events: none; 
}
.slide-title { 
  opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out;
  font-size: 56px; /* 標題加大 */
  font-weight: 800; margin-bottom: 0; 
  line-height: 1.1; text-shadow: 0 4px 15px rgba(0,0,0,0.6); 
}
.slide.active .slide-title { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }

/* Effects */
.slide.fx-zoom { transform: scale(1); } .slide.fx-zoom.active { transform: scale(1.1); transition-duration: 6s; }
.slide.fx-up { transform: translateY(100%); } .slide.fx-up.active { transform: translateY(0); }
.slide.fx-left { transform: translateX(100%); } .slide.fx-left.active { transform: translateX(0); }
.slide.fx-circle { clip-path: circle(0% at 50% 50%); } .slide.fx-circle.active { clip-path: circle(150% at 50% 50%); }
.slide.fx-blur { filter: blur(20px); transform: scale(1.1); } .slide.fx-blur.active { filter: blur(0); transform: scale(1); }

.slider-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); /* 改為極淡白色 */
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white; width: 60px; height: 60px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 20; 
  font-size: 24px; transition: 0.3s;
}
.slider-nav-btn:hover { background: var(--accent); border-color: var(--accent); }
.prev-btn { left: 30px; } .next-btn { right: 30px; }

.slider-pagination { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; z-index: 20; }
.pagination-bullet { width: 10px; height: 10px; background-color: rgba(255,255,255,0.3); border-radius: 50%; cursor: pointer; transition: all 0.3s; border: none; }
.pagination-bullet.active { background-color: var(--accent); transform: scale(1.4); }

/* Google Search */
.google-search-section {
  background-color: var(--search-section-bg); 
  padding: 50px 20px; /* 加大間距 */
  text-align: center;
  border-top: 1px solid var(--border-color);
}
.search-form { display: flex; justify-content: center; align-items: center; max-width: 600px; margin: 0 auto; gap: 0; /* 按鈕緊貼 */ }
.search-input {
  flex: 1; padding: 15px 20px; font-size: 16px; 
  background-color: var(--card-bg);           
  color: var(--text-primary);                 
  border: 1px solid var(--border-color);
  border-right: none; /* 移除右邊框，與按鈕接合 */
  border-radius: 6px 0 0 6px; outline: none; transition: border 0.3s;
}
.search-input:focus { border-color: var(--accent); }
.search-btn {
  background-color: var(--accent); color: white; border: 1px solid var(--accent);
  padding: 15px 30px; font-size: 16px; border-radius: 0 6px 6px 0;
  cursor: pointer; font-weight: bold; transition: background 0.3s;
}
.search-btn:hover { background-color: var(--accent-hover); border-color: var(--accent-hover); }

/* Footer */
#site-footer { background-color: var(--footer-bg); color: #94a3b8; padding: 60px 20px; font-size: 14px; margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-info h3 { color: #fff; margin-bottom: 15px; font-size: 20px; letter-spacing: 1px; }
.footer-copyright { text-align: right; }
@media (max-width: 768px) { 
  .footer-container { flex-direction: column; text-align: center; } 
  .footer-copyright { text-align: center; margin-top: 20px; }
  .search-form { flex-direction: column; width: 100%; gap: 10px; }
  .search-input { width: 100%; border-right: 1px solid var(--border-color); border-radius: 6px; }
  .search-btn { width: 100%; border-radius: 6px; }
}

/* RWD PC (> 992px) */
@media (min-width: 993px) {
  .menu-list { display: flex; align-items: center; justify-content: center; }
  .menu-item { height: 100%; display: flex; align-items: center; position: static; }
  
  /* 選單連結間距加大，字體加粗 */
  .menu-link { 
    padding: 0 25px; cursor: pointer; height: 100%; 
    display: flex; align-items: center; transition: 0.3s; 
    font-weight: 600; font-size: 15px;
  }
  
  .menu-item:hover .menu-link { background: rgba(0,0,0,0.03); color: var(--accent); } /* Hover 變色 */
  .menu-item.active-page:hover .menu-link { background: var(--accent); color: #fff; }

  .mega-menu {
    position: absolute; top: 100%; left: 0; width: 100%;
    border-top: none; /* 移除上方邊框，改用陰影 */
    box-shadow: 0 15px 30px rgba(0,0,0,0.3); 
    opacity: 0; visibility: hidden; transition: all 0.3s ease-in-out;
    transform: translateY(10px); /* 下拉動畫 */
  }
  .menu-item:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }
  
  .slider-nav-btn { display: flex; }
  .slider-pagination { display: flex; } 

  .mega-section.sec-personal { flex: 3; border-right: 1px solid rgba(255,255,255,0.1); padding-right: 40px; }
  .sec-personal .mega-img-grid { grid-template-columns: repeat(3, 1fr); }
  
  .mega-section.sec-business { flex: 1; padding-left: 40px; }
  .sec-business .mega-img-grid { grid-template-columns: repeat(1, 1fr); }
  
  .mega-section.sec-support { flex: 1; width: 100%; }
  .sec-support .mega-img-grid { grid-template-columns: repeat(3, 1fr); }
}

/* RWD Mobile (<= 992px) */
@media (max-width: 992px) {
  /* 手機版隱藏深色模式按鈕 */
  .theme-btn { display: none !important; }

  h1#page-main-title { font-size: 1.6rem; margin: 30px auto 15px; }

  .hero-slider { height: var(--banner-h-mb); }
  .slide-title { font-size: 36px; }
  .slide-content { left: 5%; width: 90%; text-align: left; }
  .slider-nav-btn { display: none; }
  .slider-pagination { display: flex; }

  .top-bar { justify-content: space-between; }
  .hamburger-btn { display: block; }
  .sq-icon { width: 30px; height: 30px; }

  .main-nav {
    position: fixed; top: var(--top-h); left: 0; width: 100%;
    height: calc(100vh - var(--top-h)); 
    background: #1a202c; /* 手機選單維持深色 */
    transform: translateX(100%); transition: transform 0.3s ease-in-out;
    overflow-y: auto; z-index: 2000;
  }
  .main-nav.open { transform: translateX(0); }

  .menu-list { display: block; height: auto; padding-bottom: 50px; }
  .menu-item { display: block; height: auto; border-bottom: 1px solid #334155; position: relative; }
  .menu-link { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 18px 25px; width: 100%; 
    color: #e2e8f0; 
    font-size: 16px;
    cursor: pointer; 
  }
  
  .mega-menu { 
    position: static; width: 100%; 
    background: rgba(0, 0, 0, 0.2); /* 內層加深 */
    box-shadow: none; border: none; 
    max-height: 0; overflow: hidden; opacity: 1; visibility: visible; 
  }
  .mega-split-layout { display: block; padding: 0; gap: 0; }
  .mega-section { border: none; padding: 0; }
  .mega-img-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 20px; }

  .img-card { height: 90px; border-radius: 6px; }
  .img-card span { font-size: 14px; }

  .mega-cat-title {
    background: rgba(255,255,255,0.05); color: #fff; border: none; margin: 0;
    padding: 12px 25px; font-size: 14px; margin-top: 5px;
  }

  /* 手機版摺疊按鈕：只留 + 號，去圓圈 */
  .accordion-toggle {
    display: inline-block; width: 30px; height: 30px; line-height: 30px;
    text-align: center;
    border: none; background: none; /* 去框去背 */
    color: var(--accent); 
    font-size: 24px; font-weight: bold;
    transition: transform 0.3s;
  }
  .accordion-toggle.active { 
    transform: rotate(45deg); 
    background: none; 
    color: var(--accent); 
  }
}