/**
 * The Stoic Wire - Wisdom Menu Styles (Updated)
 * Version: 6.1 - Improved Music Section Text Formatting
 */

:root {
  /* Design system colors */
  --wisdom-primary: #2a2a2a;
  --wisdom-secondary: #8b6f57;
  --wisdom-accent: #d4a574;
  --wisdom-background: #faf8f3;
  --wisdom-card-bg: #ffffff;
  --wisdom-text: #2a2a2a;
  --wisdom-text-light: #6b6b6b;
  --wisdom-border: rgba(139, 111, 87, 0.15);
  --wisdom-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --wisdom-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
  --wisdom-spotify-green: #1db954;
  
  /* Spacing system */
  --wisdom-spacing-xs: 0.5rem;
  --wisdom-spacing-sm: 1rem;
  --wisdom-spacing-md: 1.5rem;
  --wisdom-spacing-lg: 2rem;
  --wisdom-spacing-xl: 3rem;
  
  /* Typography */
  --wisdom-font-xs: 0.875rem;
  --wisdom-font-sm: 1rem;
  --wisdom-font-md: 1.125rem;
  --wisdom-font-lg: 1.375rem;
  --wisdom-font-xl: 1.75rem;
}

/* ========================================= */
/* WISDOM WRAPPER                            */
/* ========================================= */

.wisdom-wrapper {
  margin-top: var(--wisdom-spacing-xl);
  max-width: 100%;
}

/* ========================================= */
/* WISDOM MENU                               */
/* ========================================= */

.wisdom-menu {
  position: sticky;
  bottom: var(--wisdom-spacing-lg);
  background: var(--wisdom-card-bg);
  border: 1px solid var(--wisdom-border);
  border-radius: 50px;
  padding: 0;
  margin: 0 auto var(--wisdom-spacing-lg);
  max-width: fit-content;
  box-shadow: var(--wisdom-shadow);
  backdrop-filter: blur(10px);
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; 
}

.wisdom-menu:hover {
  box-shadow: var(--wisdom-shadow-hover);
}

/* Desktop: Fixed positioning at viewport bottom */
@media (min-width: 1024px) {
  .wisdom-menu {
    position: fixed;
    bottom: var(--wisdom-spacing-lg);
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Mobile: Fixed at screen bottom with side margins */
@media (max-width: 767px) {
  .wisdom-menu.mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--wisdom-border);
    margin: 0;
    max-width: 100%;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    transform: none;
    z-index: 200;
  }
}

/* ========================================= */
/* MENU PRIMARY                              */
/* ========================================= */

.menu-primary {
  padding: var(--wisdom-spacing-sm);
  display: flex;
  gap: var(--wisdom-spacing-sm);
  justify-content: center;
  align-items: center;
}

.wisdom-menu.mobile .menu-primary {
  padding: var(--wisdom-spacing-sm);
  gap: var(--wisdom-spacing-xs);
}

/* ========================================= */
/* MENU ITEMS                                */
/* ========================================= */

.menu-item {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  background: var(--wisdom-background);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.wisdom-menu.mobile .menu-item {
  width: 44px;
  height: 44px;
}

.menu-item:hover {
  background: var(--wisdom-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 111, 87, 0.3);
}

.menu-item:hover .section-icon svg {
  stroke: white;
}

.menu-item:active {
  transform: translateY(0);
}

.menu-item.active {
  background: var(--wisdom-card-bg);
  border-color: var(--wisdom-primary);
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.section-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--wisdom-secondary);
  stroke-width: 1.5;
  fill: none;
  transition: all 0.3s ease;
}

.menu-item.active .section-icon svg {
  stroke: var(--wisdom-primary);
}

/* Tooltip */
.menu-tooltip {
  position: absolute;
  bottom: 60px;
  background: var(--wisdom-primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: var(--wisdom-font-xs);
  font-family: var(--font-serif, 'EB Garamond', serif);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-tooltip::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--wisdom-primary);
}

