.phone-1{position:fixed;right:1%;top:40%;z-index:1000;}

/*手機版-側欄浮動按鈕-縮小*/
@media (max-width: 430px){ 
  .phone-1, .fb, .line-1, .ig, .map, .wechat, .shop-1, .x-twitter, .pixnet, .youtube-1, .tiktok , .thread , .messenger-link , .mail-1 { 
    transform: scale(0.8);
    right:0;
  }
}


/*根元素*/
:root{
--white:#ffffff; /* 背景(白) var(--white)*/
--black:#000000; /* 段落文字  var(--black)*/
--card:#f1f1f1; /* 卡片底(淺灰) var(--card)*/
--text:#2b302d; /* 主要文字 var(--text)*/
--text2:#c09553; /* h3次要文字 var(--text2)*/
--text3:#00bcd4; /* h4次要文字 var(--text3)*/
--text4:#20bcd4; /* 次要文字 var(--text4)*/
--shadow: 0 5px 10px rgba(0,0,0,.25); /* 陰影 var(--shadow)*/
--gradient: linear-gradient(120deg, #6f86d6 0%, #48c6ef 100%); /* 漸層 var(--gradient)*/
}

/*logo&頁籤選單文字區塊左右靠齊*/
.topnavbar {
    background-color: #fff;/*頁籤底圖顏色;background-color: rgba(255,255,255,0);透明Transparent*/
    position: relative;/*relative 頁籤&banner分開不重疊;頂置 fixed;*/
    line-height: 0;
    padding: 0;
}

.topnavbar .container {
  padding: 0;  /* 清除內距 */
  display: flex;
  align-items: center;  /* center上下置中; flex-end靠下; */
  justify-content: space-around; /* 平均分配 */
  text-align: center;
}

.topnavbar .container #logo, 
.topnavbar .container #nav { 
  width: 100%; 
}

@media only screen and (min-width: 768px){ 
  .topnavbar .container #logo { text-align: left; }/* 讓頁籤選單文字靠右 */ 
} /* 在螢幕寬度 768px 以上顯現 */

.topnavbar .container #nav { text-align: right; }/* 讓頁籤選單文字靠右 */

/*按鈕-回首頁&搜尋*/
body[data-type="fullpage"] .navbar .container {
    margin: 0 3vw 0 auto;
}

body {
    background-color: #fff;/*背景底色*/
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
/* 優先套用各平台預設英文字型（蘋果 / Windows / 安卓 / 舊版系統），中文字依序遞補套用 Noto Sans TC（思源黑體），最後由系統無襯線體（sans-serif）墊底 */
}


/*動到表格手機不會破版*/
table {
  table-layout: fixed;
  word-wrap:break-word;
} 

hr {
  border-top: 1px solid #ddd;
  border-bottom: 0;
  margin: 2em 0;
}

/*編輯欄設定*/
#main-wrap .container {
  font-size: clamp(16px, 2vw, 18px);
  color:  var(--black);
}/*編輯欄文字*/

body[data-type="fullpage"]:not(#managehome) #wrap>*:not(:last-child) {
    margin-bottom: 0px;
}

body[data-type="fullpage"] #product-header.main {
      min-height: auto;/*產品-編輯框不設定高*/
}

.fcol p{  
  line-height: 2;
  text-wrap: pretty ;  /*適用內文,段落避開孤字*/
 }

h1, h2, h3, h4, h5, h6 { 
  text-wrap: balance ;  /*適用標題和短文案,視覺效果更平衡*/
  font-family: 'Noto Serif TC', serif;
} 

.fcol h2 { 
  color: var(--text);
  font-size: clamp(26px, 3vw, 36px);/*最小值 首選值 最大值 限制屬性值區間*/
}

.fcol h3 { 
  color: var(--text);
  font-size: clamp(24px, 3vw, 30px);/*最小值 首選值 最大值 限制屬性值區間*/
}


