/**
 * Regional Events 區塊專用樣式
 * 模組化設計，獨立於其他樣式檔案
 */

/* ==================== 基礎區塊佈局 ==================== */
.regional-events {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 0;
  gap: 48px;
  width: 100vw;
  background: #F1F1F4;
  min-height: 832px;
  /* 使用負邊距讓底色突破父層限制，實現滿版效果 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -93px;
}

.regional-events .sec-inner {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 150px;
}

.regional-events .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

/* ==================== 區塊標籤 ==================== */
.regional-events .section-label {
  position: absolute;
  top: 40px;
  right: 120px;
  z-index: 2;
}

.regional-events .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: right;
  margin: -150px 10px 0 0;
  
}


/* ==================== 裝飾圖示 ==================== */
.regional-events .decoration-icons {
  position: absolute;
  top: 60px;
  right: 60px;
  z-index: 1;
}

/* PC版裝飾圖示 - 預設顯示 */
.regional-events .decoration-icons .is-pc {
  max-width: 500px;
  height: auto;
  margin: -80px 80px 0px 0;
  display: block;
}

/* SP版裝飾圖示 - 預設隱藏 */
.regional-events .decoration-icons .is-sp {
  max-width: 200px;
  height: auto;
  margin: -100px 0px 0px 0;
  display: none;
}

/* ==================== 主標題 ==================== */
.regional-events .regional-main-title {
  font-family:  'Noto Sans JP', 'sans-serif';
  font-size: 32px;
  color: #1F286F;
  font-weight: bold;
  text-align: left;
  margin: 20px 0 0 0;
  width: 100%;
}

/* ==================== 副標題圖片 ==================== */
.regional-events .subtitle-image-container {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 40px;
}

.regional-events .subtitle-image-container img {
  max-width: 40%;
  height: auto;
}

/* ==================== 地區選擇切換器 ==================== */
.card-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 400px;
  height: 50px;
  margin: 20px auto;
  border: 1px solid #002063;
  margin-top: 10px;
  position: relative;
}

.card-selector::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: -80px;
  width: calc(100% + 160px);
  height: 1px;
  background: #002063;
}

.card-selector-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50%;
  height: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: #1F286F;
}

.card-selector-item.active {
  background: linear-gradient(90deg, #1F286F 0%, #006FBB 100%);
  box-shadow: 0 2px 4px rgba(0, 160, 233, 0.3);
}

.card-selector-item span {
  font-family: 'Noto Sans', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: #002063;
  transition: color 0.3s ease;
}

.card-selector-item.active span {
  color: #FFFFFF;
}

.card-selector-item:hover:not(.active) {
  background: rgba(14, 137, 194, 0.1);
}

.card-selector-item:hover:not(.active) span {
  color: #002063;
}

/* ==================== 卡片容器與排版 ==================== */

/**
 * 智能排版邏輯說明：
 * 
 * 1000px以上螢幕寬度：
 * - 預設使用四欄布局
 * - 台灣卡片（4張）：四欄平均分布，填滿容器寬度
 * - 日韓卡片（3張）：三欄置中排列，視覺平衡
 * 
 * 999px以下螢幕寬度：
 * - 統一使用雙欄布局
 * - 台灣卡片：2+2排列
 * - 日韓卡片：2+1排列（第三張置中）
 * 
 * 550px以下螢幕寬度：
 * - 單欄縱向排列，最佳手機體驗
 */

.card-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  padding: 0px;
  gap: 32px;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* ==================== 卡片樣式設計 ==================== */
.regional-events .card-item {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px;
  gap: 10px;
  width: 100%;
  height: 330px;
  max-width: 208px;
  background: #FFFFFF;
  border: 1px solid #1F286F;
  box-shadow: 6px 6px 0px #1F286F;
  flex: 0 0 auto;
  transition: all 0.3s ease;
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0px #1F286F;
}

/* 卡片內容 */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px;
  gap: 14px;
  width: 100%;
}