@media (hover: hover) {
  .menu-item:hover .menu-tooltip {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.menu-tooltip.show {
  opacity: 1;
  transform: translateY(-4px);
}

.wisdom-menu.mobile .menu-tooltip {
  bottom: auto;
  top: -44px;
}

/* ========================================= */
/* COMBINED ATTENTION EFFECT (MOBILE ONLY)   */
/* ========================================= */

/* Combined animation keyframes */
@keyframes combined-attention {
  /* Phase 1: Wave effect (0-16.67%) */
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(139, 111, 87, 0);
  }
  4.44% { /* 0.8s of 18s */
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(139, 111, 87, 0.6);
  }
  8.89% { /* 1.6s of 18s */
    transform: scale(1);
    box-shadow: 0 0 0 rgba(139, 111, 87, 0);
  }
  
  /* Transition pause (8.89% - 16.67%) */
  16.67% { /* 3s of 18s - start breathing */
    transform: scale(1);
    box-shadow: 0 0 5px rgba(139, 111, 87, 0.3);
  }
  
  /* Phase 2: Breathing cycles (16.67% - 100%) */
  /* Each breathing cycle is 16.67% of total (3s of 18s) */
  
  /* Cycle 1: 16.67% - 33.33% */
  25% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 111, 87, 0.5);
  }
  33.33% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(139, 111, 87, 0.3);
  }
  
  /* Cycle 2: 33.33% - 50% */
  41.67% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 111, 87, 0.5);
  }
  50% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(139, 111, 87, 0.3);
  }
  
  /* Cycle 3: 50% - 66.67% */
  58.33% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 111, 87, 0.5);
  }
  66.67% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(139, 111, 87, 0.3);
  }
  
  /* Cycle 4: 66.67% - 83.33% */
  75% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 111, 87, 0.5);
  }
  83.33% {
    transform: scale(1);
    box-shadow: 0 0 5px rgba(139, 111, 87, 0.3);
  }
  
  /* Cycle 5: 83.33% - 100% */
  91.67% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 111, 87, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(139, 111, 87, 0);
  }
}

/* Apply animation only on mobile */
@media (max-width: 767px) {
  .wisdom-menu.attention-active .menu-item {
    animation: combined-attention 18s ease-in-out forwards;
    will-change: transform, box-shadow;
  }
  
  /* Staggered delays for wave effect */
  .wisdom-menu.attention-active .menu-item:nth-child(1) { animation-delay: 0s; }
  .wisdom-menu.attention-active .menu-item:nth-child(2) { animation-delay: 0.1s; }
  .wisdom-menu.attention-active .menu-item:nth-child(3) { animation-delay: 0.2s; }
  .wisdom-menu.attention-active .menu-item:nth-child(4) { animation-delay: 0.3s; }
  .wisdom-menu.attention-active .menu-item:nth-child(5) { animation-delay: 0.4s; }
  .wisdom-menu.attention-active .menu-item:nth-child(6) { animation-delay: 0.5s; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .wisdom-menu.attention-active .menu-item {
    animation: none;
  }
}

/* ========================================= */
/* WISDOM SECTIONS - FIXED CENTERING         */
/* ========================================= */

.wisdom-sections {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  max-width: 100%;
  background-color: transparent;
}

/* Desktop: Center content properly like main reflection */
@media (min-width: 1024px) {
  .wisdom-sections {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
  }
  
  .wisdom-sections .content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 80px;
    width: 100%;
    background-color: #ffffff;
  }
  
  .wisdom-sections .section-title {
    margin-bottom: var(--wisdom-spacing-xl);
  }
}

/* Tablet: Add padding */
@media (min-width: 769px) and (max-width: 1023px) {
  .wisdom-sections {
    padding: 0 3rem;
  }
}

