:root {
  --bg: #f4f7fb;
  --bg-soft: #ecf4fe;
  --bg-panel: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-accent: #e8f1ff;
  --text: #121f34;
  --text-muted: #55667f;
  --line: rgba(30, 77, 141, 0.16);
  --line-strong: #1e4d8d;
  --blue: #1e4d8d;
  --blue-dark: #0f3560;
  --blue-soft: rgba(30, 77, 141, 0.08);
  --orange: #f28f10;
  --orange-deep: #d07000;
  --orange-soft: rgba(242, 143, 16, 0.14);
  --steel: #263645;
  --steel-soft: #697486;
  --shadow: 0 24px 64px rgba(18, 24, 38, 0.08);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1220px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Source Han Sans SC",
    "Noto Sans SC",
    sans-serif;
  background:
    linear-gradient(180deg, #f7faff 0%, #e8f1ff 100%);
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(0, 0, 0, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.018) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 88%);
  pointer-events: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: 0;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(242, 143, 16, 0.22), transparent 66%);
}

body::after {
  left: -180px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(30, 77, 141, 0.18), transparent 64%);
}

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

button {
  font: inherit;
}

.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;
}

.site-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding-bottom: 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(30, 77, 141, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(18, 24, 38, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--orange) 0%, #ffd17f 100%);
  border: 1px solid rgba(30, 77, 141, 0.18);
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--blue);
}

.brand-mark::before {
  inset: 8px 24px 8px 10px;
  transform: skewX(-18deg);
}

.brand-mark::after {
  inset: 8px 10px 8px 26px;
  opacity: 0.28;
}

.brand-mark::before,
.brand-mark::after {
  z-index: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  position: relative;
  z-index: 2;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong,
.site-nav a,
.nav-cta,
.button,
.eyebrow,
.product-tag,
.industry-label,
.panel-label,
summary {
  font-family:
    "Segoe UI Variable Display",
    "Avenir Next",
    "PingFang TC",
    "Microsoft JhengHei",
    sans-serif;
}

.brand-copy strong {
  font-size: 0.96rem;
}

.brand-copy span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  color: var(--steel-soft);
  font-size: 0.92rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.site-nav-pannel {
  /* 基礎設定：使其支援寬高與內邊距 */
            display: inline-block;
            cursor: pointer;
            
            /* 字體樣式：承襲圖片中的 main.css:196 與 221 */
            font-family: 'Segoe UI Variable Display', 'Avenir Next', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
            font-size: 1.05rem; /* 比圖片中的 0.92rem 稍微大一點 */
            text-decoration: none; /* 移除超連結底線 */
            
            /* 顏色與透明度：文字顏色使用鮮豔的橘色，並帶有一點透明度 */
            color: rgba(242, 143, 16, 0.85); /* #f28f10 的 rgba 格式，最後的 0.85 是透明度 */
            
            /* 橢圓框設定 */
            border: 2px solid #f28f10; /* 鮮豔的橘色邊框 */
            border-radius: 50px; /* 超大圓角，創造出橢圓框效果 */
            padding: 6px 18px; /* 上下 6px，左右 18px 的內襯空間 */
            
            /* 轉場動畫：讓滑鼠懸停時更平滑 */
            transition: all 0.2s ease-in-out;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

.button:hover,
.nav-cta:hover {
  transform: translateY(-2px);
}

.nav-cta,
.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  box-shadow: 0 16px 30px rgba(242, 143, 16, 0.22);
}

.button-secondary {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--steel);
  border-radius: 999px;
  transition: transform 220ms ease, opacity 220ms ease;
}

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 28px;
  align-items: stretch;
  padding: 62px 0 34px;
}

