/* Products.css | HTML5 分離樣式 | UTF-8 */
.join-us-btn {
    display: inline-block;
    width: 120px;
    padding: 10px 0;
    text-align: center;
    background-color: #fff;
    color: #FF6600;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #FF6600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

/* 滑過效果 */
.join-us-btn:hover {
    background-color: #FF6600;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}


/* 按下時的壓下感 */
.join-us-btn:active {
    background-color: #cc5200;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}


* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', 'Microsoft JhengHei', Arial, sans-serif;
  color: #222;
  line-height: 1.6;
  background: #fff
}

/* Helpers */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 12px
}

.highlight {
  color: #ff7a00
}

.text-orange {
  color: var(--orange)
}

.text-green {
  color: var(--green)
}

.text-red {
  color: var(--red)
}

.muted,
.muted a {
  color: var(--muted)
}

.full-img {
  width: 100%;
  height: auto
}

.sr-only {
  position: absolute;
  left: -9999px
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff
}

.header-inner {
  display: grid;
  grid-template-columns: 212px 1fr 240px;
  align-items: center;
  gap: var(--gap);
  padding: 8px 0
}

.brand-logo {
  max-width: 180px;
  height: auto;
  display: block
}

.header-title .page-keyword {
  margin: 0;
  font-size: 20px;
  font-weight: 700
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px
}

.share-icons {
  display: flex;
  gap: 6px
}

.share-pill {
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid #ddd;
  border-radius: 12px
}

.quick-links {
  display: flex;
  gap: 10px
}

.qlink {
  font-size: 12px;
  color: #111;
  text-decoration: none
}

.qlink:hover {
  text-decoration: underline
}

.site-nav {
  border-top: 1px solid var(--line)
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0
}

.nav-item img {
  display: block;
  height: 24px
}

.nav-div {
  display: inline-block;
  width: 48px;
  height: 23px;
  background: url('images/com-menu-div.gif') no-repeat center/contain
}

/* Hero (滿版) */
.hero {
  width: 100%;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block
}

/* Main layout */
.site-main {
  display: grid;
  grid-template-columns: 211px 1fr 221px;
  gap: var(--gap);
  padding: 16px 0
}

.sidebar.left,
.sidebar.right {
  background: var(--gray);
  border-right: 1px solid #ddd;
  padding: 12px
}

.sidebar.right .box {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 10px 0;
  padding: 8px 10px;
  background: #fff
}

.sidebar.right .box .box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px
}

.sidebar.right .box .box-title img {
  height: 14px;
  width: auto
}

/* Boxes */
.box {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd
}

.box-title {
  margin-bottom: 10px
}

/* Left side */
.link-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0
}

.link-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #ccc
}

.text-link {
  color: #0a4aa6;
  text-decoration: none
}

.text-link:hover {
  text-decoration: underline
}

.taiwan-service {
  display: flex;
  gap: 10px;
  align-items: flex-start
}

.taiwan-service-text .welcome {
  color: var(--orange);
  margin: 0 0 6px
}

/* 全省服務：兩圖疊 + 右側文字（純 CSS） */
.taiwan-service {
  position: relative;
  min-height: 113px;
  padding: 6px 10px 6px 100px;
  /* 左側留給圖：85 + 15 */
}

/* 半圓背景（編號2）— 用偽元素放在最底層 */
.taiwan-service::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  width: 120px;
  height: 113px;
  background: url("images/home-taiwanmap-2.gif") no-repeat 0 0 / 120px 113px;
  opacity: .95;
  pointer-events: none;
  z-index: 0;
}

/* 台灣地圖（編號1）— 固定在左側 */
.taiwan-service>img {
  position: absolute;
  left: 10px;
  top: 0;
  width: 85px;
  height: 113px;
  pointer-events: none;
  z-index: 1;
}

/* 文字一定橫排，且顯示在最上層 */
.taiwan-service>div {
  position: relative;
  z-index: 2;
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  -ms-writing-mode: lr-tb !important;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}

