/* ==========================================================================
   典元機械 (Dean Yuan Machinery Ltd.) 現代工業風格樣式表 (極致 RWD 手機版完美適配版)
   ========================================================================== */

:root {
  --primary-color: #0f2b48;
  --primary-light: #1b4974;
  --accent-color: #d93829;
  --accent-hover: #b82a1d;
  --secondary-color: #2b394a;
  --bg-light: #f8fafc;
  --bg-surface: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-light: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 18px rgba(15,43,72,0.09);
  --shadow-lg: 0 12px 30px rgba(15,43,72,0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: all 0.25s ease-in-out;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

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

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip; /* clip 阻絕橫向溢出白邊且不破壞 position: sticky 吸頂行為 */
  position: relative;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  position: relative;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.75;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

/* 容器與佈局 */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  width: 100%;
  overflow-x: hidden;
}

.section-bg {
  background-color: var(--bg-surface);
}

.text-center { text-align: center; }
.text-accent { color: var(--accent-color); }
.text-muted { color: var(--text-muted); }

/* 頂部快速資訊列 (Topbar) */
.topbar {
  background-color: #081726;
  color: #cbd5e1;
  font-size: 15px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topbar-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.lang-switch,
.mobile-lang-switch,
.lang-btn[data-lang="en"] {
  display: none !important;
}
.lang-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #cbd5e1;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.lang-btn.active, .lang-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

/* 主導覽列 Header - 始終吸頂固定 (Sticky Top Navigation) */
.header {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  box-shadow: 0 4px 18px rgba(15, 43, 72, 0.08);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(15, 43, 72, 0.14);
  border-bottom: 2px solid var(--accent-color);
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.brand-logo:hover .logo-img {
  transform: rotate(20deg) scale(1.06);
  filter: drop-shadow(0 4px 10px rgba(217, 56, 41, 0.4));
}
.logo-img-footer {
  width: 48px;
  height: 48px;
  background-color: #ffffff;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-color), #f05342);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(217, 56, 41, 0.35);
  flex-shrink: 0;
}
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-text h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.brand-text span {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 36px;
}
.nav-link {
  font-weight: 700;
  color: var(--secondary-color);
  font-size: 17px;
  position: relative;
  padding: 8px 0;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-color);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

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

/* 手機版漢堡選單切換按鈕 */
.mobile-nav-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--primary-color);
  padding: 0;
  transition: var(--transition);
  text-align: center;
}
.mobile-nav-toggle:hover, .mobile-nav-toggle:active {
  background-color: #e2e8f0;
  color: var(--accent-color);
}

/* 手機版下拉選單 (優雅滑出面板) */
.mobile-nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 43, 72, 0.18);
  border-top: 1px solid var(--border-color);
  border-bottom: 3px solid var(--accent-color);
  padding: 20px 24px 28px;
  z-index: 1001;
  animation: slideDown 0.25s ease-out forwards;
}
.mobile-nav-menu.active {
  display: block;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-nav-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-nav-menu li {
  border-bottom: 1px solid #f1f5f9;
}
.mobile-nav-menu li:last-child {
  border-bottom: none;
}
.mobile-nav-menu a {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  transition: var(--transition);
}
.mobile-nav-menu a:hover, .mobile-nav-menu a.active {
  color: var(--accent-color);
  padding-left: 8px;
}
.mobile-nav-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-lang-switch {
  display: flex;
  gap: 10px;
}
.mobile-lang-switch .lang-btn {
  flex: 1;
  padding: 8px;
  font-size: 14px;
  color: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-light);
}
.mobile-lang-switch .lang-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* 按鈕系列 (大氣清晰) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  line-height: 1.2;
  text-align: center;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}
