/*
* Minimalist Website Template CSS - Milk Tea Color Palette
* 簡約風格網站模板樣式表 - 奶茶色系
* Japanese & European Minimalist Design
* Bootstrap 5 + Custom Styles
* Author: 紀孟勳 (Bryantchi.work@gmail.com)
*/

/* ====== VIBRANT MODERN COLOR PALETTE / 活力現代色彩系統 ====== */
:root {
  /* Core Brand Colors - 核心品牌色彩 */
  --primary: #c7a27a; /* Milk tea caramel - 奶茶焦糖 */
  --secondary: #a67752; /* Roasted brown - 焦糖棕 */
  --accent: #f4d9b6; /* Creamy highlight - 奶霜亮點 */
  --tertiary: #8c5a3e; /* Toasted cacao - 可可烘焙 */

  /* Neutral Palette - 中性色調 */
  --white: #ffffff; /* Pure white - 純白 */
  --cream: #fbf3e4; /* Milk foam beige - 奶泡米杏 */
  --light-gray: #e8dccb; /* Soft clay - 柔和陶土 */
  --medium-gray: #c5b09a; /* Warm taupe - 溫柔褐灰 */
  --dark-gray: #7b6654; /* Toasted walnut - 烘烤胡桃 */
  --charcoal: #3f2e24; /* Deep mocha - 深色摩卡 */
  --sage: #9fb0a0; /* Herbal sage - 草本鼠尾草 */
  --cocoa: #b35b3f; /* Spiced cocoa - 香料可可 */

  /* Extended Colors - 擴展色彩 */
  --forest: #6e4a35; /* Deep roast - 深焙色 */
  --burgundy: #a65c45; /* Terracotta blush - 赤陶暖粉 */
  --navy: #4e3727; /* Dark caramel - 深色焦糖 */
  --gold: #f3e1c7; /* Honey cream - 蜂蜜奶霜 */
  --lavender: #d7c5b6; /* Smoky mauve - 迷霧裸粉 */
  --mint: #d8e2d3; /* Whispering mint - 淡薄荷 */

  /* Semantic Color Mapping - 語意色彩映射 */
  --background: var(--white);
  --background-primary: var(--white);
  --background-secondary: var(--cream);
  --background-soft: var(--light-gray);
  --text-primary: var(--charcoal);
  --text-secondary: var(--dark-gray);
  --border: var(--light-gray);
  --border-color: var(--light-gray);
  --primary-color: var(--primary);
  --secondary-color: var(--secondary);
  --accent-color: var(--accent);

  /* Gradient System - 漸層系統 */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--tertiary) 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--burgundy) 100%
  );
  --gradient-warm: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
  --gradient-cool: linear-gradient(135deg, var(--sage) 0%, var(--mint) 100%);
  --gradient-subtle: linear-gradient(
    135deg,
    var(--white) 0%,
    var(--cream) 100%
  );
  --gradient-soft: linear-gradient(
    135deg,
    var(--cream) 0%,
    var(--light-gray) 100%
  );

  /* Brand Colors - 品牌色彩 */
  --brand-primary: var(--primary);
  --brand-secondary: var(--secondary);
  --brand-accent: var(--accent);

  /* Typography - 日系歐系簡約字體 */
  --font-family-primary:
    "Inter", "Noto Sans TC", "Hiragino Sans", "Microsoft JhengHei", sans-serif;
  --font-family-heading: "Inter", "Noto Sans TC", "Hiragino Sans", sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.7;
  --letter-spacing-base: 0.02em;

  /* Spacing - 簡約間距系統 */
  --section-padding: 4rem 0;
  --container-padding: 1.5rem;
  --element-gap: 2rem;
  --micro-gap: 0.5rem;

  /* Border Radius - 柔和圓角 */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;

  /* Shadows - 柔和陰影 */
  --shadow-soft: 0 2px 12px rgba(44, 41, 36, 0.08);
  --shadow-medium: 0 4px 20px rgba(44, 41, 36, 0.12);
  --shadow-strong: 0 8px 32px rgba(44, 41, 36, 0.16);
  --shadow-lg: 0 10px 30px rgba(44, 41, 36, 0.15);
  --shadow-md: 0 5px 15px rgba(44, 41, 36, 0.1);
  --shadow-xl: 0 20px 40px rgba(44, 41, 36, 0.2);

  /* Transitions - 溫和過渡 */
  --transition-gentle: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-swift: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.3s ease;
}