/* Mobile: Add margins for better visual spacing */
@media (max-width: 768px) {
  .wisdom-sections {
    padding: 0 1.5rem;
    background-color: var(--color-paper-light);
  }
}

.content-section {
  display: none;
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: var(--wisdom-spacing-lg);
  margin-bottom: var(--wisdom-spacing-lg);
  background: transparent;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.content-section.active {
  display: block;
}

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

/* Large desktop: Match increased padding */
@media (min-width: 1400px) {
  .wisdom-sections .content-section {
    max-width: 1000px;
    padding: 3rem 100px;
  }
}

.section-title {
  font-size: 2rem;
  margin-bottom: var(--wisdom-spacing-xl);
  color: var(--wisdom-primary);
  display: flex;
  align-items: center;
  gap: var(--wisdom-spacing-md);
  font-weight: 400;
  padding-bottom: var(--wisdom-spacing-lg);
  border-bottom: 2px solid var(--wisdom-secondary);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.section-title .section-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.section-title .section-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--wisdom-secondary);
  stroke-width: 1.5;
  fill: none;
}

.wisdom-card,
.practice-card,
.question-card {
  background: var(--wisdom-card-bg);
  border: 1px solid var(--wisdom-border);
  border-radius: 16px;
  padding: var(--wisdom-spacing-lg);
  margin-bottom: var(--wisdom-spacing-md);
  box-shadow: var(--wisdom-shadow);
  transition: all 0.3s ease;
}

.wisdom-card:last-child,
.practice-card:last-child,
.question-card:last-child {
  margin-bottom: 0;
}

.wisdom-card:hover,
.practice-card:hover,
.question-card:hover {
  box-shadow: var(--wisdom-shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--wisdom-spacing-sm);
  margin-bottom: var(--wisdom-spacing-md);
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon .section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--wisdom-secondary);
  stroke-width: 1.5;
  fill: none;
}

.card-title {
  font-size: var(--wisdom-font-lg);
  font-weight: 600;
  color: var(--wisdom-primary);
  margin: 0;
}

.card-subtitle {
  font-size: var(--wisdom-font-sm);
  color: var(--wisdom-text-light);
  font-style: italic;
  margin: 0;
}

.card-content {
  font-size: var(--wisdom-font-md);
  line-height: 1.8;
  color: var(--wisdom-text);
}

/* ========================================= */
/* PRACTICE SECTION                          */
/* ========================================= */

.practice-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--wisdom-spacing-sm);
  color: var(--wisdom-primary);
  font-family: var(--font-serif, 'EB Garamond', serif);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: 0;
}

.practice-description {
  font-size: 1.125rem;
  color: var(--wisdom-text);
  line-height: 1.7;
  margin-bottom: var(--wisdom-spacing-sm);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.practice-purpose {
  font-size: 1rem;
  color: var(--wisdom-text-light);
  line-height: 1.6;
  font-style: italic;
  padding-top: var(--wisdom-spacing-sm);
  border-top: 1px solid var(--wisdom-border);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

/* ========================================= */
/* QUESTIONS SECTION                         */
/* ========================================= */

.question-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--wisdom-primary);
  margin: 0;
  font-family: var(--font-serif, 'EB Garamond', serif);
  letter-spacing: -0.01em;
}

.question-text {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--wisdom-text);
  line-height: 1.7;
  font-family: var(--font-serif, 'EB Garamond', serif);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ========================================= */
/* ENHANCED MUSIC SECTION ELEMENTS           */
/* ========================================= */
/* ========================================= */
/* MUSIC SECTION                             */
/* ========================================= */

.music-section-container {
  background: var(--wisdom-card-bg);
  border: 1px solid var(--wisdom-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--wisdom-shadow);
  transition: all 0.3s ease;
}

.music-section-container:hover {
  box-shadow: var(--wisdom-shadow-hover);
}

.music-album-display {
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  max-height: 400px;
  overflow: hidden;
}

