/*
Theme Name: 貸款顧問
Theme URI: https://muse-imc.com
Author: 沐思
Author URI: https://muse-imc.com
Description: 貸款詮詢網站 WordPress 主題，採用現代設計風格，包含完整的貸款詮詢功能。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: loan-consultant
Tags: finance, loan, dark, gold, responsive
*/

/* =============================================
   CSS 變數 - 黑金主題（預設）
   ============================================= */
:root {
  --gold: oklch(0.75 0.12 85);
  --gold-light: oklch(0.85 0.10 85);
  --gold-dark: oklch(0.60 0.14 85);
  --dark-bg: oklch(0.13 0.005 285);
  --dark-card: oklch(0.17 0.005 285);
  --dark-card-2: oklch(0.20 0.005 285);
  --background: oklch(0.13 0.005 285);
  --foreground: oklch(0.95 0.005 85);
  --card: oklch(0.17 0.005 285);
  --card-foreground: oklch(0.95 0.005 85);
  --popover: oklch(0.17 0.005 285);
  --popover-foreground: oklch(0.95 0.005 85);
  --primary: oklch(0.75 0.12 85);
  --primary-foreground: oklch(0.13 0.005 285);
  --secondary: oklch(0.20 0.005 285);
  --secondary-foreground: oklch(0.85 0.005 85);
  --muted: oklch(0.22 0.005 285);
  --muted-foreground: oklch(0.65 0.005 85);
  --accent: oklch(0.75 0.12 85);
  --accent-foreground: oklch(0.13 0.005 285);
  --border: oklch(0.28 0.005 285);
  --input: oklch(0.22 0.005 285);
  --ring: oklch(0.75 0.12 85);
  --destructive: oklch(0.65 0.20 25);
  --radius: 0.5rem;
}

/* =============================================
   基礎重置
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif TC', serif;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

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

ul, ol {
  list-style: none;
}

/* =============================================
   容器
   ============================================= */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1280px;
  }
}

/* =============================================
   工具類別
   ============================================= */
.gold-line {
  display: inline-block;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin-bottom: 0.75rem;
}

.text-gold { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }

/* =============================================
   按鈕
   ============================================= */
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary-foreground);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px color-mix(in oklch, var(--gold) 40%, transparent);
  color: var(--primary-foreground);
}

.btn-gold-outline {
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: 2px solid var(--gold);
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
}

.btn-gold-outline:hover {
  background: var(--gold);
  color: var(--primary-foreground);
  transform: translateY(-2px);
}

/* =============================================
   卡片
   ============================================= */
.dark-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

/* =============================================
   動畫
   ============================================= */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--gold) 40%, transparent); }
  50% { box-shadow: 0 0 0 12px color-mix(in oklch, var(--gold) 0%, transparent); }
}

.pulse-gold {
  animation: pulse-gold 2s infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  animation: marquee 45s linear infinite;
  display: flex;
  width: max-content;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(-10px) translateX(-50%); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* =============================================
   捲軸
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* =============================================
   公告欄
   ============================================= */
#announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  overflow: hidden;
  background: linear-gradient(90deg, #7f1d1d, #991b1b, #7f1d1d);
  height: 36px;
  display: flex;
  align-items: center;
}

#announcement-bar .marquee-track span {
  color: #fecaca;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'Noto Sans TC', sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* =============================================
   導覽列
   ============================================= */
#site-nav {
  position: fixed;
  left: 0;
  right: 0;
  top: 36px;
  z-index: 50;
  transition: all 0.3s ease;
  background: color-mix(in oklch, var(--background) 85%, transparent);
  backdrop-filter: blur(12px);
}

#site-nav.scrolled {
  background: color-mix(in oklch, var(--background) 97%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

#site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

#site-nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#site-nav .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  background: linear-gradient(135deg, var(--primary), var(--gold-dark));
  color: var(--primary-foreground);
  font-family: 'Noto Serif TC', serif;
}

#site-nav .logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: 'Noto Serif TC', serif;
  color: var(--primary);
}

#site-nav .nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  #site-nav .nav-links {
    display: flex;
  }
}

