/**
 * JCB Service 區塊專用樣式
 * 模組化設計，獨立於其他樣式檔案
 */

/* ==================== 滿版白色三角形分割線 ==================== */
.white-triangle-divider {
  position: relative;
  width: 100vw;
  height: 200px;
  overflow: visible;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  z-index: 1;
}

.white-triangle-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30px;
  background: #FFFFFF;
  width: 110%;
  height: 100%;
  clip-path: polygon(0% 0%, 100% 100%, 100% 0%);
  margin-top: -50px;
  z-index: 2;
}

/* ==================== JCB Service 區塊分割線 ==================== */
 .jcb-service-section-divider {
  position: relative;
  width: 100vw;
  height: 230px;
  overflow: visible;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  z-index: 1;
}
.jcb-service-section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30px;
  background: #F1F1F4;
  width: 110%;
  height: 100%;
  clip-path: polygon(0% 0%, 100% 100%, 100% 0%);
  margin-top: -74px;
  z-index: 2;
}


/* ==================== JCB Service 基礎佈局 ==================== */
.jcb-service {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 0;
  gap: 0px;
  width: 100vw;
  background: #FFFFFF;
  min-height: 800px;
  /* 使用負邊距讓區塊突破父層限制，實現滿版效果 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.jcb-service .sec-inner {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 150px;
  margin-bottom: -80px;
}

.jcb-service .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

/* ==================== 區塊標籤 ==================== */
.jcb-service .section-label {
  position: absolute;
  top: 40px;
  left: 120px;
  z-index: 2;
}

.jcb-service .section-label span {
  display: inline-block;
  background: linear-gradient(90deg, #1F286F 0%, #006FBB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 72px;
  font-weight: bold;
  line-height: 1.2;
  text-align: left;
  margin: -0px 0 0 10px;
}

/* ==================== 主標題 ==================== */
.jcb-service .service-main-title {
  font-size: 36px;
  color: #1F286F;
  font-weight: bold;
  text-align: center;
  margin: 0;
  width: 100%;
}

/* ==================== 副標題圖片 ==================== */
.jcb-service .subtitle-image-container {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

/* PC版副標題圖片 - 預設顯示 */
.jcb-service .subtitle-image-container .is-pc {
  max-width: 85%;
  height: auto;
  display: block;
}

/* SP版副標題圖片 - 預設隱藏 */
.jcb-service .subtitle-image-container .is-sp {
  max-width: 85%;
  height: auto;
  display: none;
}

/* ==================== 四格服務選單 ==================== */
.service-cards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: visible;
}

/* 兩欄佈局的錯落效果 - 768px以上 */
@media (min-width: 768px) {
  /* 桌面版：顯示PC圖示，隱藏SP圖示 */
  .jcb-service .subtitle-image-container .is-pc {
    display: block !important;
    max-width: 85%;
    height: auto;
  }
  
  .jcb-service .subtitle-image-container .is-sp {
    display: none !important;
  }

  
  
  /* 卡片1,3 (左欄) 增加左側padding並調整陰影 */
  .service-card.card-more-left {
    margin-left: auto;
    margin-right: 15%;
  }
  
  .service-card.card-more-left.card-brown {
    box-shadow: 6px 6px 0px #B98224;
  }
  
  .service-card.card-more-left.card-blue {
    box-shadow: 6px 6px 0px #024AB3;
  }
  
  /* 卡片2,4 (右欄) 增加右側padding並調整陰影 */
  .service-card.card-more-right {
    margin-left: 0px;
    margin-right: auto;
  }
  
  .service-card.card-more-right.card-brown {
    box-shadow: 6px 6px 0px #B98224;
  }
  
  .service-card.card-more-right.card-blue {
    box-shadow: 6px 6px 0px #024AB3;
  }
  
  /* 兩欄佈局 hover 效果調整 */
  .service-card.card-more-left.card-brown:hover {
    box-shadow: 8px 8px 0px #B98224;
  }
  
  .service-card.card-more-left.card-blue:hover {
    box-shadow: 8px 8px 0px #024AB3;
  }
  
  .service-card.card-more-right.card-brown:hover {
    box-shadow: 8px 8px 0px #B98224;
  }
  
  .service-card.card-more-right.card-blue:hover {
    box-shadow: 8px 8px 0px #024AB3;
  }
}

.service-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: visible;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 棕色邊框卡片 (卡片1,2) */
.service-card.card-brown {
  box-shadow: 6px 6px 0px #8B4513;
}

/* 藍色邊框卡片 (卡片3,4) */
.service-card.card-blue {
  box-shadow: 6px 6px 0px #1F286F;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card.card-brown:hover {
  box-shadow: 8px 8px 0px #8B4513;
}

.service-card.card-blue:hover {
  box-shadow: 8px 8px 0px #1F286F;
}

/* 卡片圖片容器 */
.jcb-service .card-image {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.jcb-service .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.service-card:hover .card-image img {
  transform: scale(1.05);
}
  
/* More按鈕區塊 - 包含標題、副標題和More按鈕 */
.card-more-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px 0 0 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 120px;
  text-align: center;
  transition: all 0.3s ease;
}

/* 棕色卡片 (卡片1,2) 的樣式 */
.card-brown .card-more-button {
  background: linear-gradient(90deg, #572720 0%, #843D22 100%);
}

/* 藍色卡片 (卡片3,4) 的樣式 */
.card-blue .card-more-button {
  background: rgba(31, 40, 111, 0.9);
}

/* More按鈕左側位置 (卡片1,3) - 向左突出 */
.card-more-left .card-more-button {
  left: -70px;
}

/* More按鈕右側位置 (卡片2,4) - 向右突出 */
.card-more-right .card-more-button {
  right: -70px;
}

/* 卡片標題樣式 */
.card-more-button .card-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

/* 卡片副標題樣式 */
.card-subtitle {
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #FFFFFF;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
}

.card-line {
  width: 80%;
  height: 1px;
  background: #FFFFFF; /* 透明度0.5 */ 
  margin: 10px auto 0 auto;
}

/* More文字區域 */
.more-text {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 棕色卡片的More按鈕樣式 */
.card-brown .more-text {
  background: linear-gradient(90deg, #FFEFBC 0%, #FBF4C0 50%, #E9CA6D 100%);
}

/* 藍色卡片的More按鈕樣式 */
.card-blue .more-text {
  background: linear-gradient(90deg, #C7C9CB 0%, #D9DBDB 25%, #EBECEA 75%, #A3A6AC 100%);
}

.more-text span {
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #8B4513;
  margin: 0;
}

.card-blue .more-text span {
  color: #1F286F;
}


.service-card:hover .card-more-button {
  transform: translateY(-50%) scale(1.1);
}


/* ==================== 了解更多按鈕 ==================== */
.jcb-service .learn-more-container {
  display: flex;
  justify-content: center;
  margin: 40px 0;
  z-index: 2;
}

.jcb-service .learn-more-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(90deg, #1F286F 0%, #006FBB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
}

.jcb-service .learn-more-button:hover {
  transform: translateY(-2px);
}

.jcb-service .learn-more-button .arrow-icon {
  height: 15px;
  margin-top: -10px;
}

/* ==================== 區塊分割線（左下往右上斜線） ==================== */
.jcb-service .section-divider-diagonal {
  position: relative;
  width: 100vw;
  height: 200px;
  overflow: visible;
  z-index: 1;
  /* 使用負邊距讓三角形突破父層限制，實現滿版效果 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.jcb-service .section-divider-diagonal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30px;
  background: #FFFFFF;
  width: 110%;
  height: 100%;
  /* 左下往右上的直角三角形 */
  clip-path: polygon(0% 100%, 100% 0%, 100% 100%);
  margin-top: -70px;
}

/* ==================== 響應式設計 ==================== */

/* 超大螢幕調整 (min-width: 1201px) */
@media (min-width: 1201px) {
  /* 區塊標籤向右移動到中間偏左位置 */
  .jcb-service .section-label {
    left: 30%;
    transform: translateX(-50%);
  }
  
  .jcb-service .section-label span {
    font-size: 96px;
    font-weight: bold;
    margin: 0px 0 0 10px;
  }

  .jcb-service .subtitle-image-container .is-pc {
    max-width: 55%;
    height: auto;
    display: block;
  }
}

/* 大螢幕調整 (max-width: 1200px) */
@media (max-width: 1200px) {
  .jcb-service .sec-inner {
    padding: 0 120px;
  }
}

/* 中等螢幕調整 (959px ~ 769px) */
@media (max-width: 959px) and (min-width: 769px) {
  .jcb-service .sec-inner {
    padding: 0 80px;
  }
  
  .service-cards-container {
    max-width: 600px;
    gap: 24px;
  }
  
  /* 中等螢幕：顯示PC圖示，隱藏SP圖示 */
  .jcb-service .subtitle-image-container .is-pc {
    display: block !important;
    max-width: 85%;
    height: auto;
  }
  
  .jcb-service .subtitle-image-container .is-sp {
    display: none !important;
  }

}

/* 小螢幕 - 改為單欄佈局 (max-width: 767px) */
@media (max-width: 767px) {
  .jcb-service {
    padding: 60px 0;
    gap: 32px;
  }
  
  .jcb-service .sec-inner {
    padding: 0 40px;
    margin-bottom: -40px;
  }
  
  .jcb-service .inner {
    gap: 20px;
  }
  
  /* 區塊標籤調整 */
  .jcb-service .section-label {
    top: 20px;
    left: 60px;
  }
  
  .jcb-service .section-label span {
    font-size: 72px;
    font-weight: bolder;
    margin: 50px 0 0 0;
  }
  
  .jcb-service .service-main-title {
    font-size: 28px;
    margin: 0 0 0 0;
    padding: 0 20px;
  }

  .jcb-service .subtitle-image-container {
    margin-bottom: 40px;
    padding: 0 20px;
  }
  
  /* 平板版：隱藏PC圖示，顯示SP圖示 */
  .jcb-service .subtitle-image-container .is-pc {
    display: none !important;
  }
  
  .jcb-service .subtitle-image-container .is-sp {
    display: block !important;
    max-width: 70%;
    height: auto;
  }

  .jcb-service .section-divider-diagonal {
    height: 150px;
  }
  
  .jcb-service .section-divider-diagonal::before {
    width: 100%;
    height: 400%;
    clip-path: polygon(0% 20%, 100% 0%, 100% 20%);
    margin-top: -120px;
    left: 0;
  }
  
  /* 四格選單改為單欄 */
  .service-cards-container {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 20px;
  }

  .service-card {
    position: relative;
    display: block;
    width: 60%;
    overflow: visible;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
  }
  
  /* 單欄佈局錯落效果 - 卡片1,3 增加左側padding並調整陰影 */
  .service-card.card-more-left {
    margin-left: auto;
    margin-right: 15%;
  }
  
  .service-card.card-more-left.card-brown {
    box-shadow: 6px 6px 0px #B98224;
  }
  
  .service-card.card-more-left.card-blue {
    box-shadow: 6px 6px 0px #024AB3;
  }
  
  /* 單欄佈局錯落效果 - 卡片2,4 增加右側padding並調整陰影 */
  .service-card.card-more-right {
    margin-left: 15%;
    margin-right: auto;
  }
  
  .service-card.card-more-right.card-brown {
    box-shadow: 6px 6px 0px #B98224;
  }
  
  .service-card.card-more-right.card-blue {
    box-shadow: 6px 6px 0px #024AB3;
  }
  
  /* 單欄佈局 hover 效果調整 */
  .service-card.card-more-left.card-brown:hover {
    box-shadow: 8px 8px 0px #B98224;
  }
  
  .service-card.card-more-left.card-blue:hover {
    box-shadow: 8px 8px 0px #024AB3;
  }
  
  .service-card.card-more-right.card-brown:hover {
    box-shadow: 14px 8px 0px #B98224;
  }
  
  .service-card.card-more-right.card-blue:hover {
    box-shadow: 14px 8px 0px #024AB3;
  }

}

/* 手機版 (max-width: 480px) */
@media (max-width: 480px) {
  .jcb-service-section-divider {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: visible;
    margin-left: calc(50% - 80vw);
    margin-right: calc(50% - 50vw);
    z-index: 1;
}

.jcb-service-section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100px;
  background: #F1F1F4;
  width: 150%;
  height: 100%;
  clip-path: polygon(0% 0%, 100% 100%, 100% 0%);
  margin-top: -74px;
  z-index: 2;
}

  .jcb-service {
    padding: 40px 0;
    gap: 24px;
  }

  .jcb-service .sec-inner {
    padding: 0 20px;
  }
  
  .jcb-service .inner {
    gap: 10px;
    margin-top: -100px;
  }
  
  /* 區塊標籤手機版調整 */
  .jcb-service .section-label {
    top: 15px;
    left: 15px;
  }
  
  .jcb-service .section-label span {
    font-size: 60px;
    font-weight: bolder;
    margin: 10pxs 0 0 0;
  }
  
  .jcb-service .service-main-title {
    font-size: 24px;
    margin-top: 160px;
  }
  
  .jcb-service .section-divider-diagonal {
    height: 100px;
  }

  /* 手機版：隱藏PC圖示，顯示SP圖示 */
  .jcb-service .subtitle-image-container .is-pc {
    display: none !important;
  }
  
  .jcb-service .subtitle-image-container .is-sp {
    display: block !important;
    max-width: 80%;
    height: auto;
  }
  
  /* 手機版卡片高度調整 */
  .service-card {
    width: 70%;
    margin: auto;
  }
  
  .jcb-service .section-divider-diagonal::before {
    left: -12px;
    width: 110%;
    height: 400%;
    clip-path: polygon(0% 20%, 100% 0%, 100% 20%);
    margin-top: -120px;
  }

  .jcb-service .learn-more-container {
    display: flex;
    justify-content: center;
    margin: 40px 0 70px 0;
  }
}