/* 
   Timeline Premium Styles
   Glassmorphism + Structured Eras
*/

:root {
  --timeline-gold: #d4af37;
  --timeline-gold-dark: #8b6914;
  --timeline-bg-light: #fcf5e5;
  --timeline-bg-glass: rgba(252, 245, 229, 0.8);
  --cat-theology: #4a6fa5;
  --cat-history: #6b8e23;
  --cat-reformation: #b22222;
  --cat-council: #8b6914;
  --cat-heresy: #4b0082;
}

.timeline-wrapper {
  margin: 40px 0;
}

/* Era Section Styling */
.timeline-era-section {
  margin-bottom: 60px;
}

.timeline-era-header {
  text-align: center;
  position: sticky;
  top: 50px;
  z-index: 100;
  padding: 15px 0;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* Dark mode adjustment for the sticky header */
[data-mode='dark'] .timeline-era-header {
  background: rgba(27, 27, 30, 0.8);
  border-bottom-color: rgba(212, 175, 55, 0.2);
}

.timeline-era-header .era-label {
  display: inline-block;
  font-family: 'Georgia', serif;
  font-style: italic;
  color: var(--timeline-gold-dark);
  font-size: 0.85em;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-right: 10px;
  opacity: 0.8;
}

.timeline-era-header .era-name {
  display: inline-block;
  font-size: 1.8em;
  margin: 0;
  color: var(--timeline-gold-dark);
  text-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-weight: 700;
}

.timeline-main-title {
  text-align: center;
  font-size: 3em;
  margin-bottom: 50px;
  color: var(--timeline-gold-dark);
}

/* Base Timeline Layout */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--timeline-gold) 10%, var(--timeline-gold) 90%, transparent);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

/* Timeline items */
.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInTimeline 0.6s ease forwards;
}

@keyframes fadeInTimeline {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

/* Connector Circles */
.timeline-item::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  right: -6px;
  background-color: var(--timeline-bg-light);
  border: 2px solid var(--timeline-gold);
  top: 35px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:nth-child(even)::after {
  left: -6px;
}

/* Content Box - Glassmorphism */
.timeline-content {
  padding: 25px;
  background: var(--timeline-bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
}

/* Header within content */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.timeline-date {
  color: var(--timeline-gold-dark);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9em;
}

/* Category Badges */
.timeline-category {
  font-size: 0.7em;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  background: var(--timeline-gold);
}

.cat-theology { background: var(--cat-theology); }
.cat-history { background: var(--cat-history); }
.cat-reformation { background: var(--cat-reformation); }
.cat-council { background: var(--cat-council); }
.cat-heresy { background: var(--cat-heresy); }

/* Typography */
.timeline-title {
  font-size: 1.4em;
  margin: 10px 0;
  color: #2d2a26;
  font-weight: 800;
}

.timeline-title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--timeline-gold), var(--timeline-gold));
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size 0.3s;
}

.timeline-title a:hover {
  background-size: 100% 2px;
}

.timeline-description {
  color: #5a5650;
  line-height: 1.7;
  font-size: 0.95em;
  margin-top: 10px;
}

/* Images */
.timeline-image-wrapper {
  margin: 15px -25px;
  overflow: hidden;
  border-top: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.timeline-image {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.timeline-content:hover .timeline-image {
  transform: scale(1.05);
}

.timeline-image-caption {
  font-size: 0.8em;
  padding: 8px 25px;
  background: rgba(0,0,0,0.02);
  color: #666;
  font-style: italic;
  text-align: center;
}

/* Variations */
.timeline-image-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 15px auto;
  border: 3px solid var(--timeline-gold);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  .timeline::after {
    left: 20px;
  }
  
  .timeline-era-header {
    top: 50px;
    padding: 10px 0;
  }
  
  .timeline-era-header .era-name {
    font-size: 1.6em;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 15px;
    left: 0 !important;
    margin-bottom: 30px;
  }
  
  .timeline-item::after {
    left: 14px !important;
    top: 30px;
  }
  
  .timeline-content {
    padding: 20px;
  }
  
  .timeline-image-wrapper {
    margin: 15px -20px;
  }
}