.hero-copy,
.hero-panel,
.metric-card,
.product-card,
.capability-card,
.industry-card,
.process-card,
.contact-shell {
  border: 1px solid rgba(30, 77, 141, 0.08);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  padding: 44px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 255, 0.96));
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  right: -24px;
  top: -16px;
  width: 220px;
  height: 220px;
  border-radius: 40px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(30, 77, 141, 0.08) 0 10px,
      rgba(30, 77, 141, 0) 10px 20px
    );
  transform: rotate(8deg);
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22% 22%, rgba(242, 143, 16, 0.18) 0 12%, transparent 18%),
    radial-gradient(circle at 78% 14%, rgba(30, 77, 141, 0.16) 0 16%, transparent 22%);
  opacity: 0.9;
  mix-blend-mode: screen;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
}

.hero::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(242, 143, 16, 0.08) 0 12%, transparent 22%),
    radial-gradient(circle at 82% 78%, rgba(30, 77, 141, 0.1) 0 18%, transparent 26%);
}

.hero::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 28%),
    linear-gradient(225deg, rgba(30, 77, 141, 0.08), transparent 34%);
  mix-blend-mode: hard-light;
}

.hero-copy,
.hero-panel,
.product-line,
.gallery-image,
.category-link,
.metric-card,
.capability-card {
  transition: transform 300ms ease, box-shadow 300ms ease, background 300ms ease;
  transform-style: preserve-3d;
}

.hero-copy:hover,
.hero-panel:hover,
.product-line:hover,
.gallery-image:hover,
.category-link:hover,
.metric-card:hover,
.capability-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 28px 46px rgba(18, 24, 38, 0.12);
}

.hero-panel:hover {
  transform: translateY(-6px) translateZ(0);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.42), transparent 18%),
    radial-gradient(circle at 80% 80%, rgba(242, 143, 16, 0.14), transparent 14%);
}

.hero-panel-grid {
  position: relative;
  z-index: 1;
}

.hero-panel .spec-card,
.product-line,
.gallery-image,
.category-link,
.metric-card,
.capability-card {
  will-change: transform, box-shadow;
}

.hero-panel,
.product-line,
.gallery-image {
  animation: floatDrift 10s ease-in-out infinite alternate;
}

.nav-cta {
  animation: glowPulse 6s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.contact-copy h2,
.spec-card-main h2 {
  margin: 0;
  font-family:
    "Segoe UI Variable Display",
    "Avenir Next",
    "PingFang TC",
    "Microsoft JhengHei",
    sans-serif;
  line-height: 1.02;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 5vw, 5.3rem);
}

.hero h1 span {
  display: block;
  color: var(--orange);
}

.hero-text,
.overview-copy p,
.section-heading p,
.product-card p,
.capability-card p,
.industry-card p,
.process-card p,
.contact-copy p,
.contact-panel p,
.spec-card p {
  color: var(--text-muted);
  line-height: 1.75;
}

.hero-text {
  max-width: 58ch;
  margin: 20px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 77, 141, 0.08);
  font-size: 0.94rem;
}

.hero-stage {
  display: grid;
}

.hero-panel {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, #f6f9ff 0%, #e8f1ff 100%);
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(30, 77, 141, 0.14);
  border-radius: 28px;
  pointer-events: none;
}

.hero-panel-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-label {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 77, 141, 0.08);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.panel-line {
  flex: 1;
  height: 1px;
  background:
    linear-gradient(90deg, rgba(30, 77, 141, 0.4), rgba(30, 77, 141, 0));
}

.hero-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.spec-card {
  position: relative;
  min-height: 180px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(30, 77, 141, 0.08);
  background: rgba(255, 255, 255, 0.86);
}

.spec-card-main {
  grid-column: span 2;
  min-height: 220px;
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--blue-dark) 0%, #142547 100%);
}

.spec-card-main::before {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -38px;
  width: 180px;
  height: 180px;
  border-radius: 26px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(242, 143, 16, 0.24) 0 12px,
      rgba(242, 143, 16, 0) 12px 24px
    );
  transform: rotate(10deg);
}

