/* ==========================================================================
   永豐金證券 業務副理 吳典翰 - 知識庫與部落格專屬網站樣式表
   Primary Brand Red: #cd0013
   ========================================================================== */

:root {
  --sp-red: #cd0013;
  --sp-red-hover: #b00010;
  --sp-red-light: #fff2f2;
  --sp-red-border: #ffd6d6;
  --sp-dark: #121824;
  --sp-dark-surface: #1e2638;
  --sp-gray-bg: #f8fafc;
  --sp-card-border: #e2e8f0;
  --sp-text-main: #1e293b;
  --sp-text-muted: #64748b;
  --sp-line-green: #06C755;
  --sp-line-hover: #05a747;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Questrial', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #ffffff;
  color: var(--sp-text-main);
  line-height: 1.65;
  letter-spacing: 0.3px;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header 導覽列
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--sp-red);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: var(--sp-red);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(205, 0, 19, 0.3);
}

.logo-info {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.logo-sub {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.5px;
}

.manager-badge {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 2px solid #e2e8f0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.manager-name {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.manager-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-red);
  background: var(--sp-red-light);
  padding: 2px 8px;
  border-radius: 4px;
}

nav.main-nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
}

nav.main-nav a {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  padding: 8px 4px;
  position: relative;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--sp-red);
}

nav.main-nav a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sp-red);
  transition: var(--transition);
}

nav.main-nav a:hover:after,
nav.main-nav a.active:after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-tel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  padding: 8px 14px;
  border-radius: 8px;
  background: #f1f5f9;
}

.btn-tel i {
  color: var(--sp-red);
}

.btn-tel:hover {
  background: #e2e8f0;
}

.btn-line-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sp-line-green);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(6, 199, 85, 0.3);
  transition: var(--transition);
}

