/* =====================================================
   HERO BANNER
   ===================================================== */
.hero-banner {
  background: url("../img/banner.jpeg") center center / cover no-repeat;
  position: relative;
  padding: 3rem 1rem;
  color: #fff;
}
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55); /* dark overlay for readability */
}
.hero-banner .container {
  position: relative;
  z-index: 1;
}
.site-title {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -1px;
  font-size: 2.5rem;
}

/* =====================================================
   TIMELINE
   ===================================================== */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #dee2e6;
  transform: translateX(-50%);
}

/* End of timeline marker */
.timeline-end {
  font-size: 1.2rem;
  font-weight: 500;
  color: #666;
  border-top: 2px solid #ddd;
  padding-top: 2rem;
  text-align: center;
}

/* Month marker */
.month-marker {
  background: #0d6efd;
  color: #fff;
  padding: .4rem 1rem;
  border-radius: 999px;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-weight: 600;
  text-transform: capitalize;
  margin: 2rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.month-marker::before {
  content: attr(data-label);
}

/* Back to top button */
#back-to-top {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  text-align: center;
  line-height: 1.2rem;
  display: none; /* hidden until scroll */
  z-index: 200;
}

/* =====================================================
   EVENT POSITIONING
   ===================================================== */
.event {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
  box-sizing: border-box;
}
.event.left { left: 0; text-align: right; }
.event.right { left: 50%; }

/* Timeline dots */
.event::before {
  content: "";
  position: absolute;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dot-color, #6c757d);
  border: 2px solid #fff;
  z-index: 2;
}
.event.left::before { right: -9px; }
.event.right::before { left: -9px; }

/* =====================================================
   EVENT CARDS
   ===================================================== */
.event-card {
  border-top: 5px solid var(--dot-color, #6c757d);
  border-radius: .75rem;
  overflow: hidden;
  padding: 1rem;
}

/* Image block (badge above image) */
.event-img-block {
  text-align: center;
}
.event-img-block .badge {
  font-size: 0.75rem;
  margin-bottom: .5rem;
  padding: .4em .8em;
  border-radius: .4rem;
}
.event-img {
  max-width: 120px;
  border-radius: .5rem;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* =====================================================
   LEGEND + YEAR NAV
   ===================================================== */
.legend-item,
.year-btn {
  background-color: #e9ecef;
  color: #000;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: .4rem .9rem;
  cursor: pointer;
}
.legend-item:hover,
.year-btn:hover {
  background-color: #d6d6d6;
}
.legend-item.active,
.year-btn.active {
  background-color: #0d6efd !important;
  color: #fff !important;
  border-color: #0d6efd !important;
}

.legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

#year-nav {
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
  padding: .6rem;
  border-radius: .5rem;
}

/* =====================================================
   RESPONSIVE (Mobile)
   ===================================================== */
@media (max-width: 768px) {
  .timeline::before { left: 12px; }

  .event {
    width: 100%;
    padding-left: 2.5rem;
    left: 0 !important;
    text-align: left;
  }
  .event::before { left: 0; right: auto; }

  /* Image full width on mobile */
  .event-img {
    max-width: 100%;
    height: auto;
    margin-bottom: .75rem;
  }
  .event-img-block {
    margin-bottom: 1rem;
  }
}

/* =====================================================
   DARK MODE
   ===================================================== */
@media (prefers-color-scheme: dark) {
  body { background-color: #121212; color: #eee; }
  .timeline::before { background: #444; }

  .event-card {
    background-color: #1e1e1e;
    color: #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  }
  .event-img { background: #1e1e1e; }

  .text-muted { color: #bbb !important; }

  #year-nav {
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
  }

  .legend-item,
  .year-btn {
    background-color: #2a2a2a;
    color: #eee;
    border-color: #444;
  }
  .legend-item:hover,
  .year-btn:hover {
    background-color: #3a3a3a;
  }
  .legend-item.active,
  .year-btn.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
  }

  .sugerencias-btn {
    background: #fff !important;
    color: #000 !important;
  }
  .sugerencias-btn:hover {
    background: #ddd !important;
  }
}