@import "reset.css";
@import "mobile-menu.css";
@import "style.css";
@import "modern-landing.css";
@import "catalog-pages.css";

.tests-page {
  --tests-blue: var(--color-primary, #0039A6);
  --tests-blue-dark: var(--color-primary-hover, #08246F);
  --tests-red: var(--color-red, #DA291C);
  --tests-text: var(--color-dark, #101828);
  --tests-muted: var(--color-text, #243044);
  --tests-border: var(--color-border, #E4EAF4);
  --catalog-blue: var(--tests-blue);
  --catalog-blue-dark: var(--tests-blue-dark);
  min-height: 100%;
  background: var(--color-background, #f4f7ff);
  color: var(--tests-text);
}

.tests-hero {
  padding: var(--hero-offset-desktop, 92px) 0 34px;
}

.tests-hero__title {
  max-width: 920px;
  margin: 0;
  color: var(--tests-text);
  font-size: var(--font-size-h1, clamp(40px, 4vw, 62px));
  font-weight: 900;
  line-height: var(--line-height-heading, 1.08);
  letter-spacing: 0;
  text-wrap: balance;
  text-align: left;
  overflow-wrap: anywhere;
}

.tests-hero__subtitle {
  max-width: 820px;
  margin: 22px 0 0;
  color: var(--tests-muted);
  font-size: 18px;
  line-height: var(--line-height-body, 1.65);
  text-align: left;
  text-wrap: pretty;
}

.tests-section {
  padding: 24px 0 86px;
}

.tests-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tests-card {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius-card, 20px);
  color: #ffffff;
  text-decoration: none;
  background:
    linear-gradient(115deg, rgba(6, 26, 71, 0.92) 0%, rgba(0, 57, 166, 0.78) 48%, rgba(213, 43, 30, 0.56) 100%),
    url("/img/tests/profile-after-9.jpg") center / cover no-repeat,
    linear-gradient(135deg, #061A47 0%, #0039A6 60%, #DA291C 100%);
  box-shadow: var(--shadow-card, 0 16px 38px rgba(0, 54, 167, 0.08));
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.tests-card--profession {
  background: url("/img/profession-after-11.jpg") center / cover no-repeat;
  color: var(--tests-text);
}

.tests-card--profession:hover,
.tests-card--profession:focus-visible {
  color: var(--tests-text);
}

.tests-card--profession .tests-card__badge {
  background: rgba(0, 57, 166, 0.1);
  color: var(--tests-blue);
}

.tests-card--profession .tests-card__title {
  color: var(--tests-text);
}

.tests-card--profession .tests-card__text {
  color: #101828;
}

.tests-card--profession .tests-card__button {
  background: var(--tests-blue);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 57, 166, 0.24);
}

.tests-card--profession:hover .tests-card__button,
.tests-card--profession:focus-visible .tests-card__button {
  background: var(--tests-blue-dark);
  color: #ffffff;
}

.tests-card--good-grades {
  background:
    linear-gradient(115deg, rgba(6, 26, 71, 0.9) 0%, rgba(0, 57, 166, 0.72) 52%, rgba(218, 41, 28, 0.5) 100%),
    url("/img/good-grades-test.jpg") center / cover no-repeat,
    linear-gradient(135deg, #061A47 0%, #0039A6 58%, #DA291C 100%);
}

.tests-card--ege-readiness {
  background:
    linear-gradient(115deg, rgba(6, 26, 71, 0.9) 0%, rgba(0, 57, 166, 0.72) 52%, rgba(218, 41, 28, 0.48) 100%),
    url("/img/ege-readiness-test.jpg") center / cover no-repeat,
    linear-gradient(135deg, #061A47 0%, #0039A6 58%, #DA291C 100%);
}

.tests-card--learning-format {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 48%, rgba(255, 255, 255, 0.42) 100%),
    url("/img/learning-format-test.jpg") center / cover no-repeat;
  color: var(--tests-text);
}

.tests-card--learning-format:hover,
.tests-card--learning-format:focus-visible {
  color: var(--tests-text);
}

.tests-card--learning-format .tests-card__badge {
  background: rgba(0, 57, 166, 0.1);
  color: var(--tests-blue);
}

.tests-card--learning-format .tests-card__title,
.tests-card--learning-format .tests-card__text {
  color: #101828;
}

.tests-card--learning-format .tests-card__button {
  background: var(--tests-blue);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 57, 166, 0.24);
}

.tests-card--learning-format:hover .tests-card__button,
.tests-card--learning-format:focus-visible .tests-card__button {
  background: var(--tests-blue-dark);
  color: #ffffff;
}

.tests-card--learning-superpower {
  background:
    linear-gradient(115deg, rgba(6, 26, 71, 0.94) 0%, rgba(0, 38, 118, 0.78) 54%, rgba(0, 57, 166, 0.58) 100%),
    url("/img/learning-superpower-test.jpg") center / cover no-repeat;
}

.tests-card--math-4-grade {
  background:
    linear-gradient(115deg, rgba(6, 26, 71, 0.9) 0%, rgba(0, 57, 166, 0.72) 52%, rgba(218, 41, 28, 0.48) 100%),
    url("/img/tests/math-4-grade-test.jpg") center / cover no-repeat,
    linear-gradient(135deg, #061A47 0%, #0039A6 58%, #DA291C 100%);
}

.tests-card--school-comfort {
  background:
    linear-gradient(115deg, rgba(6, 26, 71, 0.9) 0%, rgba(0, 57, 166, 0.72) 52%, rgba(218, 41, 28, 0.48) 100%),
    url("/img/school-comfort-test.jpg") center / cover no-repeat,
    linear-gradient(135deg, #061A47 0%, #0039A6 58%, #DA291C 100%);
}

.tests-card--independent-study {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 48%, rgba(255, 255, 255, 0.42) 100%),
    url("/img/independent-study-test.jpg") center / cover no-repeat;
  color: var(--tests-text);
}

.tests-card--independent-study:hover,
.tests-card--independent-study:focus-visible {
  color: var(--tests-text);
}

.tests-card--independent-study .tests-card__badge {
  background: rgba(0, 57, 166, 0.1);
  color: var(--tests-blue);
}

.tests-card--independent-study .tests-card__title,
.tests-card--independent-study .tests-card__text {
  color: #101828;
}

.tests-card--independent-study .tests-card__button {
  background: var(--tests-blue);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 57, 166, 0.24);
}

.tests-card--independent-study:hover .tests-card__button,
.tests-card--independent-study:focus-visible .tests-card__button {
  background: var(--tests-blue-dark);
  color: #ffffff;
}

.tests-card--favorite-subject {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.82) 48%, rgba(255, 255, 255, 0.42) 100%),
    url("/img/favorite-school-subject-test.jpg") center / cover no-repeat;
  color: var(--tests-text);
}

.tests-card--favorite-subject .tests-card__badge {
  background: rgba(0, 57, 166, 0.1);
  color: var(--tests-blue);
}

.tests-card--favorite-subject .tests-card__title,
.tests-card--favorite-subject .tests-card__text {
  color: #101828;
}

.tests-card--favorite-subject .tests-card__button {
  background: var(--tests-blue);
  color: #ffffff;
}

.tests-card:hover,
.tests-card:focus-visible {
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 28px 68px rgba(0, 57, 166, 0.22);
}

.tests-card__content {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
}

.tests-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.tests-card__title {
  max-width: 100%;
  margin-top: 14px;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 900;
  line-height: 1.16;
  text-wrap: balance;
  overflow-wrap: anywhere;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tests-card__text {
  max-width: 100%;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.48;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tests-card__button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 0 18px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--tests-blue);
  font-size: 15px;
  font-weight: 850;
}

.profile-test-hero__note {
  max-width: 820px;
  margin: 18px 0 0;
  color: #344054;
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
  text-wrap: pretty;
}

.profile-test-hero__back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--tests-blue);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.profile-test-hero__back:hover,
.profile-test-hero__back:focus-visible {
  color: var(--tests-blue-dark);
  transform: translateX(-2px);
  text-decoration: none;
}

.profile-test-hero__back:active {
  color: var(--tests-red);
}

.profile-test-section {
  padding: 18px 0 92px;
}

.profile-test {
  padding: 38px;
  border: 1.5px solid var(--tests-border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 57, 166, 0.08);
}

.profile-test__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.profile-test__eyebrow {
  margin: 0 0 8px;
  color: var(--tests-blue);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-test__head h2 {
  margin: 0;
  color: var(--tests-text);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  line-height: 1.16;
}

.profile-test__counter {
  margin: 0;
  color: var(--tests-muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.profile-test__progress {
  height: 8px;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 999px;
  background: #e6ecf8;
}

.profile-test__progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--tests-blue);
  transition: width 0.2s ease;
}

.profile-test__scale-help {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--tests-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  text-wrap: pretty;
}

.profile-test__questions {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.profile-test__question {
  position: relative;
  min-width: 0;
  padding: 24px;
  border: 1.5px solid #dfe7fb;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 34px rgba(0, 57, 166, 0.07);
}

.profile-test__question-title {
  width: 100%;
  float: left;
  padding: 0;
  margin: 0;
  color: var(--tests-text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.48;
  text-align: left;
  text-wrap: pretty;
}

.profile-test__scale {
  clear: both;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding: 14px;
  border-radius: 16px;
  background: #f4f7ff;
}

.profile-test__scale--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-test__scale--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-test__scale-labels {
  clear: both;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: var(--tests-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-test__option {
  cursor: pointer;
}

.profile-test__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-test__option span {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #d8e2f4;
  border-radius: 12px;
  background: #ffffff;
  color: var(--tests-blue);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.profile-test__option input:focus-visible + span,
.profile-test__option input:checked + span {
  border-color: var(--tests-blue);
  background: var(--tests-blue);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 57, 166, 0.18);
}

.profile-test__message {
  min-height: 24px;
  margin: 20px 0 0;
  color: var(--tests-red);
  font-size: 15px;
  font-weight: 800;
}

.profile-test__actions {
  margin-top: 12px;
}

.profile-test__result {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1.5px solid var(--tests-border);
}

.profile-test__result h2,
.profile-test__cta h2 {
  margin: 0;
  color: var(--tests-text);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  line-height: 1.18;
}

.profile-test__subheading {
  margin-top: 28px !important;
}

.profile-test__result-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.profile-test__result-card {
  padding: 22px;
  border: 1.5px solid var(--tests-border);
  border-radius: 18px;
  background: #f8fbff;
}

.profile-test__result-card h3 {
  margin: 0;
  color: var(--tests-text);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
}

.profile-test__score {
  margin: 8px 0 0;
  color: var(--tests-blue);
  font-size: 15px;
  font-weight: 900;
}

.profile-test__result-card p {
  margin: 14px 0 0;
  color: #101828;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  text-wrap: pretty;
}

.profile-test__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.profile-test__meta-item {
  padding: 14px;
  border-radius: 14px;
  background: #ffffff;
}

.profile-test__meta-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--tests-text);
  font-size: 13px;
  font-weight: 900;
}

.profile-test__meta-item span {
  color: #101828;
  font-size: 14px;
  line-height: 1.45;
}

.profile-test__cta {
  margin-top: 24px;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
}

.profile-test__cta p {
  max-width: 780px;
  margin: 14px 0 0;
  color: #101828;
  font-size: 16px;
  line-height: 1.65;
}

.profile-test__result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

@media screen and (max-width: 760px) {
  .tests-hero {
    padding: 82px 0 22px;
  }

  .tests-hero__title {
    font-size: 28px;
    line-height: 1.18;
  }

  .tests-hero__subtitle,
  .profile-test-hero__note {
    font-size: 15px;
    line-height: 1.6;
  }

  .tests-section,
  .profile-test-section {
    padding-bottom: 54px;
  }

  .tests-grid {
    grid-template-columns: 1fr;
  }

  .tests-card {
    aspect-ratio: 16 / 9;
    min-height: 0;
    border-radius: 20px;
  }

  .tests-card__content {
    padding: 20px;
  }

  .tests-card__title {
    font-size: 20px;
    line-height: 1.18;
  }

  .tests-card__text {
    font-size: 13px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
  }

  .profile-test {
    padding: 20px 14px;
    border-radius: 20px;
  }

  .profile-test__head {
    flex-direction: column;
    gap: 12px;
  }

  .profile-test__counter {
    white-space: normal;
  }

  .profile-test__question {
    padding: 18px 14px 16px;
    border-radius: 18px;
  }

  .profile-test__question-title {
    font-size: 16px;
    line-height: 1.48;
  }

  .profile-test__scale {
    gap: 7px;
    margin-top: 16px;
    padding: 10px;
  }

  .profile-test__option span {
    min-height: 44px;
    border-radius: 10px;
  }

  .profile-test__scale-labels {
    font-size: 11px;
  }

  .profile-test__meta {
    grid-template-columns: 1fr;
  }

  .profile-test__result-actions .catalog-btn {
    width: 100%;
  }
}

@media print {
  .header,
  .footer,
  .mobile-menu,
  .profile-test__questions,
  .profile-test__head,
  .profile-test__progress,
  .profile-test__scale-help,
  .profile-test__message,
  .profile-test__actions,
  .profile-test__result-actions,
  .profile-test__print,
  .black-bg,
  .bg-page-for-mobile,
  .change-date,
  .find-tutor-form {
    display: none !important;
  }

  .tests-page,
  .profile-test {
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .profile-test__result {
    display: block !important;
  }
}
