/* 冠瑋科技風格前台：清爽企業、主選單＋下拉、響應式 */
:root {
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-text: #1c2434;
  --color-muted: #5c6b7f;
  --color-accent: #0d4a7a;
  --color-accent-hover: #0a3a61;
  --color-border: #dde3ec;
  --header-h: 4rem;
  --shadow: 0 4px 24px rgba(13, 74, 122, 0.08);
  --radius: 8px;
  --maxw: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site-body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft JhengHei", system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; color: var(--color-accent-hover); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; color: var(--color-accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
}

.site-nav .nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
}

.site-nav .nav-menu > li {
  position: relative;
}

.site-nav .nav-menu > li > a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--color-text);
  font-weight: 500;
  border-radius: var(--radius);
}
.site-nav .nav-menu > li > a:hover {
  background: rgba(13, 74, 122, 0.08);
  text-decoration: none;
  color: var(--color-accent);
}

.site-nav li.is-active > a {
  color: var(--color-accent);
  background: rgba(13, 74, 122, 0.1);
}

/* 子選單（桌機 hover） */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 50;
}

.site-nav li.has-children:hover > .submenu,
.site-nav li.has-children:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  font-size: 0.95rem;
}
.submenu li a:hover {
  background: rgba(13, 74, 122, 0.06);
  text-decoration: none;
  color: var(--color-accent);
}

.submenu .submenu {
  left: 100%;
  top: 0;
}

/* ----- Main ----- */
.site-main { min-height: 50vh; }

.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0rem 1.25rem;
}

.section-title {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}
.section-lead {
  color: var(--color-muted);
  margin: 0 0 2rem;
  max-width: 100%;
  text-align: center;
}

/* ----- Hero slider ----- */
.hero-slider {
  position: relative;
  background: #0a2844;
  color: #fff;
  min-height: min(55vh, 520px);
  max-height: 640px;
  overflow: hidden;
}

.hero-slider .slides {
  position: relative;
  width: 100%;
  height: min(55vh, 520px);
  max-height: 640px;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-slider .slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-slider .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 40, 68, 0.85) 0%, rgba(10, 40, 68, 0.35) 55%, transparent 100%);
  z-index: 2;
}

.slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.slide-caption h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.slide-caption p {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  font-size: 1.05rem;
  opacity: 0.95;
}

.btn-hero {
  display: inline-block;
  align-self: flex-start;
  padding: 0.6rem 1.35rem;
  background: #fff;
  color: var(--color-accent);
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.btn-hero:hover { text-decoration: none; background: #eef4f9; color: var(--color-accent-hover); }

.slider-nav {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.slider-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.slider-btn:hover { background: rgba(0,0,0,0.45); }

.slider-dots {
  display: flex;
  gap: 0.4rem;
  margin: 0 0.5rem;
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
}
.slider-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

/* 無幻燈片時的靜態首屏 */
.hero-static {
  background: linear-gradient(135deg, #0d4a7a 0%, #1a6cb5 100%);
  color: #fff;
  padding: 4rem 1.25rem;
  text-align: center;
}
.hero-static-inner {
  max-width: 40rem;
  margin: 0 auto;
}
.hero-static h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}
.hero-static p { margin: 0; opacity: 0.95; }

/* ----- 區塊：服務三欄、卡片 ----- */
.grid-3 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.home-product-cat-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(var(--home-product-cat-cols, 4), 1fr);
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .home-product-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .home-product-cat-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

.home-product-cat-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.home-product-cat-card img {
  height: 140px;
}

.home-product-cat-img {
  width: 100%;
  height: 140px;
  background: #dfe6ef;
}

.home-product-cat-img--placeholder {
  background: linear-gradient(145deg, #cfd9e6 0%, #b8c8db 48%, #dfe8f2 100%);
  background-size: 200% 200%;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--color-accent);
}

.grid-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.products-cats-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(var(--products-cats-cols, 4), 1fr);
}

@media (max-width: 1024px) {
  .products-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .products-cats-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

.products-cat-tile {
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.products-cat-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(13, 74, 122, 0.12);
}

.products-cat-tile img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.products-cat-tile__img--placeholder {
  width: 100%;
  height: 150px;
  background: linear-gradient(145deg, #cfd9e6 0%, #b8c8db 48%, #dfe8f2 100%);
  background-size: 200% 200%;
}

.products-cat-tile__body {
  padding: 1rem 1.1rem 1.25rem;
}

.products-cat-tile__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.products-cat-tile__desc {
  margin: 0.5rem 0 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.products-cat-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: block;
  margin: 0.75rem 0 1.25rem;
}

.products-children-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .products-children-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .products-children-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

.products-child-card {
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.products-child-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(13, 74, 122, 0.12);
}

.products-child-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.products-child-card__img--placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(145deg, #cfd9e6 0%, #b8c8db 48%, #dfe8f2 100%);
  background-size: 200% 200%;
}

.products-child-card__body {
  padding: 0.95rem 1.05rem 1.15rem;
}

.products-child-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13, 74, 122, 0.12);
}
.card-body { padding: 1.1rem 1.25rem; }
.card-body h2, .card-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}
.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.price { color: var(--color-accent); font-weight: 700; }
.meta { font-size: 0.85rem; color: var(--color-muted); margin-bottom: 0.35rem; }

/* ----- 部落格列表 ----- */
.blog-list { list-style: none; margin: 0; padding: 0; }
.blog-list li {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}
.blog-list a.title-link {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
}
.blog-list a.title-link:hover { color: var(--color-accent); }

.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.prose p { margin: 0 0 1rem; }

/* TinyMCE / 富文字前台顯示 */
.rich-text { font-size: 0.95rem; line-height: 1.65; }
.rich-text p { margin: 0 0 0.75rem; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text img { max-width: 100%; height: auto; border-radius: 6px; }
.rich-text a { word-break: break-word; }
.rich-text ul, .rich-text ol { margin: 0.5rem 0 0.75rem 1.25rem; padding: 0; }
.rich-text table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.9rem; }
.rich-text th, .rich-text td { border: 1px solid var(--color-border); padding: 0.35rem 0.5rem; }
.rich-text blockquote { margin: 0.75rem 0; padding-left: 1rem; border-left: 4px solid var(--color-accent); color: var(--color-muted); }
.category-desc.rich-text { color: var(--color-text); }

/* ----- 首頁：公司簡介、服務牆 ----- */
.section-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.home-intro-block .section-title {
  margin-top: 0;
}

.home-intro-body {
  max-width:100%;
  margin-top: 0.5rem;
}

/* 首頁：簡介／產品區等 CTA 按鈕置中 */
.home-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
}

