.test-dates-section {
  --td-box: #B80101;
  --td-title: #B80101;
  --td-date: #8B8B8B;
  --td-number: #FFFFFF;
  --td-unit: #FFFFFF;
  --td-colon: #C4C4C4;
  position: relative;
  z-index: 2;
  scroll-margin-top: 96px;
  padding: 80px 0 88px;
  background: #f7f7f8;
  overflow: hidden;
}

.dark-theme .test-dates-section {
  background: #141414;
}

.test-dates-section-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.test-dates-heading-wrap {
  text-align: center;
  margin-bottom: 48px;
}

.test-dates-heading {
  margin: 0 0 8px;
  font-family: 'Poppins', 'Roboto', sans-serif;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 700;
  color: var(--td-title);
}

.test-dates-subtitle {
  margin: 0;
  color: var(--td-date);
  font-size: 0.95rem;
}

.test-dates-grid {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 56px 96px;
}

.test-dates-grid[data-count="1"],
.test-dates-grid[data-count="3"],
.test-dates-grid[data-count="5"] {
  justify-content: center;
}

.test-dates-card {
  text-align: center;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
}

.test-dates-card.is-hidden {
  display: none;
}

.test-dates-card-title {
  margin: 0 0 8px;
  font-family: 'Poppins', 'Roboto', sans-serif;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
  color: var(--td-title);
  letter-spacing: 0.01em;
}

.test-dates-card-date {
  margin: 0 0 22px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--td-date);
}

.test-dates-boxes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.test-dates-box {
  width: 78px;
  min-height: 78px;
  padding: 10px 6px 8px;
  border-radius: 16px;
  background: var(--td-box);
  box-shadow: 0 10px 24px rgba(184, 1, 1, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.test-dates-number {
  font-family: 'Poppins', 'Roboto', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--td-number);
}

.test-dates-unit {
  margin-top: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--td-unit);
  opacity: 0.92;
}

.test-dates-colon {
  font-family: 'Poppins', 'Roboto', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--td-colon);
  transform: translateY(-8px);
}

.test-dates-expired-msg {
  display: none;
  margin: 0;
  font-size: 0.95rem;
  color: var(--td-date);
}

.test-dates-card.is-expired-message .test-dates-boxes,
.test-dates-card.is-expired-message .test-dates-colon {
  display: none;
}

.test-dates-card.is-expired-message .test-dates-expired-msg {
  display: block;
}

@media (max-width: 992px) {
  .test-dates-grid {
    gap: 48px 32px;
  }
}

@media (max-width: 720px) {
  .test-dates-section {
    padding: 48px 0 56px;
  }

  .test-dates-grid {
    gap: 36px;
  }

  .test-dates-card {
    width: 100%;
  }

  .test-dates-box {
    width: 68px;
    min-height: 68px;
    border-radius: 14px;
  }

  .test-dates-number {
    font-size: 1.45rem;
  }

  .test-dates-boxes {
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .test-dates-box {
    width: 60px;
    min-height: 60px;
    padding: 8px 4px 6px;
  }

  .test-dates-number {
    font-size: 1.25rem;
  }

  .test-dates-unit {
    font-size: 0.54rem;
  }
}