/* ====== BASE STYLES / 基礎樣式 ====== */
* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family-primary);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-base);
  color: var(--charcoal);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 300;
}
h2 {
  font-size: 2rem;
  font-weight: 300;
}
h3 {
  font-size: 1.5rem;
  font-weight: 400;
}
h4 {
  font-size: 1.25rem;
  font-weight: 400;
}
h5 {
  font-size: 1.125rem;
  font-weight: 500;
}
h6 {
  font-size: 1rem;
  font-weight: 500;
}

p {
  margin-bottom: 1.5rem;
  color: var(--dark-gray);
  line-height: 1.8;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-gentle);
}

a:hover {
  color: var(--secondary);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
}

/* ====== MINIMALIST BOOTSTRAP OVERRIDES / 簡約 Bootstrap 客製化 ====== */
.btn {
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-radius: var(--border-radius-lg);
  padding: 0.875rem 2rem;
  transition: all var(--transition-gentle);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--tertiary);
  border-color: var(--tertiary);
  color: var(--white);
}

.btn-outline-primary {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.btn-soft {
  background-color: var(--cream);
  border-color: var(--secondary);
  color: var(--charcoal);
}

.btn-soft:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ====== MINIMALIST NAVIGATION / 簡約導航列 ====== */
.navbar {
  padding: 1rem 0;
  transition: all var(--transition-gentle);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 1030;
  /* background-color: rgba(255, 255, 255, 0.98); */
  border-bottom: none;
  box-shadow: none;
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  /* 注意：移除 translateZ 以避免 iOS/Safari 在隱藏網址列時造成 fixed 元素上移抖動 */
}

.navbar.scrolled {
  box-shadow: 0 1px 0 var(--light-gray);
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  transition: all var(--transition-gentle);
}

.navbar-brand:hover {
  color: var(--charcoal);
  opacity: 0.6;
}

.nav-link {
  font-weight: 400;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  position: relative;
  color: var(--dark-gray);
  transition: all var(--transition-gentle);
  letter-spacing: 0.03em;
}

/* Underline animation removed for minimal style */
.nav-link::after {
  display: none;
}

.nav-link:hover,
.nav-link.active {
  /* color: var(--charcoal); */
}

.navbar-toggler {
  border: none;
  padding: 0;
  background: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%239ca394' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Offcanvas Menu - 手機版側邊選單 */
.offcanvas-end {
  width: 33.333% !important; /* 設定為螢幕寬度的三分之一 */
  min-width: 280px; /* 最小寬度確保內容可讀性 */
  max-width: 400px; /* 最大寬度避免過寬 */
}

.offcanvas {
  background-color: var(--white);
  backdrop-filter: none;
  border-left: none;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
}

.offcanvas-header {
  padding: 1.25rem 1.5rem;
  border-bottom: none;
}

.offcanvas-title {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--charcoal);
}

.offcanvas .nav-link {
  border-bottom: none;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  color: var(--dark-gray);
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
  background-color: transparent;
  color: var(--charcoal);
  padding-left: 1.5rem; /* no shift */
}

/* --- Offcanvas Close Button (easy color control) --- */
.offcanvas-close {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: var(--charcoal); /* ← change this for color */
  font-size: 1.125rem;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.offcanvas-close:hover {
  opacity: 0.5;
}

/* 小螢幕調整 */
@media (max-width: 480px) {
  .offcanvas-end {
    width: 50% !important; /* 小螢幕時調整為一半寬度 */
    min-width: 250px;
  }
}

/* 手機瀏覽器優化：避免 fixed 導覽列在滾動時位移
   - 確保頂部固定不受瀏覽器 UI（網址列）伸縮影響 */
@media (max-width: 767px) {
  .navbar {
    will-change: auto;
  }
}

/* ====== MINIMALIST HERO SECTION / 簡約主視覺區 ====== */
.hero-section {
  background: var(--cream);
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: var(--section-padding);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(156, 163, 148, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(156, 163, 148, 0.08) 0%,
      transparent 50%
    );
  opacity: 0.5;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--dark-gray);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-image-container {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.hero-image {
  border-radius: var(--border-radius-xl);
  transition: all var(--transition-slow);
  box-shadow: 0 10px 30px rgba(90, 67, 50, 0.15);
  max-width: 85%;
}

.hero-image:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(90, 67, 50, 0.25);
}

.hero-decoration {
  position: absolute;
  top: -30px;
  right: 10px;
  width: 120px;
  height: 120px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.05)
  );
  border-radius: 50%;
  opacity: 0.15;
  z-index: -1;
  animation: gentle-float 4s ease-in-out infinite;
}

