/* scenarios.css */

/* 基礎動畫設定 */
.opacity-0 {
    opacity: 0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
}

/* --- Hero Section --- */
.hero-banner {
    position: relative;
    background: url('../images/pc/scenarios/banner.jpg') center/cover no-repeat;
    min-height: 610px;
    display: flex;
    align-items: flex-end;
    border-bottom: 10px solid #cb2f20;
}
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.hero-text-box {
  position: relative;
  max-width: 980px;
  padding-top: 20px;
  padding-right: 20px;
  padding-left: 20px;
  padding-bottom: 220px;
  color: #fff;
  overflow: hidden; /* 用來切平內部的斜邊 */
}

.hero-text-inner {
  position: relative;
  z-index: 2;
  padding-left: 120px;
}

.hero-text-box::before {
  content: '';
  position: absolute;
  width: 330px; 
  height: 130%;
  background: #ce0e2d;
  /* 使用標準平行四邊形：頂部右斜上，底部也右斜上 */
  clip-path: polygon(0% 50%, 100% 10%, 100% 60%, 0% 100%);
  z-index: -1;
}
.hero-text-box .line {
  width: 60px;
  height: 4px;
  background-color: #ce0e2d;
  margin-bottom: 25px;
}

.hero-text-box h1 {
  font-size: 52px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 2px;
}

.hero-text-box p {
  font-size: 22px;
    line-height: 1.8;
    margin: 0;
}

.hero-device {
    position: absolute;
    right: 12%;
    bottom: -150px;
    width: 220px;
    z-index: 3;
}

.hero-device img {
    width: 100%;
    height: auto;
    animation: floatDevice 5s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes floatDevice {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- Scenarios Main Section --- */
.scenarios-section {
    padding: 100px 0;
    background-color: #fff;
}

.section-main-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 100px;
    font-weight: bold;
    position: relative;
    letter-spacing: 2px;
}

/* 標題下方小紅線 */
.section-main-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #BC0F14;
    margin: 20px auto 0;
}

.scenarios-list {
    display: flex;
    flex-direction: column;
    gap: 120px;
    /* 每個情境的間距 */
}

.scenario-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6%;
}

/* 偶數列左右反轉 */
.scenario-row:nth-child(even) {
    flex-direction: row-reverse;
}

.scenario-text {
    flex: 0 0 47%;
    position: relative;
    z-index: 3;
}

/* .scenario-text 留白處理 (約 20%) */
.scenario-row:nth-child(odd) .scenario-text {
    padding-left: 10%;
}

.scenario-row:nth-child(even) .scenario-text {
    padding-right: 10%;
}

/* 情境區塊底部的長紅線 */
.scenario-text::after {
    content: '';
    position: absolute;
    bottom: -40px;
    height: 2px;
    background-color: #BC0F14;
    width: 110%;
    /* 調整延伸長度 */
    z-index: 1;
}

/* 紅線與文字邊緣對齊 */
.scenario-row:nth-child(odd) .scenario-text::after {
    left: 20%;
}

.scenario-row:nth-child(even) .scenario-text::after {
    right: 20%;
}

.scenario-text h3 {
    font-size: 1.8rem;
    color: #222;
    margin-top: 20px;
    margin-bottom: 30px;
    font-weight: bold;
    position: relative;
    letter-spacing: 1px;
}

/* 標題上方的小紅線 */
.scenario-text h3::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 35px;
    height: 4px;
    background-color: #BC0F14;
}

.scenario-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #555;
    text-align: justify;
    margin: 0;
}

.scenario-image {
    flex: 0 0 47%;
    position: relative;
    z-index: 2;
}

.scenario-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.scenario-row:hover .scenario-image img {
    transform: scale(1.03);
    /* 滑鼠懸停圖片微放大效果 */
}

/* 圖片下方的 (*For reference only) */
.scenario-image .reference-note {
    position: absolute;
    bottom: -30px;
    width: 100%;
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
    white-space: nowrap;
}

/* 圖在右邊時，字在左邊 (對齊圖片左側) */
.scenario-row:nth-child(odd) .scenario-image .reference-note {
    text-align: left;
    left: 0;
}

/* 圖在左邊時，字在右邊 (對齊圖片右側) */
.scenario-row:nth-child(even) .scenario-image .reference-note {
    text-align: right;
    right: 0;
}

.reference-note {
    text-align: right;
    font-size: 0.9rem;
    color: #888;
    margin-top: 40px;
    font-style: italic;
}

/* --- RWD 響應式設定 --- */
@media screen and (max-width: 1300px) {
  .hero-text-box {
      max-width: 800px;
  }
  .hero-text-box p {
      font-size: 20px;
  }
  .hero-banner {
      min-height: 550px;
  }
  .hero-device {
      width: 210px;
  }  
}

@media screen and (max-width: 1024px) {
  
  .hero-text-box {
      max-width: 700px;
  }
  .hero-text-box p {
      font-size: 18px;
  }
  .hero-banner {
      min-height: 500px;
  }
  .hero-device {
      width: 200px;
  }
  
  .scenarios-section {
      padding: 80px 0;
  }

  .scenarios-list {
      gap: 50px;
  }

  .scenario-row,
  .scenario-row:nth-child(even) {
      flex-direction: column;
      /* 手機版改為垂直排列 */
      gap: 50px;
  }

  .scenario-text,
  .scenario-image {
      flex: 1 1 100%;
      width: 100%;
      padding: 0 !important;
      /* 取消留白 */
  }

  .scenario-text::after {
      width: 100%;
      bottom: -25px;
      left: 0 !important;
      right: auto !important;
  }

  .scenario-row:nth-child(odd) .scenario-text h3::before,
  .scenario-row:nth-child(even) .scenario-text h3::before {
      left: 0;
      top: -10px;
  }

  .scenario-image .reference-note {
      text-align: center !important;
      position: relative;
      bottom: -15px;
  }
}

@media screen and (max-width: 768px) {
  .hero-text-inner {
      padding-left: 30px;
  }
  .hero-text-box h1 {
      font-size: 38px;
      margin-bottom: 10px;
  }
  .hero-text-box p {
      font-size: 16px;
  }
  .hero-text-box p br {
      display: none;
  }
  .hero-text-box {
      padding-left: 0px;
  }
  .hero-text-box::before {
      width: 185px;
      height: 85%;
  }
  
  .section-main-title {
      font-size: 2rem;
      margin-bottom: 50px;
  }

  .scenario-text h3 {
      font-size: 1.5rem;
      margin-bottom: 20px;
      padding-bottom: 15px;
  }

  .scenario-text p {
      font-size: 1rem;
  }

  .scenario-image .reference-note {
      text-align: center;
      position: relative;
      bottom: 0px;
  }

  .reference-note {
      text-align: right;
      font-size: 0.9rem;
      color: #888;
      margin-top: 0px;
  }
}

/* 英文版調整 */
@media screen and (max-width: 768px) {
  .lang-en .hero-text-box p {
    font-size: 15px;
    line-height: 1.6;
  }
  .lang-en .hero-text-box {
      padding-top: 50px;
  }
  .lang-en .scenario-text p {
    text-align: left;
  }  
  
}


