/**
 * 群樂運動中心 - 官網核心視覺設計系統 (style.css)
 * 升級 Google Fonts、高質感留白、動態微動畫與完美響應式佈局
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

:root {
  /* 尊榮核心色彩系統 */
  --wine: #6b0f18;
  --wine-light: #961525;
  --wine2: #3a0609;
  --gold: #b9822f;
  --gold-light: #f2c37a;
  --cream: #fff7ea;
  --ink: #1e1e1e;
  --muted: #666;
  --line: #ead8c0;
  --bg-gradient: radial-gradient(circle at 20% 0%, #fff4dc 0%, #ffffff 45%, #fff8ed 100%);
  
  /* 緩動與陰影系統 */
  --shadow-sm: 0 4px 12px rgba(60, 20, 5, 0.04);
  --shadow-md: 0 10px 35px rgba(60, 20, 5, 0.07);
  --shadow-lg: 0 20px 50px rgba(107, 15, 24, 0.12);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* ==========================================================================
   🧱 基礎重設與全域排版 (Reset & Base Typography)
   ========================================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background-color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ==========================================================================
   🎯 導覽列優化 (Header & Navigation)
   解決原先桌面與平板過渡期折行、錯位的不合理排版
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 40px;
  transition: var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.brand:hover img {
  transform: rotate(3deg) scale(1.05);
}

.brand strong {
  font-size: 20px;
  letter-spacing: 2px;
  display: block;
  color: var(--wine2);
  font-weight: 900;
}

.brand span {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 3px;
  font-weight: 800;
}

/* 桌面導覽列 */
nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 700;
  color: #4a2020;
}

nav a {
  position: relative;
  padding: 6px 4px;
  font-size: 15px;
  color: var(--wine2);
}

/* 金色高感底線懸停動畫 */
nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

nav a:hover {
  color: var(--gold);
}

nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 行動端漢堡選單按鈕 (預設桌面端隱藏) */
#mobileNavToggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 32px;
  color: var(--wine);
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.2s ease, color 0.2s ease;
  outline: none;
}
#mobileNavToggle:active {
  transform: scale(0.9);
}

/* ==========================================================================
   ⚡ 英雄首頁區優化 (Hero Section)
   ========================================================================== */
.hero {
  min-height: 640px;
  background: var(--bg-gradient);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  max-width: 1280px;
  margin: auto;
  padding: 80px 40px;
  transition: var(--transition);
}

.hero h1 {
  font-size: 64px;
  line-height: 1.1;
  margin: 16px 0;
  font-weight: 900;
  color: var(--wine2);
}

.hero h1 span {
  color: var(--gold);
  font-size: 30px;
  letter-spacing: 6px;
  font-weight: 800;
  display: block;
  margin-top: 8px;
}

.hero p {
  font-size: 18px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 30px;
}

.hero-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  animation: hero-card-float 6s infinite alternate ease-in-out;
}

.hero-card img {
  width: 100%;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.hero-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(107, 15, 24, 0.16);
}

@keyframes hero-card-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

.eyebrow {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 4px;
  font-size: 14px;
  text-transform: uppercase;
}

/* ==========================================================================
   🔘 按鈕與動態反饋 (Buttons)
   ========================================================================== */
.actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  padding: 14px 28px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.btn:active {
  transform: scale(0.96) !important;
}

.primary {
  background: linear-gradient(135deg, var(--wine), var(--wine-light));
  color: white;
}

.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(107, 15, 24, 0.3);
  background: linear-gradient(135deg, var(--wine-light), #be1b2f);
}

.ghost {
  border: 2px solid var(--wine);
  color: var(--wine);
  background: #ffffff;
}

.ghost:hover {
  transform: translateY(-3px);
  background: var(--wine);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(107, 15, 24, 0.15);
}

/* ==========================================================================
   🖼️ 內容區塊與網格 (Sections & Grid)
   ========================================================================== */
.section {
  max-width: 1240px;
  margin: auto;
  padding: 80px 40px;
}

.section h2 {
  font-size: 36px;
  text-align: center;
  margin: 0 0 40px;
  font-weight: 900;
  color: var(--wine2);
  position: relative;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto 0;
  border-radius: 99px;
}

.center {
  text-align: center;
  font-size: 18px;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--muted);
}

/* 宣傳頁標題區 */
.page-title {
  background: linear-gradient(135deg, var(--wine2), var(--wine));
  color: white;
  text-align: center;
  padding: 100px 40px;
  position: relative;
  overflow: hidden;
}

.page-title::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(185, 130, 47, 0.08) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
}

.page-title h1 {
  font-size: 48px;
  margin: 16px 0;
  font-weight: 900;
  position: relative;
  z-index: 2;
  letter-spacing: 2px;
}

.page-title p:not(.eyebrow) {
  max-width: 780px;
  margin: auto;
  line-height: 1.8;
  font-size: 17px;
  color: #fff4e7;
  position: relative;
  z-index: 2;
}

.page-title .eyebrow {
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 800;
}

/* 網格系統與高級卡片動態 */
.grid {
  display: grid;
  gap: 24px;
}

.five { grid-template-columns: repeat(5, 1fr); }
.four { grid-template-columns: repeat(4, 1fr); }
.three { grid-template-columns: repeat(3, 1fr); }

.grid article, .quote, .contact-box, .timeline div {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

/* 💡 高級卡片 Hover 特效：微升起、陰影加深、淡淡金色框 */
.grid article:hover, .contact-box:hover, .timeline div:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(107, 15, 24, 0.08);
  border-color: var(--gold-light);
}