#site-nav .nav-links button {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#site-nav .nav-links button:hover {
  color: var(--primary);
  background: color-mix(in oklch, var(--primary) 10%, transparent);
}

#site-nav .nav-cta {
  display: none;
}

@media (min-width: 1024px) {
  #site-nav .nav-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
}

#site-nav .nav-mobile-btn {
  display: flex;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--primary);
}

@media (min-width: 1024px) {
  #site-nav .nav-mobile-btn {
    display: none;
  }
}

#site-nav .mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

#site-nav .mobile-menu.open {
  display: block;
}

#site-nav .mobile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
  transition: color 0.2s;
}

#site-nav .mobile-menu button:hover {
  color: var(--primary);
}

#site-nav .mobile-menu .mobile-cta {
  padding: 0.75rem 1rem 0;
}

/* =============================================
   Hero 區塊
   ============================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 144px;
  padding-bottom: 4rem;
}

#hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    color-mix(in oklch, var(--background) 85%, transparent) 0%,
    color-mix(in oklch, var(--background) 70%, transparent) 100%);
}

#hero .hero-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to top, var(--background), transparent);
}

#hero .hero-content {
  position: relative;
  z-index: 10;
  max-width: 48rem;
}

#hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  background: color-mix(in oklch, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 50%, transparent);
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
}

#hero .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s infinite;
}

#hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-family: 'Noto Serif TC', serif;
  color: var(--foreground);
  text-shadow: none;
}

@media (min-width: 768px) {
  #hero h1 { font-size: 3rem; }
}

@media (min-width: 1024px) {
  #hero h1 { font-size: 3.75rem; }
}

#hero h1 .highlight {
  color: var(--primary);
}

#hero .hero-subtitle {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.75;
  max-width: 36rem;
  color: var(--foreground);
  opacity: 0.85;
  font-family: 'Noto Sans TC', sans-serif;
  text-shadow: none;
}

@media (min-width: 768px) {
  #hero .hero-subtitle { font-size: 1.125rem; }
}

#hero .hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

#hero .hero-tag {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.375rem;
  background: color-mix(in oklch, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 50%, transparent);
  color: var(--gold-dark);
  font-family: 'Noto Sans TC', sans-serif;
}

#hero .hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  #hero .hero-cta {
    flex-direction: row;
  }
}

#hero .countdown-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#hero .countdown {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#hero .countdown-unit {
  text-align: center;
}

#hero .countdown-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  font-weight: 900;
  font-family: 'Noto Serif TC', serif;
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--primary) 40%, transparent);
  color: var(--primary);
}

#hero .countdown-lbl {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#hero .countdown-sep {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

#hero .scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: color-mix(in oklch, var(--primary) 70%, transparent);
  animation: bounce 2s infinite;
}

#hero .scroll-indicator span {
  font-size: 0.75rem;
  font-family: 'Noto Sans TC', sans-serif;
}

/* =============================================
   統計區塊
   ============================================= */
#stats {
  padding: 4rem 0;
  position: relative;
}

#stats .stats-bg {
  position: absolute;
  inset: 0;
  background: var(--card);
  opacity: 0.5;
}

#stats .stats-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  #stats .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

#stats .stat-item {
  text-align: center;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

#stats .stat-item:hover {
  border-color: color-mix(in oklch, var(--primary) 40%, transparent);
  transform: translateY(-4px);
}

#stats .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 30%, transparent);
}

#stats .stat-num {
  font-size: 1.875rem;
  font-weight: 900;
  font-family: 'Noto Serif TC', serif;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

#stats .stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

/* =============================================
   優勢區塊
   ============================================= */
#advantages {
  padding: 6rem 0;
  position: relative;
  background: var(--background);
}

#advantages .section-header {
  text-align: center;
  margin-bottom: 4rem;
}

#advantages .section-tag {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
}

#advantages h2 {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

@media (min-width: 768px) {
  #advantages h2 { font-size: 2.25rem; }
}

#advantages .section-desc {
  margin-top: 1rem;
  font-size: 1rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#advantages .adv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  #advantages .adv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #advantages .adv-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

#advantages .adv-card {
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: default;
}

#advantages .adv-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklch, var(--primary) 40%, transparent);
  box-shadow: 0 8px 30px color-mix(in oklch, var(--primary) 10%, transparent);
}

