/**
 * 國際扶輪 3482 地區 2026-27 年度扶青社社團介紹網站
 * 核心美學與排版系統 (style.css)
 * Slogan: WOW! 青年影響力 共創新世紀！ (YOUTH IMPACT • NEW ERA)
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+SC:wght@500;600;700&family=Noto+Serif+TC:wght@500;700;900&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- 基礎變數與色彩系統 --- */
:root {
  --primary: #3A5166;                      /* 官方深海藍 */
  --primary-light: #526C84;
  --primary-dark: #233D50;
  
  --accent: #B89B6B;                       /* 官方霧金 */
  --accent-light: #CBB48D;
  --accent-dark: #9A7E4F;
  
  --bg-light: #F2F3F5;                     /* 官方淺霧白 */
  --bg-white: #ffffff;
  --bg-contrast: #E4E7EB;
  
  --text-dark: #232C33;                    /* 搭配的深文字色 */
  --text-muted: #5A5D66;                   /* 官方石墨灰作為次要文字色 */
  
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(30, 42, 56, 0.06);
  
  --font-title: 'Cormorant SC', 'Noto Serif TC', 'Outfit', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft JhengHei", sans-serif;
  
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-sm: 0 4px 6px rgba(30, 42, 56, 0.04);
  --shadow-md: 0 10px 20px rgba(30, 42, 56, 0.06);
  --shadow-lg: 0 20px 40px rgba(30, 42, 56, 0.1);

  /* 官方形象識別 6 色延伸色票 */
  --color-navy: #3A5166;                   /* 01 | 深海藍 */
  --color-gold: #B89B6B;                   /* 02 | 霧金 */
  --color-future-blue: #6A7FA0;            /* 03 | 未來藍 */
  --color-graphite-gray: #5A5D66;          /* 04 | 石墨灰 */
  --color-mist-brown: #B7ACA1;             /* 05 | 霧灰褐 */
  --color-vision-green: #8CA08C;           /* 06 | 願景綠 */
}

/* --- 全域設定 --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
}

/* --- 扶輪齒輪背景浮水印 (Rotary Gear Watermark) --- */
.gear-watermark-bg {
  position: fixed;
  right: -10%;
  top: 15%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' opacity='0.03'%3E%3Cpath fill='%231e2a38' d='M50,30 C39,30 30,39 30,50 C30,61 39,70 50,70 C61,70 70,61 70,50 C70,39 61,30 50,30 Z M50,38 C56.6,38 62,43.4 62,50 C62,56.6 56.6,62 50,62 C43.4,62 38,56.6 38,50 C38,43.4 43.4,38 50,38 Z M50,10 L46,18 L54,18 Z M50,90 L46,82 L54,82 Z M10,50 L18,46 L18,54 Z M90,50 L82,46 L82,54 Z M22,22 L28,28 L23,33 Z M78,78 L72,72 L77,67 Z M22,78 L28,72 L33,77 Z M78,22 L72,28 L67,23 Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  z-index: -1;
  pointer-events: none;
  animation: rotateGear 120s linear infinite;
}

