@charset "UTF-8";

/* =========================================
   1. 全域變數 (CSS Variables)
   ========================================= */
:root {
  --top-h: 60px;     
  --total-h: 60px;  
  --banner-h-pc: 30vw;
  --banner-h-mb: 100vw; 
  --accent: #e74c3c;          

  /* --- [淺色模式 Light Mode] --- */
  --page-bg: #f4f4f4;
  --header-bg: #ffffff;
  --card-bg: #ffffff;
  --search-section-bg: #f1f1f1;
  
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-on-dark: #ffffff;
  
  --border-color: #dddddd;
  --shadow-color: rgba(0,0,0,0.05);
  
  --mega-menu-bg: rgba(0, 0, 0, 0.9);
  --footer-bg: #1a252f;
}

/* --- [深色模式 Dark Mode] --- */
[data-theme="dark"] {
  --page-bg: #121212;       
  --header-bg: #1e1e1e;     
  --card-bg: #2c2c2c;       
  --search-section-bg: #181818; 
  
  --text-primary: #e0e0e0;  
  --text-secondary: #aaaaaa;
  
  --border-color: #444444;
  --shadow-color: rgba(0,0,0,0.5);
  
  --mega-menu-bg: rgba(0, 0, 0, 0.95);
  --footer-bg: #0f151a;
}

[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(--shadow-color);
  transform: scale(1.1);
}

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

body { 
  font-family: "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;
}

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

ul { list-style: none; }
a { text-decoration: none; color: inherit; }

h1#page-main-title {
  text-align: center; margin: 40px auto 20px; font-size: 1.8rem;
  color: var(--text-primary);       
  font-weight: 700; width: 100%; max-width: 1200px; padding: 0 20px;
}

/* 麵包屑 */
.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: 8px 20px; border-radius: 50px;
  box-shadow: 0 2px 5px var(--shadow-color);
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin: 0 10px; color: #ccc; }
.breadcrumb a { color: var(--text-secondary); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.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 2px 10px rgba(0,0,0,0.1);
  background: var(--header-bg);     
}
#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: 10px; width: auto; justify-content: flex-end; }

.social-group { display: flex; gap: 8px; }
.sq-icon {
  display: block; width: 32px; height: 32px;
  border-radius: 4px; overflow: hidden; transition: opacity 0.2s;
}
.sq-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sq-icon:hover { opacity: 0.8; }

.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(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden; z-index: 999; 
}
.mega-split-layout { display: flex; max-width: 1200px; margin: 0 auto; padding: 30px; gap: 40px; }
.mega-cat-title { 
  font-size: 16px; font-weight: bold; color: var(--text-on-dark);       
  margin-bottom: 15px; padding-bottom: 5px; border-bottom: 2px solid #444; 
}
.mega-img-grid { display: grid; gap: 15px; }

.img-card {
  position: relative; display: block; height: 100px; 
  background-size: cover; background-position: center;
  border-radius: 6px; overflow: hidden; text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.img-card::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.5); 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: var(--text-on-dark); 
  font-weight: bold; font-size: 15px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8); text-align: center; padding: 5px;
}
.img-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.img-card:hover::before { background: rgba(0,0,0,0.3); }

.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: rgba(0,0,0,0.3); 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: 48px; font-weight: bold; margin-bottom: 0; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.slide.active .slide-title { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.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(0,0,0,0.4); color: white; width: 50px; height: 50px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 20; border: none; font-size: 24px; transition: 0.3s;
}
.slider-nav-btn:hover { background: var(--accent); }
.prev-btn { left: 20px; } .next-btn { right: 20px; }
.slider-pagination { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 20; }
.pagination-bullet { width: 12px; height: 12px; background-color: rgba(255,255,255,0.4); border-radius: 50%; cursor: pointer; transition: all 0.3s; border: 1px solid rgba(255,255,255,0.2); }
.pagination-bullet.active { background-color: var(--accent); transform: scale(1.2); border-color: var(--accent); }

/* Google Search */
.google-search-section {
  background-color: var(--search-section-bg); 
  padding: 30px 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: 10px; }
.search-input {
  flex: 1; padding: 12px 15px; font-size: 16px; 
  background-color: var(--card-bg);           
  color: var(--text-primary);                 
  border: 1px solid var(--border-color);
  border-radius: 4px; outline: none; transition: border 0.3s;
}
.search-input:focus { border-color: var(--accent); }
.search-btn {
  background-color: var(--accent); color: white; border: none;
  padding: 12px 25px; font-size: 16px; border-radius: 4px;
  cursor: pointer; font-weight: bold; transition: background 0.3s;
}
.search-btn:hover { background-color: #c0392b; }

/* Footer */
#site-footer { background-color: var(--footer-bg); color: #bbb; padding: 40px 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: white; margin-bottom: 10px; font-size: 18px; }
.footer-copyright { text-align: right; }
@media (max-width: 768px) { 
  .footer-container { flex-direction: column; text-align: center; } 
  .footer-copyright { text-align: center; margin-top: 10px; }
  .search-form { flex-direction: column; width: 100%; }
  .search-input, .search-btn { width: 100%; }
}

/* 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 20px; cursor: pointer; height: 100%; display: flex; align-items: center; transition: 0.3s; }
  
  .menu-item:hover .menu-link { background: rgba(125,125,125,0.1); }
  .menu-item.active-page:hover .menu-link { background: var(--accent); }

  .mega-menu {
    position: absolute; top: 100%; left: 0; width: 100%;
    border-top: 3px solid var(--accent); box-shadow: 0 10px 20px rgba(0,0,0,0.2); 
    opacity: 0; visibility: hidden; transition: 0.3s;
  }
  .menu-item:hover .mega-menu { opacity: 1; visibility: visible; }
  
  .slider-nav-btn { display: flex; }
  .slider-pagination { display: flex; } 

  .mega-section.sec-personal { flex: 3; border-right: 1px solid #444; padding-right: 30px; }
  .sec-personal .mega-img-grid { grid-template-columns: repeat(3, 1fr); }
  
  .mega-section.sec-business { flex: 1; padding-left: 30px; }
  .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.5rem; margin: 20px auto 10px; }

  .hero-slider { height: var(--banner-h-mb); }
  .slide-title { font-size: 32px; }
  .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: #222; 
    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 #333; position: relative; }
  .menu-link { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 20px; width: 100%; 
    color: #ddd; 
    cursor: pointer; 
  }
  
  .mega-menu { 
    position: static; width: 100%; 
    background: rgba(20, 20, 20, 0.95);
    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: 10px; padding: 10px 20px; }

  .img-card { height: 80px; border-radius: 4px; }
  .img-card span { font-size: 13px; }

  .mega-cat-title {
    background: #2a2a2a; color: #fff; border: none; margin: 0;
    padding: 10px 20px; font-size: 13px; margin-top: 10px;
  }

  /* [修改] 手機版摺疊按鈕：只留 + 號，去圓圈 */
  .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); 
  }
}