.taiwan-service .welcome {
  color: #f60;
  font-weight: 700;
  margin: 0 0 4px;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.contact-form textarea,
.contact-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px
}

.btn {
  padding: 8px 12px;
  border: none;
  background: #333;
  color: #fff;
  border-radius: 6px;
  cursor: pointer
}

.btn:hover {
  opacity: .9
}

/* Content */
.content {
  padding-bottom: 24px
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd
}

.content-title-img {
  height: 16px;
  width: auto
}

.breadcrumb {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px
}

.breadcrumb img {
  height: 11px;
  width: auto
}

/* Focus article */
.focus {
  display: grid;
  grid-template-columns: 204px 1fr 20px;
  gap: 0;
  margin: 16px 0
}

.focus-media img {
  width: 204px;
  height: auto;
  display: block
}

.focus-text {
  background: url('images/com-focus-bg-1.gif') repeat-y;
  padding: 12px 16px
}

.focus-title {
  color: #114e9e;
  font-size: 18px;
  margin: 4px 0 8px
}

.dotline {
  border: none;
  border-top: 1px dotted #bbb;
  margin: 12px 0
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 8px 0
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center
}

.card img {
  width: 185px;
  height: auto;
  border: 1px solid #ddd;
  padding: 2px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05)
}

.card-title {
  margin: 6px 0 0
}

.card-title img {
  height: 13px;
  width: auto;
  vertical-align: middle
}

/* Pager */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 0;
  border-top: 1px solid #ddd
}

.pager-right {
  display: flex;
  gap: 8px;
  align-items: center
}

.pager .disabled {
  color: #aaa
}

.pager .current {
  font-weight: 700
}

.page-link {
  color: #0a4aa6;
  text-decoration: none
}

.page-link:hover {
  text-decoration: underline
}

/* Right side */
.testimony .testimonial {
  display: flex;
  gap: 10px;
  align-items: flex-start
}

.testimony img {
  width: 57px;
  height: 55px
}

.service-links,
.portfolio-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0
}

.service-links li,
.portfolio-list li {
  padding: 8px 0;
  border-bottom: 1px dotted #ccc
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff
}

.footer-top {
  padding: 8px 0;
  border-bottom: 1px solid var(--line)
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px
}

.foot-link {
  color: #111;
  text-decoration: none
}

.foot-link:hover {
  text-decoration: underline
}

.foot-div {
  display: inline-block;
  width: 25px;
  height: 11px;
  background: url('images/com-tail-div.gif') no-repeat center/contain
}

.footer-bottom {
  display: grid;
  grid-template-columns: 152px 1fr 152px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  background: var(--gray)
}

.fansio img {
  width: 106px;
  height: 42px
}

.footer-note {
  font-size: 12px;
  color: #666
}

.footer-note .support img {
  height: 23px;
  width: 20px;
  vertical-align: middle
}

/* Responsive */
@media (max-width: 1200px) {
  .container {
    max-width: 100%
  }

  .site-main {
    grid-template-columns: 1fr;
  }

  .sidebar.left,
  .sidebar.right {
    border-right: none
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .header-inner {
    grid-template-columns: 1fr;
    row-gap: 8px
  }

  .header-actions {
    align-items: flex-start
  }

  .nav-inner {
    flex-wrap: wrap
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr
  }

  .focus {
    grid-template-columns: 1fr
  }

  .focus-media img {
    width: 100%
  }
}


/* === Full-width main under hero === */
.site-main.container {
  max-width: 100%;
  padding-left: 12px;
  padding-right: 12px
}

/* keep fixed sidebars and fluid center */
.site-main {
  grid-template-columns: 211px 1fr 250px
}

/* let product grid auto-fill across wide screens */
@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr)
  }
}

@media (min-width: 1600px) {
  .product-grid {
    grid-template-columns: repeat(5, 1fr)
  }
}

/* === Home (index) additions — built on Products.css base === */