@keyframes rotateGear {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- 頂級毛玻璃導覽列 (Floating Header) --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

.main-header.header-scrolled {
  padding: 12px 6%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(30, 42, 56, 0.03);
}

.header-logo-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo-rotaract {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.header-logo-divider {
  width: 1.5px;
  height: 24px;
  background-color: rgba(184, 155, 107, 0.4);
}

.header-logo-impact {
  height: 36px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

/* 捲動時導覽列標誌微縮 */
.main-header.header-scrolled .header-logo-rotaract {
  height: 34px;
}

.main-header.header-scrolled .header-logo-impact {
  height: 30px;
}

.main-header.header-scrolled .header-logo-divider {
  height: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.brand-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 1px;
  line-height: 1.25;
}

/* 捲動時文字微縮 */
.main-header.header-scrolled .brand-title {
  font-size: 1.0rem;
}

.main-header.header-scrolled .brand-subtitle {
  font-size: 0.65rem;
}

/* 導覽選單 */
.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--accent-dark);
}

.nav-btn {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  box-shadow: 0 4px 15px rgba(58, 81, 102, 0.2);
}

.nav-btn:hover {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
  transform: translateY(-2px);
}

/* 漢堡選單 (手機版) */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-btn span {
  width: 26px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 3px;
  transition: var(--transition);
}

/* --- 極致英雄區 (Hero Section) --- */
.hero-section {
  min-height: 100vh;
  padding: 140px 6% 80px;
  display: flex;
  align-items: center;
  position: relative;
  background-color: var(--bg-white);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}

.hero-text-pane {
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.hero-meta-badge {
  align-self: flex-start;
  background-color: rgba(184, 155, 107, 0.1);
  border: 1px solid rgba(184, 155, 107, 0.3);
  color: var(--accent-dark);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta-badge span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

.hero-title-main {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--primary);
}

.hero-theme-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  margin-top: 15px;
  display: inline-block;
  vertical-align: middle;
  transition: var(--transition);
}

.hero-slogan-large {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 25px;
  letter-spacing: 0.5px;
  border-left: 4px solid var(--accent);
  padding-left: 15px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-btn-primary {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(58, 81, 102, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(58, 81, 102, 0.35);
}

.hero-btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 14px 34px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
}

.hero-btn-secondary:hover {
  background-color: rgba(58, 81, 102, 0.05);
  transform: translateY(-3px);
}

/* 英雄右側主視覺徽章 (The W Emblem & Wave Vector) */
.hero-visual-pane {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.emblem-wrapper {
  position: relative;
  width: 85%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.emblem-w-svg {
  width: 100%;
  height: 100%;
  animation: floatEmblem 6s ease-in-out infinite;
  filter: drop-shadow(0 15px 30px rgba(30, 42, 56, 0.08));
}

@keyframes floatEmblem {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.emblem-glow-bg {
  position: absolute;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(184, 155, 107, 0.12) 0%, rgba(58, 81, 102, 0.04) 70%, transparent 100%);
  z-index: -1;
  border-radius: 50%;
  animation: scaleGlow 4s ease-in-out infinite;
}

@keyframes scaleGlow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* 主視覺底部流暢波浪 (SVG Waves) */
.hero-wave-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 3;
}

.hero-wave-container svg {
  position: relative;
  display: block;
  width: 100%;
  height: 120px;
}

/* --- 通用 Section 樣式 --- */
section {
  padding: 100px 6%;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-subtitle {
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 2.3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* --- 關於與地區團隊 (About & District Team) --- */
.about-section {
  background-color: var(--bg-light);
}

/* 年度精彩活動輪播 Event Carousel */
.event-carousel-wrapper {
  max-width: 1100px;
  margin: 0 auto 50px auto;
  padding: 0 15px;
}

.event-carousel {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(30, 42, 56, 0.12);
  border: 1px solid rgba(184, 155, 107, 0.2);
  background-color: var(--primary-dark);
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 浮動式毛玻璃說明面板 */
.carousel-caption {
  position: absolute;
  left: 30px;
  bottom: 30px;
  width: calc(100% - 60px);
  max-width: 600px;
  padding: 25px 35px;
  background: rgba(30, 42, 56, 0.72);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--bg-white);
  text-align: left;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s ease;
  transform: translateY(0);
}

.carousel-slide.active .carousel-caption {
  animation: slideCaptionUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

@keyframes slideCaptionUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.carousel-badge {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  color: var(--bg-white);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-gold { background-color: var(--color-gold); }
.badge-green { background-color: var(--color-vision-green); }
.badge-blue { background-color: var(--color-future-blue); }
.badge-purple { background-color: var(--color-navy); }

.carousel-caption-title {
  font-size: 1.35rem;
  font-family: var(--font-title);
  color: var(--accent-light);
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
}

.carousel-caption-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
  font-weight: 500;
}

/* 輪播控制按鈕 */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 42, 56, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--bg-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 1.4rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  outline: none;
}

.carousel-control:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(184, 155, 107, 0.4);
}

.carousel-control.prev { left: 25px; }
.carousel-control.next { right: 25px; }

/* 輪播指示點 */
.carousel-indicators {
  position: absolute;
  bottom: 50px;
  right: 50px;
  z-index: 8;
  display: flex;
  gap: 10px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}

.indicator.active {
  background: var(--accent);
  border-color: var(--bg-white);
  transform: scale(1.2);
}

/* 進度條 */
.carousel-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 12;
}

.carousel-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  transition: width 0.1s linear;
}

/* 輪播響應式適配 */
@media (max-width: 768px) {
  .event-carousel {
    height: 420px;
  }
  
  .carousel-caption {
    left: 20px;
    bottom: 20px;
    width: calc(100% - 40px);
    padding: 20px;
  }
  
  .carousel-caption-title {
    font-size: 1.15rem;
  }
  
  .carousel-caption-desc {
    font-size: 0.82rem;
  }
  
  .carousel-indicators {
    bottom: 35px;
    right: 35px;
    display: none; /* 在中小型螢幕隱藏指示點以防重疊 */
  }
  
  .carousel-control {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  
  .carousel-control.prev { left: 15px; }
  .carousel-control.next { right: 15px; }
}

@media (max-width: 576px) {
  .event-carousel {
    height: 320px;
  }
  
  .carousel-caption {
    left: 15px;
    bottom: 15px;
    width: calc(100% - 30px);
    padding: 15px;
    gap: 6px;
  }
  
  .carousel-caption-title {
    font-size: 1.05rem;
  }
  
  .carousel-caption-desc {
    display: none; /* 手機端隱藏描述，僅顯示標題與徽章 */
  }
  
  .carousel-control {
    display: none; /* 手機端隱藏切換箭頭，完全依賴自動輪播 */
  }
}

/* 四大服務主軸卡片 */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 25px;
  margin-bottom: 80px;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid rgba(30, 42, 56, 0.03);
  padding: 30px 25px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(184, 155, 107, 0.2);
}

.service-icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: rgba(58, 81, 102, 0.06);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background-color: var(--accent);
  color: var(--bg-white);
  transform: rotateY(180deg);
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.service-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* 地區影響力數據 */
.impact-stats {
  display: flex;
  justify-content: space-around;
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 80px;
  flex-wrap: wrap;
  gap: 30px;
  border: 1px solid rgba(184, 155, 107, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-number span.gold {
  color: var(--accent-dark);
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* 地區內閣 Cabinet 網格 */
.cabinet-intro-title {
  text-align: center;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 40px;
  position: relative;
}

.cabinet-intro-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  margin: 15px auto 0;
}

/* 地區團隊樹狀組織圖 Cabinet Tree Structure */
.cabinet-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.cabinet-tier {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

/* 層級標籤 */
.cabinet-tier-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 15px 0 25px 0;
  text-align: center;
  width: 100%;
  opacity: 0.85;
}

/* 樹狀連接垂直線 */
.tree-connector-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent) 0%, rgba(184, 155, 107, 0.1) 100%);
  margin: 0 auto;
}

/* 幹部卡片容器 */
.tier-cards-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.tier-cards-grid {
  display: grid;
  gap: 30px;
  width: 100%;
  justify-content: center;
}

/* 各層級格數 */
.tier-cards-grid.grid-3 {
  grid-template-columns: repeat(3, minmax(260px, 320px));
}

.tier-cards-grid.grid-2 {
  grid-template-columns: repeat(2, minmax(260px, 320px));
}

.tier-cards-grid.grid-4 {
  grid-template-columns: repeat(4, minmax(240px, 280px));
}

/* 地區代表特有高質感大卡片 */
.cabinet-drr-card {
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(184, 155, 107, 0.4) !important;
  box-shadow: 0 10px 30px rgba(184, 155, 107, 0.08) !important;
  background: linear-gradient(135deg, var(--bg-white) 0%, rgba(184, 155, 107, 0.02) 100%) !important;
}

.cabinet-drr-card .cabinet-avatar {
  width: 90px;
  height: 90px;
  border: 3px solid var(--accent) !important;
  box-shadow: 0 0 15px rgba(184, 155, 107, 0.2);
}

.cabinet-drr-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(184, 155, 107, 0.15) !important;
  border-color: var(--accent) !important;
}

