:root {
  --ink: #132238;
  --muted: #5b6678;
  --line: #d9e2ec;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --brand: #0f766e;
  --brand-dark: #0b4f4a;
  --accent: #d97706;
  --blue: #1d4ed8;
  --shadow: 0 18px 45px rgba(19, 34, 56, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.nav-cta, .button {
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.nav-cta, .button.primary { background: var(--brand); color: white; }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.nav-toggle { display: none; border: 0; background: var(--soft); border-radius: 8px; font-size: 22px; width: 44px; height: 44px; }

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(54px, 8vw, 104px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(110deg, rgba(15, 118, 110, 0.94), rgba(19, 34, 56, 0.88)),
    radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.38), transparent 28%),
    url("../images/header.jpg");
  background-size: cover;
  color: white;
}
.hero h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1.08; margin: 12px 0 20px; max-width: 900px; }
.hero p { max-width: 720px; font-size: 18px; color: rgba(255,255,255,0.88); }
.eyebrow { margin: 0; color: var(--accent); font-weight: 800; letter-spacing: 0; }
.hero .eyebrow { color: #fbbf24; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.metric { padding: 18px; background: rgba(255,255,255,0.12); border-radius: 8px; }
.metric strong { display: block; font-size: 30px; }
.metric span { color: rgba(255,255,255,0.78); }

.section { padding: clamp(52px, 7vw, 86px) clamp(18px, 5vw, 72px); }
.band { background: var(--soft); }
.section-heading { max-width: 820px; margin-bottom: 28px; }
.section-heading h2, .page-hero h1, .cta-strip h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.18; margin: 8px 0 10px; }
.content-grid, .news-grid, .resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature-card, .news-card, .resource-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 12px 28px rgba(19, 34, 56, 0.07);
}
.card-visual { height: 130px; border-radius: 8px; margin-bottom: 18px; background-size: cover; }
.feature-card h3, .news-card h3, .resource-card strong { display: block; margin: 0 0 10px; font-size: 21px; }
.feature-card p, .news-card p, .resource-card p { color: var(--muted); margin: 0; }

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.service-list article {
  border-left: 4px solid var(--brand);
  padding: 20px;
  background: white;
  border-radius: 8px;
}
.service-list span { color: var(--accent); font-weight: 900; }
.service-list h3 { margin: 6px 0; }
.service-list p { color: var(--muted); margin: 0; }

.news-card time { color: var(--brand); font-weight: 700; }
.price-table { display: grid; gap: 10px; }
.price-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 160px;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.price-row span, .resource-card span { display: block; color: var(--accent); font-size: 14px; font-weight: 800; }
.price-row p { color: var(--muted); margin: 0; }
.price-row b { color: var(--brand-dark); text-align: right; }
.resource-card { transition: transform 0.18s ease, border-color 0.18s ease; }
.resource-card:hover { transform: translateY(-3px); border-color: var(--brand); }

.cta-strip {
  margin: 0 clamp(18px, 5vw, 72px) clamp(52px, 7vw, 86px);
  padding: 28px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-hero { padding: 72px clamp(18px, 5vw, 72px); background: var(--soft); }
.page-hero.compact { min-height: 300px; display: flex; flex-direction: column; justify-content: center; }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
}
.contact-form, .contact-info, .login-card, .admin-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 12px 28px rgba(19, 34, 56, 0.07);
}
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: white;
}
textarea { resize: vertical; }
.full { grid-column: 1 / -1; }
.hp-field { position: absolute; left: -9999px; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 700; }
.form-status.is-success { color: var(--brand); }
.form-status.is-error, .alert { color: #b91c1c; }
.map-box { margin-top: 18px; min-height: 220px; border-radius: 8px; background: linear-gradient(135deg, #dbeafe, #ccfbf1); display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }

.site-footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: #0f172a;
  color: rgba(255,255,255,0.82);
}
.site-footer p { margin: 4px 0; }

.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--soft); padding: 20px; }
.login-card { width: min(420px, 100%); }
.admin-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; background: var(--soft); }
.admin-sidebar { background: #111827; color: white; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.admin-sidebar h1 { font-size: 22px; margin: 0 0 12px; }
.admin-sidebar a { padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,0.86); }
.admin-sidebar a:hover { background: rgba(255,255,255,0.1); }
.admin-main { padding: 28px; overflow-x: auto; }
.admin-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.admin-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.admin-card strong { display: block; font-size: 36px; color: var(--brand); }
.admin-title-row, .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.admin-table-wrap { background: white; border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: #eef2f7; }
.actions { display: flex; gap: 10px; align-items: center; }
.actions button { border: 0; background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.admin-form { max-width: 900px; display: grid; gap: 16px; }
.check-label { display: flex; align-items: center; gap: 10px; }
.check-label input { width: auto; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    top: 74px;
    flex-direction: column;
    align-items: stretch;
    background: white;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .content-grid, .news-grid, .resource-grid, .service-list, .admin-cards { grid-template-columns: 1fr 1fr; }
  .price-row { grid-template-columns: 1fr; }
  .price-row b { text-align: left; }
  .contact-layout, .site-footer { grid-template-columns: 1fr; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

@media (max-width: 620px) {
  .brand span { font-size: 15px; }
  .content-grid, .news-grid, .resource-grid, .service-list, .contact-form, .admin-cards { grid-template-columns: 1fr; }
  .cta-strip { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 36px; }
  .section, .page-hero { padding-left: 16px; padding-right: 16px; }
}
