* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", "Microsoft JhengHei", sans-serif;
}

body {
  background-color: #0a2540; /* 深藍色背景 */
  color: #333;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* 背景圖片容器 - 西沙灣主題 */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-image.loaded {
  opacity: 1;
}

/* 桌面背景圖片 - 使用 bg.jpg */
@media (min-width: 769px) {
  .bg-image {
    background-image: url("../img/home/bg.jpg");
  }
}

/* 手機背景圖片 - 使用 bg-m.jpg */
@media (max-width: 768px) {
  .bg-image {
    background-image: url("../img/home/bg-m.jpg");
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 頁頭樣式 - 西沙灣主題 */
header {
  background: transparent;
  color: white;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* 當頁面滾動時，給header添加背景色 */
header.scrolled {
  background: rgba(10, 37, 64, 0.95); /* 深藍色半透明 */
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.logo i {
  color: #4ecdc4; /* 青藍色 */
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 桌面端導航樣式 - 透明背景 */
.desktop-nav {
  display: flex;
  gap: 5px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nav-link.active {
  background-color: rgba(78, 205, 196, 0.8); /* 青藍色半透明 */
  box-shadow: 0 4px 8px rgba(78, 205, 196, 0.3);
}

/* 添加指示線效果 */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 20px;
  right: 20px;
  height: 2px;
  background-color: #4ecdc4; /* 青藍色 */
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link i {
  font-size: 0.9rem;
}

/* 手機端漢堡菜單按鈕 */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: background-color 0.3s;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.mobile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 手機端下拉菜單 */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: rgba(10, 37, 64, 0.98); /* 深藍色半透明 */
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s ease;
}

.mobile-nav.open {
  max-height: 400px;
}

.mobile-nav .nav-link {
  display: block;
  padding: 18px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
}

.mobile-nav .nav-link:last-child {
  border-bottom: none;
}

.mobile-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: none;
  padding-left: 30px;
}

/* 主內容區域 */
main {
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

/* 英雄區域 - 西沙灣主題 */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-bottom: 50px;
  overflow: hidden;
  border-radius: 15px;
  padding: 20px;
}

/* 主視覺圖片 */
.hero-main-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  border-radius: 15px;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fadeInImage 2s ease-out 0.5s forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 0.9;
  }
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(133, 186, 241, 0.7);
}

.hero-content {
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease-out 0.5s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(90deg, #034847, #2a9d8f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  color: #4ecdc4; /* 青藍色 */
  font-weight: 500;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 40px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  line-height: 1.8;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 英雄區域按鈕 */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 200px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.primary-btn {
  background: linear-gradient(135deg, #4ecdc4, #2a9d8f);
  color: white;
  border: 2px solid #4ecdc4;
}

.primary-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
  background: linear-gradient(135deg, #2a9d8f, #4ecdc4);
}

.secondary-btn {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.secondary-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

/* 按鈕動畫效果 */
.btn-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.primary-btn:hover .btn-wave {
  animation: wave 1s ease-out;
}

@keyframes wave {
  0% {
    transform: scale(0.15, 0.15);
    opacity: 1;
  }
  100% {
    transform: scale(30, 30);
    opacity: 0;
  }
}

.btn-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50px;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* 滾動提示 */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
  cursor: pointer;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

footer {
  text-align: center;
  padding: 25px 0;
  background-color: rgba(10, 37, 64, 0.9);
  color: #ecf0f1;
  margin-top: 50px;
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
}

/* 響應式設計 */
@media (max-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }
}

/* 手機端樣式 - 切換為下拉菜單 */
@media (max-width: 768px) {
  header {
    background: rgba(10, 37, 64, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-nav {
    display: block;
  }

  .hero-section {
    min-height: 70vh;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-btn {
    width: 100%;
    max-width: 300px;
  }

  .logo {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 60vh;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-btn {
    padding: 15px 25px;
    font-size: 1rem;
  }
}

/* WhatsApp 浮動圖標 */
.whatsapp-float {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  text-decoration: none;
  overflow: visible;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:active {
  transform: translateY(-2px) scale(1.05);
}

/* WhatsApp 脈衝動畫效果 */
.whatsapp-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: whatsapp-pulse 2s infinite;
  z-index: -1;
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* WhatsApp 提示文字 */
.whatsapp-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background-color: rgba(44, 62, 80, 0.9);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* 響應式設計：手機端調整 */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    font-size: 25px;
    bottom: 100px;
    right: 25px;
  }

  .whatsapp-tooltip {
    font-size: 13px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 22px;
    bottom: 100px;
    right: 20px;
  }
}

.logo-image {
  height: 40px;
}