#advantages .adv-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 30%, transparent);
}

#advantages .adv-num {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  color: color-mix(in oklch, var(--primary) 60%, transparent);
  font-family: 'Noto Sans TC', sans-serif;
}

#advantages .adv-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

#advantages .adv-desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

/* =============================================
   產品區塊
   ============================================= */
#products {
  padding: 6rem 0;
  background: var(--card);
}

#products .section-header {
  text-align: center;
  margin-bottom: 4rem;
}

#products .section-tag {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
}

#products h2 {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

@media (min-width: 768px) {
  #products h2 { font-size: 2.25rem; }
}

#products .products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  #products .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #products .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

#products .product-card {
  position: relative;
  border-radius: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  overflow: hidden;
}

#products .product-card:hover {
  border-color: color-mix(in oklch, var(--primary) 50%, transparent);
  box-shadow: 0 20px 40px color-mix(in oklch, var(--primary) 10%, transparent);
}

#products .product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Noto Sans TC', sans-serif;
}

#products .product-body {
  padding: 1.5rem;
}

#products .product-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#products .product-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 30%, transparent);
}

#products .product-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: var(--input);
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#products .product-subtitle {
  font-size: 0.75rem;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
  margin-bottom: 0.25rem;
}

#products .product-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

#products .product-desc {
  font-size: 0.875rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#products .product-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

#products .product-highlight {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: color-mix(in oklch, var(--primary) 8%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in oklch, var(--primary) 20%, transparent);
  font-family: 'Noto Sans TC', sans-serif;
}

#products .product-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
  transition: color 0.2s;
}

#products .product-cta:hover {
  color: var(--gold-light);
}

#products .product-cta .cta-arrow {
  margin-left: auto;
}

/* =============================================
   見證區塊
   ============================================= */
#testimonials {
  padding: 6rem 0;
  background: var(--background);
}

#testimonials .section-header {
  text-align: center;
  margin-bottom: 4rem;
}

#testimonials .section-tag {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
}

#testimonials h2 {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

@media (min-width: 768px) {
  #testimonials h2 { font-size: 2.25rem; }
}

#testimonials .testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  #testimonials .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #testimonials .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

#testimonials .testimonial-card {
  padding: 1.5rem;
  transition: all 0.3s ease;
}

#testimonials .testimonial-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklch, var(--primary) 40%, transparent);
}

#testimonials .testimonial-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#testimonials .testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Noto Serif TC', serif;
  background: linear-gradient(135deg, var(--primary), var(--gold-dark));
  color: var(--primary-foreground);
  flex-shrink: 0;
}

#testimonials .testimonial-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

#testimonials .testimonial-meta {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#testimonials .testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 0.75rem;
}

#testimonials .star {
  color: var(--primary);
  font-size: 0.875rem;
}

#testimonials .testimonial-text {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#testimonials .testimonial-amount {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: color-mix(in oklch, var(--primary) 10%, transparent);
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
  display: inline-block;
}

/* =============================================
   貸款試算（樣式已移至 functions.php inline CSS，優先級 99）
   ============================================= */
#calculator {
  padding: 6rem 0;
  background: var(--card);
}

#calculator .calc-header {
  text-align: center;
  margin-bottom: 3rem;
}

#calculator .section-tag {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
}

#calculator h2 {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

@media (min-width: 768px) {
  #calculator h2 { font-size: 2.25rem; }
}

/* =============================================
   貸款試算工具 — 滑桿版（已驗證）
   ============================================= */

#calculator .calc-subtitle {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  margin-top: 0.5rem;
}

/* 卡片外框 */
#calculator .calc-slider-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 62rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
}

@media (min-width: 768px) {
  #calculator .calc-slider-wrapper {
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
  }
}

/* 左側滑桿區 */
#calculator .calc-slider-controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#calculator .calc-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#calculator .calc-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#calculator .calc-slider-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#calculator .calc-slider-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Noto Serif TC', serif;
}

#calculator .slider-track-wrap {
  padding: 0.375rem 0;
}

/* Range input */
#calculator .calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  border: none;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--fill, 16%),
    var(--border) var(--fill, 16%),
    var(--border) 100%
  );
}