.spec-kicker,
.spec-index,
.capability-code,
.process-card span,
.metric-card strong {
  font-family:
    "Segoe UI Variable Display",
    "Avenir Next",
    "PingFang TC",
    "Microsoft JhengHei",
    sans-serif;
}

.spec-kicker {
  position: relative;
  display: inline-flex;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec-card-main p {
  color: rgba(255, 255, 255, 0.72);
}

.spec-card-main h2 {
  max-width: 14ch;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.spec-index,
.capability-code {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--orange);
  font-weight: 800;
}

.spec-card h3,
.product-card h3,
.capability-card h3,
.industry-card h3,
.process-card h3 {
  margin: 0 0 10px;
  font-family:
    "Segoe UI Variable Display",
    "Avenir Next",
    "PingFang TC",
    "Microsoft JhengHei",
    sans-serif;
  font-size: 1.16rem;
}

.overview-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: center;
  padding: 10px 0 36px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.metric-card {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
}

.metric-card strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--orange);
}

.metric-card span {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
}

.section {
  padding: 58px 0;
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 68ch;
}

.section-heading h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.product-grid,
.capability-grid,
.industry-grid,
.process-grid,
.partner-layout {
  margin-top: 28px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.our-products .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-line {
  display: grid;
  gap: 18px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(30, 77, 141, 0.12);
}

.product-line h3 {
  margin: 0;
  font-size: 1.25rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.photo-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 240ms ease;
}

.photo-item:hover img {
  transform: scale(1.05);
}

.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 77, 141, 0.06);
  border: 1px dashed rgba(30, 77, 141, 0.24);
}

.more-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: var(--blue-dark);
  font-weight: 700;
}

.more-link:hover {
  background: rgba(30, 77, 141, 0.12);
}

.product-line-1 {
  border-color: rgba(242, 143, 16, 0.3);
  background: rgba(242, 143, 16, 0.06);
}

.product-line-1 h3 {
  color: rgba(242, 143, 16, 1);
}

.product-line-1 .photo-item {
  background: rgba(242, 143, 16, 0.1);
}

.product-line-2 {
  border-color: rgba(30, 77, 141, 0.3);
  background: rgba(30, 77, 141, 0.06);
}

.product-line-2 h3 {
  color: rgba(30, 77, 141, 1);
}

.product-line-2 .photo-item {
  background: rgba(30, 77, 141, 0.1);
}

.product-line-3 {
  border-color: rgba(15, 140, 160, 0.3);
  background: rgba(15, 140, 160, 0.06);
}

.product-line-3 h3 {
  color: rgba(15, 140, 160, 1);
}

.product-line-3 .photo-item {
  background: rgba(15, 140, 160, 0.1);
}

.product-line-4 {
  border-color: rgba(73, 150, 92, 0.3);
  background: rgba(73, 150, 92, 0.06);
}

.product-line-4 h3 {
  color: rgba(73, 150, 92, 1);
}

.product-line-4 .photo-item {
  background: rgba(73, 150, 92, 0.1);
}

.product-line .photo-item.more-link {
  background: rgba(242, 143, 16, 0.08);
  border: 1px dashed rgba(242, 143, 16, 0.24);
}

.product-line .photo-item.more-link a {
  color: var(--orange-deep);
}

.product-line .photo-item.more-link:hover {
  background: rgba(242, 143, 16, 0.16);
}

.product-line .photo-item.more-link {
  min-height: 0;
}

.gallery-page {
  padding-top: 24px;
}

/* Gallery Layout */
.gallery-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  margin-top: 28px;
}

.gallery-sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-link {
  position: relative;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(30, 77, 141, 0.12);
  transition: all 200ms ease;
  text-decoration: none;
  color: var(--text);
}

.category-link h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.category-link:hover {
  background: rgba(30, 77, 141, 0.06);
  border-color: rgba(30, 77, 141, 0.24);
}

.category-link.active {
  background: rgba(30, 77, 141, 0.12);
  border-color: rgba(30, 77, 141, 0.3);
  box-shadow: inset 3px 0 0 0 var(--blue);
}