/* Full-width main under hero (一致設定) */
.site-main.container {
  max-width: 100%;
  padding-left: 12px;
  padding-right: 12px
}

/* Header/brand quick alignments (reuse base header classes if present) */
.header-inner {
  display: grid;
  grid-template-columns: 212px 1fr 240px;
  align-items: center;
  gap: 0
}

.header-inner .brand-logo {
  max-height: 56px;
  height: auto
}



/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #ddd
}

.section-header-title {
  display: flex;
  align-items: center;
  gap: 8px
}

.section-header-more img {
  display: block
}

/* Focus article (小圖 + 右文) */
.home-focus {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  background: #fff
}

.home-focus .pic {
  width: 88px;
  height: auto
}

.home-focus h2 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #114e9e
}

.home-focus p {
  margin: 0;
  font-size: 12px;
  color: #222
}

.pic-border-1 {
  border: 1px solid #dcdcdc;
  padding: 2px
}

/* News list */
.news-wrap {
  padding: 8px 12px
}

.news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0
}

.news-list {
  display: grid;
  gap: 6px
}

.news-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px
}

.news-item img {
  width: 13px;
  height: 13px
}

.news-item .date {
  color: #777;
  margin-right: 6px
}

/* Product grid (首頁縮圖 142px) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  align-items: start
}

.product-item {
  text-align: center
}

.product-item img.pic-border-2 {
  width: 185px;
  height: auto;
  border: 1px solid #dcdcdc;
  padding: 2px
}

/* Service flow (水平步驟 + 箭頭) */
.service-flow {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--line)
}

.flow-title {
  display: block;
  width: 221px;
  height: auto;
  margin: 0 0 8px
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px
}

.flow-number {
  width: 24px;
  height: auto
}

.flow-icon {
  height: 28px;
  width: auto
}

.flow-arrow {
  height: 18px;
  width: auto
}

/* Sidebar helpers */
.sidebar .box {
  margin-bottom: 12px
}

.sidebar .box .box-title img {
  width: auto
}

.quick-message textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid #ccc;
  padding: 6px;
  font-size: 12px
}

.quick-message .contact-item {
  display: flex;
  align-items: center;
  gap: 6px
}

.quick-message input[type="text"],
.quick-message input[type="email"],
.quick-message input[type="tel"] {
  flex: 1;
  border: 1px solid #ccc;
  padding: 4px;
  font-size: 12px
}

/* Right sidebar contact */
.contact-list .contact-item {
  display: flex;
  align-items: center;
  gap: 6px
}

.contact-list p {
  margin: 0;
  font-size: 12px;
  color: #0a4aa6;      /* 文字變藍色 */
  cursor: pointer;     /* 游標變手指 */
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.contact-list p:hover {
  text-decoration: underline; /* 滑鼠懸停時底線 */
}

.contact-list h3 {
  margin: 0.5rem;
}
/* Footer tweaks */
.footer-links .foot-link {
  color: #111;
  text-decoration: none
}

/* === Legacy home layout tweaks (match old index) === */

/* Main grid is already 211px | 1fr | 221px from base. Keep full-width main. */

/* Section blocks */
.section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 10px auto;
  width: 94%
}

/* Focus/topic (左小圖 + 右文) */
.focus-wrap {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 10px 12px;
  width: 94%;
  margin: 0 auto
}

.focus-wrap .focus-pic {
  width: 88px;
  border: 1px solid #dcdcdc;
  padding: 2px
}

.focus-wrap h2 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #114e9e
}

.focus-wrap p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7
}

/* News list under focus */
.news-block {
  padding: 6px 12px 12px;
  width: 94%;
  margin: 0 auto
}

.news-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px
}

.news-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px
}

.news-list .dot {
  width: 13px;
  height: 13px
}

.more-link {
  margin-left: auto
}

/* Hot products in 4 columns with dotted vertical separators */
.product-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 185px);
  justify-content: space-around;
  row-gap: 24px;
  padding: 10px 0
}

