/*
 * 檔案名稱：/style.css
 * 修改日期：2026/03/06 10:45 (UTC+8)
 * 檔案用途：Kevin 老師前台樣式 (真正完整版：加入 PWA 按鈕樣式、手機版動態縮字隱藏機制、絕對保留註解)
 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700;900&display=swap');

:root {
  --primary: #ff6b3d;
  --primary-dark: #e2572c;
  --bg: #0f172a;
  --bg-light: #111827;
  --card: #020617;
  --accent: #38bdf8;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-soft: #1f2937;
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: 0.3s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.page { min-height: 100vh; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Header / Nav ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7), transparent);
  border-bottom: 1px solid rgba(55, 65, 81, 0.6);
}

.nav { display: flex; align-items: center; justify-content: flex-start; padding: 12px 0; }
.nav-left { display: flex; align-items: center; gap: 10px; margin-right: auto; }

.logo-circle {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 32px;
  color: #ef4444;
  background: transparent;
  text-shadow: 0 2px 15px rgba(239, 68, 68, 0.4);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  white-space: nowrap; 
}

.logo-mobile-br { display: none; }

.nav-links { display: flex; gap: 10px; font-size: 14px; }
.nav-links a { padding: 6px 12px; border-radius: 20px; color: var(--text-muted); }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* 導覽列按鈕群組 */
.nav-cta-group {
  display: inline-flex;
  align-items: center;
  gap: 20px; /* ✅ 這裡設定為 20px 達成視覺上的「空一格」距離 */
}

.nav-cta-btn {
  padding: 8px 18px; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(248, 113, 22, 0.4);
  transition: 0.2s;
  white-space: nowrap;
}
.nav-cta-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }

.nav-cta-blue {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

.nav-cta-pwa {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* 桌機版微調 */
@media (min-width: 769px) {
  .nav-cta-desktop {
    margin-left: -30px; /* ✅ 向左偏移 30px 讓按鈕群組更靠中心 */
  }
}

.nav-cta-desktop { display: inline-flex; }
.nav-cta-mobile  { display: none; }
.menu-toggle { display: none; font-size: 24px; color: #fff; cursor: pointer; }

/* ===== Hero Section ===== */
.hero { padding: 60px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(15, 118, 110, 0.15); border: 1px solid rgba(45, 212, 191, 0.3); color: #a5f3fc; font-size: 13px; margin-bottom: 15px; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.hero-title { font-size: clamp(32px, 4vw, 42px); font-weight: 800; margin-bottom: 15px; line-height: 1.3; }
.hero-title span { background: linear-gradient(135deg, #f97316, #facc15); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 20px; max-width: 500px; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.pill { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border-soft); font-size: 13px; color: #e5e7eb; background: rgba(255,255,255,0.03); }

.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-main-btn, .hero-ghost-btn { padding: 12px 20px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s; }
.hero-main-btn { border: none; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 10px 30px rgba(248,113,22,0.3); }
.hero-ghost-btn { border: 1px solid var(--border-soft); background: rgba(255,255,255,0.05); color: #fff; }

.hero-right-card { background: radial-gradient(circle at top left, #1e293b, #020617); border: 1px solid var(--border-soft); border-radius: 24px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.hero-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.stat-card { background: rgba(255,255,255,0.03); padding: 10px; border-radius: 12px; border: 1px solid var(--border-soft); text-align: center; }
.stat-value { font-size: 18px; font-weight: 800; color: #fff; }
.stat-label { font-size: 12px; color: var(--text-muted); }

/* ===== Section Common ===== */
section { padding: 60px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.section-header { margin-bottom: 30px; text-align: left; }
.section-kicker { color: var(--accent); font-weight: 800; letter-spacing: 2px; font-size: 13px; margin-bottom: 5px; }
.section-title { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.section-desc { color: var(--text-muted); font-size: 15px; max-width: 600px; }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature { background: var(--card); padding: 25px; border-radius: 16px; border: 1px solid var(--border-soft); transition: 0.3s; }
.feature:hover { border-color: var(--primary); transform: translateY(-3px); }
.feature-icon { font-size: 28px; margin-bottom: 10px; }
.feature-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.feature-text { font-size: 14px; color: var(--text-muted); }

/* Curriculum */
.curriculum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.curr-card { background: var(--bg-light); padding: 20px; border-radius: 16px; border-left: 4px solid var(--primary); margin-bottom: 15px; }
.curr-head { display: flex; justify-content: space-between; margin-bottom: 10px; }
.curr-level { font-weight: 700; color: #fff; font-size: 16px; }
.curr-list span { display: inline-block; background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 4px; font-size: 13px; margin: 0 5px 5px 0; color: var(--text-muted); }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.news-card { background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-soft); display: block; }
.news-img { height: 180px; background: #000; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.news-card:hover .news-img img { transform: scale(1.1); }
.news-body { padding: 20px; }
.news-date { color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.news-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.news-content { font-size: 14px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Reviews */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.review-card { background: var(--bg-light); padding: 20px; border-radius: 16px; border: 1px solid var(--border-soft); }
.stars { color: #f59e0b; margin-bottom: 10px; font-size: 14px; }
.review-text { font-style: italic; color: #fff; font-size: 14px; margin-bottom: 15px; }
.review-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-pill { background: rgba(56,189,248,0.1); color: #38bdf8; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; border: 1px solid rgba(56,189,248,0.2); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.price-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 20px; padding: 25px; position: relative; display: flex; flex-direction: column; }
.price-tag { position: absolute; top: 0; right: 0; background: var(--accent); color: #000; padding: 5px 15px; font-size: 12px; font-weight: 700; border-bottom-left-radius: 15px; }
.price-title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 5px; }
.price-price { font-size: 32px; font-weight: 900; color: #fff; margin: 15px 0; }
.price-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.price-features li { margin-bottom: 8px; font-size: 14px; color: var(--text-muted); display: flex; gap: 8px; }
.price-features li i { color: var(--primary); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { color: #fff; margin-bottom: 20px; }
.contact-item { margin-bottom: 15px; color: var(--text-muted); font-size: 14px; }
.contact-item i { width: 20px; color: var(--primary); text-align: center; margin-right: 10px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; margin-bottom: 15px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-soft); border-radius: 8px; color: #fff; outline: none; font-size: 14px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.submit-btn { width: 100%; padding: 12px; background: var(--primary); color: #fff; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.submit-btn:hover { filter: brightness(1.1); }

/* 課程卡片底部兩顆按鈕專用樣式 */
.price-main-btn { margin-top: 8px; margin-bottom: 20px; }
.price-material-btn { margin-top: 0; background: linear-gradient(135deg, #fde047, #facc15); color: #1f2933; }

footer { border-top: 1px solid var(--border-soft); padding: 40px 0; text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 60px; }

/* Floating Buttons */
.float-stack { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.float-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); transition: 0.2s; }
.float-btn:hover { transform: translateY(-3px); }
.float-line { background: #06C755; }
.float-fb { background: #1877F2; }
.float-yt { background: #FF0000; }
.float-member { background: #7c3aed; }
.float-logout { background: #64748b; }

/* ===== RWD ===== */
@media (max-width: 900px) {
  .hero-grid, .curriculum-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-right-card { order: -1; }
}

@media (max-width: 768px) {
  .nav { flex-wrap: wrap; justify-content: flex-start; }
  .nav-left { flex: 0 0 100%; margin-bottom: 6px; margin-right: 0; justify-content: flex-start; gap: 6px; }

  .logo-mobile-br { display: block; }
  .menu-toggle { display: none !important; }

  .nav-links {
    width: 100%;
    position: static;
    display: flex !important;
    flex-direction: row;        
    flex-wrap: wrap;            
    align-items: center;
    justify-content: space-between;
    gap: 0;                     
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 13px;
  }

  .nav-links a {
    flex: 0 0 33.33%;           
    text-align: center;
    padding: 6px 0;             
    border-radius: 0;           
  }

  .nav-cta-desktop { display: none !important; }

  /* 調整手機版按鈕內距，讓三顆按鈕排得下 */
  .nav-cta-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    font-size: 12px;
  }

  /* 隱藏指定 span 文字 */
  .hide-mobile { display: none; }

  .nav-cta-blue.nav-cta-mobile {
    margin-left: 0;  
    margin-right: 0;  
  }
  .nav-cta-pwa.nav-cta-mobile {
    margin-left: auto; /* 將這三個按鈕群組往右推 */
  }
  .nav-cta-mobile:last-child {
    margin-right: 5px;  
  }

  .hero-stats-grid { grid-template-columns: 1fr; }
}

/* =========================
   隱藏邏輯 (絕對保留)
   ========================= */
.nav-links { display: none !important; } 
.nav-links a { display: none !important; } 

#about, #curriculum, #news, #reviews, #contact { display: none !important; }
.hero-cta-row { display: none !important; }

/* 課程日期放大與會員樣式 (絕對保留) */
.price-card > div:first-of-type { font-size: 16px; font-weight: 700; color: #e5e7eb; }

@media (max-width: 768px) {
  .price-card > div:first-of-type,
  .price-card .price-title + div { font-size: 19px; font-weight: 800; line-height: 1.4; }
  .price-card .price-title + div { font-size: 18px !important; font-weight: 800 !important; line-height: 1.4 !important; }
}

.member-wrap{ width: 100%; max-width: 520px; margin: 90px auto 40px; padding: 0 16px; }
.member-card{ background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); border-radius: 18px; backdrop-filter: blur(14px); padding: 18px; }
.member-title{ font-size: 22px; font-weight: 900; margin-bottom: 12px; }
.member-field{ margin: 12px 0; }
.member-field label{ display:block; font-size: 13px; font-weight: 800; color: var(--text-muted); margin-bottom: 6px; }
.member-input{ width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.18); color: #fff; outline: none; }
.member-input:focus{ border-color: rgba(56,189,248,0.55); box-shadow: 0 0 0 3px rgba(56,189,248,0.15); }
.captcha-row{ display: flex; gap: 10px; align-items: center; }
.captcha-row .captcha-input{ flex: 1 1 auto; }
.captcha-img{ width: 180px; height: 56px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.14); background: #fff; object-fit: cover; cursor: pointer; }

@media (max-width: 520px){
  .captcha-row{ flex-direction: column; align-items: stretch; }
  .captcha-img{ width: 100%; height: 60px; }
}

.member-btn{ width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: none; cursor: pointer; font-weight: 900; color: #fff; background: linear-gradient(135deg, #111, #000); }
.member-links{ display:flex; gap:12px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.member-links a:hover{ color:#fff; }