/* 燈泡銀行 中華聚光有限公司 — 靜態網站樣式
   色碼與版面依原站版型還原（見 report.md H3） */

:root {
  --primary: #34699a;
  --primary-dark: #274f74;
  --logo-blue: #80b5e6;
  --text: #666;
  --heading: #222;
  --header-bg: #eee;
  --title-bg: #f3f3f3;
  --footer-bg: #0e172a;
  --line: #ddd;
  --line-blue: #b8cbd3;
  --readmore-line: #9ab5cd;
  --table-head: #34699a;
  --table-stripe: #eef7fa;
  --table-key: #d7f0f4;
  --hl-orange: #e65c00;
  --hl-red: #d40000;
  --container: 1170px;
  --gutter: 15px;
  --font: "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Noto Sans TC", "Heiti TC", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
}

h1, h2, h3, h4, h5 { color: var(--heading); font-weight: 600; line-height: 1.4; margin: 0 0 .6em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover, a:focus { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }
picture { display: inline-block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
ul { padding-left: 1.4em; margin: 0 0 1em; }
strong { color: #444; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; 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; top: 0; z-index: 10000; background: var(--primary); color: #fff; padding: 8px 16px; }
.skip-link:focus { left: 8px; top: 8px; color: #fff; }
:focus-visible { outline: 3px solid var(--logo-blue); outline-offset: 2px; }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--header-bg);
  border-bottom: 1px solid #e2e2e2;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 90px; gap: 16px; }
.logo { display: block; flex: 0 0 auto; }
.logo img { display: block; height: 60px; width: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; align-items: center; gap: 4px; }
.menu > li { position: relative; }
/* 原站選單：17px、#34699A，目前頁面與滑過時變黑色，沒有底線與箭頭 */
.menu > li > a {
  display: block; padding: 8px 12px;
  color: var(--primary); font-size: 17px; line-height: 30px;
}
.menu > li > a:hover, .menu > li > a:focus,
.menu > li.is-active > a { color: #000; text-decoration: none; }
.sub-toggle { display: none; }

/* 原站下拉選單：單欄、白底、陰影、每項前有 ⊙ 圖示並以細線分隔 */
.submenu {
  position: absolute; top: 100%; left: 0; z-index: 10;
  width: 240px; padding: 4px 0;
  background: #fff; border: 1px solid #e3e3e3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .18);
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu { visibility: visible; opacity: 1; transform: none; }
.submenu li { border-bottom: 1px solid #eee; }
.submenu li:last-child { border-bottom: 0; }
.submenu a { position: relative; display: block; padding: 10px 16px 10px 40px; color: #848484; font-size: 15px; line-height: 1.35; }
.submenu a::before {
  content: ""; position: absolute; left: 20px; top: 15px; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid currentColor; background: radial-gradient(circle, currentColor 0 1.6px, transparent 2px);
}
.submenu a:hover, .submenu a:focus, .submenu .is-active > a { color: var(--primary); text-decoration: none; }

.nav-toggle { display: none; }

/* ---------- 輪播（只在首頁） ---------- */
.hero { position: relative; background: #0b3a66; overflow: hidden; }
.hero-track { position: relative; }
.slide { display: none; margin: 0; }
.slide.is-active { display: block; }
.js .slide { display: block; position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.js .slide.is-active { position: relative; opacity: 1; }
.slide picture, .slide img { display: block; width: 100%; }
/* 原站 Nivo 輪播箭頭：貼近左右邊緣的小型灰色圓鈕 */
.hero-btn {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; border: 2px solid rgba(255, 255, 255, .7); border-radius: 50%;
  background: rgba(110, 110, 110, .75); color: #fff; font-size: 20px; line-height: 26px; cursor: pointer;
}
.hero-btn:hover, .hero-btn:focus { background: rgba(60, 60, 60, .9); }
.hero-prev { left: 10px; }
.hero-next { right: 10px; }
.no-js .hero-btn, .hero-btn[hidden] { display: none; }

/* ---------- 麵包屑 ---------- */
/* 原站麵包屑：容器內的淺灰圓角框，房子圖示開頭，「/」分隔，目前頁面紅色 */
.breadcrumb-wrap { padding-top: 10px; }
.breadcrumb {
  list-style: none; margin: 0; padding: 9px 15px; display: flex; flex-wrap: wrap; align-items: center;
  background: #f5f5f5; border-radius: 4px; font-size: 16px; line-height: 1.5;
}
.breadcrumb li + li::before { content: "/"; padding: 0 6px; color: #ccc; }
.breadcrumb a { color: var(--primary); }
.breadcrumb .bc-home a { color: #777; display: inline-flex; vertical-align: -2px; }
.breadcrumb [aria-current] { color: #d9230f; }

/* ---------- 主體 ---------- */
.site-main { padding: 44px 0 48px; }
.home-heading { font-size: 1.3rem; font-weight: normal; color: #333; margin: 0 0 .4em; }
.home-about { margin-bottom: 1.5em; }
.home-products .home-heading { margin-bottom: 1.4em; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.layout--sidebar { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.page-title { font-size: 1.6rem; padding-bottom: .4em; border-bottom: 2px solid var(--primary); margin-bottom: 1em; }
.section-title { font-size: 1.35rem; color: var(--primary); margin: 0 0 1em; padding-left: 12px; border-left: 4px solid var(--primary); }
.lead { font-size: 1.05rem; }

/* 原站側欄：深灰標題列（#3F3D3D，左側主色線），白底細框清單 */
.sidebar .widget { background: #fff; border: 1px solid var(--line); padding: 0 10px 8px; margin-bottom: 24px; }
.widget-title {
  margin: -1px -11px 10px; padding: 12px 20px; background: #3f3d3d; border-left: 4px solid var(--primary);
  color: #fff; font-size: 1.5rem; font-weight: normal; line-height: 1.4;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { border-bottom: 1px solid #e5e5e5; }
.widget li:last-child { border-bottom: 0; }
.widget li a { display: block; padding: 6px 2px; color: #848484; font-size: 16px; line-height: 2.2; }
.widget li a:hover, .widget li a:focus { color: var(--primary); text-decoration: none; }

/* 文章內欄位（取代原 Bootstrap col-sm-*） */
.cols { display: flex; flex-wrap: wrap; margin: 0 -12px 1.5em; }
.cols > .col { padding: 0 12px; flex: 1 1 100%; min-width: 0; }
.cols > .col img { margin-bottom: 8px; }
@media (min-width: 768px) {
  .cols > .col-2 { flex: 0 0 16.6667%; }
  .cols > .col-3 { flex: 0 0 25%; }
  .cols > .col-4 { flex: 0 0 33.3333%; }
  .cols > .col-6 { flex: 0 0 50%; }
  .cols > .col-8 { flex: 0 0 66.6667%; }
  .cols > .col-9 { flex: 0 0 75%; }
}
.hl-orange { color: var(--hl-orange); }
.hl-gray { color: #808080; }
.hl-red { color: var(--hl-red); font-weight: 600; }

.article-body p { margin-bottom: .8em; }
.article-body figure { margin: 0 0 1em; }

/* 閱讀更多（原站 p.readmore 樣式） */
.readmore { text-align: right; margin-top: 1em; }
.btn-outline {
  display: inline-block; padding: 6px 18px; border: 1px solid var(--readmore-line); border-radius: 4px;
  color: var(--primary); background: #fff;
}
.btn-outline:hover, .btn-outline:focus { background: var(--primary); border-color: var(--primary); color: #fff; text-decoration: none; }

/* ---------- 分類格 / 產品卡片 ---------- */
.tile-grid, .card-grid { list-style: none; margin: 0 0 1.5em; padding: 0; display: grid; gap: 20px; }
.tile-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 原站首頁分類格：無外框，圖片寬度填滿，名稱靠左、灰字，列與列之間有細線 */
.tile-grid { gap: 30px; margin: 0; align-items: start; }
.tile a { display: block; color: #848484; text-align: left; }
.tile a:hover, .tile a:focus { text-decoration: none; color: var(--primary); }
.tile picture, .tile img { display: block; width: 100%; height: auto; }
.tile .thumb { display: block; }
.tile-name { display: block; padding-top: 6px; font-size: 16px; line-height: 1.5; }
.tile-sep { margin: 22px 0 50px; border: 0; border-top: 1px solid #eee; }

/* 原站系列頁產品卡片：極淡外框，圖片填滿，標題靠左黑字、行距緊 */
.card-grid { gap: 40px 30px; align-items: start; }
.card a.card-link { display: block; border: 1px solid #f0f0f0; background: #fff; color: #222; text-align: left; transition: box-shadow .2s; }
.card a.card-link:hover, .card a.card-link:focus { box-shadow: 0 2px 12px rgba(0, 0, 0, .1); text-decoration: none; }
.card .thumb { display: block; }
.card .thumb picture, .card .thumb img { display: block; width: 100%; height: auto; }
.card-body { display: block; padding: 10px 2px 6px; }
.card-title { display: block; margin: 0; font-size: 19px; font-weight: normal; color: #222; line-height: 1.15; }
.card-more { display: block; margin-top: 8px; font-size: 14px; color: var(--primary); }

/* 產品頁 */
.product-back { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.product-figure { text-align: center; }

/* 特殊光源圖片格 */
.lamp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 1.5em; }
.lamp-grid figure { margin: 0; padding: 10px; text-align: center; border: 1px solid var(--line); border-radius: 4px; }
.lamp-grid figcaption { font-size: 14px; line-height: 1.5; color: #555; margin-top: 6px; }

/* ---------- 產品規格表（report.md H4-4） ---------- */
.spec-wrap { margin: 1.5em 0; }
.spec-hint { display: none; margin: 0 0 6px; font-size: 13px; color: #888; text-align: center; }
.spec-table {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .2), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .2), transparent) right / 14px 100% no-repeat scroll;
}
.spec { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; line-height: 1.5; background: transparent; }
.spec th, .spec td { padding: 6px 10px; border: 1px solid var(--line-blue); text-align: center; white-space: nowrap; }
.spec thead th { background: var(--table-head); color: #fff; font-weight: 600; }
.spec thead tr + tr th { background: #4f82b0; font-weight: normal; font-size: 13px; }
.spec tbody tr { background: rgba(255, 255, 255, .92); }
.spec tbody tr:nth-child(odd) { background: rgba(238, 247, 250, .95); }
.spec tbody th { position: sticky; left: 0; z-index: 1; background: var(--table-key); color: #333; text-align: left; font-weight: 600; }
.spec thead th:first-child { position: sticky; left: 0; z-index: 2; }
.spec-table--narrow .spec { min-width: 0; }
.spec-table--narrow .spec th, .spec-table--narrow .spec td { white-space: normal; }
@media (min-width: 992px) { .spec { min-width: 0; } }

/* 聯絡頁地圖 */
.map-embed { position: relative; width: 100%; aspect-ratio: 4 / 3; min-height: 300px; border: 1px solid var(--line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 頁尾 ---------- */
/* 原站頁尾：深藍底、白字置中，6 行公司資訊，連結不加底線 */
.site-footer { background: var(--footer-bg); color: #fff; text-align: center; padding: 22px 0; font-size: 16px; line-height: 1.5; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: #fff; text-decoration: underline; }
.footer-name { font-size: inherit; font-weight: normal; margin: 0; }
.footer-info { list-style: none; margin: 0; padding: 0; }
.footer-copy { margin: 18px 0 0; font-size: 13px; color: rgba(255, 255, 255, .6); }
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  width: 44px; height: 44px; border-radius: 4px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; opacity: .85;
}
.to-top:hover, .to-top:focus { color: #fff; opacity: 1; text-decoration: none; }

/* 404 */
.notfound { text-align: center; padding: 40px 0; }
.notfound .code { font-size: 4rem; font-weight: 700; color: var(--logo-blue); line-height: 1; margin-bottom: .2em; }

/* ---------- 平板（< 992px） ---------- */
@media (max-width: 991px) {
  .header-inner { min-height: 70px; }
  .logo img { height: 50px; }
  .layout--sidebar { grid-template-columns: minmax(0, 1fr); }
  .tile-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lamp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spec-hint { display: block; }
  .spec-table--narrow + .spec-hint, .spec-wrap--narrow .spec-hint { display: none; }

  /* 漢堡選單（有 JS 時才收合，沒有 JS 時選單直接展開） */
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: transparent; border: 1px solid var(--primary); border-radius: 4px;
    color: var(--primary); font: inherit; font-size: 15px; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: "";
  }
  .nav-toggle-bar::before { position: absolute; top: -6px; }
  .nav-toggle-bar::after { position: absolute; top: 6px; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { flex: 1 1 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 12px; }
  .menu > li { border-top: 1px solid #ddd; display: flex; flex-wrap: wrap; }
  .menu > li > a { flex: 1 1 auto; padding: 10px 4px; border-bottom: 0; }
  .menu > li.is-active > a { border-bottom: 0; }
  .has-sub > a::after { display: none; }
  .sub-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; background: transparent; border: 0; border-left: 1px solid #ddd; color: var(--primary); cursor: pointer;
  }
  .sub-toggle::before { content: ""; border: 6px solid transparent; border-top-color: currentColor; border-bottom: 0; transition: transform .2s; }
  .sub-toggle[aria-expanded="true"]::before { transform: rotate(180deg); }
  .submenu {
    position: static; flex: 1 1 100%; width: auto; display: block; padding: 0 0 8px 12px;
    visibility: visible; opacity: 1; transform: none; box-shadow: none; border: 0; background: transparent;
  }
  .submenu li { border-bottom: 0; }
  .submenu a { padding: 8px 8px 8px 30px; }
  .submenu a::before { left: 10px; top: 13px; }
  .js .submenu { display: none; }
  .js .submenu.is-open { display: block; }
  .has-sub:hover > .submenu { visibility: visible; }
}

/* ---------- 手機（< 768px） ---------- */
@media (max-width: 767px) {
  body { font-size: 15px; }
  h1, .page-title { font-size: 1.35rem; }
  .logo img { height: 44px; }
  .site-main { padding: 20px 0 36px; }
  .tile-grid--6, .tile-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lamp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-btn { width: 36px; height: 36px; line-height: 36px; font-size: 18px; }
  .readmore { text-align: center; }
}
@media (max-width: 479px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .js .slide, .submenu, .tile a, .card a.card-link { transition: none; }
}

/* 列印：規格表完整印出 */
@media print {
  .site-header, .breadcrumb-wrap, .sidebar, .hero, .to-top, .spec-hint, .product-back { display: none !important; }
  .layout--sidebar { grid-template-columns: 1fr; }
  .spec-table { overflow: visible; background: none; }
  .spec { min-width: 0; }
  .spec th, .spec td { white-space: normal; }
  .site-footer { background: none; color: #000; }
  .site-footer a { color: #000; }
}