/* 響應式樹狀結構調優 */
@media (max-width: 992px) {
  .tier-cards-grid.grid-4 {
    grid-template-columns: repeat(2, minmax(240px, 320px));
  }
}

@media (max-width: 768px) {
  .tier-cards-grid.grid-3 {
    grid-template-columns: repeat(2, minmax(240px, 320px));
  }
  
  .tree-connector-line {
    height: 30px;
  }
  
  .cabinet-tier-label {
    font-size: 0.78rem;
    margin: 10px 0 20px 0;
  }
}

@media (max-width: 576px) {
  .tier-cards-grid.grid-3,
  .tier-cards-grid.grid-2,
  .tier-cards-grid.grid-4 {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .tree-connector-line {
    display: none; /* 手機端隱藏連接線以防視覺擁擠 */
  }
}

.cabinet-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px 25px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  transition: var(--transition);
}

.cabinet-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(184, 155, 107, 0.25);
}

.cabinet-avatar {
  width: 80px;
  height: 80px;
  background: var(--bg-light);
  font-size: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 2px solid rgba(184, 155, 107, 0.15);
  transition: var(--transition);
  overflow: hidden;
}

.cabinet-card:hover .cabinet-avatar {
  border-color: var(--accent);
  background-color: rgba(184, 155, 107, 0.05);
  transform: scale(1.05);
}