.gallery-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.gallery-section {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(30, 77, 141, 0.12);
  animation: fadeIn 300ms ease;
  display: none;
}

.gallery-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(30, 77, 141, 0.08);
}

.section-header h3 {
  margin: 0 0 8px 0;
  font-size: 1.3rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.gallery-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 240ms ease;
}

.gallery-image:hover img {
  transform: scale(1.08);
}

/* Product Line Colors for Gallery */
.product-line-1 .section-header h3 {
  color: rgba(242, 143, 16, 1);
}

.product-line-1 {
  border-color: rgba(242, 143, 16, 0.3);
  background: rgba(242, 143, 16, 0.06);
}

.product-line-1 .gallery-image {
  background: rgba(242, 143, 16, 0.1);
}

.product-line-2 .section-header h3 {
  color: rgba(30, 77, 141, 1);
}

.product-line-2 {
  border-color: rgba(30, 77, 141, 0.3);
  background: rgba(30, 77, 141, 0.06);
}

.product-line-2 .gallery-image {
  background: rgba(30, 77, 141, 0.1);
}

.product-line-3 .section-header h3 {
  color: rgba(15, 140, 160, 1);
}

.product-line-3 {
  border-color: rgba(15, 140, 160, 0.3);
  background: rgba(15, 140, 160, 0.06);
}

.product-line-3 .gallery-image {
  background: rgba(15, 140, 160, 0.1);
}

.product-line-4 .section-header h3 {
  color: rgba(73, 150, 92, 1);
}

.product-line-4 {
  border-color: rgba(73, 150, 92, 0.3);
  background: rgba(73, 150, 92, 0.06);
}

.product-line-4 .gallery-image {
  background: rgba(73, 150, 92, 0.1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.gallery-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(30, 77, 141, 0.12);
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(18, 24, 38, 0.06);
  display: grid;
  gap: 14px;
}

.photo-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 240ms ease;
}

.photo-frame:hover img {
  transform: scale(1.04);
}

.gallery-card h3 {
  margin: 0 20px 0 20px;
  font-size: 1.1rem;
}

.gallery-card p {
  margin: 0 20px 20px 20px;
  color: var(--text-muted);
  line-height: 1.8;
}

@media (max-width: 1120px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .gallery-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .gallery-sidebar {
    position: static;
  }
  
  .category-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .category-link {
    flex: 0 1 calc(25% - 6px);
    min-width: 140px;
  }
  
  .gallery-images {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .category-link {
    flex: 0 1 calc(50% - 4px);
  }
  
  .gallery-section {
    padding: 16px;
  }
  
  .section-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  
  .section-header h3 {
    font-size: 1.1rem;
  }
  
  .gallery-images {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
}

.product-card.featured {
  color: #ffffff;
  background:
    linear-gradient(145deg, var(--blue) 0%, var(--blue-dark) 100%);
}

.product-card.featured p,
.product-card.featured .product-tag {
  color: rgba(255, 255, 255, 0.78);
}

.product-tag,
  .industry-label {
  width: fit-content;
  position: relative;
  top: -3px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

span.product-tag {
  position: relative;
  top: -7px; /* 從 -3px 改為 -7px */
  margin-bottom: 22px; /* 增加間距防止重疊 */
  display: inline-block; /* 建議改為 inline-block 以更好地控制 margin */
}

.product-tag,
.industry-label {
  margin-bottom: 18px;
}

.product-card .product-tag {
  position: relative;
  top: -3px;
  background: rgba(30, 77, 141, 0.08);
  color: var(--blue);
}

.product-card.featured .product-tag {
  position: relative;
  top: -3px;
  background: rgba(255, 255, 255, 0.12);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.capability-card {
  min-height: 210px;
  padding: 24px;
  border-radius: 24px;
}

.capability-card:nth-child(4n + 1),
.industry-card:nth-child(5n + 2),
.process-card:nth-child(4n + 2) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 209, 0.92));
}

.capability-card:nth-child(4n + 2),
.industry-card:nth-child(5n + 3),
.process-card:nth-child(4n + 3) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 239, 239, 0.96));
}

