/*根元素*/
:root{
--bg:#ffffff; /* 背景(白) var(--bg)*/
--p:#000000; /* 段落文字 var(--p)*/
--card:#f1f1f1; /* 卡片底(淺灰) var(--card)*/
--text:#252b5d; /* 主要文字(深藍) var(--text)*/
--text2:#ff9900; /* 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, #252b5d 0%, #707ba0 100%); /* 漸層 var(--gradient)*/
}

/*回首頁按鈕隱藏*/
.navbar-nav { display: none; }

.topnavbar {
  background-color: var(--text);
    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, 32px);/*最小值 首選值 最大值 限制屬性值區間*/
  line-height:2;
}

.fcol h3 { 
  color: var(--text2);
  font-size: clamp(24px, 3vw, 30px);/*最小值 首選值 最大值 限制屬性值區間*/
}

.fcol h4 { 
  color: var(--text3);
  font-size: clamp(20px, 3vw, 24px);/*最小值 首選值 最大值 限制屬性值區間*/
}

/*nav*/
#nav { margin-right: 6vw; }
#nav ul li a {
    white-space: normal; /*自動換行*/
    font-size: 15px;/*頁籤文字大小*/
    color: var(--bg);/*頁籤文字顏色*/
    padding: 10px 15px;/*頁籤文字間隔;padding:2px 16px 2px 16px;*/
    line-height: 1.3;
    transition: .3s;
  height: 10vh;
  display: flex;
  align-items: center;
}

#nav ul li a:hover  {
    color: var(--text);/*頁籤滑過文字顏色*/
  background-color: #fff;
}
#nav ul li.current a {
    color: var(--text);/*頁籤按下後文字顏色*/
  background-color: #fff;
    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;
}/*產品內頁標題文字*/

.fcol.fcol-header { display: none; }/*分頁標題隱藏*/

/*title文字顏色*/
.h1title h1{
    color: var(--text);
}

a {
    color: var(--text2);/*連結顏色*/
    text-decoration: none;
}

.swiper-container {
  height: auto !important; /* 將容器預設的高拿掉 */
}
.swiper-wrapper, .swiper-slide {
  height: 0 !important;
}
.swiper-slide {
  width: 100% !important; /* 強制圖片寬度隨容器變更 */
}
/* 首頁 */
#bodyinhome .swiper-wrapper, #bodyinhome .swiper-slide {
  padding-bottom: calc(0 / 1920 * 100%); /* 首頁 banner 大小 */
}
/* 內頁 */
#bodyinpage .swiper-wrapper, #bodyinpage .swiper-slide {
  padding-bottom: calc(0 / 1920 * 100%); /* 內頁 banner 大小 */
}

.fcol.fcol-1 .container { width: 100% ; padding: 1em 0;}
body.servics .fcol.fcol-1 .container { width: 100% ; padding: 21px;}
.fcol.fcol-2, .fcol.fcol-3, .fcol.fcol-4, .fcol.fcol-5, .fcol.fcol-6 {display: none; }/*編輯欄隱藏*/

/*footer*/
#footer {
    color: var(--bg);
    background-image: var(--gradient);
}
#foot-nav { display: none; }/*footer下頁籤隱藏*/
.footer-edit { padding: 2em; }

@media (min-width: 1280px) {
    body[data-type="fullpage"] .container {
        width: 1280px;
    }
}


/*contact-us*/
.contact-box { padding: 0 clamp(8px, 2vw, 14px); }
.contact-box [class^="col-"]:nth-child(1) {  min-height: 50vh;}
.contact-box [class^="col-"]:nth-child(5) {  min-height: 15vh;}
.contact-box { 
  background-attachment: scroll;
  background-repeat: no-repeat;
  background-image: url(https://static.iyp.tw/409889/files/06021472-9f4f-4f4c-bb5d-d456a7a7e782.jpg);
  background-position: center;
  background-size: cover;
  padding: 0;
}
.contact-box [class^="col-"] { 
  padding: 0;
  border: 8px solid #fff;
     box-sizing: border-box;
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
}
.contact-box [class^="col-"]:nth-child(2) {
  background-image: -webkit-linear-gradient(-45deg, #252b5ddd 0%, #252b5ddd 100%),url(https://static.iyp.tw/409889/files/480225c1-231e-4722-8ea2-0157470dd1b6.jpg);
  padding: clamp(1em, 3vw, 2em);
}
@media only screen and (max-width: 430px){ 
  .contact-box [class^="col-"] {  border: 2px solid #fff; }
}

/*index banner分割grid;*/
.banner-box { 
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  grid-template-columns: 2fr 1fr 2fr 1fr 2fr;
  gap: clamp(5px, 1.2vw, 16px);
}
.banner-box div { background-color: var(--card); }
.banner-box img {  
  display: block; 
  width: 100%;
  height: 100%;
  max-height: 25vh;
  object-fit: cover;
  opacity:1;
  transition:0.7s
}
.banner-box img:hover { opacity:0.5; }

/*index banner分割-點圖放大*/
.lightbox-1 {
  /* Default to hidden */
  display: none;

  /* Overlay entire screen */
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  
  /* A bit of padding around image */
  padding: 1em;

  /* Translucent background */
  background: rgba(0, 0, 0, 0.8);
}

/* Unhide the lightbox when it's the target */
.lightbox-1:target {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lightbox-1 img {
  /* Full width and height */
  display: block;
  width: auto;
  height: auto;
  
  /* Size and position background image */
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  margin: 0 auto;

}
.lightbox-1 span {
  display:block;
  color: #fff;
  text-align: center;
}
.lightbox-1 i {
  position: relative;
  top: -1%;
  left: 95%;
  font-size: clamp(20px, 3vw, 30px);
  color: #fff;
}