.cabinet-role {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.cabinet-name {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.cabinet-club {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 15px;
}

.cabinet-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--bg-contrast);
  padding-top: 15px;
  line-height: 1.5;
}

/* --- 17社團宇宙 (Club Explorer) --- */
.explorer-section {
  background-color: var(--bg-white);
}

/* 篩選與搜尋面板 */
.filter-panel {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--bg-contrast);
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg-white);
  border: 1px solid rgba(30, 42, 56, 0.15);
  padding: 16px 20px 16px 50px;
  border-radius: 50px;
  font-size: 1rem;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 155, 107, 0.1);
}

.search-box-wrapper::before {
  content: '🔍';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.6;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  background: var(--bg-white);
  border: 1px solid rgba(30, 42, 56, 0.08);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background-color: rgba(58, 81, 102, 0.05);
  border-color: var(--primary-light);
}

.filter-btn.active {
  background-color: var(--primary);
  color: var(--bg-white);
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(58, 81, 102, 0.2);
}

/* 社團卡片網格 */
.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.club-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-contrast);
  padding: 35px 30px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.club-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  background-color: var(--bg-white);
  border-color: rgba(184, 155, 107, 0.25);
}

.club-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.club-badge {
  color: var(--bg-white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  background-color: var(--primary);
  display: inline-block;
  transition: var(--transition);
}

.club-badge.badge-vocational { background-color: var(--color-navy); }
.club-badge.badge-international { background-color: var(--color-gold); }
.club-badge.badge-tech { background-color: var(--color-future-blue); }
.club-badge.badge-service { background-color: var(--color-vision-green); }
.club-badge.badge-heritage { background-color: var(--color-mist-brown); }
.club-badge.badge-fellowship { background-color: var(--color-graphite-gray); }
.club-badge.badge-campus { background-color: var(--primary-light); }

.club-meeting-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.club-card-title {
  font-size: 1.45rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.club-card-english {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  font-weight: 500;
}

.club-card-slogan {
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 20px;
  line-height: 1.5;
}

.club-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.tag {
  background-color: rgba(30, 42, 56, 0.04);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.club-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--bg-contrast);
  padding-top: 20px;
}

.club-sponsor {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.club-more-btn {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.club-card:hover .club-more-btn {
  background-color: var(--primary);
  color: var(--bg-white);
  box-shadow: 0 4px 12px rgba(58, 81, 102, 0.15);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* --- 磨砂玻璃詳情 Modal (Club Details Popup) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 42, 56, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-container {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px rgba(30, 42, 56, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1050px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 50px 40px 40px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.show .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  background: var(--bg-contrast);
  color: var(--text-dark);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.modal-close-btn:hover {
  background-color: var(--accent);
  color: var(--bg-white);
  transform: rotate(90deg);
}

/* Modal Grid 內版 */
.modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
}

.modal-col-left {
  display: flex;
  flex-direction: column;
}

.modal-club-name {
  font-size: 2.2rem;
  color: var(--primary);
  margin: 10px 0 4px;
}

.modal-club-english {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 25px;
  font-weight: 600;
}

.modal-slogan {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 600;
  color: var(--accent-dark);
  border-left: 3px solid var(--accent);
  padding-left: 15px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.modal-section-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-contrast);
}

.modal-section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 45px;
  height: 2px;
  background-color: var(--accent);
}

.modal-intro-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 30px;
}

.modal-info-list {
  list-style: none;
  margin-bottom: 30px;
}

.modal-info-list li {
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
}

.modal-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 35px;
}

.modal-social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-icon-btn {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bg-white);
  transition: var(--transition);
}

