/* =============================== */
/* =============================== */
/* ![Modified Styles for specific sections]! */
/* =============================== */

.s1-g1-5 {
  bottom: -45%;
}

.s3-g2-1 img {
  transform: scale(0.8);
  transition: transform 0.3s ease;
  will-change: transform;
}
.s3-g2-1 img:hover {
  transform: scale(1);
}

.s4-g2-3 {
  top: 6%;
  left: 19%;
  z-index: 2;
}

.s4-g3-2 {
  left: -19%;
  height: 62%;
  z-index: 2;
}

.s6-g2-2 {
  bottom: 26%;
}

.s7-g1-5 {
  bottom: -44%;
}

.cta-menu-box {
  border: none;
  box-shadow: none;
}

#section-contact {
  padding: 0;
}

#section8 .edm-container {
  background: #182648;
}

.contact-form-container {
  padding-left: 20px;
  padding-right: 20px;
}

.submit-btn {
  padding: 2px;
}
.submit-btn img {
  width: 100%;
  height: 100%;
  padding: 1px;
  margin: 1px;
  border: 1px solid transparent;
  display: inline-block;
}

.footer img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* =============================== */
/* 背景動畫容器樣式 */
/* =============================== */

/* 背景動畫容器 - 固定在整個視窗背後 */
.bg-animation-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  z-index: -10 !important;
  background: #000 !important;
  background: #0f1835 !important;
  overflow: hidden;
  pointer-events: none !important;
}

/* 確保前景內容在上層 */
body {
  position: relative;
  z-index: 1;
}

/* Three.js Canvas 自動調整樣式 */
.bg-animation-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

/* 只在寬螢幕顯示背景動畫 */
@media (max-width: 1100px) {
  .bg-animation-container {
    display: none;
  }
}

/* 效能優化：減少重繪 */
.bg-animation-container canvas {
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* 支援高 DPI 螢幕 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .bg-animation-container {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* 動畫載入狀態 */
.bg-animation-container.loading {
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.bg-animation-container.loaded {
  opacity: 1;
}

/* 降低動畫優先級 */
@media (prefers-reduced-motion: reduce) {
  .bg-animation-container {
    display: none;
  }
}

/* 為低效能設備優化 */
@media (max-width: 1100px), (max-height: 600px) {
  .bg-animation-container {
    display: none;
  }
}

/* =============================== */
/* 背景模糊遮罩效果 */
/* =============================== */

/* 底部漸層模糊遮罩 */
.bg-animation-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: -9 !important;
  pointer-events: none !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0.3) 100%);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

/* 底部強化模糊區域 */
.bg-animation-overlay::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.4) 100%);
  backdrop-filter: blur(var(--bottom-blur, 8px));
  -webkit-backdrop-filter: blur(var(--bottom-blur, 8px));
  transition: backdrop-filter 0.3s ease;
}

/* 中層模糊效果 */
.bg-animation-middle-blur {
  position: fixed !important;
  /* top: 30% !important; */
  top: 0% !important;
  left: 0 !important;
  width: 100% !important;
  /* height: 40% !important; */
  height: 100% !important;
  z-index: -8 !important;
  pointer-events: none !important;
  /* backdrop-filter: blur(0px) brightness(0.2) contrast(0.2); */
  /* backdrop-filter: blur(1px) ;
  -webkit-backdrop-filter: blur(1px); */
  /* background: rgba(0, 0, 0, 0.05); */
}

/* 響應式設計 */
@media (max-width: 1100px) {
  .bg-animation-overlay,
  .bg-animation-middle-blur {
    display: none;
  }
}

/* 支援性檢查 */
@supports not (backdrop-filter: blur(1px)) {
  .bg-animation-overlay::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.6) 100%);
  }

  .bg-animation-middle-blur {
    background: rgba(0, 0, 0, 0.15);
  }
}

/* =============================== */
/* Footer 區域樣式 */
/* =============================== */

.footer {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: block;
}

.footer img {
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* 確保圖片在容器內完全顯示 */
.footer img {
  max-width: 100%;
  vertical-align: top;
}
