* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1746a2;
  --secondary: #ffd23f;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #f7f9fc;
  --white: #ffffff;
}

body {
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 42px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 980px) {
  .site-header {
    top: 0;
  }
}

.navbar {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  position: relative;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo strong {
  font-size: 1.25rem;
  color: var(--primary);
}

.logo span {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-toggle {
  display: none;
  border: 1px solid #dbe3f1;
  background: #fff;
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary);
  color: var(--white);
}

.hero {
  margin: 24px auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 35px rgba(23, 70, 162, 0.14);
  background: var(--white);
}

.carousel {
  position: relative;
  height: 480px;
}

.carousel.compact {
  height: 260px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(10, 20, 50, 0.64), rgba(10, 20, 50, 0.12));
  color: #fff;
  display: flex;
  align-items: center;
  padding: 36px 7%;
}

.slide-overlay h1,
.slide-overlay h2 {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  margin-bottom: 10px;
}

.slide-overlay p {
  width: min(680px, 100%);
  font-size: 1.02rem;
}

.section {
  margin: 38px 0;
}

.section-title {
  margin-bottom: 16px;
}

.section-title h2 {
  color: var(--primary);
  font-size: 1.7rem;
}

.section-title p {
  color: var(--muted);
}

.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 14px 14px 18px;
}

.card-body h3 {
  margin-bottom: 6px;
  font-size: 1.06rem;
}

.card-body p {
  color: var(--muted);
  font-size: 0.94rem;
}

.highlight {
  background: linear-gradient(135deg, #173f9f, #2859cc);
  color: #fff;
  border-radius: 20px;
  padding: 30px;
}

.highlight h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.list {
  margin-left: 18px;
}

.article {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 26px rgba(30, 41, 59, 0.08);
}

.article p {
  margin-bottom: 14px;
}

.article ul {
  margin-left: 20px;
  margin-bottom: 14px;
}

.license-wrap {
  margin-top: 18px;
}

.license-wrap h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.license-wrap img {
  width: 100%;
  max-width: 620px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.contact-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 26px rgba(30, 41, 59, 0.08);
}

.contact-box h3 {
  color: var(--primary);
  margin-bottom: 8px;
}

.site-footer {
  background: #0d2a66;
  color: #e8efff;
  margin-top: 46px;
}

.site-footer .container {
  padding: 24px 0 28px;
  text-align: center;
  font-size: 0.95rem;
}

.site-footer a {
  color: #ffd23f;
}

@media (max-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .navbar {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .logo {
    max-width: calc(100% - 50px);
  }

  .logo strong {
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 8px;
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
  }

  .carousel {
    height: 360px;
  }

  .carousel.compact {
    height: 220px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .slide-overlay p {
    font-size: 0.92rem;
  }
}