.ig-btn { background-color: #e1306c; }
.ig-btn:hover { background-color: #c13584; }
.fb-btn { background-color: #1877f2; }
.fb-btn:hover { background-color: #166fe5; }
.mail-btn { background-color: var(--primary); }
.mail-btn:hover { background-color: var(--primary-dark); }

/* Modal 右側 */
.modal-officers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 35px;
}

.modal-officer-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-light);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-contrast);
}

.mo-avatar {
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  background: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 155, 107, 0.2);
  flex-shrink: 0;
  overflow: hidden;
}

/* 幹部大頭貼照片適配樣式 */
.cabinet-avatar img,
.mo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.mo-info {
  display: flex;
  flex-direction: column;
}

.mo-role {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.mo-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.mo-title {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Modal 社團活動花絮照片牆（跨欄置於幹部名單下方） */
.modal-gallery-section {
  margin-top: 45px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.mg-item {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bg-contrast);
  background: var(--bg-light);
  position: relative;
}

.mg-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: var(--transition);
}

.mg-item:hover img {
  transform: scale(1.05);
}

.mg-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 10px 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

/* Modal 活動 Timeline */
.modal-activities-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-act-item {
  display: flex;
  gap: 15px;
}

.ma-time {
  background-color: rgba(184, 155, 107, 0.15);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
  min-width: 50px;
  text-align: center;
}

.ma-content {
  display: flex;
  flex-direction: column;
}

.ma-title {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.ma-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- 扶青社員媒合器 (Rotaract Matcher) --- */
.quiz-section {
  background-color: var(--bg-light);
}

.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 50px 40px;
  border: 1px solid rgba(184, 155, 107, 0.12);
  min-height: 400px;
}

.quiz-pane {
  transition: opacity 0.3s ease;
}

.quiz-pane.hidden {
  display: none !important;
}

/* 歡迎面板 */
.quiz-welcome-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 20px;
  display: block;
}

.quiz-welcome-title {
  font-size: 1.8rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 15px;
}

.quiz-welcome-text {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 35px;
  line-height: 1.7;
}

.quiz-start-btn-wrapper {
  text-align: center;
}

.quiz-btn-go {
  background-color: var(--primary);
  color: var(--bg-white);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 16px 45px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(58, 81, 102, 0.2);
  transition: var(--transition);
}

.quiz-btn-go:hover {
  transform: translateY(-2px);
  background-color: var(--primary-dark);
}

/* 題目面板 */
.quiz-progress-bar-container {
  margin-bottom: 35px;
}

.quiz-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.quiz-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-light);
  border-radius: 10px;
  overflow: hidden;
}

.quiz-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.quiz-question-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 30px;
  line-height: 1.5;
}