.music-album-display.no-image {
  min-height: 200px;
}

.music-album-image {
  width: 100%;
  height: 100%;
  max-width: 400px;
  max-height: 400px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.album-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--wisdom-spacing-xl);
  color: white;
}

.album-icon {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--wisdom-spacing-md);
}

.album-icon .section-icon svg {
  width: 50px;
  height: 50px;
  stroke: white;
  opacity: 0.8;
}

.album-info {
  max-width: 300px;
}

.album-name {
  font-size: var(--wisdom-font-lg);
  font-weight: 500;
  margin-bottom: var(--wisdom-spacing-xs);
  color: white;
}

.album-note {
  font-size: var(--wisdom-font-sm);
  opacity: 0.7;
  color: rgba(255, 255, 255, 0.8);
}

.music-popularity {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  padding: 12px 16px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.popularity-label {
  font-size: var(--wisdom-font-xs);
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  display: block;
}

.popularity-bar {
  width: 100px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.popularity-fill {
  height: 100%;
  background: var(--wisdom-spotify-green);
  transition: width 0.6s ease;
}

.music-details {
  padding: var(--wisdom-spacing-lg);
}

.music-track-name {
  font-size: var(--wisdom-font-xl);
  font-weight: 500;
  margin-bottom: var(--wisdom-spacing-xs);
  color: var(--wisdom-primary);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.music-artist-name {
  font-size: var(--wisdom-font-md);
  color: var(--wisdom-text-light);
  font-style: italic;
  margin-bottom: var(--wisdom-spacing-xs);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.music-album-name {
  font-size: var(--wisdom-font-sm);
  color: var(--wisdom-text-light);
  opacity: 0.8;
  margin-bottom: var(--wisdom-spacing-xs);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.music-duration {
  font-size: var(--wisdom-font-sm);
  color: var(--wisdom-text-light);
  opacity: 0.7;
  margin-bottom: var(--wisdom-spacing-lg);
  font-family: var(--font-mono, 'Roboto Mono', monospace);
}

.spotify-play-link,
.spotify-search-link {
  display: inline-flex;
  align-items: center;
  gap: var(--wisdom-spacing-sm);
  color: white;
  text-decoration: none;
  font-size: var(--wisdom-font-sm);
  padding: var(--wisdom-spacing-sm) var(--wisdom-spacing-lg);
  background: var(--wisdom-spotify-green);
  border-radius: 50px;
  transition: all 0.3s ease;
  font-weight: 600;
  margin-bottom: var(--wisdom-spacing-lg);
  border: none;
  cursor: pointer;
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.spotify-play-link:hover,
.spotify-search-link:hover {
  background: #1ed760;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

.spotify-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.spotify-icon-wrapper .section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.spotify-icon-wrapper svg {
  width: 20px;
  height: 20px;
  stroke: white;
  fill: white;
}

/* Music Essence Grid - Beautiful card layout */
.music-essence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--wisdom-spacing-md);
  margin-top: var(--wisdom-spacing-lg);
  margin-bottom: var(--wisdom-spacing-lg);
}

.essence-card {
  background: var(--wisdom-background);
  border-radius: 16px;
  padding: var(--wisdom-spacing-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--wisdom-border);
}

.essence-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.essence-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--wisdom-secondary), var(--wisdom-accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.essence-card:hover::before {
  opacity: 1;
}

.essence-icon {
  width: 48px;
  height: 48px;
  background: var(--wisdom-card-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--wisdom-spacing-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.essence-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--wisdom-secondary);
  stroke-width: 1.5;
}

.essence-title {
  font-size: var(--wisdom-font-sm);
  font-weight: 600;
  color: var(--wisdom-primary);
  margin-bottom: var(--wisdom-spacing-sm);
  font-family: var(--font-serif, 'EB Garamond', serif);
  letter-spacing: 0.02em;
}

.essence-text {
  font-size: var(--wisdom-font-md);
  line-height: 1.7;
  color: var(--wisdom-text);
  margin: 0;
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.essence-quote {
  font-size: var(--wisdom-font-lg);
  font-style: italic;
  line-height: 1.6;
  color: var(--wisdom-text);
  margin: 0;
  font-family: var(--font-serif, 'EB Garamond', serif);
  position: relative;
  padding-left: var(--wisdom-spacing-md);
}

.essence-quote::before {
  content: '"';
  position: absolute;
  left: -5px;
  top: -10px;
  font-size: 3rem;
  color: var(--wisdom-secondary);
  opacity: 0.2;
  font-family: var(--font-serif, 'EB Garamond', serif);
}

/* Card-specific styling */
.why-card {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.05) 0%, rgba(212, 165, 116, 0.1) 100%);
}

.quote-card {
  background: linear-gradient(135deg, var(--wisdom-primary) 0%, #3a3a3a 100%);
  color: white;
}

.quote-card .essence-title,
.quote-card .essence-quote {
  color: white;
}

.quote-card .essence-icon {
  background: rgba(255, 255, 255, 0.1);
}

.quote-card .essence-icon svg {
  stroke: white;
}

.healing-card {
  background: linear-gradient(135deg, rgba(139, 111, 87, 0.05) 0%, rgba(139, 111, 87, 0.1) 100%);
}

.theme-card {
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.03) 0%, rgba(42, 42, 42, 0.08) 100%);
}

/* Mini theme tags within the thematic resonance card */
.mini-theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--wisdom-spacing-sm);
}

.mini-theme-tag {
  padding: 4px 10px;
  background: var(--wisdom-card-bg);
  color: var(--wisdom-secondary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--wisdom-border);
  transition: all 0.2s ease;
}

.mini-theme-tag:hover {
  background: var(--wisdom-secondary);
  color: white;
  transform: translateY(-1px);
}

/* Music Accordion */
.music-accordion {
  margin-top: var(--wisdom-spacing-lg);
  border: 1px solid var(--wisdom-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--wisdom-card-bg);
}

.accordion-item {
  border-bottom: 1px solid var(--wisdom-border);
}

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

.accordion-header {
  width: 100%;
  padding: var(--wisdom-spacing-md) var(--wisdom-spacing-lg);
  background: var(--wisdom-background);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  font-family: var(--font-serif, 'EB Garamond', serif);
  color: var(--wisdom-text);
  font-size: var(--wisdom-font-md);
}

.accordion-header:hover {
  background: rgba(139, 111, 87, 0.05);
}

.accordion-header[aria-expanded="true"] {
  background: var(--wisdom-card-bg);
  border-bottom: 1px solid var(--wisdom-border);
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: var(--wisdom-spacing-sm);
  font-weight: 600;
  color: var(--wisdom-primary);
}

.accordion-title .section-icon {
  width: 20px;
  height: 20px;
}

.accordion-title svg {
  width: 20px;
  height: 20px;
  stroke: var(--wisdom-secondary);
}

.accordion-icon {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.accordion-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--wisdom-text-light);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--wisdom-card-bg);
  display: none; /* Start hidden */
}

