:root {
  --color-primary: #1a6dff;
  --color-primary-dark: #0f56d9;
  --color-navy: #0a1628;
  --color-dark: #111;
  --color-text: #333;
  --color-muted: #666;
  --color-light: #f4f7fc;
  --color-card: #eaf2ff;
  --color-border: #e6ebf2;
  --color-white: #fff;
  --container: 1400px;
  --header-h: 70px;
  --radius: 10px;
  --shadow: 0 10px 28px rgba(10, 22, 40, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.75rem; line-height: 1.35; color: var(--color-navy); }
p { margin: 0 0 1rem; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--color-white);
  color: var(--color-navy);
  border-bottom: 1px solid var(--color-border);
}

.page-home .site-header {
  position: sticky;
  top: 0;
  background: var(--color-white);
  color: var(--color-navy);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: none;
}

.page-home .hero {
  min-height: 560px;
  margin-top: 0;
  padding-top: 0;
  /* 保持容器水平居中，与顶栏 .container 同宽同左缘 */
  justify-content: center;
  text-align: left;
}

.page-home .hero-content {
  /* 与顶部导航同一 .container 左边缘对齐，勿覆盖 width */
  max-width: none;
  text-align: left;
  padding: 3rem 0;
}

.page-home .hero h1,
.page-home .hero p {
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  line-height: 1.65;
  font-weight: 600;
  margin: 0;
  color: var(--color-white);
}

.page-home .hero h1 {
  margin-bottom: 0.75rem;
}

.page-home .lang-switch {
  border-left-color: rgba(0, 0, 0, 0.12);
}

.page-home .lang-switch a.is-active {
  color: var(--color-primary);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: inherit;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav > a {
  color: inherit;
  opacity: 0.85;
  font-size: 0.95rem;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.site-nav > a:hover {
  opacity: 1;
}

.site-nav > a.is-active {
  opacity: 1;
  background: var(--color-primary);
  color: var(--color-white);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.6rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
}

.lang-switch a.is-active {
  color: var(--color-primary);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* ========== Hero / Banner ========== */
.hero,
.page-banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navy) center / cover no-repeat;
  color: var(--color-white);
  text-align: center;
}

.hero { min-height: 520px; }
.page-banner { min-height: 420px; }
.page-banner--plain { min-height: 400px; }

.hero::before,
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 16, 32, 0.35) 0%, rgba(6, 16, 32, 0.55) 100%);
}

.page-banner--plain::before {
  background: rgba(6, 16, 32, 0.15);
}

.hero-content,
.banner-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1rem;
  max-width: 900px;
}

.hero h1,
.page-banner h1 {
  color: var(--color-white);
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.hero p,
.page-banner p {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin: 0;
}

/* ========== Sections ========== */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-light); }

.section-heading {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-heading h2 {
  display: inline-block;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  margin-bottom: 0;
  position: relative;
  padding-bottom: 0.85rem;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 42px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section-heading p {
  color: var(--color-muted);
  max-width: 780px;
  margin: 1.25rem auto 0;
  font-size: 0.98rem;
}

/* About split */
.about-block .section-heading { margin-bottom: 2rem; }

.about-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.about-split__media img {
  width: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.about-split__text .company-name {
  color: var(--color-primary);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  margin-bottom: 1rem;
}

.about-split__text p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Feature / tech cards — text left, icon right */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.35rem;
}

.feature-card,
.tech-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, #eef5ff 0%, #f7faff 100%);
  border: 1px solid #d9e7ff;
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: none;
  overflow: hidden;
}

.feature-card img,
.tech-card img {
  width: 100%;
  max-height: 130px;
  object-fit: contain;
  justify-self: end;
  aspect-ratio: auto;
}

.feature-card__body,
.tech-card__body {
  padding: 0;
}

.feature-card h3,
.tech-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.feature-card p,
.tech-card p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.65;
}

/* Advantages masonry: tall left + 2x2 right */
.advantages-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.1rem;
  min-height: 520px;
}

.advantage-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-navy);
  box-shadow: var(--shadow);
  border: 0;
}

.advantage-card:nth-child(1) {
  grid-row: 1 / 3;
}

.advantage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
  min-height: 180px;
}

.advantage-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.15rem 1.35rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 70%);
  color: var(--color-white);
}

.advantage-card h3 {
  color: var(--color-white);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.advantage-card p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
}

