/* References Page Specific Styles */

.references-container {
  max-width: 900px;
  margin: 0 auto;
}

.references-container h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.75rem;
}

.references-container h2:first-of-type {
  margin-top: 2rem;
}

.references-list {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.references-list li {
  margin: 1.5rem 0;
  line-height: 1.8;
  position: relative;
  padding-left: 2rem;
  list-style: none;
  counter-increment: ref-counter;
}

.references-list li::before {
  content: counter(ref-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.references-list li:target {
  background: #fef3c7;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  margin: 1rem -1.5rem;
  border-radius: 8px;
  animation: highlight 1s ease-out;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.references-list li[id] {
  scroll-margin-top: 100px;
}

.references-list em {
  color: var(--text-light);
  font-style: italic;
}

.references-list a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.875rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}

.references-list a:hover {
  text-decoration: underline;
}

/* Reset counter for each list */
.references-list {
  counter-reset: ref-counter;
}

.references-list[start="10"] {
  counter-reset: ref-counter 9;
}

.references-list[start="12"] {
  counter-reset: ref-counter 11;
}

.references-list[start="20"] {
  counter-reset: ref-counter 19;
}

.references-list[start="23"] {
  counter-reset: ref-counter 22;
}

.references-list[start="24"] {
  counter-reset: ref-counter 23;
}

/* Section headers */
.references-container > h2 {
  position: relative;
  padding-left: 3rem;
}

.references-container > h2::before {
  content: attr(data-section);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
}

/* Add section letters to headers */
.references-container h2:nth-of-type(1)::before {
  content: "A";
}
.references-container h2:nth-of-type(2)::before {
  content: "B";
}
.references-container h2:nth-of-type(3)::before {
  content: "C";
}
.references-container h2:nth-of-type(4)::before {
  content: "D";
}
.references-container h2:nth-of-type(5)::before {
  content: "E";
}
.references-container h2:nth-of-type(6)::before {
  content: "F";
}

@keyframes highlight {
  0% {
    background: #fbbf24;
    transform: scale(1.02);
  }
  100% {
    background: #fef3c7;
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .references-list {
    padding: 1.5rem 1rem;
  }

  .references-list li {
    padding-left: 1.5rem;
    font-size: 0.9rem;
  }

  .references-container h2 {
    font-size: 1.5rem;
    padding-left: 2.5rem;
  }
}
