* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0c5fa8;
  --primary-dark: #083b69;
  --accent: #f3b23f;
  --bg: #f5f8fc;
  --text: #1f2937;
  --muted: #6b7280;
  --white: #ffffff;
  --shadow: 0 10px 28px rgba(12, 95, 168, 0.12);
}

body {
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 42px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .site-header {
    top: 0;
  }
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary-dark);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  padding: 9px 8px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #334155;
  margin: 5px 0;
  transition: 0.25s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-weight: 600;
  color: #334155;
  transition: 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero.short {
  min-height: 280px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(8, 59, 105, 0.58), rgba(12, 95, 168, 0.18));
  z-index: 1;
}

.carousel {
  position: absolute;
  inset: 0;
}

.carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.carousel img.active {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  text-align: center;
  padding: 16px;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.2;
  margin-bottom: 14px;
}

.hero-content p {
  font-size: 1.06rem;
  opacity: 0.94;
}

.section {
  padding: 74px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 36px;
}

.section-title h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  color: #0f172a;
}

.section-title p {
  color: var(--muted);
  margin-top: 8px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-item {
  background: var(--white);
  border-radius: 12px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}

.feature-item h4 {
  margin-bottom: 8px;
  color: #0f172a;
}

.text-block {
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 28px;
}

.text-block h2,
.text-block h3 {
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.text-block p {
  margin-bottom: 14px;
}

.text-block ul {
  padding-left: 22px;
  margin: 10px 0 16px;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  margin-bottom: 10px;
}

.site-footer {
  background: #0b1d2f;
  color: #dbeafe;
  padding: 22px 0;
  text-align: center;
}

.site-footer a {
  color: #f8d171;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    min-height: 64px;
    padding: 10px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    grid-column: 1 / -1;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 6px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li + li {
    border-top: 1px solid #eef2f7;
  }

  .nav-links a {
    display: block;
    padding: 12px 14px;
  }

  .hero {
    min-height: 460px;
  }

  .hero.short {
    min-height: 220px;
  }

  .grid-3,
  .features {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 56px 0;
  }
}
