.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{
--bg:#ffffff; /* 背景(白) var(--bg)*/
--p:#000000; /* 段落文字 var(--p)*/
--card:#f1f1f1; /* 卡片底(淺灰) var(--card)*/
--text:#003878; /* 主要文字(藍) var(--text)*/
--text2:#0c6db8; /* h3次要文字(藍) var(--text2)*/
--text3:#64acff; /* h4次要文字(淺藍) var(--text3)*/
--text4:#ff0000; /* 次要文字(紅) var(--text4)*/
--shadow: 0 5px 10px rgba(0,0,0,.25); /* 陰影 var(--shadow)*/
--gradient: linear-gradient(120deg, var(--text) 0%, var(--text2) 100%); /* 漸層 var(--gradient)*/
}

.topnavbar {
    background-color: #fff;/*頁籤底圖顏色;background-color: rgba(255,255,255,0);透明Transparent*/
    position: relative;/*relative 頁籤&banner分開不重疊;頂置 fixed;*/
    line-height: 0;
    padding: 0;/*頁籤間距*/
}

.topnavbar .container {
  text-align: justify;
  padding: 0;
}

.topnavbar .container::after {
  display: inline-block;
  width: 100%;
}

body {
    background-color: #fff;/*背景底色*/
    font-family: 'Noto Sans TC', sans-serif;/*套用google font字型Noto Sans TC黑體*/
}

#logo h1 { text-align: center; }

/*動到表格手機不會破版*/
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(--p);
}/*編輯欄文字*/

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 ;  //適用標題和短文案,視覺效果更平衡
} 

.fcol h2 { 
  color: var(--text);
  font-size: clamp(26px, 3vw, 36px);/*最小值 首選值 最大值 限制屬性值區間*/
}

.fcol h3 { 
  color: var(--text2);
  font-size: clamp(24px, 3vw, 30px);/*最小值 首選值 最大值 限制屬性值區間*/
}

.fcol h4 { 
  color: var(--text3);
  font-size: clamp(20px, 3vw, 24px);/*最小值 首選值 最大值 限制屬性值區間*/
}

/*nav*/
#nav {
    vertical-align: bottom;
}
#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.4em;
  font-weight: 700;
  color: var(--bg);
}
#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 p{
    color: #333;
    font-size: 30px;
}/*產品內頁標題文字*/


/*分頁title文字*/
.h1title h1 {
  color: var(--text);
  text-align: center;
}

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.fcol-header { display: none; }

