:root {
  --color-primary: #3a26f9;
  --color-primary-hover: #3320d6;
  --color-border-accent: #a299fa;
  --color-badge-bg: #dfdcfe;
  --color-badge-text: #3a26f9;
  --color-accent-red: #e63e26;
  --color-heading: #1a1a1a;
  --color-body: #272727;
  --color-card-bg: #f1f0fe;
  --color-modal-bg: #f1f0ff;
  --font-main: "Open Sans", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--color-body);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1rem 0;
}

/* Layout */
.page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.page__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 80rem;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.header__logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
}

.header__title,
.header__subtitle {
  color: #fff;
  line-height: 1.25;
}

.header__title {
  font-weight: 700;
  font-size: 1rem;
}

.header__subtitle {
  font-weight: 600;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .header {
    flex-direction: row;
    text-align: left;
  }

  .header__logo {
    width: 60px;
    height: 58px;
  }

  .header__title {
    font-size: 1.125rem;
  }

  .header__subtitle {
    font-size: 1rem;
  }
}

@media (min-width: 1024px) {
  .header {
    margin-bottom: 3rem;
  }
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: center;
}

.hero__content {
  flex: 1;
}

.hero__heading {
  color: #fff;
  font-weight: 600;
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 2rem;
}

.benefits {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.6;
}

.benefits li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  background: #dfdcfe;
  border-radius: 2px;
  transform: rotate(-45deg);
}

.hero__illustration {
  pointer-events: none;
}

.hero__illustration img {
  max-width: none;
  width: 110%;
  height: auto;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .hero {
    flex-direction: row;
    text-align: left;
    gap: 3rem;
    margin-bottom: 4rem;
  }

  .hero__heading {
    font-size: 4.5rem;
  }

  .benefits {
    margin-left: 0;
  }

  .benefits li {
    font-size: 1.3125rem;
  }

  .hero__illustration {
    position: absolute;
    width: 27rem;
    right: 6rem;
    top: 6rem;
    z-index: 0;
  }
}

@media (max-width: 1023px) {
  .hero__illustration {
    display: none;
  }
}

/* Panel: directions + subjects */
.panel {
  position: relative;
  z-index: 10;
  margin-bottom: 2rem;
  border-radius: 1rem;
  background: linear-gradient(to right, #d9d6ff, #f8d3ce, #a299fa);
}
.panel_label {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.href__inner {
  display: flex;              /* чтобы работали padding и выравнивание */
  align-items: center;
  justify-content: center;    /* текст по центру внутри */
  width: 100%;
  max-width: 600px;           /* вместо жёстких 600px */
  margin: 0 auto 1rem;        /* сам блок по центру родителя */
  padding: 1rem 1.5rem;
  color: var(--color-heading);
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
  text-decoration: none;      /* если это <a> */
  background-color: #7687b9;
  border-radius: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.href__inner:hover {
  background-color: #b3c1d5;
}
.panel__inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .panel {
    margin-bottom: 3rem;
  }

  .panel__inner {
    padding: 2rem;
    gap: 2rem;
  }
}

.section-title {
  color: var(--color-heading);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 2.125rem;
    margin-bottom: 1.5rem;
  }
}

/* Radio pill row (directions) */
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0.5rem 0.625rem;
  background: #fff;
  border: 1.5px solid var(--color-border-accent);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.radio-circle {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-circle__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-border-accent);
  opacity: 0;
}

.radio-pill.is-checked .radio-circle__dot,
.radio-circle.is-checked .radio-circle__dot {
  opacity: 1;
}

.radio-pill span.radio-label {
  font-size: 0.875rem;
  color: var(--color-body);
}

