/* =========================================================
   SmartBoss Website Stylesheet
   Version: 1.5 (Professional SaaS Dark - Slim Header)
   Strategy: Tonal Dark Mode, subtle depth, authoritative layout.
   ========================================================= */

:root {
  --page: #121212;
  --card-bg: #1e1e1e;
  --card-bg-hover: #2a2a2a;
  
  --ink-primary: #f0f0f0;
  --ink-secondary: #a0a0a0;
  --page-white: #ffffff;

  --yl: #fec900;
  --yl-dark: #e0ac00;

  --line: #383838;
  --maxw: 1000px;
}

/* Base */
html, body {
  margin: 0; padding: 0;
  background: var(--page);
  color: var(--ink-primary);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 24px;
}

/* =========================================================
   Header & Nav (*** MODIFICATION HERE ***)
   ========================================================= */
header {
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 0; /* <<<--- 修改點：將 16px 減少為 10px，使其更薄 */
  position: sticky;
  top: 0;
  z-index: 10;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

nav a {
  color: var(--ink-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.2s;
}

nav a:hover {
  background: var(--card-bg-hover);
  color: var(--page-white);
}

nav a.brand {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--yl);
}
nav a.brand:hover {
  background: none;
}

nav a.btn {
  background: var(--yl);
  color: #111111;
  padding: 8px 18px;
  margin-top: 0;
  font-weight: 700;
  border-radius: 8px;
}
nav a.btn:hover {
  background: var(--yl-dark);
}

/* =========================================================
   Hero Section
   ========================================================= */
.hero {
  background: none;
  border: none;
  box-shadow: none;
  padding: 80px 0 60px 0;
  margin-bottom: 50px;
  text-align: left;
}

.hero h1 {
  font-size: 3.2rem;
  line-height: 1.25;
  color: var(--page-white);
  font-weight: 800;
  margin: 0 0 16px;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--yl);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero p {
  font-size: 1.1rem;
  color: var(--ink-secondary);
  max-width: 700px;
}

blockquote {
  border-left: 4px solid var(--yl);
  padding-left: 24px;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink-primary);
  margin: 32px 0;
}

/* =========================================================
   Content & Headings
   ========================================================= */
section {
  margin-bottom: 60px;
}

h1, h2, h3 {
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--page-white);
}

h1 { font-size: 2.8rem; }

h2 {
  font-size: 2.2rem;
  margin-bottom: 32px;
  padding-bottom: 0;
  border-bottom: none;
  display: block;
}

h3 {
  font-size: 1.4rem;
}

p { margin: 12px 0; }
ul { padding-left: 22px; margin: 12px 0; }
li { margin-bottom: 8px; }

/* =========================================================
   Card & Grid
   ========================================================= */
.grid {
  display: grid;
  gap: 28px;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card-bg);
  color: var(--ink-primary);
  border: 1px solid var(--line);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-6px);
  background: var(--card-bg-hover);
  border-color: #444;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin-top: 0;
  color: var(--page-white);
  font-size: 1.5rem;
}

/* =========================================================
   Table
   ========================================================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--card-bg);
  color: var(--ink-primary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
th, td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--yl);
  color: #111111;
  font-weight: 700;
  border-bottom: 2px solid var(--yl-dark);
}
tbody tr:nth-child(even) {
  background-color: var(--card-bg-hover);
}

/* =========================================================
   Buttons
   ========================================================= */
a.btn, a.cta-btn {
  display: inline-block;
  background: var(--yl);
  color: #111111;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 15px rgba(254, 201, 0, 0.2);
  margin-top: 16px;
  transition: all 0.2s ease-out;
}
a.btn:hover, a.cta-btn:hover {
  background: var(--yl-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(254, 201, 0, 0.3);
}
.cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-block;
  background: none;
  color: var(--yl);
  text-decoration: none;
  padding: 12px 30px;
  border: 2px solid var(--yl);
  border-radius: 8px;
  font-weight: 600;
  margin-top: 16px;
  transition: all 0.2s ease-out;
}
.btn-secondary:hover {
  background: var(--yl);
  color: #111111;
  transform: translateY(-3px);
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-secondary);
  font-size: 14px;
  padding: 40px 0 40px;
  background: var(--page);
}

/* =========================================================
   Responsive (*** MODIFICATION HERE ***)
   ========================================================= */
