/* pages/index.css — 首頁樣式 (2026-10 改版) */
:root {
  --brand: #0a5bb5;
  --brand-dark: #073f80;
  --brand-ink: #0b2545;
  --accent: #f08a24;
  --green: #4f8f1f;
  --green-soft: #eef6e6;
  --surface: #ffffff;
  --surface-alt: #f3f7fb;
  --line: #e2e8f0;
  --text: #334155;
  --muted: #64748b;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 40, 80, 0.06), 0 2px 8px rgba(15, 40, 80, 0.05);
  --shadow-md: 0 8px 28px rgba(15, 40, 80, 0.12);
}

body {
  color: var(--text);
}

a:hover {
  color: var(--brand);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.section-title {
  text-align: center;
  color: var(--brand-ink);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 2.2rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 0.7rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), #3fb5e8);
}

/* ===== 首頁橫幅 ===== */
.hero {
  position: relative;
  margin: 87px 0 0 0;
  min-height: 460px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #062a55 url("../../images/hero/hero-network.svg") center / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  color: #fff;
}

.hero-eyebrow {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  color: #9fd3ff;
}

.hero-taglines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-taglines li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  padding: 0.55rem 0;
  text-shadow: 0 2px 12px rgba(0, 20, 50, 0.45);
}

/* 標語前的訊號線 (延續原圖設計) */
.hero-taglines .pulse {
  width: 110px;
  height: 18px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 18'%3E%3Cpath d='M0 9h46l4-7 5 14 5-12 3 5h47' fill='none' stroke='%239fd3ff' stroke-width='1.6' stroke-linejoin='round'/%3E%3Ccircle cx='106' cy='9' r='3' fill='%23f5b82e'/%3E%3C/svg%3E")
    no-repeat center / contain;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(240, 138, 36, 0.35);
}

.btn-primary:hover {
  color: #fff;
  background: #e07612;
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  color: var(--brand-ink);
  background: #fff;
}

/* ===== 產品服務區塊 ===== */
.services {
  max-width: 1200px;
  margin: -56px auto 3.5rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  position: relative;
  z-index: 3;
  scroll-margin-top: 110px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:nth-child(2) {
  border-top-color: var(--green);
}

.service-card:nth-child(3) {
  border-top-color: var(--accent);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(15, 40, 80, 0.16);
}

.services-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.services-title-wrapper h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--brand-ink);
}

.service-icon {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  color: var(--brand);
  background: #e8f1fc;
}

.service-card:nth-child(2) .service-icon {
  color: var(--green);
  background: var(--green-soft);
}

.service-card:nth-child(3) .service-icon {
  color: var(--accent);
  background: #fdf0e3;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-list li {
  position: relative;
  padding: 0.38rem 0 0.38rem 1.3rem;
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.55;
}

.service-list a {
  color: var(--text);
}

.service-list a:hover {
  color: var(--brand);
}

.service-extra {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #e8f1fc;
  color: var(--brand);
  font-weight: 700;
}

.service-extra:hover {
  background: var(--brand);
  color: #fff;
}

/* ===== 環境監控系統整合 ===== */
.system-integration {
  background: linear-gradient(180deg, var(--surface-alt) 0%, #e8f2fb 100%);
  padding: 4rem 1rem 4.5rem;
}

.system-integration .grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
}

.card-link {
  display: block;
  color: inherit;
  height: 100%;
}

.card-link:hover {
  color: inherit;
}

.monitoring-card {
  height: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover .monitoring-card {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.content-wrapper {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.text-content {
  flex: 1;
}

.text-content h3 {
  color: var(--green);
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.text-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.text-content li {
  margin-bottom: 0.7rem;
  padding-left: 1.4rem;
  position: relative;
}

.text-content li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.image-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ===== 工業4.0 智慧製造 ===== */
.image_industry {
  display: block;
  padding: 4rem 1rem;
  background: var(--surface);
}

.industry-frame {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.industry-frame img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* ===== 動態消息 / 知識園地 (並排) ===== */
.info-columns {
  background: var(--surface-alt);
  padding: 3.5rem 1rem 4rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
}

.info-columns > section {
  width: 100%;
  max-width: 590px;
  justify-self: end;
}

.info-columns > section + section {
  justify-self: start;
}

.news,
.knowledge {
  background: transparent !important;
  padding: 0;
}

.news-container,
.knowledge-container {
  height: 100%;
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
}

.news h2,
.knowledge h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  color: var(--brand-ink);
}

.news h2 i {
  color: var(--brand);
}

.knowledge h2 i {
  color: var(--green);
}

.news ul,
.knowledge ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.news li,
.knowledge li {
  border-bottom: 1px dashed var(--line);
}

.news li:last-child,
.knowledge li:last-child {
  border-bottom: 0;
}

.news li a,
.knowledge li a {
  display: block;
  position: relative;
  padding: 0.7rem 1.4rem 0.7rem 0;
  color: var(--text);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.news li a::after,
.knowledge li a::after {
  content: "\203A";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: #a0aec0;
}

.news li a:hover,
.knowledge li a:hover {
  color: var(--brand);
  padding-left: 0.4rem;
}

.news-more-link,
.knowledge-more-link {
  position: static;
  margin-top: auto;
  align-self: flex-end;
}

.news-more-link a,
.knowledge-more-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 600;
}

.news-more-link a:hover,
.knowledge-more-link a:hover {
  background: var(--brand);
  color: #fff;
}

.news-more-link i,
.knowledge-more-link i {
  font-size: 0.85em;
  transition: transform 0.2s ease;
}

.news-more-link a:hover i,
.knowledge-more-link a:hover i {
  transform: translateX(3px);
}

/* ===== 首頁響應式 ===== */
@media (max-width: 1200px) {
  .hero {
    margin-top: 87px;
    min-height: 380px;
    background-position: 30% center;
  }

  .services {
    grid-template-columns: 1fr;
    margin-top: -40px;
  }

  .system-integration .grid {
    grid-template-columns: 1fr;
  }

  .content-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .info-columns {
    grid-template-columns: 1fr;
  }

  .info-columns > section,
  .info-columns > section + section {
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 340px;
    background-position: 38% center;
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 29, 61, 0.15) 0%, rgba(4, 29, 61, 0.75) 100%);
  }

  .hero-content {
    align-items: center;
    text-align: center;
    padding: 2.5rem 1rem 4rem;
    align-self: flex-end;
  }

  .hero-taglines li {
    justify-content: center;
    font-size: 1.15rem;
    padding: 0.3rem 0;
  }

  .hero-taglines .pulse {
    display: none;
  }

  .hero-actions {
    justify-content: center;
  }

  .services {
    margin: -32px auto 2.5rem;
  }

  .system-integration,
  .image_industry {
    padding: 2.8rem 1rem;
  }

  .monitoring-card {
    padding: 1.2rem;
  }

  .industry-frame {
    padding: 0.6rem;
  }
}
