@import "/mk3/assets/palette.css";
/* ========================================
   Millzik 文化資源頁面樣式
   65/35 非對稱佈局 + 深色主題
   ======================================== */

/* ========================================
   全域變數
   ======================================== */
:root {
  --dark-bg: #0f172a;
  --darker-bg: #020617;
  --light-text: #f1f5f9;
  --muted-text: #94a3b8;
  --border-color: #334155;
  --hover-bg: #1e293b;
  --card-bg: #1e293b;
  --timeline-line: #475569;
}

/* ========================================
   基礎樣式
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC',
               'Microsoft JhengHei', sans-serif;
  background: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[id] {
  scroll-margin-top: 84px;
}

/* ========================================
   Hero Section
   ======================================== */
.resources-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--darker-bg) 100%);
  overflow: hidden;
}

.resources-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(251, 171, 24, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(36, 85, 166, 0.15) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

.hero-breadcrumb {
  font-size: 0.8125rem;
  color: rgba(241, 245, 249, 0.6);
  margin-bottom: 1.25rem;
}

.hero-breadcrumb a {
  color: var(--orange);
  text-decoration: none;
}

.hero-breadcrumb a:hover {
  text-decoration: underline;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--orange) 0%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-text);
  line-height: 1.8;
}

/* ========================================
   主容器：65/35 佈局
   ======================================== */
.resources-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 3rem;
}

/* ========================================
   主內容區（左側 65%）
   ======================================== */
.main-content {
  min-width: 0; /* 防止 grid 溢出 */
}

.content-section {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.section-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--muted-text);
  margin-bottom: 1.5rem;
}

/* 引用區塊 */
.quote {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 600;
  color: var(--orange);
  padding: 2rem;
  margin: 2rem 0;
  background: var(--card-bg);
  border-left: 4px solid var(--orange);
  border-radius: 0.5rem;
}

/* ========================================
   時間軸
   ======================================== */
.timeline-section {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 4rem;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.timeline-item:last-child {
  border-bottom: none;
}

/* 時間軸線 */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 3rem;
  bottom: -3rem;
  width: 2px;
  background: var(--timeline-line);
}

.timeline-item:last-child::before {
  display: none;
}

/* 時間標記 */
.timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 3rem;
  height: 3rem;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  border: 3px solid var(--dark-bg);
  box-shadow: 0 0 0 2px var(--orange);
}

.timeline-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 24px rgba(251, 171, 24, 0.15);
  transform: translateY(-2px);
}

.timeline-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--light-text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.era-icon {
  font-size: 2rem;
}

.timeline-location {
  font-size: 0.875rem;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-body {
  color: var(--muted-text);
  line-height: 1.8;
}

.timeline-body h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.timeline-body p {
  margin-bottom: 1rem;
}

.timeline-body ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.timeline-body li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.timeline-body li::marker {
  color: var(--orange);
}

.timeline-body strong {
  color: var(--orange);
  font-weight: 600;
}

/* ========================================
   音樂播放器
   ======================================== */
.audio-player {
  margin-top: 2rem;
  background: var(--darker-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.audio-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.audio-icon {
  font-size: 1.5rem;
}

.audio-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
}

.audio-tracks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.audio-track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--card-bg);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.audio-track:hover {
  background: var(--hover-bg);
  transform: translateX(4px);
}

.track-name {
  font-size: 0.9375rem;
  color: var(--muted-text);
}

.track-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--orange);
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
}

.track-link:hover {
  background: var(--orange);
  color: var(--dark-bg);
}

/* ========================================
   設備列表
   ======================================== */
.gear-list {
  margin-top: 2rem;
}

.gear-list h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.gear-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gear-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--darker-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--muted-text);
  transition: all 0.2s ease;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.gear-item:hover {
  border-color: var(--orange);
  background: var(--card-bg);
  transform: translateY(-2px);
}

.gear-icon {
  font-size: 1.5rem;
}