@media (max-width: 720px) {
  
  /* --- 針對手機版導覽列的調整 --- */
  header {
    position: static;  /* 取消黏貼 */
    padding: 8px 0;    /* <<<--- 修改點：將 12px 減少為 8px，手機版更薄 */
    backdrop-filter: none;
    background: var(--page); 
  }
  
  .container { padding: 40px 20px; }
  
  nav {
    justify-content: center;
    text-align: center;
  }
  nav a.brand {
    width: 100%;
    margin-bottom: 10px;
  }

  .hero { 
    padding: 40px 0; 
    text-align: center; 
  }
  .hero h1 { font-size: 2.4rem; }
  .hero .subtitle { font-size: 1.2rem; }
  .hero p { max-width: 100%; }

  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.3rem; }

  .cols-2, .cols-3 {
    grid-template-columns: 1fr;
  }
  
  .card { padding: 24px; }
  
  table { 
    display: block; 
    width: 100%; 
    overflow-x: auto; 
    white-space: nowrap;
  }
  
  .cta { gap: 12px; }
  a.btn, a.cta-btn, .btn-secondary {
    width: 100%;
    text-align: center;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* =========================================================
   SmartBoss Formula Layout (Page-Specific) v4.0 (Wrapper-Fix)
   These styles ONLY apply to #page-products
   - ADDS .content-wrapper INSIDE #pillar-twin to GUARANTEE centering.
   ========================================================= */

/* * 1. 佈局：公式化網格 (Grid Wrapper)
 * ------------------------------------------------------ */
#page-products .formula-grid-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 28px;
  align-items: start; /* 頂部對齊 */
  margin-bottom: 60px; /* 恢復 section 的底部間距 */
}

/* * 2. 視覺：模組卡片化 (Core, Pulse, Twin)
 * ------------------------------------------------------ */
#page-products .formula-grid-wrapper section {
  background: var(--card-bg); /* 保留輕微灰底 */
  border-radius: 12px;
  padding: 32px;
  height: 100%; /* 確保 A, B 兩欄等高 */
}

/* * 3. 佈局：網格定位 (Grid Positioning)
 * ------------------------------------------------------ */
#page-products #pillar-core {
  grid-column: 1;
  margin-bottom: 0;
}
#page-products .icon-plus {
  grid-column: 2;
  grid-row: 1;
  align-self: center; /* 讓 + 號保持垂直置中 */
}
#page-products #pillar-pulse {
  grid-column: 3;
  margin-bottom: 0;
}
#page-products .icon-arrow {
  grid-column: 1 / -1; /* 橫跨所有三欄 */
  grid-row: 2;
}

/* * 4. 佈局：(Pillar C) - 容器本身
 * ------------------------------------------------------ */
#page-products #pillar-twin {
  grid-column: 1 / -1; /* C 區塊容器保持 100% 寬 */
  grid-row: 3;
  margin-bottom: 0;
  /* ▼▼▼ 核心修正：將 padding 移至 wrapper，確保背景色填滿 ▼▼▼ */
  padding: 0;
}

/* * 5. 佈局：匯聚 (Centering the .content-wrapper)
 * ------------------------------------------------------ */
#page-products #pillar-twin .content-wrapper {
  width: 70%;
  max-width: 900px;
  margin: 0 auto; /* 0 上下, auto 左右 (保證置中) */
  padding: 32px;  /* 將 padding 從 section 移到這裡 */
}

/* * 6. 視覺元素：+ 號與箭頭
 * ------------------------------------------------------ */
#page-products .icon-plus,
#page-products .icon-arrow {
  font-size: 5rem;
  font-weight: 700;
  color: var(--yl);
  text-align: center;
  user-select: none;
}
#page-products .icon-arrow {
  margin: 10px 0;
}

/* * 7. 內容：版圖標題 (H4) 與邊距修正
 * ------------------------------------------------------ */
#page-products .formula-grid-wrapper h4 {
  font-size: 1.1rem;
  color: var(--yl);
  font-weight: 600;
  margin: 0 0 8px 0;
  text-transform: uppercase;
}
#page-products .formula-grid-wrapper h2 {
  margin-top: 0;
}

/* * 8. 響應式 RWD (手機版)
 * ------------------------------------------------------ */
@media (max-width: 768px) {
  #page-products .formula-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  #page-products .icon-plus {
    display: none;
  }

  #page-products .icon-arrow {
    font-size: 3.5rem;
  }

  #page-products .formula-grid-wrapper section {
    padding: 0; /* 移除 section padding (已移至 wrapper) */
    height: auto;
  }
  
  #page-products #pillar-core,
  #page-products #pillar-pulse {
      padding: 24px; /* ...但為 A, B 區加回 RWD padding */
  }

  /* ▼▼▼ RWD 修正：wrapper 恢復 100% 寬 ▼▼▼ */
  #page-products #pillar-twin .content-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px; /* RWD padding */
  }
}