/* --- 1. 品牌基本配色與整體設定 --- */
:root {
  --primary-blue: #003399; 
  --accent-pink: #e60073;  
  --bg-light: #f4f7f6;     
  --text-dark: #333;
  --card-bg: #ffffff;
}

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: 75px; /* 修復：點擊選單時，預留導覽列的高度，標題不再被遮擋 */
}

body {
  font-family: 'Helvetica Neue', Arial, 'Microsoft JhengHei', sans-serif;
  color: var(--text-dark);
  margin: 0;
  padding: 0; 
}

/* --- 2. 頂部導覽列 (Navbar) --- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(0, 51, 153, 0.9);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-sizing: border-box;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  backdrop-filter: blur(5px);
}

/* --- 替換原本的 .nav-logo 設定 --- */
.nav-logo { 
  display: flex;
  align-items: center;
  text-decoration: none; /* 確保點擊時沒有底線 */
}

/* 控制 Logo 圖片的大小與外觀 */
.nav-logo img {
  height: 45px; /* 控制 Logo 的高度，你可以自由微調數字 */
  width: auto;
  background-color: white; /* 給 logo 一個白底，在深藍色導覽列上更突顯 */
  padding: 5px 10px; /* 讓白底邊緣留一點呼吸空間 */
  border-radius: 8px; /* 加上圓角，看起來更現代、柔和 */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 加上淡淡的陰影增加立體感 */
  transition: transform 0.3s ease; /* 滑鼠移過去的動畫準備 */
}

/* 滑鼠移到 Logo 上的微互動效果 */
.nav-logo img:hover {
  transform: scale(1.05);
}
.nav-links a {
  color: white; text-decoration: none; margin-left: 20px; font-weight: bold; transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent-pink); }

/* --- 3. 滿版首頁視覺大圖 --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh; 
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  background-image: url('https://images.unsplash.com/photo-1552422535-c45813c61732?q=80&w=2070&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; 
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(0, 51, 153, 0.7), rgba(0, 0, 0, 0.6));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
  margin-top: 60px; 
  animation: fadeInUp 1s ease-out;
}

.hero h1 { font-size: 3.5rem; margin-bottom: 15px; letter-spacing: 2px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 1.3rem; margin-bottom: 40px; line-height: 1.6; color: #eaf3fb; }

.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 15px 35px; border-radius: 30px; font-size: 1.2rem; font-weight: bold;
  text-decoration: none; transition: all 0.3s ease; border: 2px solid transparent;
}
.btn-primary { background-color: var(--accent-pink); color: white; box-shadow: 0 4px 15px rgba(230, 0, 115, 0.4); }
.btn-primary:hover { background-color: transparent; border-color: var(--accent-pink); transform: translateY(-3px); }
.btn-secondary { background-color: transparent; color: white; border-color: white; }
.btn-secondary:hover { background-color: white; color: var(--primary-blue); transform: translateY(-3px); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 4. 內容區塊共用設定 --- */
.section-container { 
  padding: 80px 20px; /* 微調上下留白，視覺更緊湊 */
  text-align: center; 
}

.section-title { color: var(--primary-blue); font-size: 2.2rem; margin-bottom: 10px; font-weight: bold; }
.section-subtitle { color: #666; font-size: 1.1rem; margin-bottom: 50px; }

.grid-container {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px; max-width: 1100px; margin: 0 auto;
}

.card {
  background-color: var(--card-bg); border-radius: 12px; padding: 30px 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; text-align: left;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,51,153,0.15); }
.card-title { font-size: 1.4rem; color: var(--primary-blue); margin-bottom: 15px; border-bottom: 2px solid #eee; padding-bottom: 10px; font-weight: bold; }
.card-text { color: #555; line-height: 1.6; }

/* --- 5. 音樂課程專屬 --- */
#music-section { background-color: #ffffff; }
.music-card { border-top: 4px solid var(--primary-blue); }
.music-card:hover { border-top: 4px solid var(--accent-pink); }
.tag-list { margin: 0 0 20px 0; padding: 0; list-style: none; }
.tag-list li {
  display: inline-block; margin: 0 8px 8px 0; background: #eaf3fb;
  padding: 6px 14px; border-radius: 20px; font-size: 0.95rem; font-weight: bold; color: #444;
}

/* --- 6. 補習區塊專屬 --- */
#tutorial-section { background-color: var(--bg-light); }
.tutorial-card { border-left: 5px solid var(--primary-blue); }
.interest-card { border-left: 5px solid var(--accent-pink); background: #fff5f8; }
.interest-card .card-title { color: var(--accent-pink); }

.badge {
  display: inline-block; background-color: var(--accent-pink); color: white;
  padding: 6px 16px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; margin-bottom: 20px;
}
.target-group { color: var(--accent-pink); font-weight: bold; margin-top: -5px; }
.feature-list { list-style: none; padding: 0; margin: 0; line-height: 1.8; color: #555; }
.feature-list li::before { content: "✓ "; color: var(--accent-pink); font-weight: bold; margin-right: 5px; }
.interest-card .feature-list li::before { content: "🎨 "; }

/* --- 7. 頁尾聯絡資訊 (Footer) --- */
footer { background-color: var(--primary-blue); color: white; padding: 60px 20px 30px; text-align: center; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; max-width: 1000px; margin: 0 auto; text-align: left; }
.footer-box { flex: 1; min-width: 300px; }
.footer-box h3 { color: var(--accent-pink); font-size: 1.5rem; margin-top: 0; margin-bottom: 15px; }
.footer-box p { line-height: 1.8; margin: 5px 0; font-size: 1rem; color: #eaf3fb; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.9rem; color: #ccc; }

/* --- 8. 懸浮聯絡按鈕 --- */
.floating-contact {
  position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 9999;
}
.float-btn {
  width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
  color: white; text-decoration: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}
.float-btn:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }

.btn-top { background-color: var(--primary-blue); }
.btn-whatsapp { background-color: #25D366; }
.btn-email { background-color: var(--accent-pink); }
.float-btn svg { width: 24px; height: 24px; fill: currentColor; }

/* 響應式設計 (手機版) */
@media (max-width: 768px) {
  .hero { background-attachment: scroll; } /* 修復：防止 iOS Safari 背景圖片顯示異常 */
  .hero h1 { font-size: 2.5rem; }
  .footer-content { flex-direction: column; text-align: center; }
  
  .float-btn { width: 45px; height: 45px; }
  .float-btn svg { width: 20px; height: 20px; }
  .floating-contact { bottom: 20px; right: 20px; gap: 10px; }
}