/* ====== MINIMALIST CARDS / 簡約卡片 ====== */
.feature-card {
  background: transparent;
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-gentle);
  border: none;
  padding: 2rem 1rem;
}

.feature-card:hover {
  transform: translateY(-5px);
  background-color: var(--cream);
}

.feature-icon {
  transition: all var(--transition-gentle);
}

.feature-card:hover .feature-icon {
  transform: translateY(-3px);
}

.service-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-gentle);
  border: 1px solid var(--light-gray);
}

.service-card:hover {
  transform: translateY(-8px);
  background-color: var(--cream);
  box-shadow: 0 10px 30px rgba(44, 41, 36, 0.15);
  border-color: var(--primary);
}

.service-icon {
  transition: all var(--transition-gentle);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

/* Portfolio Items */
.portfolio-item {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-gentle);
  background: var(--white);
  box-shadow: 0 5px 15px rgba(44, 41, 36, 0.1);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(44, 41, 36, 0.2);
}

.portfolio-item img {
  transition: all var(--transition-slow);
  aspect-ratio: 4/3;
  object-fit: cover;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.9) 0%,
    rgba(139, 92, 246, 0.8) 100%
  );
  opacity: 0;
  transition: all var(--transition-gentle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--background-primary);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover img {
  transform: scale(1.08);
}

/* Contact Info */
.contact-info {
  transition: all var(--transition-gentle);
  border-radius: var(--border-radius-lg);
}

.contact-info:hover {
  transform: translateY(-5px);
  background-color: rgba(254, 253, 248, 0.8);
}

.contact-icon {
  transition: all var(--transition-gentle);
}

.contact-info:hover .contact-icon {
  transform: translateY(-3px);
}

/* ====== SERVICE CARDS / 服務卡片 ====== */
.service-card {
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transition: all var(--transition-base);
}

.service-card:hover::before {
  left: 0;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  color: var(--brand-primary);
}

/* ====== SWIPER CUSTOMIZATION / Swiper 客製化 ====== */
.servicesSwiper {
  padding: 2rem 0 3rem;
}

.servicesSwiper .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background-color: var(--brand-primary);
  opacity: 0.3;
  transition: all var(--transition-base);
}

.servicesSwiper .swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.2);
}

.servicesSwiper .swiper-button-next,
.servicesSwiper .swiper-button-prev {
  color: var(--brand-primary);
  background-color: var(--white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.servicesSwiper .swiper-button-next:hover,
.servicesSwiper .swiper-button-prev:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.servicesSwiper .swiper-button-next::after,
.servicesSwiper .swiper-button-prev::after {
  font-size: 1.2rem;
  font-weight: 600;
}

/* ====== PORTFOLIO SECTION / 作品集 ====== */
.portfolio-item {
  transition: all var(--transition-base);
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

.portfolio-item img {
  transition: all var(--transition-slow);
  aspect-ratio: 4/3;
  object-fit: cover;
}

.portfolio-overlay {
  background: rgba(199, 162, 122, 0.9);
  opacity: 0;
  transition: all var(--transition-base);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

/* ====== CONTACT SECTION / 聯絡區 ====== */
.contact-info {
  transition: all var(--transition-base);
}

.contact-info:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  transition: all var(--transition-base);
}

.contact-info:hover .contact-icon {
  transform: scale(1.1);
  color: var(--brand-primary);
}

/* ====== BACK TO TOP BUTTON / 回到頂部按鈕 ====== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  /* background: var(--gradient-primary); */
  border: none;
  /* color: var(--white); */
  font-size: 1.25rem;
  /* border-radius: 50%; */
  /* box-shadow: var(--shadow-lg); */
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 1020;
}

.back-to-top.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  /* box-shadow: var(--shadow-xl); */
}

/* ====== FOOTER / 頁尾 ====== */
footer {
  background-color: var(--navy) !important;
  color: var(--white) !important;
}

footer .social-links a {
  transition: all var(--transition-base);
  display: inline-block;
  color: var(--white) !important;
}

footer .social-links a:hover {
  transform: translateY(-3px);
  color: var(--cream) !important;
}

footer a {
  color: var(--white) !important;
}

footer a:hover {
  color: var(--cream) !important;
}

/* ====== MINIMALIST ANIMATIONS / 簡約動畫 ====== */
@keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.02);
    opacity: 1;
  }
}

