/**
 * Japan Tips 區塊專用樣式
 * 模組化設計，獨立於其他樣式檔案
 */

/* ==================== Japan Tips 基礎佈局 ==================== */
.japan-tips {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 0 250px 0;
  gap: 48px;
  width: 100vw;
  background-image: url('../img/04_japan_tips/bg_japan tips_PC_2x-min.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 900px;
  /* 使用負邊距讓區塊突破父層限制，實現滿版效果 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -150px;
}

.japan-tips .sec-inner {
  width: 100%;
  max-width: 1500px;
  margin: 120px auto 0 auto;
  padding: 0 150px;
}

.japan-tips .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

/* ==================== 區塊標籤 ==================== */
.japan-tips .section-label {
  position: absolute;
  top: 90px;
  right: 110px;
  z-index: 2;
}

.japan-tips .section-label span {
  display: inline-block;
  color: #FFFFFF;
  font-size: 84px;
  font-weight: bold;
  line-height: 1.2;
  text-align: right;
  margin: 0px 10px 0 0;
}

/* ==================== 主標題 ==================== */
.japan-tips .japan-main-title {
  font-size: 36px;
  color: #FFFFFF;
  font-weight: bold;
  text-align: left;
  margin: 0;
  width: 100%;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-top: 180px;
}

/* ==================== 副標題圖片 ==================== */
.japan-tips .subtitle-image-container {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 40px;
}

.japan-tips .subtitle-image-container img {
  max-width: 50%;
  height: auto;
}

/* ==================== 情報卡片區 ==================== */
.japan-tips-cards-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.japan-tips-card {
  position: relative;
  display: block;
  width: 80%;
  margin: 20px auto;
  aspect-ratio: 16/5; /* PC版圖片比例約為16:5 */
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.japan-tips-card:hover {
  transform: translateY(-4px);
}

.japan-tips-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.japan-tips-card:hover img {
  transform: scale(1.03);
}


/* 卡片內容覆蓋層 - 調整為右側區域 */
.japan-tips-card-overlay {
  position: absolute;
  top: 145px;
  right: 0;
  bottom: 0;
  left: 330px;
  background: rgba(26, 49, 120, 0.85);
  padding: 10px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
  height: 100px;
  width: 420px;
  overflow: visible;
}

.japan-tips-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.japan-tips-card-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* 最多顯示3行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.japan-tips-card-description {
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片More按鈕 - 位於右下角 */
.japan-tips-card-more {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 12px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  align-self: flex-end;
}

.japan-tips-card-more span {
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1A3178;
  margin: 0;
}

.japan-tips-card-more img {
  width: 10px;
  height: 10px;
  position: relative;
}

.japan-tips-card:hover .japan-tips-card-more {
  background: rgba(255, 255, 255, 1);
  transform: translateX(4px);
}

/* ==================== 了解更多按鈕 ==================== */
.japan-tips .learn-more-container {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.japan-tips .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;
  transition: transform 0.3s ease;
}

.japan-tips .learn-more-button:hover {
  transform: translateY(-2px);
}

.japan-tips .learn-more-button .arrow-icon {
  height: 15px;
  margin-top: -10px;
}

/* ==================== 區塊分割線（左上往右下斜線） ==================== */
.japan-tips .section-divider-reverse {
  position: relative;
  width: 100vw;
  height: 200px;
  overflow: visible;
  z-index: 1;
  /* 使用負邊距讓三角形突破父層限制，實現滿版效果 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.japan-tips .section-divider-reverse::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, #006FBB 0%, #1F286F 100%);
  width: 100%;
  height: 100%;
  /* 左上往右下的直角三角形，直角在左上角 */
  clip-path: polygon(0% 0%, 0% 100%, 100% 0%);
}

/* ==================== 響應式設計 ==================== */

/* 超大螢幕調整 (min-width: 1201px) */
@media (min-width: 1201px) {
  /* 區塊標籤向左移動到中間偏右位置 */
  .japan-tips .section-label {
    right: 25%;
    transform: translateX(50%);
    top: 30px;
  }
  
  .japan-tips .section-label span {
    font-size: 120px;
    font-weight: bold;
    margin: 120px 45px 0 0;
}

.japan-tips .subtitle-image-container{
  display: flex;
  justify-content: flex-start;
  margin-bottom: 40px;
  margin-left: -75px;
}

  .japan-tips-card-overlay {
    position: absolute;
    top: 145px;
    right: 0;
    bottom: 0;
    left: 330px;
    background: rgba(26, 49, 120, 0.85);
    padding: 10px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    height: 100px;
    width: 420px;
    overflow: visible;
  }
}

/* 大螢幕調整 (max-width: 1200px) */
@media (max-width: 1200px) {
  .japan-tips .sec-inner {
    padding: 0 120px;
  }
  .japan-tips .section-label span {
    font-size: 84px;
    font-weight: bolder;
    margin: 80px 0px 0 0;
  }
  .japan-tips-card-overlay {
    position: absolute;
    top: 60%;
    right: 0;
    bottom: 0;
    left: 45%;
    background: rgba(26, 49, 120, 0.85);
    padding: 10px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    height: 100px;
    width: 420px;
    overflow: visible;
  }
}

/* 中等螢幕調整 (959px ~ 769px) */
@media (max-width: 959px) and (min-width: 769px) {
  .japan-tips .sec-inner {
    padding: 0 80px;
  }
  
  .japan-tips-cards-container {
    max-width: 700px;
  }
  
  .japan-tips-card {
    aspect-ratio: 16/5; /* 保持PC版比例 */
  }

  .japan-tips .section-label span {
    font-size: 84px;
    font-weight: bolder;
    margin: 80px 0px 0 0;
  }

  .japan-tips-card-overlay {
    position: absolute;
    top: 50%;
    right: 0;
    bottom: 0;
    left: 40%;
    background: rgba(26, 49, 120, 0.85);
    padding: 10px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    height: 100px;
    width: 350px;
    overflow: visible;
  }
}

/* 平板版 (max-width: 768px) */
@media (max-width: 768px) {
  .japan-tips {
    padding: 60px 0;
    gap: 32px;
    background-image: url('../img/04_japan_tips/bg_japan tips_SP_3x-min.png');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    min-height: 900px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: -100px;
  }
  
  .japan-tips .sec-inner {
    padding: 0 40px;
  }
  
  .japan-tips .inner {
    gap: 20px;
  }
  
  /* 區塊標籤調整 */
  .japan-tips .section-label {
    top: 20px;
    right: 60px;
  }
  
  .japan-tips .section-label span {
    font-size: 84px;
    font-weight: bolder;
    margin: 80px 0px 0 0;
  }
  
  .japan-tips .japan-main-title {
    font-size: 28px;
    margin: 100px 0 0 0;
    padding: 0 20px;
  }

  .japan-tips .subtitle-image-container {
    margin-bottom: 40px;
    padding: 0 20px;
  }
  
  .japan-tips .subtitle-image-container img {
    max-width: 70%;
    height: auto;
  }

  .japan-tips .section-divider-reverse {
    height: 150px;
  }
  
  /* 平板版卡片樣式調整 */
  .japan-tips-card {
    aspect-ratio: 4/3; /* SP版圖片比例約為4:3 */
  }
  
  .japan-tips-card-overlay {
    position: absolute;
    top: 65%;
    right: 0;
    bottom: 0;
    left: 39%;
    background: rgba(26, 49, 120, 0.85);
    padding: 10px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    height: 140px;
    width: 69%;
    overflow: visible;
  }
}

/* 手機版 (max-width: 480px) */
@media (max-width: 480px) {
  .japan-tips {
    padding: 40px 0;
    gap: 24px;
  }

  .japan-tips .sec-inner {
    padding: 0 20px;
    margin: 50px auto 0 auto;
  }
  
  .japan-tips .inner {
    gap: 10px;
  }
  
  /* 區塊標籤手機版調整 */
  .japan-tips .section-label {
    top: 15px;
    right: 15px;
  }
  
  .japan-tips .section-label span {
    font-size: 60px;
    font-weight: bolder;
    margin:50px 0 0 0;
  }
  
  .japan-tips .japan-main-title {
    font-size: 24px;
    margin-top: 160px;
  }
  
  .japan-tips .section-divider-reverse {
    height: 100px;
  }

  .japan-tips .subtitle-image-container img {
    max-width: 90%;
    height: auto;
  }
  
  .japan-tips-card {
    aspect-ratio: 4/3; /* 使用SP版圖片比例 */
  }
  
  .japan-tips-card-overlay {
    position: absolute;
    top: 54%;
    right: 0;
    bottom: 0;
    left: 23%;
    background: rgba(26, 49, 120, 0.85);
    padding: 10px;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    height: 105px;
    width: 86%;
    overflow: visible;
  }
  
  .japan-tips-card-content {
    gap: 6px;
  }
  
  .japan-tips-card-title {
    font-size: 13px;
    -webkit-line-clamp: 3;
    line-height: 1.3;
  }
  
  .japan-tips-card-description {
    font-size: 11px;
    -webkit-line-clamp: 1;
  }
  
  .japan-tips-card-more {
    padding: 4px 8px;
  }
  
  .japan-tips-card-more span {
    font-size: 11px;
  }
  
  .japan-tips-card-more img {
    width: 8px;
    height: 8px;
  }
}