.bg-yellow-shade {
  background-image: linear-gradient(-18deg, #fde25954 0%, transparent 100%);
}

.year-wise-past-papers-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.year-wise-header-and-years {
  flex-direction: column;
  align-items: flex-start;
  gap: 3rem;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  position: relative;
}

.section-header-line {
  align-items: center;
  justify-content: center;
  gap: 1rem;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  position: relative;
}

.section-header-line .line-left,
.section-header-line .line-right {
  display: flex;
  height: 2px;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex: 1 0 0;
  background: linear-gradient(270deg, #ffb029 0%, #fff 100%);
}

.section-header-line .line-right {
  background: linear-gradient(90deg, #ffb029 0%, #fff 100%);
}

.section-title {
  position: relative;
  width: fit-content;
  margin-top: -0.0625rem;
  font-family: "Inter", Helvetica;
  font-weight: 700;
  color: rgba(26, 26, 26, 1);
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: -0.015rem;
  line-height: 1.875rem;
  white-space: nowrap;
  font-style: normal;
}

.years-container {
  display: grid;
  justify-content: center;
  align-items: center;
  grid-template-columns: repeat(7, minmax(8.75rem, 1fr));
  align-self: stretch;
  width: 100%;
  gap: 1rem 0;
}

.year-circle-wrapper {
  display: flex;
  width: 11.75rem;
  height: 11.75rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  aspect-ratio: 1/1;
  background-color: #fff;
  border-radius: 6.25rem;
  overflow: hidden;
  border: 1px solid rgba(253, 202, 89, 0.12);
  position: relative;
}

.year-circle-wrapper .circle-svg {
  position: absolute;
  bottom: -3px;
  width: 108%;
  right: 0;
}

.year-circle-wrapper:not(:first-child) {
  margin-left: -16px; /* Apply overlap only for subsequent circles */
}

.year-circle-wrapper:first-child {
  margin-left: -18px; /* Specific margin for the first child */
}

.year-circle-wrapper:last-child {
  margin-right: -18px; /* Specific margin for the last child */
}

.year-circle-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 100px;
  background: linear-gradient(
    59deg,
    rgba(253, 202, 89, 0.12) 0%,
    rgba(253, 202, 89, 1) 55%,
    rgba(255, 255, 255, 1) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.year-text {
  position: relative;
  z-index: 2; /* Ensure text is above the SVG */
  align-self: stretch;
  font-family: "Inter", Helvetica;
  font-weight: 600;
  color: rgba(26, 26, 26, 1);
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: -0.015rem;
  line-height: 1.875rem;
  font-style: normal;
}

.view-more-years-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 48px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(249, 201, 53, 1) 0%,
    rgba(255, 218, 87, 1) 100%
  );
  cursor: pointer;
}

.view-more-years-btn:focus-visible {
  outline: 2px solid #4a90e2 !important;
  outline: -webkit-focus-ring-color auto 5px !important;
}

.button-label {
  position: relative;
  width: fit-content;
  margin-top: -1px;
  font-family: "Inter", Helvetica;
  font-weight: 700;
  color: rgba(26, 26, 26, 1);
  font-size: 16px;
  text-align: center;
  letter-spacing: -0.08px;
  line-height: 20px;
  white-space: nowrap;
  font-style: normal;
}

@media screen and (max-width: 768px) {
  .year-wise-past-papers-section {
    gap: 2.5rem;
  }
  .year-wise-header-and-years {
    gap: 2.5rem;
  }
  .section-title {
    font-size: 1rem;
    letter-spacing: -0.01rem;
    line-height: 1.25rem;
  }

  .years-container {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.5rem;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    max-width: 100%;
  }

  .years-container.show-more {
    flex-wrap: wrap;
    gap: 0.75rem 0;
    overflow-x: visible;
  }

  .years-container::-webkit-scrollbar {
    display: none;
  }

  .years-container > * {
    flex: 0 0 6.75rem;
    margin-right: -0.6rem;
  }

  .year-circle-wrapper {
    position: relative;
    width: 6.75rem;
    height: 6.75rem;
  }

  .year-text {
    font-size: 1.25rem;
  }

  .year-circle-wrapper:first-child {
    margin-left: 0px;
  }

  /* Style for circles in new rows */
  .years-container.show-more .year-circle-wrapper:nth-child(7n + 1) {
    margin-left: 0;
  }
}