/* Subjects */
.subjects-heading {
  font-weight: 600;
  color: var(--color-heading);
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

@media (min-width: 1024px) {
  .subjects-heading {
    font-size: 2.125rem;
    margin-bottom: 1.5rem;
  }
}

.subjects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .subjects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.subjects-grid--two-col {
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .subjects-grid--two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.subject-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.subject-item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.subject-item span {
  font-weight: 600;
  color: var(--color-body);
  font-size: 0.875rem;
}

@media (min-width: 1024px) {
  .subject-item img {
    width: 30px;
    height: 30px;
  }

  .subject-item span {
    font-size: 1.25rem;
  }
}

.subjects-required-optional {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .subjects-required-optional {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Course cards */
.courses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .courses {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.course-group-label {
  grid-column: 1 / -1;
  background: linear-gradient(to right, #d9d6ff, #f8d3ce, #a299fa);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  text-align: center;
}

.course-group-label span {
  font-weight: 700;
  color: var(--color-heading);
  font-size: 1.25rem;
}

@media (min-width: 1024px) {
  .course-group-label span {
    font-size: 1.5rem;
  }
}

.course-card {
  background: var(--color-card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.course-card:hover {
  box-shadow: 0 10px 24px rgba(58, 38, 249, 0.12);
}

@media (min-width: 1024px) {
  .course-card {
    padding: 2rem;
  }
}

.course-card__title {
  font-weight: 600;
  color: var(--color-heading);
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0;
}

.course-card__format {
  font-weight: 600;
  color: var(--color-accent-red);
  font-size: 1rem;
  margin-top: 0.75rem;
}

@media (min-width: 1024px) {
  .course-card__title {
    font-size: 1.5rem;
  }

  .course-card__format {
    font-size: 1.125rem;
  }
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge img {
  width: 12px;
  height: 12px;
}

@media (min-width: 1024px) {
  .badge {
    font-size: 0.875rem;
  }

  .badge img {
    width: 16px;
    height: 16px;
  }
}

.badge--discount {
  background: transparent;
  border: 1px solid var(--color-accent-red);
  color: var(--color-accent-red);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.pricing-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 3rem;
  background: #fff;
  border: 1.5px solid var(--color-border-accent);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  user-select: none;
}

.pricing-option__left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-option__label {
  font-size: 0.875rem;
  color: var(--color-body);
}

.pricing-option__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-option__price {
  font-weight: 600;
  color: var(--color-body);
  font-size: 1rem;
}

@media (min-width: 1024px) {
  .pricing-option__label,
  .pricing-option__price {
    font-size: 1.125rem;
  }
}

.pricing-flat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: #fff;
  border-radius: 0.5rem;
  border: 2px solid var(--color-border-accent);
  font-size: 0.875rem;
}

.pricing-flat__price {
  font-weight: 600;
  font-size: 1rem;
}

/* Buttons */
.btn {
  font-family: var(--font-main);
  border: none;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  padding: 0.875rem 1rem;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--block {
  width: 100%;
}

@media (min-width: 1024px) {
  .btn--primary {
    font-size: 1.125rem;
    padding: 1rem;
  }
}

/* Schedule info */
.schedule-info {
  max-width: 56rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.schedule-info p {
  color: #fff;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.schedule-info a {
  color: #2a0d47;
}

.schedule-info a:hover {
  text-decoration: underline;
}

@media (min-width: 1024px) {
  .schedule-info {
    text-align: left;
    margin-left: 0;
  }

  .schedule-info p {
    font-size: 1.25rem;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--color-modal-bg);
  border-radius: 1rem;
  width: 600px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__body {
  padding: 1.5rem;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal__title {
  font-weight: 600;
  color: var(--color-heading);
  font-size: 1.5rem;
  margin: 0;
}

.modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  padding: 0.25rem;
  border-radius: 999px;
  cursor: pointer;
}

.modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.form-section-label {
  display: block;
  font-size: 1.125rem;
  color: var(--color-body);
  margin-bottom: 0.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-body);
  margin-bottom: 0.5rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-family: var(--font-main);
  font-size: 1rem;
}

.field input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-border-accent);
  border-color: transparent;
}

.field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.field--checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  accent-color: var(--color-primary);
}

.field--checkbox label {
  font-size: 0.75rem;
  color: var(--color-body);
  margin: 0;
}

.field--checkbox a {
  color: #1b06e4;
}

.field--checkbox a:hover {
  text-decoration: underline;
}

.subjects-field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-body);
  margin-bottom: 0.75rem;
}

.subjects-required {
  margin-bottom: 0;
}

.subjects-required h4,
.subjects-optional h4 {
  font-weight: 600;
  color: var(--color-heading);
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
}

.required-subject-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: #f9fafb;
  margin-bottom: 0.5rem;
}

.required-subject-row span {
  font-weight: 600;
  color: var(--color-body);
  font-size: 0.875rem;
}

.check-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.check-circle:hover:not(.is-checked):not(:disabled) {
  border-color: #4c39f9;
}

.check-circle.is-checked {
  background: #4c39f9;
  border-color: #4c39f9;
}

.check-circle svg {
  width: 12px;
  height: 12px;
  color: #fff;
  visibility: hidden;
}

.check-circle.is-checked svg {
  visibility: visible;
}

.check-circle:disabled {
  cursor: default;
}

.subject-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.subject-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: var(--color-body);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subject-pill:hover:not(:disabled):not(.is-selected) {
  border-color: #4c39f9;
}

.subject-pill.is-selected {
  background: #4c39f9;
  border-color: #4c39f9;
  color: #fff;
}

.subject-pill:disabled:not(.is-selected) {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.form-message {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.form-message--error {
  color: #dc2626;
}

.form-message--success {
  color: #16a34a;
}

.form-message[hidden] {
  display: none;
}