.btn-line-cta:hover {
  background: var(--sp-line-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Hero 橫幅區塊
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #1e2638 0%, #111824 100%);
  color: #ffffff;
  padding: 60px 0 50px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(205, 0, 19, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Hero 左右雙欄佈局 (Hero Split) */
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* 左側文字區域 */
.hero-left-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.hero-pill-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: -4px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-pill:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.hero-pill i {
  color: #fca5a5;
  font-size: 13.5px;
}

.hero-title {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

.hero-title span {
  color: #ff6b6b;
}

.hero-desc {
  font-size: 17px;
  color: #cbd5e1;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--sp-red);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(205, 0, 19, 0.4);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--sp-red-hover);
  transform: translateY(-2px);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 8px;
  transition: var(--transition);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
}

/* ==========================================================================
   Hero 右側精緻開戶卡片 (Hero Right Card)
   ========================================================================== */
.hero-right-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-top: 4px solid var(--sp-red);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-right-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.hero-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.hero-card-badge {
  background: var(--sp-red-light);
  color: var(--sp-red);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-card-agent {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.hero-card-agent strong {
  font-size: 19px;
  color: #0f172a;
  font-weight: 900;
}

/* 卡片中段：QR Code 與 代碼並排 */
.hero-card-body {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.hero-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.hero-qr-img {
  width: 125px;
  height: 125px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hero-qr-hint {
  font-size: 11px;
  color: #64748b;
  margin-top: 5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-code-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  flex: 1;
}

.hero-code-tag {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.hero-code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 20px;
  font-weight: 900;
  color: var(--sp-red);
  letter-spacing: 1px;
  line-height: 1;
}

.btn-copy-mini {
  background: #ffffff;
  color: var(--sp-red);
  border: 1px solid var(--sp-red);
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  margin-top: 2px;
}

.btn-copy-mini:hover {
  background: var(--sp-red);
  color: #ffffff;
}

.hero-code-hint {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

/* 卡片按鈕組 */
.hero-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-hero-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--sp-red);
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(205, 0, 19, 0.28);
  transition: var(--transition);
}

.btn-hero-open:hover {
  background: var(--sp-red-hover);
  transform: translateY(-1px);
}

.btn-hero-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #06c755;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 0;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.2);
  transition: var(--transition);
}

.btn-hero-line:hover {
  background: #05b34c;
  transform: translateY(-1px);
}

/* 響應式優化 */
@media (max-width: 992px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-left-content {
    text-align: center;
    align-items: center;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-card-header {
    align-items: center;
  }
  .hero-right-card {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-card-body {
    flex-direction: column;
    text-align: center;
  }
  .hero-code-box {
    align-items: center;
  }
}

/* ==========================================================================
   快捷導覽 Bar (Quick Links)
   ========================================================================== */
.quick-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--sp-card-border);
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--sp-gray-bg);
  border: 1px solid var(--sp-card-border);
  transition: var(--transition);
  cursor: pointer;
}

.quick-item:hover {
  background: #ffffff;
  border-color: var(--sp-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--sp-red-light);
  color: var(--sp-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.quick-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.quick-text p {
  font-size: 12px;
  color: var(--sp-text-muted);
}

/* ==========================================================================
   部落格知識庫專區 (Articles Knowledge Base)
   ========================================================================== */
.blog-section {
  padding: 60px 0 80px 0;
  background: #fafcff;
}

.section-header {
  text-align: center;
  margin-bottom: 35px;
}

.section-badge {
  display: inline-block;
  background: var(--sp-red-light);
  color: var(--sp-red);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--sp-text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* 搜尋與篩選控制器 */
.controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 35px;
}

.search-box {
  position: relative;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

.search-box i.search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 17px;
}

.search-input {
  width: 100%;
  padding: 14px 45px 14px 50px;
  font-size: 15px;
  border: 1px solid var(--sp-card-border);
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--sp-red);
  box-shadow: 0 0 0 3px rgba(205, 0, 19, 0.12);
}

.btn-clear-search {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  background: none;
  color: #94a3b8;
  font-size: 16px;
  display: none;
}

.btn-clear-search:hover {
  color: #0f172a;
}

/* 分類標籤頁 (Pills) */
.category-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 25px;
  background: #ffffff;
  border: 1px solid var(--sp-card-border);
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.pill-btn:hover {
  border-color: var(--sp-red);
  color: var(--sp-red);
  background: var(--sp-red-light);
}

.pill-btn.active {
  background: var(--sp-red);
  color: #ffffff;
  border-color: var(--sp-red);
  box-shadow: 0 3px 8px rgba(205, 0, 19, 0.25);
}

/* 文章數量統計列 */
.articles-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  color: var(--sp-text-muted);
}

.status-count strong {
  color: var(--sp-red);
  font-size: 16px;
}

/* 文章卡片網格 (Articles Grid) */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--sp-card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--sp-red);
  background: var(--sp-red-light);
  padding: 3px 10px;
  border-radius: 4px;
}

.card-badge {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #334155;
  padding: 2px 8px;
  border-radius: 4px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition);
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.article-card:hover .card-title,
.article-card:hover .card-title-link {
  color: var(--sp-red);
}

.card-summary {
  font-size: 14px;
  color: var(--sp-text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card-tag {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #94a3b8;
}

.card-meta {
  display: flex;
  gap: 12px;
}

.card-read-btn {
  font-size: 13px;
  font-weight: 700;
  color: var(--sp-red);
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-card:hover .card-read-btn {
  transform: translateX(3px);
}

/* 無搜尋結果提示 */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px dashed #cbd5e1;
}

.empty-state i {
  font-size: 48px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--sp-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ==========================================================================
   文章閱讀彈窗 (Article Detail Modal)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 24px 30px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
}

.modal-close-btn {
  background: #f1f5f9;
  color: #64748b;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--sp-red);
  color: #ffffff;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

.modal-body h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 28px 0 14px 0;
  border-left: 4px solid var(--sp-red);
  padding-left: 12px;
}

.modal-body h4 {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 16px 0 8px 0;
}

.modal-body p {
  margin-bottom: 16px;
}

.modal-body ul, .modal-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.modal-body li {
  margin-bottom: 8px;
}

/* 文章內部排版元素 */
.callout {
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  font-size: 15px;
}

.callout h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-important {
  background: #fff5f5;
  border-left: 4px solid var(--sp-red);
}

.callout-important h4 {
  color: var(--sp-red);
}

.callout-tip {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
}

.callout-tip h4 {
  color: #16a34a;
}

.step-card {
  background: var(--sp-gray-bg);
  border: 1px solid var(--sp-card-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
}

.step-card.step-highlight {
  background: #fff8f8;
  border: 1.5px solid var(--sp-red);
}

.step-badge {
  display: inline-block;
  background: var(--sp-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.code-box {
  background: #ffffff;
  border: 1px dashed var(--sp-red);
  padding: 10px 16px;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 16px;
}

.code-box strong {
  color: var(--sp-red);
  font-size: 18px;
  font-family: monospace;
}

pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 18px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 20px 0;
}

/* 比較網格 */
.app-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.app-card {
  background: var(--sp-gray-bg);
  border: 1px solid var(--sp-card-border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.app-card-preview {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  margin: 14px 0;
  display: block;
}

.app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.app-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--sp-red);
  margin-bottom: 10px;
}

/* 資料表格 */
.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
}

.data-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

.data-table tr:nth-child(even) {
  background: #fafafa;
}

/* 彈窗底部的行動呼籲 (Modal CTA Box) */
.modal-footer-cta {
  background: linear-gradient(135deg, #1e2638 0%, #111824 100%);
  color: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.modal-footer-info h4 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.modal-footer-info p {
  font-size: 14px;
  color: #cbd5e1;
  margin: 0;
}

.modal-footer-btns {
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   業務副理個人簡介區塊 (About Manager Profile)
   ========================================================================== */
.about-section {
  padding: 70px 0;
  background: #ffffff;
  border-top: 1px solid var(--sp-card-border);
}

.about-card {
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sp-card-border);
  box-shadow: var(--shadow-md);
  padding: 44px 50px;
}

.about-header-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.about-tag {
  background: var(--sp-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.about-agent-title {
  font-size: 15px;
  color: #475569;
}

.about-agent-title strong {
  color: #0f172a;
  font-size: 16px;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-details h3 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.about-desc {
  font-size: 16px;
  color: #475569;
  line-height: 1.8;
}

.contact-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 10px 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.contact-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--sp-red-light);
  color: var(--sp-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.contact-item a {
  font-weight: 700;
  color: #0f172a;
}

.contact-item a:hover {
  color: var(--sp-red);
}

.manager-promise-box {
  background: linear-gradient(135deg, #a8000f 0%, #cd0013 100%);
  color: #ffffff;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.7;
}

.manager-promise-box strong {
  color: #ffe4e6;
  font-size: 16px;
}

/* ==========================================================================
   永豐金證券 9 大優勢特色 (SinoPac Strengths)
   ========================================================================== */
.strengths-section {
  padding: 70px 0;
  background: #f8fafc;
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.strength-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--sp-card-border);
  padding: 28px;
  transition: var(--transition);
  position: relative;
}

.strength-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.strength-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--sp-red);
  line-height: 1;
  margin-bottom: 12px;
  font-family: monospace;
}

.strength-card h4 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.strength-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.65;
}

/* ==========================================================================
   法規注意事項與警語 (Legal & Disclaimer)
   ========================================================================== */
.disclaimer-section {
  padding: 40px 0;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.8;
}

.disclaimer-title {
  font-weight: 800;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.disclaimer-list {
  padding-left: 20px;
}

.disclaimer-list li {
  margin-bottom: 4px;
}

/* ==========================================================================
   頁尾 Footer
   ========================================================================== */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 50px 0 25px 0;
  font-size: 14px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding-bottom: 35px;
  border-bottom: 1px solid #1e293b;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo .logo-badge {
  width: 50px;
  height: 50px;
  font-size: 24px;
}

.footer-logo h3 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.footer-logo p {
  font-size: 13px;
  color: #64748b;
}

.footer-contact-items {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.f-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e2e8f0;
}

.f-contact i {
  color: var(--sp-red);
  font-size: 16px;
}

.footer-bottom {
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   右下角浮動快捷聯絡選單 (Floating Action Bar)
   ========================================================================== */
.floating-bar {
  position: fixed;
  bottom: 30px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: var(--transition);
  color: #ffffff;
}

.float-line {
  background: var(--sp-line-green);
}

.float-line:hover {
  background: var(--sp-line-hover);
  transform: scale(1.1);
}

.float-tel {
  background: var(--sp-red);
}

.float-tel:hover {
  background: var(--sp-red-hover);
  transform: scale(1.1);
}

.float-top {
  background: #334155;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.float-top.visible {
  opacity: 1;
  visibility: visible;
}

.float-top:hover {
  background: #0f172a;
  transform: translateY(-2px);
}

/* Toast 提示條 (複製代碼成功提示) */
.toast-msg {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 100000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-msg i {
  color: #4ade80;
}

/* ==========================================================================
   響應式設計 (Media Queries)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .strengths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-card {
    padding: 30px 22px;
  }
  .contact-list {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

@media screen and (max-width: 768px) {
  .nav-container {
    height: 64px;
  }
  nav.main-nav {
    display: none;
  }
  .btn-tel {
    display: none;
  }
  .manager-badge {
    display: none;
  }
  .hero-title {
    font-size: 28px;
  }
  .hero-desc {
    font-size: 15px;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .strengths-grid {
    grid-template-columns: 1fr;
  }
  .app-comparison-grid {
    grid-template-columns: 1fr;
  }
  .modal-container {
    max-height: 95vh;
  }
  .modal-header {
    padding: 18px 20px;
  }
  .modal-title {
    font-size: 20px;
  }
  .modal-body {
    padding: 20px;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-contact-items {
    flex-direction: column;
    gap: 12px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .floating-bar {
    bottom: 20px;
    right: 15px;
  }
  .float-btn {
    width: 46px;
    height: 46px;
    font-size: 19px;
  }
}

/* ==========================================================================
   開戶啟用與驗證手機雙系統專用樣式 (Device Guide & Verification)
   ========================================================================== */
.device-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}

@media screen and (max-width: 768px) {
  .device-guide-grid {
    grid-template-columns: 1fr;
  }
}

.device-guide-card {
  border-radius: var(--radius-md);
  padding: 22px;
  border: 1px solid var(--sp-card-border);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.device-card-android {
  border-top: 4px solid #3ddc84;
}

.device-card-apple {
  border-top: 4px solid #0071e3;
}

.device-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.device-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.device-icon-android {
  background: #e8fbf0;
  color: #0fad52;
}

.device-icon-apple {
  background: #edf5ff;
  color: #0071e3;
}

.device-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.device-badge-alert {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.device-card-android .device-badge-alert {
  background: #e6f9ed;
  color: #0d8a43;
}

.device-card-apple .device-badge-alert {
  background: #e0f2fe;
  color: #0369a1;
}

.device-steps-list {
  padding-left: 20px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
}

.device-steps-list li {
  margin-bottom: 8px;
}

.device-steps-list strong {
  color: #0f172a;
}

/* 嚴禁無痕/私密瀏覽警示橫幅 */
.warning-banner-incognito {
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}

.warning-incognito-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dc2626;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.35);
}

.warning-incognito-body h4 {
  font-size: 18px;
  font-weight: 900;
  color: #b91c1c;
  margin: 0 0 6px 0;
}

.warning-incognito-body p {
  font-size: 14px;
  color: #7f1d1d;
  line-height: 1.65;
  margin: 0;
}

/* 官方 App 形象展示卡 */
.app-promo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 18px 0;
}

.app-promo-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.app-promo-info h5 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.app-promo-info p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.article-img-responsive {
  border-radius: var(--radius-md);
  border: 1px solid var(--sp-card-border);
  box-shadow: var(--shadow-md);
  margin: 16px auto;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   優惠活動專區 (Promotions Section)
   ========================================================================== */
.promotions-section {
  padding: 60px 0;
  background: #f8fafc;
  border-top: 1px solid var(--sp-card-border);
  border-bottom: 1px solid var(--sp-card-border);
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 24px;
}

.promo-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px rgba(0,0,0,0.05);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.promo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.promo-tag-sec {
  background: #fee2e2;
  color: var(--sp-red);
}

.promo-tag-fut {
  background: #e0f2fe;
  color: #0369a1;
}

.promo-date {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.promo-card-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.4;
}

.promo-card-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
}

.promo-highlight-box {
  background: #fdf2f2;
  border-left: 4px solid var(--sp-red);
  padding: 14px 16px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.promo-highlight-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.promo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.7;
}

.promo-task-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.promo-task-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.promo-task-item p {
  font-size: 12px;
  color: #475569;
  margin: 4px 0 0 0;
  line-height: 1.4;
}

.task-badge {
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.highlight-grand {
  grid-column: span 2;
  background: #fffbeb;
  border-color: #fde68a;
}

.badge-grand {
  background: #f59e0b;
  color: #ffffff;
}

.futures-rewards-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.reward-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.highlight-fut-row {
  background: #fff5f5;
  border-color: #fecaca;
}

.reward-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.reward-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.reward-content p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.promo-notes {
  margin-bottom: 16px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.promo-card-footer {
  margin-top: auto;
  padding-top: 10px;
}

@media (max-width: 900px) {
  .promo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .promo-task-grid {
    grid-template-columns: 1fr;
  }
  .highlight-grand {
    grid-column: span 1;
  }
}


