/*
Theme Name: Fuyue Tech
Description: A modern WordPress theme for Fuyue Technology Co., Ltd. - Wireless Networks & Digital Surveillance Systems
Author: Fuyue Tech
Version: 1.1.0
License: GPL v2 or later
Text Domain: fuyue-tech
*/

/* ==========================================
   CSS 自訂屬性 (CSS Variables) - 品牌色彩系統
   ========================================== */
:root {
  /* 品牌主色 */
  --brand-primary: #2563eb;
  --brand-primary-50: #eff6ff;
  --brand-primary-100: #dbeafe;
  --brand-primary-200: #bfdbfe;
  --brand-primary-300: #93c5fd;
  --brand-primary-400: #60a5fa;
  --brand-primary-500: #3b82f6;
  --brand-primary-600: #2563eb;
  --brand-primary-700: #1d4ed8;
  --brand-primary-800: #1e40af;
  --brand-primary-900: #1e3a8a;
  
  /* 品牌輔助色 */
  --brand-secondary: #059669;
  --brand-accent: #7c3aed;
  --brand-warning: #f59e0b;
  --brand-error: #dc2626;
  --brand-success: #10b981;
  
  /* 中性色系 */
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  
  /* 字體系統 */
  --font-family-chinese: "Noto Sans TC", "PingFang TC", "Microsoft YaHei", "SF Pro TC", "Helvetica Neue", Arial, sans-serif;
  --font-family-english: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  
  /* 字體大小 */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  
  /* 行高 */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* 間距系統 */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  --spacing-4xl: 5rem;     /* 80px */
  --spacing-5xl: 6rem;     /* 96px */
  
  /* 陰影系統 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* 圓角系統 */
  --radius-sm: 0.125rem;   /* 2px */
  --radius-base: 0.25rem;  /* 4px */
  --radius-md: 0.375rem;   /* 6px */
  --radius-lg: 0.5rem;     /* 8px */
  --radius-xl: 0.75rem;    /* 12px */
  --radius-2xl: 1rem;      /* 16px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;
  
  /* 動畫時間 */
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 750ms;
  
  /* 動畫曲線 */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 深色模式變數 */
@media (prefers-color-scheme: dark) {
  :root {
    --neutral-50: #111827;
    --neutral-100: #1f2937;
    --neutral-200: #374151;
    --neutral-300: #4b5563;
    --neutral-400: #6b7280;
    --neutral-500: #9ca3af;
    --neutral-600: #d1d5db;
    --neutral-700: #e5e7eb;
    --neutral-800: #f3f4f6;
    --neutral-900: #f9fafb;
  }
}

/* ==========================================
   基礎樣式重設與字體設定
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-chinese);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--neutral-700);
  background-color: var(--neutral-50);
  overflow-x: hidden;
}

/* 中英文混排優化 */
body {
  font-variant-numeric: tabular-nums;
  text-size-adjust: 100%;
}

/* 英文字體優化 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-chinese);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  color: var(--neutral-900);
}

/* 程式碼字體 */
code, pre, kbd, samp {
  font-family: var(--font-family-mono);
}

/* ==========================================
   改進的版面配置系統
   ========================================== */
.container {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

@media (min-width: 640px) {
  .container { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }
}

@media (min-width: 1024px) {
  .container { padding-left: var(--spacing-xl); padding-right: var(--spacing-xl); }
}

/* ==========================================
   優化的按鈕系統
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--duration-slow) var(--ease-out), height var(--duration-slow) var(--ease-out);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

/* 按鈕變體 */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary-600), var(--brand-primary-700));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-primary-700), var(--brand-primary-800));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  background: white;
  color: var(--brand-primary-600);
  border: 2px solid var(--brand-primary-600);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--brand-primary-600);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px) scale(1.02);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
  background: white;
  color: var(--brand-primary-900);
  border-color: white;
  transform: translateY(-2px) scale(1.02);
}