.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 56, 41, 0.28);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 56, 41, 0.4);
}
.btn-secondary {
  background-color: var(--primary-color);
  color: #ffffff;
}
.btn-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}
.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}
.btn-outline:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* Hero 旗艦形象區 */
.hero {
  background: linear-gradient(135deg, #091a2e 0%, #153b61 100%);
  color: #ffffff;
  padding: 90px 0 110px;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(217,56,41,0.18) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #e2e8f0;
}
.hero-tag .dot {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.hero-title {
  font-size: 50px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
  word-break: break-word;
}
.hero-desc {
  font-size: 20px;
  color: #cbd5e1;
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 620px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.stat-item h3 {
  font-size: 38px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
}
.stat-item p {
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 500;
}

/* 視覺卡片區 (Hero Visual Card) */
.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  padding: 34px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  width: 100%;
}
.hero-card h4 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.badge-tech {
  background-color: var(--accent-color);
  color: #fff;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
}
.feature-list {
  list-style: none;
  margin: 20px 0;
}
.feature-list li {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-weight: 500;
}
.feature-list li:last-child {
  border-bottom: none;
}
.check-icon {
  color: #4ade80;
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
}

/* 區塊標題 */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  padding: 0 10px;
}
.section-subtitle {
  color: var(--accent-color);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.section-title {
  font-size: 38px;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}
.section-desc {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.7;
}

/* 核心優勢網格 (Why Dean Yuan) */
.grid-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-box {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  width: 100%;
}
.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.feature-box-icon {
  width: 56px;
  height: 56px;
  background-color: #f1f5f9;
  color: var(--accent-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
}
.feature-box h4 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
}
.feature-box p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* 產品展示網格 (Product Grid) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  width: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #94a3b8;
}
.product-img-wrapper {
  background: linear-gradient(135deg, #eef2f6 0%, #e2e8f0 100%);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px;
}
.machine-visual {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  background-image: 
    radial-gradient(circle at center, rgba(56, 189, 248, 0.15) 0%, transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 14px 14px, 14px 14px;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2), 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}
.machine-visual::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  pointer-events: none;
}
.machine-visual .model-id {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.5px;
}
.machine-visual .mat-tag {
  font-size: 10px;
  font-weight: 600;
  color: #38bdf8;
  margin-top: 4px;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.product-card:hover .machine-visual {
  transform: scale(1.05) rotate(2deg);
  border-color: #0284c7;
}
.product-real-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
}
.product-card:hover .product-real-img {
  transform: scale(1.06);
}
.detail-visual-has-img {
  padding: 30px 20px !important;
}
.detail-real-img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}
.detail-visual-has-img:hover .detail-real-img {
  transform: scale(1.03);
}
.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
}
.product-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-category {
  font-size: 13px;
  color: var(--accent-color);
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.product-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.4;
}
.product-summary {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
  flex-grow: 1;
}
.product-specs-mini {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 產業應用卡片 */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.app-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  transition: var(--transition);
  width: 100%;
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}
.app-icon {
  font-size: 38px;
  margin-bottom: 16px;
}
.app-card h4 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
}
.app-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* 頁尾 Footer */
.footer {
  background-color: #081726;
  color: #cbd5e1;
  padding: 70px 0 30px;
  font-size: 15px;
  border-top: 4px solid var(--accent-color);
  width: 100%;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-col h5 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 18px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a:hover {
  color: #ffffff;
  padding-left: 6px;
}
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 10px;
}

/* 動畫效果 */
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   可自設背景大橫幅模組 (Custom Background Section - Mixertech 工業質感風格)
   ========================================================================== */
.custom-bg-section {
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 90px 0;
  overflow: hidden;
  transition: background-image 0.4s ease;
}
.custom-bg-section .section-title {
  color: #ffffff;
}
.custom-bg-section .section-desc {
  color: #e2e8f0;
}
.custom-bg-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

/* ==========================================================================
   卡片式機台照片分類導覽模組 (Category Cards Grid)
   ========================================================================== */
.category-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}
.category-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  text-decoration: none;
  color: inherit;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #38bdf8;
}
.category-card-img-wrap {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.category-card:hover .category-card-img-wrap img {
  transform: scale(1.08);
}
.category-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 43, 72, 0.85);
  backdrop-filter: blur(4px);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  z-index: 2;
}
.category-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.category-card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.category-card-en {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.category-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}
.category-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-color);
}
.category-card-footer .arrow-icon {
  transition: transform 0.25s ease;
}
.category-card:hover .category-card-footer .arrow-icon {
  transform: translateX(4px);
}

/* ==========================================================================
   單列式無縫跑馬燈卷軸模組 (Category Marquee Carousel)
   ========================================================================== */
.category-marquee-section {
  position: relative;
  overflow: hidden;
  padding: 65px 0 55px;
  background: #ffffff;
}

.marquee-viewport-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-top: 36px;
  padding: 10px 0 25px;
}

/* 兩側微光漸層遮罩，營造照片自然淡入淡出的現代流體感 */
.marquee-viewport-container::before,
.marquee-viewport-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 5;
  pointer-events: none;
}
.marquee-viewport-container::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.95), rgba(255,255,255,0));
}
.marquee-viewport-container::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.95), rgba(255,255,255,0));
}

.marquee-track-wrapper {
  overflow: hidden;
  width: 100%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.marquee-track-wrapper:active {
  cursor: grabbing;
}

.marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  will-change: transform;
}

/* 單列式精簡照片卡片 (支援自由調整寬度與大照片高度) */
.marquee-card {
  flex: 0 0 var(--marquee-card-w, 380px);
  width: var(--marquee-card-w, 380px);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  text-decoration: none;
  color: inherit;
}
.marquee-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(15, 43, 72, 0.12);
  border-color: #38bdf8;
}