.gear-name {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ========================================
   傳承區塊
   ======================================== */
.legacy-section {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}

.legacy-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.flow-item {
  padding: 1rem 1.5rem;
  background: var(--darker-bg);
  border: 2px solid var(--orange);
  border-radius: 0.5rem;
  font-weight: 600;
  color: var(--light-text);
}

.flow-arrow {
  font-size: 1.5rem;
  color: var(--orange);
}

.legacy-principles {
  margin-top: 3rem;
}

.legacy-principles h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 2rem;
  text-align: center;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.principle-item {
  text-align: center;
  padding: 2rem;
  background: var(--darker-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.principle-item:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(251, 171, 24, 0.15);
}

.principle-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.principle-item h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.75rem;
}

.principle-item p {
  font-size: 0.9375rem;
  color: var(--muted-text);
  line-height: 1.6;
}

.legacy-quote {
  margin-top: 3rem;
  text-align: center;
  font-size: 1.75rem;
}

/* ========================================
   側邊欄（右側 35%）
   ======================================== */
.sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

/* 快速導航 */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-link {
  display: block;
  padding: 0.75rem;
  color: var(--muted-text);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.sidebar-link:hover {
  background: var(--hover-bg);
  color: var(--orange);
  transform: translateX(4px);
}

/* 相關課程 */
.sidebar-courses {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--darker-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.course-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.course-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.course-info {
  flex: 1;
}

.course-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.25rem;
}

.course-meta {
  font-size: 0.8125rem;
  color: var(--muted-text);
}

/* 推薦設備 */
.sidebar-gear {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gear-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--darker-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.gear-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.gear-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: var(--card-bg);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gear-placeholder {
  font-size: 2rem;
}

.gear-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gear-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 0.25rem;
}

.gear-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--orange);
}

/* 延伸閱讀 */
.sidebar-reading {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reading-link {
  display: block;
  padding: 1rem;
  background: var(--darker-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--light-text);
  transition: all 0.2s ease;
  line-height: 1.4;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.reading-link:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.reading-author {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted-text);
  margin-top: 0.25rem;
}

/* 相關連結 */
.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-links a {
  display: block;
  padding: 0.75rem;
  color: var(--muted-text);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.sidebar-links a:hover {
  background: var(--hover-bg);
  color: var(--orange);
  transform: translateX(4px);
}

/* ========================================
   站台外框（skip-link / 頁尾 / Toast）
   ======================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 3000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.mk-footer {
  background: var(--darker-bg);
  color: var(--muted-text);
  padding: 26px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.footer-logo {
  color: var(--light-text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 2px;
  user-select: none;
}

.footer-logo span {
  color: var(--orange);
}

.mk-footer p {
  font-size: 12px;
}

.mk-footer a {
  color: var(--orange);
  text-decoration: none;
}

.mk-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2000;
}

.mk-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================
   響應式設計
   ======================================== */

/* 平板 */
@media (max-width: 1024px) {
  .resources-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }

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

  .timeline-item {
    padding-left: 3rem;
  }

  .timeline-marker {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.75rem;
  }

  .timeline-item::before {
    left: 1rem;
  }
}

/* 手機 */
@media (max-width: 768px) {
  .resources-container {
    padding: 2rem 1rem;
  }

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

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

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

  .section-title {
    font-size: 1.5rem;
  }

  .timeline-title {
    font-size: 1.25rem;
  }

  .timeline-content {
    padding: 1.5rem;
  }

  .legacy-section {
    padding: 2rem 1.5rem;
  }

  .flow-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .audio-track {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .gear-items {
    grid-template-columns: 1fr;
  }

  .quote {
    font-size: 1.25rem;
    padding: 1.5rem;
  }

  .mk-footer {
    padding: 20px 18px;
    flex-direction: column;
    text-align: center;
  }
}

/* 小手機 */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .timeline-item {
    padding-left: 2.5rem;
  }

  .timeline-marker {
    width: 2rem;
    height: 2rem;
    font-size: 0.625rem;
    left: -0.25rem;
  }

  .timeline-item::before {
    left: 0.75rem;
  }

  .legacy-flow {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }
}

/* ========================================
   無障礙與動畫偏好
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* 高對比度模式 */
@media (prefers-contrast: high) {
  .timeline-content,
  .sidebar-section,
  .audio-player,
  .gear-item {
    border-width: 2px;
  }
}

/* 焦點樣式 */
*:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ========================================
   列印樣式
   ======================================== */
@media print {
  .sidebar,
  .audio-player,
  .gear-list {
    display: none;
  }

  .resources-container {
    grid-template-columns: 1fr;
  }

  .timeline-content {
    page-break-inside: avoid;
  }
}
