/* Timeline Artística - Estilo TailwindCSS */
.timeline-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  transition: all 0.3s ease;
  padding-bottom: 80px;
}

/* Tema claro */
.timeline-page.light-theme {
  --bg: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --elev: #ffffff;
  --accent: #3b82f6;
}

/* Header */
.timeline-header {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 16px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.timeline-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Theme Toggle */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

.theme-btn {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: var(--elev);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.theme-icon {
  font-size: 20px;
  position: absolute;
  transition: all 0.3s ease;
}

.timeline-page:not(.light-theme) .light-icon {
  opacity: 0;
  transform: rotate(180deg);
}

.timeline-page.light-theme .dark-icon {
  opacity: 0;
  transform: rotate(180deg);
}

/* Timeline Container */
.timeline-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* Timeline Line */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), #8b5cf6);
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Timeline Items */
.timeline-item {
  position: relative;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(even) .timeline-card {
  margin-left: calc(50% + 40px);
}

.timeline-item:nth-child(odd) .timeline-card {
  margin-right: calc(50% + 40px);
  text-align: right;
}

/* Timeline Markers */
.timeline-marker {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border: 4px solid var(--bg);
  transition: all 0.3s ease;
}

.timeline-marker.featured {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.timeline-marker.period {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.timeline-marker.current {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}

/* Timeline Cards */
.timeline-card {
  background: var(--elev);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.timeline-card:hover::before {
  transform: scaleX(1);
}

.timeline-card.featured {
  border: 2px solid #f59e0b;
  background: linear-gradient(135deg, var(--elev), rgba(245, 158, 11, 0.05));
}

.timeline-card.period {
  border: 2px solid #8b5cf6;
  background: linear-gradient(135deg, var(--elev), rgba(139, 92, 246, 0.05));
}

.timeline-card.current {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, var(--elev), rgba(16, 185, 129, 0.05));
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.1);
}

/* Timeline Content */
.timeline-year {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.timeline-event {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.3;
}

.timeline-description {
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 20px;
  font-size: 1rem;
}

/* Multiple Events */
.timeline-multiple {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.timeline-sub-event h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.timeline-sub-event p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Tags */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.timeline-item:nth-child(odd) .timeline-tags {
  justify-content: flex-end;
}

.tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .timeline-header {
    padding: 60px 16px 40px;
  }
  
  .timeline-title {
    font-size: 2.5rem;
  }
  
  .timeline-subtitle {
    font-size: 1rem;
  }
  
  .theme-toggle {
    position: static;
    margin-top: 24px;
  }
  
  .timeline-container {
    padding: 0 16px;
  }
  
  /* Mobile: Horizontal timeline */
  .timeline-line {
    left: 24px;
    width: 2px;
  }
  
  .timeline-item:nth-child(even) .timeline-card,
  .timeline-item:nth-child(odd) .timeline-card {
    margin-left: 60px;
    margin-right: 0;
    text-align: left;
  }
  
  .timeline-item:nth-child(odd) .timeline-tags {
    justify-content: flex-start;
  }
  
  .timeline-marker {
    left: 24px;
    width: 16px;
    height: 16px;
  }
  
  .timeline-marker.featured {
    width: 20px;
    height: 20px;
  }
  
  .timeline-marker.period {
    width: 18px;
    height: 18px;
  }
  
  .timeline-marker.current {
    width: 24px;
    height: 24px;
  }
  
  .timeline-card {
    padding: 24px;
    border-radius: 16px;
  }
  
  .timeline-event {
    font-size: 1.3rem;
  }
  
  .timeline-multiple {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .timeline-title {
    font-size: 2rem;
  }
  
  .timeline-card {
    padding: 20px;
  }
  
  .timeline-event {
    font-size: 1.2rem;
  }
}

/* Animation delays for staggered effect */
.timeline-item:nth-child(1) { transition-delay: 0.1s; }
.timeline-item:nth-child(2) { transition-delay: 0.2s; }
.timeline-item:nth-child(3) { transition-delay: 0.3s; }
.timeline-item:nth-child(4) { transition-delay: 0.4s; }
.timeline-item:nth-child(5) { transition-delay: 0.5s; }
.timeline-item:nth-child(6) { transition-delay: 0.6s; }
.timeline-item:nth-child(7) { transition-delay: 0.7s; }

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Contenido adicional de la página */
.timeline-page-content {
  max-width: 1000px;
  margin: 80px auto 0;
  padding: 0 24px;
}

.page-content-wrapper {
  background: var(--elev);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.page-content-wrapper h1,
.page-content-wrapper h2,
.page-content-wrapper h3,
.page-content-wrapper h4 {
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 16px;
}

.page-content-wrapper h1 {
  font-size: 2.2rem;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding-bottom: 16px;
}

.page-content-wrapper h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

.page-content-wrapper h3 {
  font-size: 1.4rem;
  font-weight: 600;
}

.page-content-wrapper p {
  color: var(--text);
  line-height: 1.7;
  margin: 16px 0;
  font-size: 1.1rem;
}

.page-content-wrapper ul,
.page-content-wrapper ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text);
}

.page-content-wrapper li {
  margin: 8px 0;
  line-height: 1.6;
}

.page-content-wrapper blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(59, 130, 246, 0.05);
  font-style: italic;
  color: var(--text);
  border-radius: 8px;
}

.page-content-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-content-wrapper a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.page-content-wrapper a:hover {
  border-bottom-color: var(--accent);
}

/* Responsive para contenido adicional */
@media (max-width: 768px) {
  .timeline-page-content {
    margin-top: 60px;
    padding: 0 16px;
  }
  
  .page-content-wrapper {
    padding: 24px;
    border-radius: 16px;
  }
  
  .page-content-wrapper h1 {
    font-size: 1.8rem;
  }
  
  .page-content-wrapper h2 {
    font-size: 1.5rem;
  }
  
  .page-content-wrapper p {
    font-size: 1rem;
  }
}

/* Print styles */
@media print {
  .theme-toggle {
    display: none;
  }
  
  .timeline-card,
  .page-content-wrapper {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