.industry-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  gap: 18px;
}

.industry-card {
  min-height: 240px;
  padding: 26px;
  border-radius: 26px;
}

.industry-card.wide {
  grid-row: span 2;
  background:
    linear-gradient(160deg, rgba(255, 247, 209, 0.98), rgba(255, 255, 255, 0.95));
}

.industry-label {
  background: rgba(30, 77, 141, 0.08);
  color: var(--blue);
}

span.industry-label {
  position: relative;
  top: -7px; /* 從 -3px 改為 -7px */
  margin-bottom: 22px; /* 增加間距防止重疊 */
  display: inline-block; /* 建議改為 inline-block 以更好地控制 margin */
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.process-card {
  min-height: 220px;
  padding: 24px;
  border-radius: 24px;
}

.process-card span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--orange);
  font-size: 1.16rem;
  font-weight: 800;
}

.contact-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius-xl);
}

.contact-copy h2 {
  font-size: clamp(1.9rem, 3vw, 3rem);
}

.contact-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius-xl);
}

.contact-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(140deg, var(--steel) 0%, #171b20 100%);
  color: #ffffff;
}

.contact-panel a {
  width: fit-content;
  font-family:
    "Segoe UI Variable Display",
    "Avenir Next",
    "PingFang TC",
    "Microsoft JhengHei",
    sans-serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.contact-panel p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.contact-panel .button-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.company-QRcode {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 22px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 22px 40px rgba(18, 24, 38, 0.08);
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease, background 260ms ease;
  animation: company-qr-float 8s ease-in-out infinite;
}

.company-QRcode:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow: 0 28px 54px rgba(18, 24, 38, 0.16);
  background: rgba(255, 255, 255, 0.16);
}

.company-QRcode img {
  width: min(240px, 100%);
  height: auto;
  border-radius: 22px;
  display: block;
}

.company-QRcode p {
  margin: 0;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 260ms ease, border-color 260ms ease, background 260ms ease;
}

.company-QRcode:hover p {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
}

@keyframes company-qr-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 0;
  color: var(--steel-soft);
  font-size: 0.92rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 720ms cubic-bezier(0.2, 1, 0.28, 1),
    transform 720ms cubic-bezier(0.2, 1, 0.28, 1);
}

[data-reveal="left"] {
  transform: translateX(26px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@keyframes floatDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 18px 28px rgba(242, 143, 16, 0.18);
  }
  50% {
    box-shadow: 0 24px 42px rgba(242, 143, 16, 0.28);
  }
}

@keyframes hoverGlow {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.95;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.hero-panel,
.product-line,
.gallery-image,
.category-link {
  animation: floatDrift 14s ease-in-out infinite alternate;
}

@media (max-width: 1120px) {
  .hero,
  .overview-strip,
  .contact-shell,
  .partner-layout {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .industry-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card.featured,
  .industry-card.wide {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .topbar {
    flex-wrap: wrap;
    border-radius: 30px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-left: 0;
    padding-top: 8px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding-top: 42px;
  }

  .hero-copy,
  .hero-panel,
  .product-card,
  .capability-card,
  .industry-card,
  .process-card,
  .contact-shell {
    padding: 24px;
  }

  .hero-panel-grid,
  .hero-points,
  .metrics,
  .product-grid,
  .industry-grid,
  .process-grid,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .spec-card-main,
  .product-card.featured,
  .industry-card.wide {
    grid-column: span 1;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 2.7rem;
  }

  .section-heading h2,
  .contact-copy h2,
  .spec-card-main h2 {
    font-size: 2rem;
  }

  .button,
  .nav-cta {
    width: 100%;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .contact-panel a {
    word-break: break-all;
  }
}
