/* Smooth scrolling for the page */
html {
  scroll-behavior: smooth;
}

/* Decade Navigation */
.decade-nav {
  position: sticky;
  top: 70px;
  background: white;
  z-index: 20;
  padding: 1rem 0;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.decade-nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.decade-nav-link {
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  background: #f8f9fa;
  color: #495057;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.decade-nav-link:hover {
  background: #e9ecef;
  color: #0d6efd;
  border-color: #0d6efd;
  transform: translateY(-2px);
}

.decade-nav-link.active {
  background: #0d6efd;
  color: white;
}

/* Decade Section */
.decade-section {
  position: relative;
  margin-bottom: 3rem;
  padding: 0 1.5rem;
  scroll-margin-top: 180px;
}

/* Ensure cards have proper spacing */
.decade-section .card {
  margin-bottom: 0;
}

.decade-section .card-body {
  padding: 1rem !important;
}

/* Ensure all card elements have proper padding */
.horizontal-scroll-content .card-body {
  padding: 1rem !important;
}

.horizontal-scroll-content .card {
  margin: 0 !important;
}

.decade-header {
  position: sticky;
  top: 70px;
  background: white;
  z-index: 10;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-bottom: 3px solid #0d6efd;
  margin-bottom: 2rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
}

.decade-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Year Band */
.year-band {
  margin-bottom: 3rem;
  padding-left: 0.5rem;
}

.year-band h3 {
  color: #6c757d;
  font-weight: 600;
}

.year-band .d-flex {
  padding-left: 0;
}

/* Horizontal Scrolling Container */
.horizontal-scroll-container {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #0d6efd #f8f9fa;
  padding: 0.5rem 0 1rem 0;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Webkit Scrollbar Styling */
.horizontal-scroll-container::-webkit-scrollbar {
  height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #0a58ca;
}

/* Horizontal Scroll Content */
.horizontal-scroll-content {
  display: flex;
  gap: 0;
  width: max-content;
  padding: 0.5rem 0;
}

/* Override column classes for issue cards in horizontal scroll */
.horizontal-scroll-content > .col-6,
.horizontal-scroll-content > .col-md-4,
.horizontal-scroll-content > .col-lg-3 {
  flex: 0 0 280px !important;
  width: 280px !important;
  max-width: 280px !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

/* Card hover effect in horizontal scroll */
.horizontal-scroll-content .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-scroll-content .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .decade-nav {
    top: 56px;
    padding: 0.75rem 0;
  }

  .decade-nav-links {
    gap: 0.4rem;
  }

  .decade-nav-link {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
  }

  .decade-header {
    top: 130px;
    padding: 1.5rem 1rem 1rem 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .decade-section {
    margin-bottom: 2rem;
    padding: 0 1rem;
    scroll-margin-top: 150px;
  }

  .horizontal-scroll-content > .col-6,
  .horizontal-scroll-content > .col-md-4,
  .horizontal-scroll-content > .col-lg-3 {
    flex: 0 0 240px;
    width: 240px;
    max-width: 240px;
  }

  .horizontal-scroll-content {
    gap: 0.75rem;
  }

  .year-band {
    margin-bottom: 2rem;
    padding-left: 0;
  }
}

/* Smooth scroll hint */
.horizontal-scroll-container::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 1rem;
  width: 60px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9));
  pointer-events: none;
}

.horizontal-scroll-container:hover::after {
  opacity: 0.5;
}