/*nav*/
#nav ul li a {
    white-space: normal; /*自動換行*/
    font-size: 1.0rem;/*頁籤文字大小*/
    color: #000;/*頁籤文字顏色*/
    padding: 10px 20px;/*頁籤文字間隔;padding:2px 16px 2px 16px;*/
    line-height: 1.3;
    transition: .3s;
}

#nav ul li a:hover  {
    color: var(--text);/*頁籤滑過文字顏色*/
}
#nav ul li.current a {
    color: var(--text);/*頁籤按下後文字顏色*/
    font-weight: 500;
}

#nav .subnav {
    background-color: #fff;/*次頁籤底色*/
    max-width: 400px;/*次頁籤背景最大寬度*/
    width: max-content;/*最大內容*/
    text-align: left;
}

#nav .subnav .has-subnav span{
    max-width: 400px;/*次頁籤文字背景最大寬度*/
}

#nav li.has-subnav ul li.has-subnav>div a::after, #nav>ul>li.has-subnav>a::after {
    padding-left: 2px;/*下拉選單箭頭距離*/
}

/*產品頁*/
#side h3 {
  /*background-color: var(--card);*/
  background-image: var(--gradient);
  border-radius: 10px 10px 0 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}
#side ul li a {
  font-size: 16px;
  color: #333;
  border-bottom: 1px dashed #ddd;
}
#side ul li a:hover {
  color: var(--text);
}

ul.product-list li a {
    color: var(--text);/*產品格文字顏色*/
    background-color: #eee;/*產品格底色*/
}
ul.product-list li a:hover {
    color: var(--text2);/*產品格滑過文字顏色*/
}
.productdetail .detail-spec h2 {
    color: #333;
    font-size: 30px;
}/*產品內頁標題文字*/

/*分頁h1title h1標題視覺隱藏但可讀取*/
.h1title h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0); /* 舊版瀏覽器相容 */
  clip-path: inset(50%);  /* 現代標準寫法 */
  white-space: nowrap;
  border: 0;
}

a {
    color: var(--text2);/*連結顏色*/
    text-decoration: none;
}

.swiper-container {
  height: auto !important; /* 將容器預設的高拿掉 */
}

.swiper-wrapper, .swiper-slide {
  height: 0 !important;
  padding-bottom: calc(750 / 1920 * 100%); /* 自定響應式圖片高度 */
}

.swiper-slide {
  width: 100% !important; /* 強制圖片寬度隨容器變更 */
}

body.about-us .fcol:nth-child(-n+4) .container { width: 100%; padding: 0;}
body.about-us .fcol:nth-child(n+5):nth-child(-n+7)  { display:none; }

body.about-us .fcol.fcol-2 { background: var(--custom-bg-light); }

/* ==========================================
   全域變數與基礎設定 (未做任何更改)
   ========================================== */
:root {
  --custom-primary-color: #2b302d;    /* 主色：深灰黑 */
  --custom-accent-color: #c09553;     /* 強調色：暖金棕 */
  --custom-bg-light: #f6f1ea;         /* 淺灰背景 */
  --custom-text-main: #333333;        /* 深灰內文 */
  --custom-text-muted: #666666;       /* 次要灰色 */
  --custom-transition: all 0.3s ease; /* 統一動畫時間 */
}

/* 確保全域邊距一致 */
.custom-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.custom-section {
  padding: 2em 0;
}

.custom-bg-light {
  background-color: var(--custom-bg-light);
}

.custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 標題共用樣式 */
.custom-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  gap: 1em;
}

.custom-section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--custom-primary-color);
  margin: 0 0 8px 0;
}

.custom-section-subtitle {
  font-size: 14px;
  color: var(--custom-text-muted);
  margin: 0;
}

.custom-link-more {
  color: var(--custom-primary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: var(--custom-transition);
  border-bottom: 1px solid #999;
  padding-bottom: 5px;
}

.custom-link-more:hover {
  color: var(--custom-accent-color);
}
.custom-link-more:hover i {
    transform: translateX(5px);
  transition: var(--custom-transition);
}

/* ==========================================
   區塊二：營業項目 8 格 (figure & 滿版 absolute a 連結卡片)
   ========================================== */
.custom-grid-8 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
}