/* 卡片圖片 */
.regional-events .card-image {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.regional-events .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 卡片文字區域 */
.regional-events .card-text {
  width: 100%;
  height: auto;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0px;
  gap: 4px;
}

.regional-events .card-text h3 {
  width: 100%;
  height: 72px;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: 0.016em;
  color: #000000;
  margin: 0;
  display: flex;
  align-items: flex-start;
  text-align: left;
}

/* 卡片折扣標籤 */
.regional-events .card-discount {
  font-family: 'Noto Sans', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: #666666;
  margin-top: 4px;
}

/* 卡片按鈕 */
.regional-events .card-button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: auto;
  min-width: 37px;
  height: 40px;
  background: linear-gradient(90deg, #1F286F 0%, #006FBB 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  align-self: flex-end;
  margin-top: auto;
}

.regional-events .card-button:hover {
  background: linear-gradient(90deg, #1F286F 0%, #006FBB 100%);
  transform: translateY(-2px);
}

.regional-events .card-button span {
  font-family: 'Hiragino Sans', 'Noto Sans', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 125%;
  letter-spacing: 0.12em;
  color: #FFFFFF;
  text-align: center;
  white-space: nowrap;
}

.card-button .arrow-icon {
  width: 6px;
  height: 6px;
  border: 1px solid #FFFFFF;
  border-left: none;
  border-bottom: none;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ==================== 了解更多按鈕 ==================== */
.regional-events .learn-more-container {
  display: flex;
  justify-content: center;
  margin: 40px 0;
  margin-bottom: -100px;
  z-index: 2;
}

.regional-events .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;
}

.regional-events .learn-more-button:hover {
  transform: translateY(-2px);
}

.regional-events .learn-more-button .arrow-icon {
  height: 15px;
  margin-top: -10px;
}

/* CTA按鈕容器 */
.cta-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.cta-button {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px;
  gap: 10px;
  width: 240px;
  height: 50px;
  background: linear-gradient(180deg, #FFFFFF 34.13%, #DDF1FF 100%);
  border: 1px solid #00A0E9;
  box-shadow: 6px 6px 0px #00A0E9;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 0px #00A0E9;
}

.cta-button span {
  font-family: 'Hiragino Sans', 'Noto Sans', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 20px;
  line-height: 125%;
  letter-spacing: 0.12em;
  color: #00A0E9;
  text-align: center;
}

/* ==================== 區塊分割線（左上往右下斜線） ==================== */
.regional-events .section-divider-reverse {
  position: relative;
  width: 100vw;
  height: 200px;
  overflow: visible;
  z-index: 1;
  /* 使用負邊距讓三角形突破父層限制，實現滿版效果 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.regional-events .section-divider-reverse::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  background: #FFFFFF;
  width: 100%;
  height: 100%;
  /* 左上往右下的直角三角形，直角在左上角 */
  clip-path: polygon(0% 0%, 0% 100%, 100% 0%);
}

/* 另一個斜線分割線 - 左下往右上 */
.regional-section-divider-diagonal {
  position: relative;
  width: 100vw; /* 滿版寬度 */
  height: 200px; /* 雙倍高度 (原本100px → 200px) */
  overflow: visible; /* 改為hidden，隱藏超出畫面的部分 */
  /* 使用負邊距讓三角形突破父層限制，實現滿版效果 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: -110px;
}

.regional-section-divider-diagonal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30px;
  background: #F1F1F4;
  width: 110%;
  height: 100%;
  clip-path: polygon(0% 100%, 100% 0%, 100% 100%);
  margin-top: -200px;
}

/* ==================== 響應式設計 ==================== */

/* 超大螢幕調整 (min-width: 1201px) */
@media (min-width: 1201px) {
  /* 區塊標籤向左移動到中間偏右位置 */
  .regional-events .section-label {
    right: 30%;
    transform: translateX(50%);
  }

  .regional-events .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: 96px;
    font-weight: bold;
    line-height: 1.2;
    text-align: right;
    margin: -165px 10px 0px 10px;
}
  
  /* 裝飾圖示向左移動到中間位置 */
  .regional-events .decoration-icons {
    right: 30%;
    transform: translateX(30%);
  }
  
  /* 超大螢幕：調整選擇器橫線寬度與四張卡片總寬度一致 */
  .regional-events .card-selector::after {
    left: 50%;
    transform: translateX(-50%);
    width: 928px;
  }
  
  /* 超大螢幕：調整選擇器項目寬度 */
  .regional-events .card-selector-item {
    width: 50%;
  }
}

/* 大螢幕調整 (max-width: 1200px) */
@media (max-width: 1200px) {
  .regional-events .sec-inner {
    padding: 0 120px;
  }
}

/* 中等螢幕調整 (959px ~ 769px) */
@media (max-width: 959px) and (min-width: 769px) {
  .regional-events .sec-inner {
    padding: 0 80px;
  }
  
  /* 中等螢幕：顯示PC版圖示 */
  .regional-events .decoration-icons .is-pc {
    display: block !important;
    max-width: 400px;
    height: auto;
    margin: -50px 80px 0px 0;
  }
  
  .regional-events .decoration-icons .is-sp {
    display: none !important;
  }
}

/* 平板版 (max-width: 768px) */
@media (max-width: 768px) {
  .regional-events {
    padding: 60px 0;
    gap: 32px;
    margin-top: -221px;
  }
  
  .regional-events .sec-inner {
    padding: 0 40px;
  }
  
  .regional-events .inner {
    gap: 20px;
  }
  
  /* 區塊標籤調整 */
  .regional-events .section-label {
    top: 20px;
    right: 60px;
  }
  
  .regional-events .section-label span {
    font-size: 72px;
    font-weight: bolder;
    margin: -80px -45px 0 0;
  }
  
  .regional-events .decoration-icons {
    top: 40px;
    right: 30px;
  }

  /* 平板版：隱藏PC圖示，顯示SP圖示 */
  .regional-events .decoration-icons .is-pc {
    display: none;
  }
  
  .regional-events .decoration-icons .is-sp {
    display: block;
    max-width: 70%;
    margin: auto;
  }
  
  .regional-events .regional-main-title {
    font-size: 28px;
    margin: 100px 0 0 0;
    padding: 0 0px;
  }

  .regional-events .subtitle-image-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 40px;
    padding: 0 0px;
  }
  
  .regional-events .subtitle-image-container img {
    max-width: 60%;
    height: auto;
  }

  .regional-events .section-divider-reverse {
    height: 150px;
  }

  /* 地區選擇器平板版調整 */
  .regional-events .card-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    height: 50px;
    margin: 20px auto;
    border: 1px solid #002063;
    margin-top: 100px;
    position: relative;
  }
  
  /* 平板版橫線調整 - 更窄 */
  .regional-events .card-selector::after {
    left: -30px;
    width: calc(100% + 60px);
  }
  
  .regional-events .card-item {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 10px;
    gap: 10px;
    width: 45%;
    height: 330px;
    max-width: 208px;
    background: #FFFFFF;
    border: 1px solid #1F286F;
    box-shadow: 6px 6px 0px #1F286F;
    flex: 0 0 auto;
    transition: all 0.3s ease;
}

  /* 區塊分割線平板版調整 */
  .regional-section-divider-diagonal {
    position: relative;
    width: 100vw; /* 滿版寬度 */
    height: 200px; /* 雙倍高度 (原本100px → 200px) */
    overflow: visible; /* 改為hidden，隱藏超出畫面的部分 */
    /* 使用負邊距讓三角形突破父層限制，實現滿版效果 */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: -140px;
  }

  .regional-section-divider-diagonal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    background: #F1F1F4;
    width: 100%;
    height: 400%;
    clip-path: polygon(0% 20%, 100% 0%, 100% 20%);
    margin-top: -260px;
  }
}