/* Vision */
.vision-card {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 0;
  align-items: stretch;
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.vision-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.vision-card__body {
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.vision-card .vision-date {
  color: var(--color-primary);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.vision-card p {
  color: var(--color-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* About business cards — tall vertical */
.card-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.biz-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow);
  border: 0;
}

.biz-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.biz-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1rem 1.35rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  text-align: left;
}

.biz-card h3 {
  color: var(--color-white);
  font-size: 1.15rem;
  margin: 0 0 0.45rem;
}

.biz-card p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0;
}

/* Brands */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-height: 120px;
  box-shadow: 0 4px 14px rgba(10, 22, 40, 0.04);
}

.brand-item img {
  max-height: 72px;
  max-width: 85%;
  width: auto;
  object-fit: contain;
}

/* Solutions */
.solution-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  margin-bottom: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-white);
  box-shadow: 0 6px 20px rgba(10, 22, 40, 0.05);
}

.solution-block:last-child { margin-bottom: 0; }

.solution-block--reverse .solution-block__media { order: 2; }
.solution-block--reverse .solution-block__text { order: 1; }

.solution-block__media img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.solution-block__text {
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.solution-block__text h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.solution-block__text p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 42px;
  padding: 0.65rem 1.6rem;
  background: var(--color-primary);
  color: var(--color-white);
  border: 0;
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--color-primary-dark); color: #fff; }
.btn-center { align-self: center; margin: 0.5rem auto 0; display: flex; }
.btn-block { width: 100%; }

/* Contact */
.info-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 2.75rem;
}

.info-card {
  text-align: left;
  padding: 1.75rem 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.info-card img {
  width: 36px;
  height: 36px;
  margin: 0;
  flex-shrink: 0;
  object-fit: contain;
}

.info-card__body { padding: 0; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.info-card p { color: var(--color-muted); margin: 0; font-size: 0.92rem; }
.info-card a { color: var(--color-primary); }

.contact-form {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--color-white);
  padding: 2.25rem 2.5rem 2.5rem;
  border-radius: 8px;
  box-shadow: none;
  border: 1px solid var(--color-border);
}

.contact-form > h2 {
  text-align: left;
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.92rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-white);
}

.form-group textarea { min-height: 130px; resize: vertical; }

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(26, 109, 255, 0.2);
  border-color: var(--color-primary);
}

.phone-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0;
}

.phone-row input[name="phone_code"] {
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #f0f2f5;
  text-align: center;
  font-weight: 600;
  color: var(--color-muted);
}

.phone-row input[name="phone"] {
  border-radius: 0 4px 4px 0;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.form-error { color: #c62828; font-size: 0.85rem; margin-top: 0.35rem; }
.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
  border-radius: 4px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
}

/* Footer */
.site-footer {
  background: #0d0d0d;
  color: rgba(255, 255, 255, 0.85);
  padding-top: 3.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 2.75rem;
}

.footer-brand {
  color: var(--color-white);
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}

.footer-col h4 {
  color: var(--color-white);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.footer-meta a:hover { color: #fff; }

.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }

.footer-social {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.footer-social a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Responsive */
@media (max-width: 992px) {
  .card-grid-5,
  .brand-grid { grid-template-columns: repeat(2, 1fr); }

  .advantages-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .advantage-card:nth-child(1) { grid-row: auto; grid-column: 1 / -1; min-height: 280px; }
  .advantage-card { min-height: 220px; }

  .vision-card,
  .about-split,
  .solution-block { grid-template-columns: 1fr; }

  .solution-block--reverse .solution-block__media,
  .solution-block--reverse .solution-block__text { order: initial; }

  .feature-card,
  .tech-card { grid-template-columns: 1fr; }

  .feature-card img,
  .tech-card img { max-height: 110px; justify-self: center; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-white);
    color: var(--color-navy);
    padding: 0.5rem 0 1rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  }

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

  .site-nav > a,
  .lang-switch {
    padding: 0.85rem 1.25rem;
    border-radius: 0;
    margin: 0;
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .site-nav > a.is-active {
    border-radius: 0;
  }

  .hero { min-height: 380px; }
  .page-banner { min-height: 300px; }
  .page-banner--plain { min-height: 280px; }
  .section { padding: 2.75rem 0; }

  .card-grid-2,
  .card-grid-5,
  .brand-grid,
  .advantages-grid,
  .info-cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .advantage-card:nth-child(1) { grid-column: auto; }

  .contact-form { padding: 1.35rem; }
  .solution-block__text { padding: 1.5rem; }
  .vision-card__body { padding: 1.5rem; }
}