/* figure 容器，Reset 預設邊距並設定定位與陰影 */
.custom-service-card {
  position: relative; /* 供子元素 a 標籤絕對定位參考 */
  margin: 0;
  padding: 0;
  background: var(--custom-bg-light);
  border-radius: 0px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: var(--custom-transition);
  cursor: pointer;
}

/* 滿版覆蓋連結 */
.custom-card-link {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10; /* 確保位於圖文最上方，使整張卡片皆可點擊 */
}

/* 圖片外盒與縮放控制 */
.custom-card-img-box {
	position: relative;
    aspect-ratio: 16 / 9;
    /* overflow: hidden;*/
}

.custom-card-img-box .custom-img {
  transition: var(--custom-transition);
}

/* 圖示風格與動畫 */
.custom-card-icon {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: var(--custom-accent-color);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: var(--custom-transition);
  z-index: 2;
}

/* figcaption 文字內容區塊 */
.custom-card-body {
  padding: 28px 15px 15px 15px;
  text-align: center;
  margin: 0;
}

.custom-card-title {
  font-size: clamp(16px,2vw,18px) !important;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--custom-primary-color) !important;
  transition: var(--custom-transition);
}

.custom-card-desc {
  font-size: 14px;
  color: var(--custom-text-muted);
  margin: 0;
  line-height: 1.4 !important;
}

/* --- figure 滑過 (Hover) 動態反饋 --- */
.custom-service-card:hover {
  transform: translateY(-6px); /* 整張卡片微幅上浮 */
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12); /* 增強深邃陰影 */
}

.custom-service-card:hover .custom-card-img-box .custom-img {
  transform: scale(1.08); /* 圖片微幅放大 */
  filter: brightness(0.95); /* 圖片微暗凸顯文字 */
}

.custom-service-card:hover .custom-card-icon {
  background: var(--custom-primary-color); /* 圖示轉為品牌主色 */
  transform: translateX(-50%) translateY(-3px); /* 圖示微幅上提 */
}

.custom-service-card:hover .custom-card-title {
  color: var(--custom-accent-color); /* 標題變為金棕色 */
}

/* ==========================================
   區塊三：關於莘林 (About & Features)
   ========================================== */
.custom-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

.custom-about-banner {
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    height: 100%;
}

.custom-about-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-about-overlay {
  position: relative;
  z-index: 2;
  background: rgba(43, 48, 45, 0.85); /* 深灰背景遮罩 */
  color: #ffffff;
  padding: clamp(2em, 5vw, 3em);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.custom-about-title {
  font-size: 26px;
  margin: 0 0 16px 0;
  line-height: 1.3;
  color: var(--white) !important;
}

.custom-about-text {
  font-size: clamp(14px,2vw,18px);
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 24px;
}

.custom-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: var(--custom-transition);
  width: fit-content;
}

.custom-btn-outline-light {
  border: 1px solid #ffffff;
  color: #ffffff;
}

.custom-btn-outline-light:hover {
  background: #ffffff;
  color: var(--custom-primary-color);
}

/* 右側 2x2 理念樣式 */
.custom-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.custom-feature-item {
  background: var(--custom-bg-light);
  padding: 24px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-feature-icon {
  font-size: 28px;
  color: var(--custom-accent-color);
}

.custom-feature-content h3 {
  font-size: clamp(20px,3vw,24px);
  margin: 0 0 8px 0;
  color: var(--custom-primary-color);
      font-weight: 700;
}

.custom-feature-content p {
  font-size: clamp(14px,2vw,16px);
  color: var(--custom-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ==========================================
   區塊四：工程實績 6 格 (Portfolio)
   ========================================== */
.custom-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.custom-portfolio-card {
  background: var(--custom-bg-light);
  border-radius: 0px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.custom-portfolio-img-wrapper {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.custom-portfolio-img-wrapper .custom-img {
  transition: var(--custom-transition);
}

.custom-portfolio-card:hover .custom-img {
  transform: scale(1.08); /* 滑過放大效果 */
}

.custom-portfolio-title {
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--custom-primary-color);
}

/* ==========================================
   Footer 頁尾聯絡宣傳區塊
   ========================================== */
#footer {
    color: #fff;
    background-color: var(--custom-primary-color);
}

#foot-nav {
    display: flex;
    justify-content: center;
}

/* Flex 主架構佈局 */
.custom-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 1.5em 0;
}

/* ------------------------------------------
   1. 品牌 Logo 區
   ------------------------------------------ */
.custom-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 30px;
  border-right: 1px solid rgba(255, 255, 255, 0.2); /* 右側垂直分隔線 */
  flex-shrink: 0;
}