#calculator .calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2.5px solid var(--card);
  box-shadow: 0 1px 6px rgba(0,0,0,0.3), 0 0 0 1.5px var(--primary);
  transition: transform 0.12s ease;
}

#calculator .calc-slider::-webkit-slider-thumb:hover,
#calculator .calc-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

#calculator .calc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2.5px solid var(--card);
  box-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

#calculator .calc-slider::-moz-range-progress {
  background: var(--primary);
  border-radius: 999px;
  height: 5px;
}

#calculator .calc-slider-minmax {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  margin-top: 0.2rem;
}

/* 右側結果面板 */
#calculator .calc-result-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 每月還款大字區 */
#calculator .calc-result-main {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

#calculator .calc-result-main-label {
  font-size: 0.8125rem;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
  margin-bottom: 0.375rem;
  opacity: 0.9;
}

#calculator .calc-result-main-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  font-family: 'Noto Serif TC', serif;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

@media (min-width: 1024px) {
  #calculator .calc-result-main-value { font-size: 2.75rem; }
}

#calculator .calc-result-main-unit {
  font-size: 0.8125rem;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
  opacity: 0.75;
}

/* 明細列表 */
#calculator .calc-result-details {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  overflow: hidden;
}

#calculator .calc-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Noto Sans TC', sans-serif;
}

#calculator .calc-detail-row:last-child {
  border-bottom: none;
}

#calculator .calc-detail-label {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

#calculator .calc-detail-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

#calculator .calc-detail-interest {
  color: var(--primary);
}

#calculator .calc-detail-total .calc-detail-label {
  font-weight: 700;
  color: var(--foreground);
}

#calculator .calc-detail-total .calc-detail-value {
  color: var(--primary);
  font-size: 0.95rem;
}

#calculator .calc-disclaimer {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.65;
}

#calculator .calc-cta-btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.5rem;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
  border: none;
  background: var(--primary);
  color: var(--background);
  transition: opacity 0.2s;
}

#calculator .calc-cta-btn:hover {
  opacity: 0.88;
}

/* =============================================
   申請區塊
   ============================================= */
#apply {
  padding: 6rem 0;
  background: var(--background);
  position: relative;
  overflow: hidden;
}

#apply .apply-wrapper {
  max-width: 72rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  #apply .apply-wrapper {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  #apply .apply-wrapper {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* 兩欄佈局 */
#apply .apply-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  #apply .apply-two-col {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
}

/* 左側說明 */
#apply .apply-info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* 標籤線 + APPLY NOW */
#apply .apply-info-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#apply .apply-tag-line {
  width: 3rem;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 0.25rem;
}

#apply .apply-tag-text {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  font-family: 'Noto Sans TC', sans-serif;
}

#apply .apply-main-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
  line-height: 1.25;
  margin: 0;
}

@media (min-width: 768px) {
  #apply .apply-main-title { font-size: 2.75rem; }
}

#apply .apply-title-highlight {
  color: var(--primary);
}

#apply .apply-desc {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.8;
  font-family: 'Noto Sans TC', sans-serif;
  margin: 0;
}

/* 步驟 */
#apply .apply-steps {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

#apply .apply-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

#apply .apply-step-num {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  border-radius: 0.5rem;
  background: color-mix(in oklch, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary) 40%, transparent);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans TC', sans-serif;
  flex-shrink: 0;
}

#apply .apply-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 0.25rem;
}

#apply .apply-step-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#apply .apply-step-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

/* 提醒框 */
#apply .apply-reminder {
  background: color-mix(in oklch, var(--card) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
}

#apply .apply-reminder-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
  margin-bottom: 0.75rem;
}

#apply .apply-reminder ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#apply .apply-reminder li {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.6;
}

/* 右側表單卡片 */
#apply .apply-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

#apply .apply-form-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

#apply .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  #apply .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
}

#apply .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

#apply .form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#apply .form-field input,
#apply .form-field select,
#apply .form-field textarea {
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: var(--input);
  border: 1.5px solid var(--border);
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

#apply .form-field input:focus,
#apply .form-field select:focus,
#apply .form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 15%, transparent);
}