.btn-sm {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: var(--text-lg);
}

/* ==========================================
   精緻的卡片系統
   ========================================== */
.card {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-2xl);
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--neutral-100);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left var(--duration-slow) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-2xl);
  transform: translateY(-8px) scale(1.02);
  border-color: var(--brand-primary-200);
}

.card:hover::before {
  left: 100%;
}

/* 卡片變體 */
.card-interactive {
  cursor: pointer;
}

.card-bordered {
  border: 2px solid var(--neutral-200);
}

.card-gradient {
  background: linear-gradient(135deg, white 0%, var(--neutral-50) 100%);
}

/* ==========================================
   導航系統優化
   ========================================== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all var(--duration-base) var(--ease-out);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.navbar-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4rem;
}

/* Logo 優化 */
.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-image {
  height: 2.5rem;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: all var(--duration-base) var(--ease-out);
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--neutral-900);
  background: linear-gradient(135deg, var(--brand-primary-600), var(--brand-primary-800));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 導航選單 */
.nav-menu {
  display: none;
  gap: var(--spacing-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
}

.nav-item {
  color: var(--neutral-700);
  text-decoration: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  font-weight: 500;
  position: relative;
  transition: all var(--duration-base) var(--ease-out);
}

.nav-item::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand-primary-600);
  transition: all var(--duration-base) var(--ease-out);
  transform: translateX(-50%);
}

.nav-item:hover {
  color: var(--brand-primary-600);
  background: var(--brand-primary-50);
}

.nav-item:hover::before {
  width: 100%;
}

/* 手機選單按鈕 */
.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--neutral-700);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.mobile-menu-button:hover {
  background: var(--neutral-100);
  color: var(--brand-primary-600);
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

/* 手機選單 */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-xl);
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-base) var(--ease-out);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.mobile-nav-item {
  padding: var(--spacing-md);
  color: var(--neutral-700);
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all var(--duration-base) var(--ease-out);
}

.mobile-nav-item:hover {
  background: var(--brand-primary-50);
  color: var(--brand-primary-600);
}

/* ==========================================
   Hero 區域強化
   ========================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--brand-primary-900) 0%, var(--brand-primary-700) 50%, var(--brand-primary-900) 100%);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 58, 237, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%);
  animation: heroGradient 20s ease-in-out infinite;
}

@keyframes heroGradient {
  0%, 100% { 
    background: 
      radial-gradient(circle at 20% 80%, rgba(120, 58, 237, 0.3) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%);
  }
  50% { 
    background: 
      radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
      radial-gradient(circle at 20% 20%, rgba(120, 58, 237, 0.3) 0%, transparent 50%);
  }
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  max-width: 60rem;
  margin: 0 auto;
  padding: var(--spacing-2xl);
}

.hero-title {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: 900;
  line-height: var(--leading-tight);
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s var(--ease-out) 0.2s both;
}

.hero-subtitle {
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  font-weight: 400;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--spacing-2xl);
  opacity: 0.9;
  animation: fadeInUp 1s var(--ease-out) 0.4s both;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: center;
  animation: fadeInUp 1s var(--ease-out) 0.6s both;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* ==========================================
   服務圖示系統
   ========================================== */
.service-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
  font-size: 2rem;
  position: relative;
  transition: all var(--duration-base) var(--ease-out);
}

.service-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: inherit;
  opacity: 0;
  transform: scale(1.2);
  transition: all var(--duration-base) var(--ease-out);
}

.service-icon:hover::before {
  opacity: 0.3;
  transform: scale(1);
}

.service-icon.blue { 
  background: linear-gradient(135deg, var(--brand-primary-100), var(--brand-primary-200));
  color: var(--brand-primary-600);
}

.service-icon.green { 
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: var(--brand-secondary);
}

.service-icon.purple { 
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: var(--brand-accent);
}

/* ==========================================
   動畫系統
   ========================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 動畫類別 */