.custom-footer-logo-icon {
  font-size: 32px;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.custom-footer-logo-text {
  display: flex;
  flex-direction: column;
}

.custom-footer-company-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
  color: #ffffff;
}

.custom-footer-company-sub {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  font-weight: 500;
}

/* ------------------------------------------
   2. 品牌標語區
   ------------------------------------------ */
.custom-footer-slogan {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 30px;
  padding-left: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.2); /* 右側垂直分隔線 */
  flex-grow: 1;
}

.custom-slogan-primary {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #ffffff;
  margin-bottom: 4px;
}

.custom-slogan-secondary {
  font-size: 14px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.85);
}

/* ------------------------------------------
   3. 電話諮詢區
   ------------------------------------------ */
.custom-footer-contact {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-right: 20px;
  flex-shrink: 0;
}

/* 白底圓形電話圖示：內部圖示深色採用全域主色 */
.custom-phone-icon-box {
  width: 44px;
  height: 44px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--custom-primary-color);
  font-size: 20px;
  flex-shrink: 0;
}

.custom-phone-info {
  display: flex;
  flex-direction: column;
}

.custom-phone-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #ffffff;
  margin-bottom: 2px;
}

.custom-phone-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

/* ------------------------------------------
   4. 行動按鈕區 (CTA Button)
   ------------------------------------------ */
.custom-footer-action {
  flex-shrink: 0;
}

.custom-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 28px;
  border: 1.5px solid #ffffff;
  border-radius: 30px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  background: transparent;
  transition: var(--custom-transition); /* 採用全域動態時間 */
}

/* 按鈕 Hover 反饋：切換為強調色 --custom-accent-color */
.custom-footer-btn:hover {
  background-color: var(--custom-accent-color);
  border-color: var(--custom-accent-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.custom-footer-btn i {
  transition: var(--custom-transition);
}

.custom-footer-btn:hover i {
  transform: translateX(4px); /* 箭頭向右微位移 */
}


/* ==========================================
   響應式斷點設定 (Media Queries)
   ========================================== */
/* 平板尺寸 (992px 以下) */
@media (max-width: 992px) {
  .custom-grid-8 {
    grid-template-columns: repeat(4, 1fr);
  }
  .custom-about-grid {
    grid-template-columns: 1fr;
  }
  .custom-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
    .custom-footer-content {
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
  }
  
  .custom-footer-brand,
  .custom-footer-slogan {
    border-right: none; /* 平板版面移除垂直分隔線 */
    padding-right: 0;
  }
  
  .custom-footer-slogan {
    padding-left: 0;
    text-align: center;
  }
}

/* 手機平板過渡 (768px 以下) */
@media (max-width: 768px) {
  .custom-grid-8 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 手機極小螢幕 (576px 以下) */
@media (max-width: 576px) {
  .custom-section {
    padding: 40px 0;
  }
  .custom-grid-8,
  .custom-grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .custom-footer-content {
    flex-direction: column; /* 改為直立單欄 */
    text-align: center;
    gap: 20px;
  }

  .custom-footer-brand {
    flex-direction: column;
    gap: 8px;
  }

  .custom-footer-contact {
    padding-right: 0;
    flex-direction: column;
    gap: 10px;
  }

  .custom-footer-action {
    width: 100%;
    max-width: 280px;
  }

  .custom-footer-btn {
    width: 100%;
    box-sizing: border-box;
  }
}