.accordion-header[aria-expanded="true"] + .accordion-content {
  display: block; /* Show when expanded */
}

.accordion-inner {
  padding: var(--wisdom-spacing-lg);
}

/* Musical Journey Timeline (within accordion) */
.music-accordion .musical-journey-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--wisdom-spacing-sm);
}

.journey-moment {
  display: flex;
  align-items: baseline;
  gap: var(--wisdom-spacing-md);
  padding: var(--wisdom-spacing-sm) 0;
  border-bottom: 1px solid var(--wisdom-border);
  transition: all 0.3s ease;
}

.journey-moment:last-child {
  border-bottom: none;
}

.journey-moment:hover {
  background: rgba(139, 111, 87, 0.05);
  padding-left: var(--wisdom-spacing-sm);
  border-radius: 8px;
}

.moment-time {
  font-family: var(--font-mono, 'Roboto Mono', monospace);
  font-size: var(--wisdom-font-md);
  color: var(--wisdom-secondary);
  font-weight: 600;
  min-width: 50px;
}

.moment-description {
  font-size: var(--wisdom-font-sm);
  color: var(--wisdom-text);
  line-height: 1.6;
  flex: 1;
}

/* Lyrical Journey (within accordion) */
.music-accordion .lyric-journey-progression {
  display: flex;
  flex-direction: column;
  gap: var(--wisdom-spacing-md);
}