.animate-fade-in {
  animation: fadeIn 1s var(--ease-out) both;
}

.animate-fade-in-up {
  animation: fadeInUp 1s var(--ease-out) both;
}

.animate-fade-in-down {
  animation: fadeInDown 1s var(--ease-out) both;
}

.animate-slide-in-left {
  animation: slideInLeft 1s var(--ease-out) both;
}

.animate-slide-in-right {
  animation: slideInRight 1s var(--ease-out) both;
}

.animate-scale-in {
  animation: scaleIn 1s var(--ease-out) both;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* 延遲動畫 */
.animate-delay-200 {
  animation-delay: 200ms;
}

.animate-delay-400 {
  animation-delay: 400ms;
}

.animate-delay-600 {
  animation-delay: 600ms;
}

/* ==========================================
   響應式設計改進
   ========================================== */
@media (max-width: 767px) {
  .hero-content {
    padding: var(--spacing-lg);
  }
  
  .card {
    padding: var(--spacing-lg);
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-buttons .btn {
    min-width: 200px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    max-width: 48rem;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 64rem;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 80rem;
  }
}

/* ==========================================
   無障礙支援改進
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.btn:focus-visible,
.nav-item:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-primary-600);
  outline-offset: 2px;
}

/* ==========================================
   高對比模式支援
   ========================================== */
@media (prefers-contrast: high) {
  :root {
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  }
  
  .card {
    border: 2px solid var(--neutral-300);
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* ==========================================
   效能優化
   ========================================== */
.card,
.btn,
.nav-item {
  will-change: transform;
}

.hero-section {
  contain: layout style paint;
}

img {
  will-change: auto;
}

/* ==========================================
   舊版 CSS 兼容性
   ========================================== */
.max-w-7xl { max-width: 80rem; margin: 0 auto; }
.max-w-4xl { max-width: 56rem; margin: 0 auto; }
.max-w-3xl { max-width: 48rem; margin: 0 auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

/* 基礎間距 */
.px-4 { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.px-6 { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }
.px-8 { padding-left: var(--spacing-xl); padding-right: var(--spacing-xl); }
.py-12 { padding-top: var(--spacing-3xl); padding-bottom: var(--spacing-3xl); }
.py-16 { padding-top: var(--spacing-4xl); padding-bottom: var(--spacing-4xl); }
.py-20 { padding-top: var(--spacing-5xl); padding-bottom: var(--spacing-5xl); }
.py-24 { padding-top: var(--spacing-5xl); padding-bottom: var(--spacing-5xl); }
.p-8 { padding: var(--spacing-xl); }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: var(--spacing-md); }
.mb-6 { margin-bottom: var(--spacing-lg); }
.mb-8 { margin-bottom: var(--spacing-xl); }
.mb-12 { margin-bottom: var(--spacing-3xl); }
.mb-16 { margin-bottom: var(--spacing-4xl); }
.mt-8 { margin-top: var(--spacing-xl); }
.mt-12 { margin-top: var(--spacing-3xl); }

/* 基礎顏色 */
.bg-white { background-color: white; }
.bg-gray-50 { background-color: var(--neutral-50); }
.bg-gray-100 { background-color: var(--neutral-100); }
.bg-gray-900 { background-color: var(--neutral-900); }
.bg-blue-50 { background-color: var(--brand-primary-50); }
.bg-blue-100 { background-color: var(--brand-primary-100); }
.bg-blue-600 { background-color: var(--brand-primary-600); }
.bg-blue-700 { background-color: var(--brand-primary-700); }
.bg-blue-800 { background-color: var(--brand-primary-800); }
.bg-blue-900 { background-color: var(--brand-primary-900); }

.text-white { color: white; }
.text-gray-600 { color: var(--neutral-600); }
.text-gray-700 { color: var(--neutral-700); }
.text-gray-900 { color: var(--neutral-900); }
.text-blue-100 { color: var(--brand-primary-100); }
.text-blue-200 { color: var(--brand-primary-200); }
.text-blue-300 { color: var(--brand-primary-300); }
.text-blue-600 { color: var(--brand-primary-600); }

/* 字體大小 */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Flexbox 和 Grid */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-2 > * + * { margin-left: var(--spacing-sm); }
.space-x-4 > * + * { margin-left: var(--spacing-md); }
.space-y-4 > * + * { margin-top: var(--spacing-md); }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-4 { gap: var(--spacing-md); }
.gap-8 { gap: var(--spacing-xl); }
.gap-12 { gap: var(--spacing-3xl); }

/* 響應式 Grid */
@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:block { display: block; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: var(--spacing-xl); padding-right: var(--spacing-xl); }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 工具類 */
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

.transition-all { transition: all var(--duration-base) var(--ease-out); }
.transition-colors { transition: color var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out); }
.transition-transform { transition: transform var(--duration-base) var(--ease-out); }

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-50 { z-index: 50; }

/* 圖片工具 */
.w-full { width: 100%; }
.h-48 { height: 12rem; }
.h-64 { height: 16rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.object-cover { object-fit: cover; }

/* 文字工具 */
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-tight { line-height: var(--leading-tight); }

/* 懸停效果 */
.hover\:text-blue-600:hover { color: var(--brand-primary-600); }
.hover\:bg-gray-50:hover { background-color: var(--neutral-50); }
.hover\:scale-110:hover { transform: scale(1.1); }
.hover\:scale-105:hover { transform: scale(1.05); }

/* 響應式工具 */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: var(--spacing-lg); padding-right: var(--spacing-lg); }
    .sm\:flex-row { flex-direction: row; }
}

/* Badge 樣式 */
.bg-blue-100.text-blue-600 {
    background-color: var(--brand-primary-100);
    color: var(--brand-primary-600);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
}

/* 手機響應式修正 */
@media (max-width: 767px) {
    .text-4xl { font-size: var(--text-3xl); }
    .text-6xl { font-size: var(--text-4xl); }
    .py-24 { padding-top: var(--spacing-3xl); padding-bottom: var(--spacing-3xl); }
    .px-4 { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
    .gap-8 { gap: var(--spacing-lg); }
    .py-20 { padding-top: var(--spacing-3xl); padding-bottom: var(--spacing-3xl); }
}

/* 確保適當間距 */
@media (max-width: 640px) {
    .max-w-7xl,
    .max-w-4xl,
    .max-w-3xl {
        margin-left: var(--spacing-md);
        margin-right: var(--spacing-md);
        max-width: calc(100% - 2rem);
    }
}

/* 按鈕響應式行為 */
.flex.flex-col.sm\:flex-row .btn {
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

@media (min-width: 640px) {
    .flex.flex-col.sm\:flex-row .btn {
        width: auto;
        margin-bottom: 0;
    }
}

/* 缺失的 Tailwind 類別 */
.duration-300 { transition-duration: var(--duration-base); }
.ease { transition-timing-function: var(--ease-in-out); }

/* 漸層背景替代 */
.bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to));
}

.from-blue-50 { --tw-gradient-from: var(--brand-primary-50); }
.to-blue-100 { --tw-gradient-to: var(--brand-primary-100); }

.bg-gradient-to-br.from-blue-50.to-blue-100 {
    background: linear-gradient(to bottom right, var(--brand-primary-50), var(--brand-primary-100));
}

/* 額外的移動優化 */
@media (max-width: 480px) {
    .hero-title {
        font-size: var(--text-3xl);
        line-height: var(--leading-tight);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .service-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }
}

/* ==========================================
   Print 樣式
   ========================================== */
@media print {
    .navbar,
    .mobile-menu,
    .btn,
    .hero-section::before {
        display: none;
    }
    
    .hero-section {
        background: var(--brand-primary-900) !important;
        color: white !important;
        min-height: auto;
        padding: var(--spacing-2xl);
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--neutral-300);
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
    }
}