/* === 基本重設 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/* === GIF區域 === */
.gif-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* 左側漸層遮罩 */
.gif-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
  z-index: 2;
}

/* === 文字區塊 === */
.text-description {
  position: absolute;
  top: 20%;
  left: 5%;
  width: 33%;
  color: white;
  text-align: left;
  padding: 20px;
  z-index: 3;
}

.text-item h2 {
  font-weight: bold;
  font-size: 23pt;
  margin-bottom: 8px;
  font-style: italic;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.text-item p {
  font-size: 10pt;
  line-height: 1.5;
  margin-bottom: 20px;
  font-weight: bold;
  padding-right: 10px;
  text-shadow:
    2px 2px 5px rgba(0, 0, 0, 0.7),
    0px 0px 0px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.5px;
}

/* === CTA 按鈕 === */
.cta-button {
  background-color: #f9a31a;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
  left: 5%;
  position: absolute;
  z-index: 4;
  overflow: hidden;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  transform: skewX(-45deg);
  animation: light-sweep 1.5s infinite;
}

.cta-button:hover {
  background-color: #26394b;
  box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.3);
}

@keyframes light-sweep {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* === RWD 區段 === */

/* 平板 (max-width: 992px)：適度放大遮罩，文字置中 */
@media (max-width: 992px) {
  .gif-container::before {
    width: 60%;
  }

  .text-description {
    width: 80%;
    top: 15%;
    left: 10%;
  }

  .text-item h2 {
    font-size: 18pt;
  }

  .text-item p {
    font-size: 11pt;
  }

  .cta-button {
    font-size: 15px;
    left: 10%;
  }
}

/* 手機 (max-width: 576px)：維持背景、縮小字、調整位置 */
@media (max-width: 576px) {
  .gif-container {
    height: 100vh;
  }

  img {
    object-position: center;
  }

  .gif-container::before {
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  }

  .text-description {
    top: auto;
    bottom: 15%;
    left: 8%;
    width: 85%;
    padding: 10px;
    text-align: center;
  }

  .text-item h2 {
    font-size: 1.2rem;
    white-space: normal;
  }

  .text-item p {
    font-size: 0.9rem;
    padding: 0;
  }

  .cta-button {
    position: relative;
    left: 0;
    margin-top: 10px;
    font-size: 0.9rem;
    padding: 10px 18px;
  }
}