/* 上半部：高清晰大型機台照片展示區 */
.marquee-card-img-wrap {
  width: 100%;
  height: var(--marquee-photo-h, 280px);
  background: var(--marquee-img-bg, linear-gradient(135deg, #0b192c, #1e293b));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--marquee-img-pad, 10px);
  transition: all 0.3s ease;
}
.marquee-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: var(--marquee-img-fit, contain);
  object-position: var(--marquee-img-pos, center center);
  transition: transform 0.4s ease;
}
.marquee-card.img-mode-cover .marquee-card-img-wrap {
  padding: 0;
}
.marquee-card.img-mode-cover .marquee-card-img-wrap img {
  object-fit: cover;
}
.marquee-card:hover .marquee-card-img-wrap img {
  transform: scale(1.05);
}

/* 下半部：照片下方精簡單行文字 (大字號、大氣俐落、支援原地打字編輯) */
.marquee-card-body {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  flex-grow: 0;
  border-top: 1px solid #f1f5f9;
}
.marquee-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.marquee-card-title .card-arrow {
  font-size: 14px;
  color: var(--accent-color);
  transition: transform 0.2s ease;
}
.marquee-card:hover .marquee-card-title .card-arrow {
  transform: translateX(4px);
}
.marquee-card-en, .marquee-card-desc, .marquee-card-footer {
  display: none !important; /* 確保下方純淨單行文字，無冗餘資訊干擾 */
}

/* 左右輔助箭頭導覽鈕 */
.marquee-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 43, 72, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.marquee-nav-btn:hover {
  background: #d93829;
  transform: translateY(-50%) scale(1.1);
}
.marquee-prev {
  left: 14px;
}
.marquee-next {
  right: 14px;
}

@media (max-width: 768px) {
  .marquee-card {
    flex: 0 0 280px;
    width: 280px;
  }
  .marquee-card-img-wrap {
    height: 190px;
  }
  .marquee-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .marquee-viewport-container::before,
  .marquee-viewport-container::after {
    width: 40px;
  }
}

/* ==========================================================================
   響應式排版 (RWD Breakpoints: 平板與手機版全方位校驗)
   ========================================================================== */

@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid-features { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-card-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar { height: 80px; }
  .hero-title { font-size: 40px; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 45px 0; }
  
  /* 頂部列與主選單手機適配 */
  .topbar { display: none; }
  .nav-menu { display: none; }
  .nav-actions { display: none; } /* 手機版將 CTA 整合入抽屜選單，保留版面給 Logo 與漢堡鈕 */
  .mobile-nav-toggle { display: flex; align-items: center; justify-content: center; }
  
  .navbar { height: 70px; }
  .logo-icon { width: 40px; height: 40px; font-size: 20px; }
  .logo-img { width: 42px; height: 42px; }
  .brand-text h1 { font-size: 19px; }
  .brand-text span { font-size: 10.5px; }

  /* Hero 手機版完美適配 (杜絕文字擠壓與折行破版) */
  .hero { padding: 40px 0 50px; }
  .hero-tag { font-size: 12px; padding: 5px 12px; margin-bottom: 14px; }
  .hero-title { font-size: 26px; line-height: 1.35; margin-bottom: 14px; }
  .hero-desc { font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-cta .btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
  }
  .stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
  }
  .stat-item h3 { font-size: 22px; margin-bottom: 0; }
  .stat-item p { font-size: 13px; }

  .hero-card { padding: 20px 16px; border-radius: var(--radius-md); }
  .hero-card h4 { font-size: 18px; }
  .hero-carousel-slide { padding: 22px 18px; }
  .hero-carousel-controls { padding: 0 18px 20px; }
  .hero-card-img-wrap { height: 165px; }
  .feature-list li { font-size: 14px; padding: 8px 0; }

  /* 區塊標題與網格手機版全改單欄 */
  .section-header { margin-bottom: 30px; }
  .section-title { font-size: 24px; }
  .section-desc { font-size: 14.5px; }

  .grid-features { grid-template-columns: 1fr; gap: 16px; }
  .product-grid { grid-template-columns: 1fr; gap: 20px; }
  .category-card-grid { grid-template-columns: 1fr; gap: 18px; }
  .custom-bg-section { padding: 55px 0; }
  .custom-bg-content { padding: 0 8px; }
  .app-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* 產品詳情與產業應用卡片手機適配 */
  .solution-card {
    grid-template-columns: 1fr !important;
    padding: 20px !important;
    gap: 16px !important;
  }
  .about-story-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* 浮動詢價籃手機端精巧尺寸 */
  .rfq-floating-btn {
    bottom: 20px !important;
    right: 16px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }

  .video-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .map-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .map-wrapper {
    min-height: 280px !important;
  }
}