.quiz-options-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.quiz-opt-btn {
  background: var(--bg-light);
  border: 1px solid var(--bg-contrast);
  border-radius: var(--radius-md);
  padding: 18px 25px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.quiz-opt-btn:hover {
  background-color: var(--bg-white);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.opt-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bg-white);
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 42, 56, 0.1);
  transition: var(--transition);
}

.quiz-opt-btn:hover .opt-num {
  background-color: var(--accent);
  color: var(--bg-white);
  border-color: var(--accent);
}

.opt-text {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* 測驗結果面板 */
.quiz-results-title {
  font-size: 1.8rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 8px;
}

.quiz-results-subtitle {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 35px;
}

.match-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.match-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--bg-contrast);
  position: relative;
  transition: var(--transition);
}

.match-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.match-rank-badge {
  position: absolute;
  top: 25px;
  right: 30px;
  background-color: var(--accent);
  color: var(--bg-white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
}

.match-rank-1 {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(184, 155, 107, 0.05) 100%);
  border: 2px solid var(--accent);
}

.match-card-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.match-card-slogan {
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.match-info {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.match-action-btn {
  background-color: var(--primary);
  color: var(--bg-white);
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.match-action-btn:hover {
  background-color: var(--primary-dark);
}

.quiz-actions-footer {
  text-align: center;
}

.quiz-btn-reset {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--bg-contrast);
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-btn-reset:hover {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* --- 地區年度重大活動時間軸 (Timeline) --- */
.timeline-section {
  background-color: var(--bg-white);
}

.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0;
}

/* 中央垂直軌跡 (按月分組版型已停用) */
.timeline-container::before {
  content: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: var(--bg-contrast);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-flow {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.timeline-item {
  position: relative;
  width: 50%;
  display: flex;
  z-index: 2;
}

.timeline-left {
  align-self: flex-start;
  justify-content: flex-end;
  padding-right: 50px;
  text-align: right;
}

.timeline-right {
  align-self: flex-end;
  justify-content: flex-start;
  padding-left: 50px;
  text-align: left;
}

/* 時間軸圓點 */
.timeline-dot {
  position: absolute;
  top: 25px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--bg-white);
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 155, 107, 0.15);
  z-index: 3;
  transition: var(--transition);
}

.timeline-left .timeline-dot { right: -9px; }
.timeline-right .timeline-dot { left: -9px; }

.timeline-item:hover .timeline-dot {
  background-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(184, 155, 107, 0.25);
  transform: scale(1.1);
}

/* 時間軸月份標誌 */
.timeline-date {
  position: absolute;
  top: 15px;
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.timeline-left .timeline-date { right: -125px; }
.timeline-right .timeline-date { left: -125px; }

/* 時間軸內容卡片 */
.timeline-content {
  background: var(--bg-light);
  border: 1px solid var(--bg-contrast);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 420px;
  transition: var(--transition);
}

.timeline-item:hover .timeline-content {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  border-color: rgba(184, 155, 107, 0.2);
}

.timeline-type {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--bg-white);
  display: inline-block;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* 委員會色標 (對齊地區行事曆分類) */
.timeline-type-district { background-color: #c0504d; }      /* 地區 */
.timeline-type-rotary { background-color: #4a90b8; }        /* 扶輪 */
.timeline-type-service { background-color: #2f7d95; }       /* 社服 */
.timeline-type-meeting { background-color: #6f7f90; }       /* 會議 */
.timeline-type-vocational { background-color: #4a9d5b; }    /* 職業 */
.timeline-type-international { background-color: #8a76b0; } /* 國際 */
.timeline-type-club { background-color: #c47a2c; }          /* 社務 */
.timeline-type-pr { background-color: #c56c94; }            /* 公關 */

.timeline-title {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 按月分組行事曆 (每月 3-4 場活動) */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  max-width: 1000px;
  margin: 0 auto 30px;
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cal-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.cal-month-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--bg-contrast);
}

.cal-month-label {
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  position: relative;
  padding-left: 16px;
}

.cal-month-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 70%;
  border-radius: 3px;
  background-color: var(--accent);
}

.cal-month-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --- 全年常態計畫（獨立於按月行事曆的板塊） --- */
.cal-programs {
  margin-bottom: 60px;
}

.cal-program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.cal-program {
  background: linear-gradient(135deg, var(--bg-white) 0%, rgba(184, 155, 107, 0.04) 100%);
  border: 1px solid rgba(184, 155, 107, 0.28);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.cal-program:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.cal-program-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid rgba(184, 155, 107, 0.45);
  border-radius: 20px;
  padding: 2px 10px;
}

.cal-program-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin: 12px 0 6px;
}

.cal-program-motto {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.cal-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.cal-event {
  background: var(--bg-light);
  border: 1px solid var(--bg-contrast);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.cal-event:hover {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  border-color: rgba(184, 155, 107, 0.25);
  transform: translateY(-4px);
}

.cal-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cal-event-date {
  font-family: var(--font-title);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.cal-event-type {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--bg-white);
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}

.cal-event-title {
  font-size: 1.08rem;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.cal-event-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 576px) {
  .cal-event-grid {
    grid-template-columns: 1fr;
  }
  .cal-month-label {
    font-size: 1.6rem;
  }
}

/* --- 意願諮詢表單 (Contact Form) --- */
.contact-section {
  background-color: var(--bg-light);
}

.contact-container {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 50px;
  border: 1px solid rgba(184, 155, 107, 0.1);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  background: var(--bg-light);
  border: 1px solid rgba(30, 42, 56, 0.1);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  background-color: var(--bg-white);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 155, 107, 0.08);
}

select.form-control {
  cursor: pointer;
}

.form-btn-submit {
  background-color: var(--primary);
  color: var(--bg-white);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(58, 81, 102, 0.2);
  transition: var(--transition);
  margin-top: 10px;
}

.form-btn-submit:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.form-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* --- 成功 Popup 模態視窗 --- */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 42, 56, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.success-overlay.show {
  opacity: 1;
}

.success-container {
  background: var(--bg-white);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 500px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.success-overlay.show .success-container {
  transform: scale(1);
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
}

.success-title {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.success-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 30px;
  text-align: left;
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
}

.success-btn {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 12px 35px;
  border-radius: 50px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.success-btn:hover {
  background-color: var(--primary-dark);
}

/* --- 頁尾 (Footer) --- */
.main-footer {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 6% 40px;
  border-top: 5px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-logo-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--bg-white);
  font-weight: 800;
}

.footer-logo-title span {
  color: var(--accent);
}

.footer-brand-desc {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-slogan {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.footer-links-title {
  color: var(--bg-white);
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-links-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a {
  font-size: 0.92rem;
}

.footer-links-list a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-contact-info {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.9rem;
}

.footer-contact-info strong {
  color: var(--bg-white);
}

.footer-copyright {
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
}

/* --- 滾動淡入動畫 (Scroll Animation Utility) --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 響應式佈局適配 (Media Queries) --- */

/* 平板適配 */
@media (max-width: 992px) {
  .main-header {
    padding: 15px 4%;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(30, 42, 56, 0.1);
    flex-direction: column;
    justify-content: center;
    gap: 35px;
    padding: 80px 40px;
    transition: var(--transition);
    z-index: 999;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  /* 漢堡選單動態效果 */
  .mobile-menu-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }
  
  .hero-meta-badge {
    align-self: center;
  }
  
  .hero-slogan-large {
    border-left: none;
    border-bottom: 2px solid var(--accent);
    padding-left: 0;
    padding-bottom: 12px;
    display: inline-block;
    align-self: center;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual-pane {
    max-width: 450px;
    margin: 0 auto;
  }
  
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .timeline-container::before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 50px !important;
    padding-right: 0 !important;
    text-align: left !important;
  }
  
  .timeline-left .timeline-dot,
  .timeline-right .timeline-dot {
    left: 11px;
  }
  
  .timeline-left .timeline-date,
  .timeline-right .timeline-date {
    position: relative;
    top: 0;
    left: 0;
    display: block;
    margin-bottom: 10px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 手機適配 */
@media (max-width: 576px) {
  section {
    padding: 80px 4%;
  }
  
  .hero-section {
    padding: 120px 4% 60px;
  }
  
  .hero-title-main {
    font-size: 2.3rem;
  }
  
  .hero-theme-logo {
    height: 38px;
    margin-top: 10px;
  }
  
  .header-logo-rotaract {
    height: 32px;
  }
  
  .header-logo-impact,
  .header-logo-divider {
    display: none; /* 手機端窄版隱藏右側副 Logo 以防擁擠破版 */
  }
  
  .header-logo-group {
    gap: 8px;
  }
  
  .brand-title {
    font-size: 0.95rem;
  }
  
  .brand-subtitle {
    font-size: 0.62rem;
  }
  
  .hero-slogan-large {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 1.85rem;
  }
  
  .impact-stats {
    flex-direction: column;
    padding: 30px 20px;
  }
  
  .stat-item {
    width: 100%;
  }
  
  .filter-panel {
    padding: 20px 15px;
  }
  
  .modal-container {
    padding: 40px 20px 30px;
  }
  
  .modal-club-name {
    font-size: 1.7rem;
  }
  
  .modal-officers-grid {
    grid-template-columns: 1fr;
  }
  
  .quiz-container {
    padding: 30px 20px;
  }
  
  .quiz-question-title {
    font-size: 1.15rem;
  }
  
  .opt-text {
    font-size: 0.88rem;
  }
  
  .contact-container {
    padding: 30px 20px;
  }
}

/* --- 指導暨支持夥伴 Section (Sponsors & Partners) --- */
.sponsors-section {
  background-color: var(--bg-white);
  border-top: 1px solid var(--bg-contrast);
  padding: 100px 6%;
}

.sponsors-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.sponsors-tier {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.tier-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--primary);
  text-align: center;
  position: relative;
  padding-bottom: 12px;
}

.tier-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2.5px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* Tier 1: Grand Sponsors Grid */
.sponsors-grid-grand {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  justify-content: center;
}

.sponsor-card {
  background: var(--bg-light);
  border: 1.5px solid var(--bg-contrast);
  border-radius: var(--radius-md);
  padding: 25px 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sponsor-card.grand-card {
  background: linear-gradient(135deg, var(--bg-white) 0%, rgba(184, 155, 107, 0.03) 100%);
  border-color: rgba(184, 155, 107, 0.25);
  box-shadow: var(--shadow-sm);
}

.sponsor-card.grand-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(184, 155, 107, 0.12);
}

.sponsor-card-inner {
  display: flex;
  align-items: center;
  gap: 25px;
}

.sponsor-logo-container {
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sponsor-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sponsor-svg-gear {
  width: 100%;
  height: 100%;
  animation: rotateGear 60s linear infinite;
}

.sponsor-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sponsor-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  color: var(--bg-white);
  letter-spacing: 0.5px;
}

.tag-grand { background-color: var(--primary); }
.tag-grant { background-color: var(--accent); }

.sponsor-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.sponsor-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

/* Tier 2: Sponsoring Clubs Grid */
.sponsors-grid-clubs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.club-sponsor-card {
  background: var(--bg-white);
  border: 1px solid var(--bg-contrast);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.club-sponsor-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 155, 107, 0.3);
  box-shadow: 0 8px 20px rgba(30, 42, 56, 0.05);
  background: linear-gradient(135deg, var(--bg-white) 0%, rgba(184, 155, 107, 0.01) 100%);
}

.club-sponsor-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.club-sponsor-icon svg {
  width: 100%;
  height: 100%;
  opacity: 0.8;
  transition: var(--transition);
}

.club-sponsor-card:hover .club-sponsor-icon svg {
  transform: rotate(45deg);
  opacity: 1;
}

.club-sponsor-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.club-sponsor-relation {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .sponsors-grid-grand {
    grid-template-columns: 1fr;
  }
  .sponsors-grid-clubs {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