.product-item {
  padding: 0 10px;
  text-align: center;
  position: relative
}

.product-item:not(:nth-child(4n))::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  border-right: 1px dotted #cfcfcf
}

.product-item img.pic-border-2 {
  width: 185px;
  height: auto;
  border: 1px solid #dcdcdc;
  padding: 2px
}

.product-item .caption {
  margin-top: 6px;
  font-size: 12px
}

/* Right column blocks */
.rightbox {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 10px 0;
  padding: 8px 10px;
  background: #fff;
}

.rightbox .titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px
}

.person p {
  margin: 0;
  font-size: 13px;
  color: #666
}

.flow-vertical {
  display: grid;
  gap: 10px
}

.flow-row {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dotted #ddd
}

.flow-row:last-child {
  border-bottom: none
}

.flow-num {
  width: 26px
}

.flow-ico {
  height: 28px
}

.testimony-long .person {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 8px 0
}

.testimony-long .avatar {
  width: 57px;
  height: 55px;
  border: 0
}

.testimony-long .name {
  color: #f60;
  font-weight: 700;
  margin-bottom: 2px
}

.benefits .item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dotted #eee
}

.benefits .badge {
  min-width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #7bc67b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700
}

.benefits .desc {
  font-size: 12px
}

.project-list ol {
  margin: 0;
  padding-left: 20px
}

.project-list li {
  padding: 6px 0;
  border-bottom: 1px dotted #ddd
}

.project-list li:last-child {
  border-bottom: none
}

.client-list ul {
  margin: 0;
  padding-left: 20px
}

.client-list li {
  padding: 6px 0;
  border-bottom: 1px dotted #ddd
}

.client-list li:last-child {
  border-bottom: none
}

/* Left column extra boxes (全省服務＋招租中...) */
.box .titlebar img {
  height: 14px
}

.taiwan-service {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 8px;
  align-items: start
}

.titlebar-orange {
  display: flex;
  justify-content: center;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px 4px 0 0
}

.titlebar-orange img {
  height: 100%
}

.rightbox.orange {
  padding: 0;
  border-color: #f2b36b
}

.rightbox.orange .inner {
  padding: 8px 10px
}

/* Numbered list with small icons */
.numlist {
  list-style: none;
  margin: 0;
  padding: 0
}

.numlist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px dotted #ddd
}

.numlist li img {
  width: 20px;
  height: 25px
}

/* === Middle grid: main content + mid rail (流程/效益) === */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 2px;
  align-items: start
}

.mid-rail {
  border-left: 1px solid #d9d9d9;
  padding-left: 10px
}

.mid-rail .rightbox {
  margin: 0 0 12px 0;
  padding: 8px 10px
}

.mid-rail .titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px
}

.mid-rail .flow-vertical {
  display: grid;
  gap: 10px
}

.mid-rail .flow-row {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dotted #ddd
}

.mid-rail .flow-row:last-child {
  border-bottom: none
}

.mid-rail .benefits .item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dotted #eee
}

.mid-rail .benefits .item:last-child {
  border-bottom: none
}

.mid-rail .benefits .badge {
  min-width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #7bc67b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700
}

/* 熱門產品：固定每格寬度，圖片強制不超出格子 */
.product-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 185px);
  /* 每列 4 格 */
  justify-content: space-around;
  row-gap: 22px;
}

.product-grid-4 .product-item {
  width: 185px;
  overflow: hidden;
  /* 就算圖片更大也不會溢出 */
  text-align: center;
}

/* 圖片一律跟格子等寬；忽略 HTML 上的 width/height */
.product-grid-4 .product-item img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #dcdcdc;
  padding: 2px;
  background: #fff;
}

/* 如果你有虛線分隔線（用 :after 画的），保持在格子內對齊 */
.product-grid-4 .product-item:not(:nth-child(4n))::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  border-right: 1px dotted #cfcfcf;
}

.product-grid-4 .product-item {
  position: relative;
}