.grid h3, .timeline h3 {
  color: var(--wine);
  font-size: 22px;
  margin: 0 0 12px;
  font-weight: 800;
}

.grid p, .timeline p, .split p, .contact-box p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  margin: 0;
}

.grid a {
  color: var(--wine);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.grid a:hover {
  color: var(--gold);
}

/* ==========================================================================
   🌑 暗色區塊 (Dark Sections)
   ========================================================================== */
.dark {
  max-width: none;
  background: linear-gradient(135deg, var(--wine2), var(--wine));
  color: white;
}

.dark h2 {
  color: white;
}

.dark h2::after {
  background: var(--gold-light);
}

.dark .grid {
  max-width: 1240px;
  margin: auto;
}

.dark article {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.dark article:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-light);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.dark h3, .dark p {
  color: white;
}

/* ==========================================================================
   🔀 其他特色排版 (Splits, Timeline & Contact)
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.quote {
  font-size: 26px;
  font-weight: 900;
  color: var(--wine);
  line-height: 1.5;
  text-align: center;
  border-left: 6px solid var(--gold);
  background: #faf6f0;
  border-radius: var(--radius-sm);
  padding: 34px;
}

.timeline {
  max-width: 900px;
  margin: auto;
  display: grid;
  gap: 20px;
}

.timeline div {
  border-left: 6px solid var(--gold);
  padding: 24px 30px;
}

.contact-box {
  max-width: 780px;
  margin: auto;
  text-align: center;
}

.contact-box h2 {
  margin-top: 0;
}

/* ==========================================================================
   👣 頁尾設計 (Footer)
   ========================================================================== */
footer {
  background: #1c0304;
  color: white;
  padding: 40px 24px;
  text-align: center;
  border-top: 4px solid var(--gold);
}

footer strong {
  font-size: 18px;
  letter-spacing: 1px;
  color: #ffffff;
}

footer p {
  color: #ead8c0;
  margin: 10px 0 0;
  font-size: 14px;
  opacity: 0.85;
}

/* ==========================================================================
   📱 完美響應式適配 (Responsive layout)
   解決中型螢幕與行動裝置下的排版混亂
   ========================================================================== */
@media (max-width: 1100px) {
  /* 中型寬度平板：縮小 Nav 間距防止折行錯位 */
  .site-header {
    padding: 14px 24px;
  }
  nav {
    gap: 12px;
  }
  nav a {
    font-size: 14px;
  }
  .hero {
    gap: 30px;
  }
  .hero h1 {
    font-size: 48px;
  }
}

@media (max-width: 980px) {
  /* 行動裝置與小型平板 */
  header.site-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative;
    padding: 14px 24px !important;
  }
  
  header.site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 15px 30px rgba(107, 15, 24, 0.08);
    flex-direction: column !important;
    align-items: center !important;
    padding: 24px 20px !important;
    gap: 16px !important;
    z-index: 9999;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
  }
  
  header.site-header nav.mobile-active {
    display: flex !important;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  header.site-header nav a {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(234, 216, 192, 0.4);
    margin-left: 0 !important;
  }
  header.site-header nav a:last-child {
    border-bottom: none;
  }
  
  #mobileNavToggle {
    display: block !important;
  }
  
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 60px 20px;
    min-height: auto;
  }
  
  .hero h1 {
    font-size: 42px;
  }
  
  .hero h1 span {
    font-size: 22px;
    letter-spacing: 4px;
  }
  
  .actions {
    justify-content: center;
  }
  
  .hero-card {
    max-width: 480px;
    margin: auto;
  }
  
  .five, .four, .three {
    grid-template-columns: 1fr;
  }
  
  .split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .page-title {
    padding: 70px 20px;
  }
  
  .page-title h1 {
    font-size: 34px;
  }
  
  .section {
    padding: 50px 20px;
  }
  
  .section h2 {
    font-size: 28px;
  }
}

/* ==========================================================================
   📸 首頁最新消息多圖徽章樣式
   ========================================================================== */
.post-images-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(107, 15, 24, 0.85); /* 尊榮紅酒底色，加半透明 */
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ==========================================================================
   🔍 最新動態搜尋與載入更多 (Search & Load More)
   ========================================================================== */
.news-search-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto 32px;
  position: relative;
  z-index: 10;
}

.news-search-input {
  width: 100%;
  max-width: 420px;
  padding: 12px 24px;
  border-radius: 99px;
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.news-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(185, 130, 47, 0.15);
}

/* 顯示更多按鈕容器與樣式 */
.news-more-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 40px;
  position: relative;
  z-index: 10;
}

.news-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 36px;
  background: #ffffff;
  border: 2px solid var(--wine);
  color: var(--wine);
  border-radius: 99px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.news-more-btn:hover {
  transform: translateY(-3px);
  background: var(--wine);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(107, 15, 24, 0.15);
}

.news-more-btn:active {
  transform: scale(0.96) !important;
}

.news-more-btn.btn-gold-outline {
  border-color: var(--gold);
  color: var(--gold);
}

.news-more-btn.btn-gold-outline:hover {
  background: var(--gold);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(185, 130, 47, 0.2);
}

/* 🌙 暗色區塊 (.dark) 下的適配覆寫 */
.dark .news-search-input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.dark .news-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.dark .news-search-input:focus {
  border-color: var(--gold-light);
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 15px rgba(242, 195, 122, 0.25);
}

.dark .news-more-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(242, 195, 122, 0.35);
  color: var(--gold-light);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.dark .news-more-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(185, 130, 47, 0.25);
}