.service-wall-section {
  padding: 1rem 0 1rem;
  background-color: #e8edf4;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(13, 74, 122, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
}

.service-wall-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .service-wall-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

.service-card {
  background: var(--color-surface);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(28, 36, 52, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(221, 227, 236, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.service-card--link:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(13, 74, 122, 0.14);
}

.service-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #dfe6ef;
}

.service-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-card-title-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.45));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.service-card-desc {
  padding: 1rem 1.15rem 1.35rem;
  flex: 1;
  color: var(--color-text);
  font-size: 0.93rem;
  line-height: 1.6;
}

.service-card-desc.rich-text p {
  margin: 0 0 0.5rem;
  font-size: inherit;
}
.service-card-desc.rich-text p:last-child {
  margin-bottom: 0;
}

/* ----- 首頁：最新消息（橫向四欄卡片） ----- */
.home-news-section {
  padding: 1rem 0 1rem;
  background-color: #e4eaf2;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, transparent 45%),
    radial-gradient(circle at 1px 1px, rgba(13, 74, 122, 0.06) 1px, transparent 0);
  background-size: auto, 20px 20px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.home-news-inner {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

.home-news-heading {
  text-align: center;
  margin-bottom: 1.75rem;
  color: var(--color-accent);
  font-weight: 700;
}

.home-news-empty {
  text-align: center;
  margin-bottom: 0;
}

.home-news-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

@media (max-width: 1024px) {
  .home-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .home-news-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

.home-news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(28, 36, 52, 0.08);
  border: 1px solid rgba(221, 227, 236, 0.95);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-news-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(13, 74, 122, 0.12);
}

.home-news-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #d8e0ea;
  overflow: hidden;
}

.home-news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-news-card-img--placeholder {
  min-height: 100%;
  background: linear-gradient(145deg, #cfd9e6 0%, #b8c8db 48%, #dfe8f2 100%);
  background-size: 200% 200%;
}

.home-news-card-datebar {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  background: #5a6578;
  color: #fff;
}

.home-news-card-time {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0;
  color: inherit;
}

.home-news-card-day {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-news-card-ym {
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0.92;
}

.home-news-card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-start;
  border-top: 1px solid var(--color-border);
}

.home-news-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.home-news-card-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.5em;
}

.home-news-card-desc--muted {
  color: var(--color-muted);
  opacity: 0.85;
}

.home-news-more {
  margin: 1.75rem 0 0;
  text-align: center;
}

.home-news-more a {
  font-weight: 600;
}

/* ----- Footer ----- */
.site-footer {
  background: #1c2434;
  color: #c8d0dc;
  margin-top: 3rem;
  padding: 2.5rem 1.25rem 1.5rem;
  font-size: 0.95rem;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.5rem;
}
.site-footer a { color: #9ec5ff; }
.site-footer a:hover { color: #fff; }
.footer-muted { color: #8a96a8; margin: 0.35rem 0 0; font-size: 0.9rem; }
.footer-copy {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: #8a96a8;
}

/* Cookie 橫幅 */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
}
.cookie-banner p { margin: 0; flex: 1; min-width: 200px; font-size: 0.9rem; color: var(--color-muted); }
.btn-cookie {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn-cookie:hover { background: var(--color-accent-hover); }

/* ----- 聯絡頁 ----- */
.contact-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  max-width: 36rem;
  box-shadow: var(--shadow);
}
.contact-block p { margin: 0 0 0.75rem; }

/* ----- 響應式選單 ----- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .site-nav.is-open {
    max-height: min(80vh, 640px);
    overflow-y: auto;
  }

  .site-header .header-inner { position: relative; flex-wrap: wrap; }

  .site-nav .nav-menu {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 1rem;
  }

  .site-nav .nav-menu > li > a {
    padding: 0.85rem 1.25rem;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding-left: 1rem;
    background: rgba(13, 74, 122, 0.04);
    display: none;
  }
  .site-nav li.has-children.is-open > .submenu {
    display: block;
  }

  /* 手機：點父層展開子選單 */
  .site-nav li.has-children > a::after {
    content: ' +';
    opacity: 0.6;
  }
  .site-nav li.has-children.is-open > a::after {
    content: ' −';
  }
}