/* 手機版 (max-width: 480px) */
@media (max-width: 480px) {
  .regional-events {
    padding: 40px 0;
    gap: 24px;
    margin-top: -205px;
  }

  .regional-events .sec-inner {
    padding: 0 20px;
  }
  
  .regional-events .inner {
    gap: 10px;
  }
  
  /* 區塊標籤手機版調整 */
  .regional-events .section-label {
    top: 15px;
    right: 15px;
  }
  
  .regional-events .section-label span {
    font-size: 60px;
    font-weight: bolder;
    margin: -50px 0px 0 0;
  }
  
  .regional-events .decoration-icons {
    top: 30px;
    right: 0px;
  }
  
  /* 手機版：隱藏PC圖示，顯示SP圖示 */
  .regional-events .decoration-icons .is-pc {
    display: none;
  }
  
  .regional-events .decoration-icons .is-sp {
    display: block;
    max-width: 100%;
    margin-top: 50px;
  }
  
  .regional-events .regional-main-title {
    font-size: 24px;
    margin-top: 160px;
  }
  
  .regional-events .section-divider-reverse {
    height: 100px;
  }

  .regional-events .subtitle-image-container img {
    max-width: 80%;
    height: auto;
  }

  /* 地區選擇器手機版調整 */
  .regional-events .card-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 200px;
    height: 50px;
    margin: 20px auto;
    border: 1px solid #002063;
    margin-top: 100px;
    position: relative;
  }
  
  /* 手機版橫線調整 - 畫面寬度的70% */
  .regional-events .card-selector::after {
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
  }
  
  .regional-events .card-item {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 10px;
    gap: 10px;
    width: 80%;
    height: 100%;
    max-width: 300px;
    background: #FFFFFF;
    border: 1px solid #1F286F;
    box-shadow: 6px 6px 0px #1F286F;
    flex: 0 0 auto;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.regional-events .card-button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: auto;
  min-width: 37px;
  height: 40px;
  background: linear-gradient(90deg, #1F286F 0%, #006FBB 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  align-self: flex-end;
  margin-top: auto;
}
  /* 區塊分割線手機版調整 */
  .regional-section-divider-diagonal {
    position: relative;
    width: 100vw; /* 滿版寬度 */
    height: 200px; /* 雙倍高度 (原本100px → 200px) */
    overflow: visible; /* 改為hidden，隱藏超出畫面的部分 */
    /* 使用負邊距讓三角形突破父層限制，實現滿版效果 */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: -156px;
  }

  .regional-section-divider-diagonal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -12px;
    background: #F1F1F4;
    width: 110%;
    height: 400%;
    clip-path: polygon(0% 20%, 100% 0%, 100% 20%);
    margin-top: -280px;
  }

  .regional-events .learn-more-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    margin-bottom: -50px;
    z-index: 2;
  }

}