.lyric-section {
  display: flex;
  flex-direction: column;
  gap: var(--wisdom-spacing-xs);
  padding-bottom: var(--wisdom-spacing-md);
  border-bottom: 1px solid rgba(139, 111, 87, 0.1);
}

.lyric-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lyric-part {
  font-weight: 600;
  color: var(--wisdom-secondary);
  font-size: var(--wisdom-font-sm);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.lyric-essence {
  font-size: var(--wisdom-font-md);
  color: var(--wisdom-text);
  line-height: 1.6;
  font-style: italic;
  padding-left: var(--wisdom-spacing-md);
}

/* Legacy styles for compatibility */
.music-selection-reason {
  margin-top: var(--wisdom-spacing-lg);
  padding: var(--wisdom-spacing-lg);
  background: linear-gradient(135deg, rgba(139, 111, 87, 0.03) 0%, rgba(139, 111, 87, 0.08) 100%);
  border-radius: 12px;
  border: 1px solid var(--wisdom-border);
  position: relative;
  overflow: hidden;
}

.music-selection-reason::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--wisdom-secondary);
}

.music-reason-title {
  font-size: var(--wisdom-font-sm);
  font-weight: 600;
  margin-bottom: var(--wisdom-spacing-sm);
  color: var(--wisdom-secondary);
  font-family: var(--font-serif, 'EB Garamond', serif);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: var(--wisdom-spacing-xs);
}

.music-reason-title::before {
  content: '💫';
  font-size: 1rem;
}

.music-reason-text {
  font-size: var(--wisdom-font-md);
  line-height: 1.8;
  color: var(--wisdom-text);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.music-reason-text p {
  margin-bottom: var(--wisdom-spacing-sm);
}

.music-reason-text p:last-child {
  margin-bottom: 0;
}

.music-reason-text strong {
  color: var(--wisdom-primary);
  font-weight: 600;
  background: linear-gradient(to bottom, transparent 60%, rgba(139, 111, 87, 0.2) 60%);
  padding: 0 2px;
}

/* Responsive adjustments for music section */
@media (max-width: 768px) {
  .music-track-name {
    font-size: 1.5rem;
  }
  
  .music-artist-name {
    font-size: 1rem;
  }
  
  .music-album-display {
    max-height: 400px;
  }
  
  .music-popularity {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
  }
  
  .popularity-bar {
    width: 80px;
  }
  
  .music-essence-grid {
    grid-template-columns: 1fr;
    gap: var(--wisdom-spacing-sm);
  }
  
  .essence-card {
    padding: var(--wisdom-spacing-md);
  }
  
  .essence-icon {
    width: 40px;
    height: 40px;
  }
  
  .essence-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .accordion-header {
    padding: var(--wisdom-spacing-sm) var(--wisdom-spacing-md);
  }
  
  .accordion-inner {
    padding: var(--wisdom-spacing-md);
  }
  
  .accordion-title {
    font-size: var(--wisdom-font-sm);
  }
  
  .journey-moment {
    flex-direction: column;
    gap: var(--wisdom-spacing-xs);
  }
  
  .moment-time {
    font-size: var(--wisdom-font-xs);
  }
  
  .lyric-essence {
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .music-details {
    padding: var(--wisdom-spacing-md);
  }
  
  .music-album-display {
    max-height: 300px;
  }
  
  .spotify-play-link,
  .spotify-search-link {
    width: 100%;
    justify-content: center;
  }
}

/* Enhanced hover effects */
.music-selection-reason:hover,
.music-essence-grid .essence-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Print styles */
@media print {
  .music-essence-grid {
    display: block;
  }
  
  .essence-card {
    page-break-inside: avoid;
    margin-bottom: 1rem;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .music-accordion {
    display: none;
  }
  
  .spotify-play-link,
  .spotify-search-link {
    display: none;
  }
}

/* ========================================= */
/* WISDOM SECTION                            */
/* ========================================= */

.wisdom-concept-card {
  background: var(--wisdom-card-bg);
  border: 1px solid var(--wisdom-border);
  border-radius: 16px;
  padding: var(--wisdom-spacing-lg);
  margin-bottom: var(--wisdom-spacing-md);
  box-shadow: var(--wisdom-shadow);
}

.wisdom-concept-card .card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--wisdom-spacing-sm);
  margin-bottom: var(--wisdom-spacing-md);
}

.wisdom-concept-card .card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: -2px;
}

