@charset "UTF-8";

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #fff;
  color: #333;
  font-family: "微軟正黑體", "新細明體", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: clamp(32px, 4vw, 44px); font-weight: bold; }
h2 { font-size: clamp(28px, 3.5vw, 32px); font-weight: bold; text-align: center; }
h3, h4 { font-size: clamp(20px, 2.5vw, 24px); font-weight: bold; }
ul, li { list-style: none; }
img { max-width: 100%; height: auto; border: 0; }
a { text-decoration: none; color: inherit; }

/* ==================== Layout ==================== */
.section {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
}

.content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ==================== nav ==================== */
#nav {
  width: 100%;
  background-color: #f4f4f4;
  padding: 9px 0;
  position: relative;
  z-index: 999995;

  @media (min-width: 768px) {
    padding: 1.5px 0;
  }

  .logo {
    display: block;
  }
}

/* ==================== banner ==================== */
#banner {
  height: auto;
  min-height: 554px;
  padding: 0;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;

  .banner_title {
    width: 100%;
    text-align: center;
    padding: 240px 5% 50px;

    @media (min-width: 768px) {
      text-align: left;
      padding: 180px 0 50px 20%;
    }

    h1 {
      font-size: clamp(32px, 5vw, 56px);
      font-weight: bold;
      line-height: 1.4;
      text-shadow: 0 2px 4px rgba(255,255,255,0.7);
    }
  }
}

/* ==================== foreword ==================== */
#foreword {
  h2 {
    padding: 10% 0 0;
    
    @media (min-width: 768px) {
      padding: 60px 0 20px;
    }
  }

  .f_txt {
    display: block;
    width: 100%;
    margin: 0 auto;
    text-align: justify;
    padding: 4% 0;

    @media (min-width: 768px) {
      width: 75%;
      padding: 20px 0;
    }
  }

  /* RWD Unified View */
  .contrast {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto 50px;
    align-items: center;

    @media (min-width: 1100px) {
      flex-direction: row;
      justify-content: space-between;
      padding-bottom: 150px;
    }

    .before_txt, .after_txt {
      width: 100%;
      border-radius: 8px;
      padding-bottom: 20px;
      
      @media (min-width: 1100px) {
        flex: 1;
        width: auto;
        min-height: 411px;
      }
    }
    
    .before_txt { background: #098b6e; }
    .after_txt { background: #e45814; }

    ul {
      width: 100%;
      position: relative;
      margin: 0 auto;
      padding: 0;

      @media (min-width: 1100px) {
        padding: 20px 0;
      }

      li {
        width: 100%;
        padding: 0 5%;
        margin-bottom: 15px;
        display: flex;
        align-items: flex-start;
        gap: 15px;
        
        @media (min-width: 1100px) {
          padding: 0 45px;
          min-height: 48px;
          margin-bottom: 25px;
        }

        span {
          flex: 0 0 48px;
        }

        p {
          color: #fff;
          line-height: 1.5;
          font-size: 16px;

          @media (min-width: 1100px) {
            font-size: 18px;
          }
        }
      }
    }

    .h_txt {
      font-size: 42px;
      line-height: 1.5;
      color: #fff;
      text-align: center;
      padding: 4% 0;

      @media (min-width: 1100px) {
        text-align: left;
        font-size: 52px;
        padding: 16px 45px;
      }
    }

    .row {
      display: flex;
      justify-content: center;
      margin: 20px auto;
      animation: rower_m 1s infinite;
      
      @media (min-width: 1100px) {
        width: 100px;
        margin: 0;
        animation: rower 1s infinite;
        align-items: center;
      }

      img {
        width: 100%;
        height: auto;
      }

      .arrow_desktop {
        display: none;
        max-width: 100px;
        @media (min-width: 1100px) { display: block; }
      }

      .arrow_mobile {
        display: block;
        max-width: 50px;
        @media (min-width: 1100px) { display: none; }
      }
    }
  }
}

@keyframes rower {
  0% { transform: translateX(0); }
  50% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

@keyframes rower_m {
  0% { transform: translateY(0); }
  50% { transform: translateY(5px); }
  100% { transform: translateY(0); }
}

/* ==================== case ==================== */
#case {
  background-color: #e9e9e9;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  padding-bottom: 80px;

  h2 {
    padding: 8% 0 4%;
    
    @media (min-width: 768px) {
      padding: 90px 0 22px;
    }
  }

  ul {
    display: flex;
    flex-direction: column;
    gap: 10px;

    li {
      background-color: #fff;
      border-radius: 4px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.05);

      .case-header {
        position: relative;
        cursor: pointer;

        &::after {
          content: "";
          width: 39px;
          height: 39px;
          background: url("../images/menuBtn.png") no-repeat center;
          position: absolute;
          top: 50%;
          right: 17px;
          transform: translateY(-50%);
          transition: transform 0.3s ease;
        }

        &.active::after {
          transform: translateY(-50%) rotate(-90deg);
        }

        .hgroup {
          display: flex;
          flex-direction: column;

          @media (min-width: 768px) {
            flex-direction: row;
            min-height: 75px;
          }

          h3 {
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #2e6769;
            color: #fff;
            padding: 15px;
            text-align: center;

            @media (min-width: 768px) {
              width: 25%;
            }
          }

          h4 {
            display: flex;
            align-items: center;
            background-color: #d0d0d0;
            padding: 15px 60px 15px 15px;
            
            @media (min-width: 768px) {
              width: 75%;
            }
          }
        }
      }

      .case-content {
        display: flex;
        overflow: hidden;
        max-height: 0;
        background-color: #fff;
        transition: max-height 0.3s ease;
        
        &.active {
          max-height: 600px;
        }

        .case-content-text {
          padding: 20px;
          
          @media (min-width: 768px) {
            padding: 40px 80px;
          }

          p {
            line-height: 1.8;
          }
        }
      }
    }
  }
}