#apply .form-field.full-width {
  grid-column: 1 / -1;
}

#apply .form-field-hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* 單選按鈕 */
#apply .apply-radio-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#apply .apply-radio-group {
  display: flex;
  gap: 2.5rem;
  margin-top: 0.375rem;
}

#apply .apply-radio-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--foreground);
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
}

/* 送出按鈕 */
#apply .apply-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.05em;
}

#apply .apply-submit-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

#apply .form-note {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 0.875rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.5;
}

/* 成功訊息 */
#apply .form-success {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#apply .form-success .success-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  border: 2px solid color-mix(in oklch, var(--primary) 40%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

#apply .form-success h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

#apply .form-success p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  line-height: 1.7;
}

/* =============================================
   注意事項
   ============================================= */
#notice {
  padding: 5rem 0;
  background: var(--background);
}

#notice .notice-header {
  text-align: center;
  margin-bottom: 3rem;
}

#notice h2 {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

@media (min-width: 768px) {
  #notice h2 { font-size: 2.25rem; }
}

#notice .notice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  #notice .notice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

#notice .notice-card {
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
}

#notice .notice-card.full-width {
  grid-column: 1 / -1;
}

#notice .notice-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#notice .notice-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

#notice .notice-list {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#notice .notice-list li {
  padding: 0.25rem 0;
}

#notice .notice-list .hotline {
  color: var(--primary);
  padding-top: 0.5rem;
}

#notice .notice-text {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#notice .loan-terms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  font-size: 0.875rem;
  font-family: 'Noto Sans TC', sans-serif;
}

@media (min-width: 768px) {
  #notice .loan-terms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

#notice .loan-term-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

#notice .loan-term-value {
  color: var(--muted-foreground);
}

#notice .loan-example {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.75;
  background: var(--secondary);
  color: var(--muted-foreground);
}

/* =============================================
   頁尾
   ============================================= */
#site-footer {
  padding: 4rem 0 2rem;
  background: var(--card);
  border-top: 1px solid var(--border);
}

#site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  #site-footer .footer-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  #site-footer .footer-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
  }
}

#site-footer .footer-brand .brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#site-footer .footer-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  background: linear-gradient(135deg, var(--primary), var(--gold-dark));
  color: var(--primary-foreground);
  font-family: 'Noto Serif TC', serif;
}

#site-footer .footer-brand .brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  font-family: 'Noto Serif TC', serif;
  color: var(--primary);
}

#site-footer .footer-brand .brand-desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#site-footer .footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
  font-family: 'Noto Serif TC', serif;
}

#site-footer .footer-links li {
  margin-bottom: 0.5rem;
}

#site-footer .footer-links button {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
  transition: color 0.2s;
}

#site-footer .footer-links button:hover {
  color: var(--primary);
}

#site-footer .footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

#site-footer .footer-contact-item span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

#site-footer .footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  #site-footer .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

#site-footer .footer-bottom p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  opacity: 0.6;
  font-family: 'Noto Sans TC', sans-serif;
}

/* =============================================
   浮動 LINE 按鈕
   ============================================= */
#floating-line {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#floating-line .scroll-top-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--primary);
  cursor: pointer;
  display: none;
}

#floating-line .scroll-top-btn.visible {
  display: flex;
}

#floating-line .scroll-top-btn:hover {
  transform: translateY(-4px);
}

#floating-line .line-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

#floating-line .line-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: #06C755;
  box-shadow: 0 4px 20px rgba(6, 199, 85, 0.5);
}

#floating-line .line-btn:hover .line-icon {
  transform: translateY(-4px) scale(1.1);
}

#floating-line .line-label {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  background: rgba(0,0,0,0.7);
  color: #ffffff;
  font-family: 'Noto Sans TC', sans-serif;
  white-space: nowrap;
}

/* =============================================
   表單成功訊息
   ============================================= */
.form-success {
  text-align: center;
  padding: 2rem;
}

.form-success .success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: color-mix(in oklch, var(--primary) 15%, transparent);
  border: 2px solid color-mix(in oklch, var(--primary) 40%, transparent);
}

.form-success h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  font-family: 'Noto Serif TC', serif;
}