.wisdom-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--wisdom-spacing-sm);
  color: var(--wisdom-primary);
  font-family: var(--font-serif, 'EB Garamond', serif);
  line-height: 1.2;
  margin-top: 0;
}

.wisdom-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--wisdom-text);
  font-family: var(--font-serif, 'EB Garamond', serif);
}

.insight-card {
  background: linear-gradient(135deg, var(--wisdom-primary), #3a3a3a);
  color: white;
  padding: var(--wisdom-spacing-lg);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  margin-top: var(--wisdom-spacing-md);
  box-shadow: var(--wisdom-shadow);
}

.insight-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 120px;
  opacity: 0.1;
  font-family: var(--font-serif, 'EB Garamond', serif);
  line-height: 1;
}

.insight-label {
  font-size: var(--wisdom-font-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.8;
  margin-bottom: var(--wisdom-spacing-sm);
}

.insight-text {
  font-size: var(--wisdom-font-lg);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--wisdom-spacing-sm);
  position: relative;
  z-index: 1;
}

.insight-attribution {
  font-size: var(--wisdom-font-sm);
  opacity: 0.7;
  font-style: normal;
}

/* ========================================= */
/* ARTWORK SECTION                           */
/* ========================================= */

.artwork-section-container {
  background: var(--wisdom-card-bg);
  border: 1px solid var(--wisdom-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--wisdom-shadow);
  transition: all 0.3s ease;
}

.artwork-section-container:hover {
  box-shadow: var(--wisdom-shadow-hover);
}