@keyframes subtle-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Gentle entrance animation */
.fade-in {
  animation: fade-in-up 0.8s ease-out;
}

/* Breathing effect for icons */
.breathing {
  animation: soft-pulse 3s ease-in-out infinite;
}

/* ====== UTILITY CLASSES / 工具類 ====== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-custom {
  box-shadow: var(--shadow-xl);
}

.border-gradient {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    var(--gradient-primary) border-box;
}

/* ====== RESPONSIVE DESIGN / 響應式設計 ====== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1320px;
  }

  .display-4 {
    font-size: 3.5rem;
  }

  .display-5 {
    font-size: 3rem;
  }
}

/* Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .hero-section {
    min-height: 90vh;
  }

  .display-4 {
    font-size: 3rem;
  }
}

/* Large Tablet (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .hero-section {
    min-height: 85vh;
    padding-top: 100px;
  }

  .display-4 {
    font-size: 2.5rem;
  }

  .display-5 {
    font-size: 2rem;
  }

  .servicesSwiper .swiper-button-next,
  .servicesSwiper .swiper-button-prev {
    display: none;
  }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-section {
    min-height: 80vh;
    text-align: center;
    padding-top: 120px;
  }

  .display-4 {
    font-size: 2.2rem;
  }

  .display-5 {
    font-size: 1.8rem;
  }

  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .navbar {
    padding: 0.8rem 0;
  }

  .servicesSwiper .swiper-button-next,
  .servicesSwiper .swiper-button-prev {
    display: none;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

/* Mobile Large (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .hero-section {
    min-height: 75vh;
    text-align: center;
    padding-top: 100px;
    padding-bottom: 2rem;
  }

  .display-4 {
    font-size: 1.8rem;
  }

  .display-5 {
    font-size: 1.5rem;
  }

  .lead {
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 0.8rem 1.4rem;
    font-size: 0.95rem;
  }

  .navbar-brand {
    font-size: 1.5rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .shape {
    display: none;
  }
}

/* Mobile (320px - 575px) */
@media (max-width: 575px) {
  .hero-section {
    min-height: 70vh;
    text-align: center;
    padding: 80px 0 2rem;
  }

  .display-4 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .display-5 {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .lead {
    font-size: 0.95rem;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .btn-lg {
    padding: 0.75rem 1.2rem;
    font-size: 0.9rem;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    font-size: 1.3rem;
  }

  .container {
    padding: 0 15px;
  }

  .py-5 {
    padding: 3rem 0;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .hero-decoration,
  .shape {
    display: none;
  }

  .offcanvas .nav-link {
    font-size: 1rem;
    padding: 1rem;
  }

  .feature-card,
  .service-card,
  .contact-info {
    margin-bottom: 2rem;
  }

  footer .row > div {
    margin-bottom: 2rem;
  }

  .d-flex.gap-3 {
    flex-direction: column;
    gap: 0.5rem !important;
  }
}

/* Ultra Small Mobile (320px and below) */
@media (max-width: 320px) {
  .display-4 {
    font-size: 1.4rem;
  }

  .display-5 {
    font-size: 1.2rem;
  }

  .btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .container {
    padding: 0 10px;
  }
}

/* ====== HIGH DPI / RETINA DISPLAYS / 高解析度螢幕 ====== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image,
  .portfolio-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ====== PRINT STYLES / 列印樣式 ====== */
@media print {
  .navbar,
  .back-to-top,
  .hero-bg-animation,
  .floating-shapes {
    display: none !important;
  }

  .hero-section {
    background: var(--white) !important;
    color: #000000 !important;
    min-height: auto !important;
    padding: 1rem 0 !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #000000 !important;
    page-break-after: avoid;
  }

  .container {
    max-width: 100% !important;
  }
}

/* ====== ACCESSIBILITY / 無障礙設計 ====== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .floating-shapes,
  .hero-decoration {
    animation: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn {
    border-width: 3px;
  }

  .nav-link::after {
    height: 3px;
  }

  .feature-card,
  .service-card,
  .contact-info {
    border-width: 2px;
  }
}

/* Remove outline on all interactive elements */
button,
a,
input,
textarea,
select,
.btn,
.nav-link {
  outline: none !important;
}

button:focus,
button:active,
a:focus,
a:active,
input:focus,
textarea:focus,
select:focus,
.btn:focus,
.btn:active,
.nav-link:focus,
.nav-link:active {
  outline: none !important;
}

/* 深色模式已停用，保留單一亮色設計 */