body.about-us .fcol.fcol-1,
body.about-us .fcol.fcol-2 {
   width: 100%;
   background-attachment: fixed; /*fixed固定背景; scroll捲動背景*/
   background-repeat: no-repeat;
   background-position:center;
   background-size: cover;/*cover圖片剪裁不拉伸壓縮 ; contain不拉伸壓縮.等比縮放)*/
   background-image: url(https://static.iyp.tw/409914/files/8dc44f3a-30df-4c1a-b1fa-84d152bada3e.jpg);
  padding:3em 0;
}

body.about-us .fcol.fcol-3 {
  width: 100%;
  background-repeat: no-repeat;
  background-position:80% 50%;
  background-size: cover;  
 background-image: -webkit-linear-gradient(top, #ffffff00 16vh ,var(--card)  16vh ,var(--card)  70vh , #ffffff 100vh),url(https://static.iyp.tw/409914/files/9c7fb92d-0bc2-4648-90f4-eaa563174307.jpg);
}

body.about-us .fcol.fcol-6 {
  width: 100%;
  background-repeat: no-repeat;
  background-position:50% 50%;
  background-size: cover;  
 background-image: -webkit-linear-gradient(top, #0002 0% , #0002 100%),url(https://static.iyp.tw/409914/files/dd818bf6-0fe8-442d-b9f1-cefc952f8dca.jpg);
  padding:3em 0;
}

/*優勢*/
.icon-1>div { padding: 10px; }
.icon-1 i {
  font-size: clamp(3em, 6vw, 4em);
  color: var(--text3);
}
.icon-1 h4 {
  font-size: clamp(18px, 3vw, 22px);
  color: var(--text);
}
.icon-1 p {
  font-size: clamp(14px, 2vw, 16px);
  color: #333;
  line-height: 1.5;
  text-align: justify;
}
/*產品-區塊項目li效果—3格*/
.pro_item ul {
  display: flex;
  flex-wrap: wrap;
  gap:10px;
  margin-top: 1em;
}
.pro_item ul li {
    padding: 5px;
    width: calc(50% - 10px);
    line-height: 1.5;
    border: 1px solid #dddddd;
    color: #fff;
    background-image: var(--gradient);
  font-size: clamp(14px, 3vw, 20px);
  font-weight: 500;
  text-align: center;
}


.frame img {
	width: 100%;
	height: auto;
	background-color: #F0F0F0; /*背景顏色*/ 
	padding: 0px; /*物件內的間距*/
	border: 1px solid #D5D5D5; /*邊框樣式（solid直線 dotted點狀線 dashed虛線）*/
object-fit: cover;  /*cover圖片剪裁不拉伸壓縮 ; contain不拉伸壓縮.等比縮放)*/
aspect-ratio: 4 / 3; /*比例*/
}

/* Timeline-歷史沿革 */
.timeline {
  border-left: 4px solid var(--text2);
  border-bottom-right-radius: 2px;
  border-top-right-radius: 2px;
  color: #333;
  margin: 0 2vw 0 9vw;
  letter-spacing: 0.5px;
  position: relative;
  line-height: 1.4em;
  padding: 60px 0 20px 20px;
  list-style: none;
  text-align: left;
}

.timeline .event {
  border-bottom: 1px solid var(--card);
  padding: 15px 0;
  position: relative;
  margin-bottom: 10px;
}

.timeline .event:last-of-type {
  padding-bottom: 0;
  margin-bottom: 0;
  border: none;
}

.timeline .event:before,
.timeline .event:after {
  position: absolute;
  display: block;
  top: 0;
}

.timeline .event:before {
  left: -170px;
  color: var(--text2);
  content: attr(data-date);
  text-align: right;
  font-size: clamp(16px,3vw,20px);
  min-width: 120px;
}

.timeline .event:after {
    box-shadow: 0 0 0 6px var(--text2);
    left: -28px;
    background: #ffffff;
    border-radius: 50%;
    height: 11px;
    width: 11px;
    content: "";
    top: 5px;
}
.timeline p {
  padding-top: 0;
  font-size: clamp(14px,2vw,16px);
  text-align: justify;
}

@media (max-width: 945px) {
  .timeline .event::before {
    left: 0.5px;
    top: 0px;
    min-width: 0;
  }
  .timeline p { padding-top: 20px; }
}

.timeline #p-txt { font-size: 10pt; color:#666; line-height: 1.5; padding-left: 15px;}


/* 組織架構 Grid 佈局 */
.children-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 切分為三欄 */
  gap: 27.3px; /* 卡片間距 */
}

/* 卡片與圖片樣式 */
.children-grid .card {
  border: 1px solid var(--text);
  padding: 0px;
  background-color: white;
  text-align: center;
}

.children-grid .card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.children-grid .caption { padding: clamp(5px, 1vw, 10px); }
.children-grid .caption p {   
  font-size: clamp(12px, 2vw, 18px);
  line-height: 1.5;
}

:root {
  --line-color: var(--text); /* 圖片中的藍色 */
  --line-width: 2px;
}
/* 1. 總公司下方的垂直短線 */
.connector-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vertical-line {
  width: var(--line-width);
  height: 20px;
  background-color: var(--line-color);
}

/* 2. 橫跨三台子公司的水平線 */
.horizontal-line {
  width: 45vw; /* 寬度剛好對準第一台與第三台的中間 */
  height: var(--line-width);
  background-color: var(--line-color);
  position: relative;
}

/* 3. 子公司上方的垂直短線 */
.children-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1vw;
}

.child {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vertical-line-short {
  width: var(--line-width);
  height: 20px;
  background-color: var(--line-color);
}

/*聯絡據點*/
.contact-box>div {
  background-color: var(--card);
  border: 5px solid #fff;
  padding: 15px;
}

/*footer*/
#footer {
    color: #333;
    background-color: var(--card);
}
#footer a { color: var(--text3); }
#footer a:hover { color: var(--text2); }

#foot-nav ul li a {
    display: block;
    color: #fff;
    font-size: 14px;
    margin-right: 15px;
    padding: 3px 10px;
    background-color: var(--text2);
    border-radius: 100vmax; /*弧度保持膠囊狀*/
}
#foot-nav ul li a:hover { background-color: #fff; color: #333;}

#foot-nav {
  clear: both;
  padding: 2em 0 1em;
  border-bottom: 0px solid #444;
  display: flex;
  justify-content: center;
}