.form-success p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: 'Noto Sans TC', sans-serif;
}

/* =============================================
   響應式調整
   ============================================= */
@media (max-width: 640px) {
  #hero h1 { font-size: 2rem; }
  #hero .hero-cta .btn-gold,
  #hero .hero-cta .btn-gold-outline {
    width: 100%;
    justify-content: center;
  }
  #calculator .calc-result-grid {
    grid-template-columns: 1fr;
  }
}


/* =============================================
   部落格樣式
   ============================================= */

/* 導覽列 section 錨點連結（非首頁時用 <a> 取代 <button>）*/
#site-nav .nav-links .nav-link-section,
#site-nav .nav-links a.nav-link-section {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--foreground) !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  line-height: 1.5;
  transition: color 0.2s, background 0.2s;
}

#site-nav .nav-links .nav-link-section:hover {
  color: var(--primary);
  background: color-mix(in oklch, var(--primary) 10%, transparent);
}

/* 導覽列部落格連結 */
.nav-links .nav-link-blog,
.nav-links .nav-link-home {
    color: var(--foreground) !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: color 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.nav-links .nav-link-blog:hover,
.nav-links .nav-link-home:hover {
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 10%, transparent);
}

.nav-links .nav-link-blog.active {
    color: var(--primary);
    font-weight: 700;
}

/* ---- 部落格 Hero ---- */
#blog-hero {
    background: var(--background);
    padding: 8rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

#blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, color-mix(in oklch, var(--primary) 12%, transparent) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero-inner {
    position: relative;
    z-index: 1;
}

#blog-hero h1 {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--foreground);
    margin: 0.5rem 0 1rem;
}

.blog-hero-sub {
    font-size: 1.0625rem;
    color: var(--muted-foreground);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ---- 文章列表 ---- */
#blog-list {
    padding: 4rem 0 5rem;
    background: var(--background);
}

.blog-grid {
    display: grid;
    gap: 2rem;
}

/* 每行欄數控制 */
.blog-grid-cols-1 {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
}

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

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

.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px color-mix(in oklch, var(--primary) 15%, transparent);
    border-color: var(--primary);
}

.blog-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--muted);
    border-radius: 1.25rem 1.25rem 0 0;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.05);
}

.blog-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: color-mix(in oklch, var(--primary) 8%, var(--card));
    border-radius: 1.25rem 1.25rem 0 0;
}

.blog-thumb-placeholder span {
    font-size: 3rem;
    opacity: 0.4;
}

.blog-card-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in oklch, var(--primary) 8%, var(--card));
}

.blog-card-thumb-placeholder span {
    font-size: 3rem;
    opacity: 0.5;
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.blog-card-cat {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
}

.blog-card-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.blog-card-title a {
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin: 0 0 1.25rem;
    flex: 1;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.2s;
}

.blog-read-more:hover {
    gap: 0.625rem;
}

/* ---- 無限滾動指示器 ---- */
.blog-infinite-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 0;
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

.blog-loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid color-mix(in oklch, var(--primary) 20%, transparent);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: blog-spin 0.8s linear infinite;
}

@keyframes blog-spin {
    to { transform: rotate(360deg); }
}

.blog-infinite-end {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    padding: 3rem 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.blog-end-line {
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: var(--border);
}

/* ---- 部落格 Hero Tag ---- */
.blog-hero-tag {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ---- 部落格分頁 ---- */
.blog-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination .page-numbers li a,
.blog-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--foreground);
    background: var(--card);
    transition: all 0.2s;
}

.blog-pagination .page-numbers li a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 8%, var(--card));
}

.blog-pagination .page-numbers li span.current {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
    font-weight: 700;
}

/* ---- 空狀態 ---- */
.blog-empty {
    text-align: center;
    padding: 5rem 2rem;
}

.blog-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.blog-empty h2 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 0.75rem;
}

.blog-empty p {
    color: var(--muted-foreground);
    font-size: 1rem;
}

/* ---- 部落格 CTA ---- */
#blog-cta {
    padding: 5rem 0;
    background: color-mix(in oklch, var(--primary) 6%, var(--background));
    border-top: 1px solid color-mix(in oklch, var(--primary) 15%, transparent);
}