.artwork-display {
  width: 100%;
  position: relative;
  background: var(--wisdom-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 600px;
  overflow: hidden;
}

.artwork-section-image {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  display: block;
}

.artwork-details {
  padding: var(--wisdom-spacing-lg);
}

.artwork-title-main {
  font-size: var(--wisdom-font-xl);
  font-weight: 500;
  margin-bottom: var(--wisdom-spacing-xs);
  color: var(--wisdom-primary);
}

.artwork-artist-menu {
  font-size: var(--wisdom-font-md);
  color: var(--wisdom-text-light);
  font-style: italic;
  margin-bottom: var(--wisdom-spacing-xs);
}

.artwork-year {
  font-size: var(--wisdom-font-sm);
  color: var(--wisdom-text-light);
  opacity: 0.8;
  margin-bottom: var(--wisdom-spacing-md);
}

.artwork-source-link {
  display: inline-block;
  color: var(--wisdom-secondary);
  text-decoration: none;
  font-size: var(--wisdom-font-sm);
  margin-bottom: var(--wisdom-spacing-lg);
  padding: var(--wisdom-spacing-xs) var(--wisdom-spacing-md);
  background: var(--wisdom-background);
  border-radius: 20px;
  transition: all 0.3s ease;
  border: 1px solid var(--wisdom-border);
}

.artwork-source-link:hover {
  background: var(--wisdom-secondary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(139, 111, 87, 0.3);
}

.artwork-selection-reason {
  margin-top: var(--wisdom-spacing-lg);
  padding-top: var(--wisdom-spacing-lg);
  border-top: 1px solid var(--wisdom-border);
}

.artwork-reason-title {
  font-size: var(--wisdom-font-md);
  font-weight: 600;
  margin-bottom: var(--wisdom-spacing-sm);
  color: var(--wisdom-primary);
}

.artwork-reason-text {
  font-size: var(--wisdom-font-md);
  line-height: 1.8;
  color: var(--wisdom-text);
}

/* ========================================= */
/* MOBILE RESPONSIVE                         */
/* ========================================= */

@media (max-width: 768px) {
  :root {
    --wisdom-font-xs: 0.813rem;
    --wisdom-font-sm: 0.938rem;
    --wisdom-font-md: 1.063rem;
    --wisdom-font-lg: 1.25rem;
    --wisdom-font-xl: 1.5rem;
  }
  
  .wisdom-sections {
    padding: 0 1.25rem;
    background-color: var(--color-paper-light);
  }
  
  .section-title {
    font-size: 1.75rem;
    gap: var(--wisdom-spacing-xs);
  }
  
  .section-title .section-icon {
    width: 40px;
    height: 40px;
  }
  
  .wisdom-card,
  .practice-card,
  .question-card,
  .music-details,
  .artwork-details {
    padding: var(--wisdom-spacing-md);
  }
  
  .music-track-name {
    font-size: 1.5rem;
  }
  
  .music-artist-name {
    font-size: 1rem;
  }
  
  .music-album-display {
    max-height: 400px;
  }
  
  .music-popularity {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
  }
  
  .popularity-bar {
    width: 80px;
  }
  
  .artwork-display {
    max-height: 400px;
  }
  
  .music-listening-practice {
    padding: var(--wisdom-spacing-md);
  }
  
  .listening-practice-item {
    padding-left: 2rem;
  }
}

@media (max-width: 480px) {
  :root {
    --wisdom-spacing-xs: 0.375rem;
    --wisdom-spacing-sm: 0.75rem;
    --wisdom-spacing-md: 1.125rem;
    --wisdom-spacing-lg: 1.5rem;
    --wisdom-spacing-xl: 2.25rem;
  }
  
  .wisdom-sections {
    padding: 0 1rem;
  }
  
  .wisdom-card,
  .practice-card,
  .question-card,
  .music-section-container,
  .artwork-section-container {
    border-radius: 12px;
  }
  
  .music-details,
  .artwork-details {
    padding: var(--wisdom-spacing-md);
  }
  
  .music-album-display {
    max-height: 300px;
  }
  
  .spotify-play-link,
  .spotify-search-link {
    width: 100%;
    justify-content: center;
  }
  
  .listening-practice-item {
    padding-left: 1.75rem;
    margin-bottom: var(--wisdom-spacing-sm);
  }
}

/* ========================================= */
/* FOCUS STATES                              */
/* ========================================= */

.menu-item:focus-visible,
.spotify-play-link:focus-visible,
.spotify-search-link:focus-visible,
.artwork-source-link:focus-visible {
  outline: 2px solid var(--wisdom-secondary);
  outline-offset: 3px;
}

/* ========================================= */
/* PRINT STYLES                              */
/* ========================================= */

@media print {
  .wisdom-menu {
    display: none !important;
  }
  
  .wisdom-sections {
    padding: 0;
  }
  
  .content-section {
    display: block !important;
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }
  
  .wisdom-card,
  .practice-card,
  .question-card,
  .music-section-container,
  .artwork-section-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .spotify-play-link,
  .spotify-search-link {
    display: none;
  }
}