/* =========================================================
   A 階段新增：旗艦模組多機型動態輪播 (Hero Multi-Machine Carousel)
   ========================================================= */
.hero-carousel-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

.hero-carousel-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 20;
}

.hero-carousel-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d93829, #f87171);
  transition: width 0.1s linear;
}

.hero-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
  will-change: transform;
}

.hero-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  padding: 30px;
  box-sizing: border-box;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-carousel-slide h4 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-carousel-slide .feature-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.hero-carousel-slide .feature-list li {
  padding: 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  line-height: 1.5;
  word-break: break-word;
}

.hero-carousel-slide .feature-list li:last-child {
  border-bottom: none;
}

.hero-card-img-wrap {
  width: 100%;
  height: 190px;
  background: rgba(15, 23, 42, 0.45);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.hero-carousel-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.4s ease;
}

.hero-carousel-slide:hover .hero-carousel-img {
  transform: scale(1.04);
}

.hero-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px 24px;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  width: 28px;
  background: var(--accent-color);
  box-shadow: 0 0 10px rgba(217, 56, 41, 0.6);
}

.carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.carousel-arrow:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.08);
}

/* =========================================================
   A 階段新增：實機影音展示模組 (Video Showcase Section)
   ========================================================= */
.video-showcase-section {
  background: linear-gradient(135deg, #091a2e 0%, #102a45 100%);
  color: #ffffff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.video-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.video-player-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 比例 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #000;
}

.video-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-info-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 56, 41, 0.15);
  border: 1px solid rgba(217, 56, 41, 0.35);
  color: #f87171;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 800;
  width: fit-content;
}

.video-checklist {
  list-style: none;
  margin: 12px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  color: #e2e8f0;
}

.video-checklist li span.v-check {
  color: #22c55e;
  font-weight: 900;
  font-size: 16px;
}

/* =========================================================
   A 階段新增：工廠廠址地圖與聯絡我們模組 (Google Maps & Contact)
   ========================================================= */
.map-contact-section {
  padding: 80px 0;
  background-color: #f8fafc;
  position: relative;
}

.map-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: stretch;
}

.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1.5px solid #e2e8f0;
  min-height: 420px;
  background: #e2e8f0;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

.contact-card-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-card-box h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.contact-card-box p.contact-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.contact-detail-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: #334155;
  line-height: 1.5;
}

.contact-detail-item .c-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.contact-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

.copy-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.copy-toast.show {
  opacity: 1;
}

/* 核心優勢與產業卡片互動加強 */
.feature-box {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.feature-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(15, 43, 72, 0.12);
  border-color: var(--accent-color);
}

.app-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}
.app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.app-rec-badge {
  display: inline-block;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-color);
  background: rgba(217, 56, 41, 0.08);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(217, 56, 41, 0.2);
}

/* ==========================================================================
   3欄純展示型大圖網格模組 (3-Column Photo Showcase Grid)
   ========================================================================== */
.showcase-grid-section {
  padding: 60px 0;
  background: #ffffff;
  position: relative;
}

.showcase-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
  width: 100%;
}

.showcase-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(15, 43, 72, 0.12);
  border-color: #38bdf8;
}

.showcase-card-img-wrap {
  width: 100%;
  height: var(--showcase-photo-h, 280px);
  background: var(--showcase-img-bg, linear-gradient(135deg, #0b192c, #1e293b));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--showcase-img-pad, 10px);
  transition: all 0.3s ease;
}

.showcase-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: var(--showcase-img-fit, contain); /* 預設改為 contain: 100% 完整展示整張機台照片，絕不切頭切尾！ */
  object-position: var(--showcase-img-pos, center center);
  transition: transform 0.4s ease;
}

/* 滿版模式 */
.showcase-card.img-mode-cover .showcase-card-img-wrap {
  padding: 0;
}
.showcase-card.img-mode-cover .showcase-card-img-wrap img {
  object-fit: cover;
}

.showcase-card:hover .showcase-card-img-wrap img {
  transform: scale(1.05);
}

.showcase-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.showcase-card-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.5;
  transition: font-size 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  word-break: break-word;
}

.showcase-card-text .card-arrow {
  font-size: 15px;
  color: var(--accent-color);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.showcase-card:hover .showcase-card-text .card-arrow {
  transform: translateX(4px);
}

@media (max-width: 992px) {
  .showcase-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .showcase-card-img-wrap {
    height: 240px;
  }
}

@media (max-width: 640px) {
  .showcase-grid-3col {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .showcase-card-img-wrap {
    height: 220px;
  }
}