.blog-cta-inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.blog-cta-inner h2 {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 900;
    color: var(--foreground);
    margin: 0 0 1rem;
}

.blog-cta-inner p {
    color: var(--muted-foreground);
    font-size: 1rem;
    line-height: 1.75;
    margin: 0 0 2rem;
}

/* ---- 單篇文章 Hero ---- */
#single-hero {
    position: relative;
    padding: 8rem 0 3rem;
    background: var(--background);
    overflow: hidden;
}

.single-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.single-hero-overlay {
    position: absolute;
    inset: 0;
    background: color-mix(in oklch, var(--background) 80%, transparent);
    backdrop-filter: blur(2px);
}

.single-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.single-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.single-breadcrumb a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s;
}

.single-breadcrumb a:hover {
    color: var(--primary);
}

.single-title {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 900;
    color: var(--foreground);
    line-height: 1.3;
    margin: 0 0 1.25rem;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.single-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ---- 單篇文章內容 ---- */
#single-content {
    padding: 4rem 0 5rem;
    background: var(--background);
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

.single-article {
    min-width: 0;
}

.single-body {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem;
    line-height: 1.9;
    font-size: 1rem;
    color: var(--foreground);
    /* CSS 隔離防護：防止文章內容的 HTML/CSS 影響容器外部 */
    contain: layout style;
    display: flow-root;
    overflow: hidden;
    isolation: isolate;
}

.single-body h2 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 2rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

.single-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 1.75rem 0 0.875rem;
}

.single-body p {
    margin: 0 0 1.25rem;
    color: var(--muted-foreground);
}

.single-body ul, .single-body ol {
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
    color: var(--muted-foreground);
}

.single-body li {
    margin-bottom: 0.5rem;
}

.single-body a {
    color: var(--primary);
    text-decoration: underline;
}

.single-body blockquote {
    border-left: 4px solid var(--primary);
    background: color-mix(in oklch, var(--primary) 6%, var(--card));
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--muted-foreground);
    font-style: italic;
}

.single-body img {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.single-body code {
    background: color-mix(in oklch, var(--primary) 8%, var(--card));
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: var(--primary);
}

/* 標籤 */
.single-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.single-tags-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-weight: 600;
}

.single-tag {
    font-size: 0.8125rem;
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s;
}

.single-tag:hover {
    background: color-mix(in oklch, var(--primary) 20%, transparent);
}

/* 上下篇導覽 */
.single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.single-nav-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.single-nav-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px color-mix(in oklch, var(--primary) 15%, transparent);
}

.single-nav-next {
    text-align: right;
}

.single-nav-dir {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 600;
}

.single-nav-title {
    font-size: 0.9rem;
    color: var(--foreground);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- 側邊欄 ---- */
.single-sidebar {
    position: sticky;
    top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.sidebar-card-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

.sidebar-cta {
    background: color-mix(in oklch, var(--primary) 6%, var(--card));
    border-color: color-mix(in oklch, var(--primary) 25%, transparent);
    text-align: center;
}

.sidebar-cta-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-cta h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 0.625rem;
}

.sidebar-cta p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin: 0;
}

.sidebar-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.sidebar-post-list li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-post-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-post-list a {
    font-size: 0.9rem;
    color: var(--foreground);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-list a:hover {
    color: var(--primary);
}

.sidebar-post-date {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--foreground);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar-cat-list a:hover {
    background: color-mix(in oklch, var(--primary) 8%, transparent);
    color: var(--primary);
}

.sidebar-cat-count {
    font-size: 0.75rem;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}

/* ---- 響應式 ---- */
@media (max-width: 1024px) {
    .single-layout {
        grid-template-columns: 1fr;
    }
    .single-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    #blog-hero {
        padding: 7rem 0 2.5rem;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .single-nav {
        grid-template-columns: 1fr;
    }
    .single-body {
        padding: 0.25rem;
    }
    #single-hero {
        /* 公告欄 36px + 導覽列 64px = 100px，加上安全間距提高至 7rem */
        padding: 7rem 0 1.25rem;
    }
    .single-layout {
        padding: 0 0.25rem;
    }
}
