/* Shared visual language for public sections that are outside the official-info area. */

:is(
  .contacts_page,
  .news_section,
  .news_detail_page,
  .ann_detail_page,
  .faculties_page,
  .faculty_detail_page,
  .additional_courses_page,
  .course_detail_page,
  .course_contact_section,
  .applicants_page,
  .applicants_docs,
  .applicants_schedule,
  .applicants_contact,
  .stipend_page,
  .documents_section,
  .useinfo,
  .page_area,
  .transfer_header,
  .transfer_steps,
  .transfer_form_wrap,
  .cert_sections,
  .cert_form_section,
  .schedule_page,
  .graduates
) {
  background: var(--gray);
}

/* One compact title panel instead of a detached oversized page heading. */
.sections.page_surface > h1.page_title {
  position: relative;
  overflow: hidden;
  margin: 0 0 28px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: clamp(31px, 3.6vw, 50px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.sections.page_surface > h1.page_title::before {
  position: absolute;
  inset: clamp(24px, 3vw, 38px) auto clamp(24px, 3vw, 38px) 0;
  width: 5px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  background: var(--primary);
  content: "";
}

/* Content surfaces */
:is(
  .contacts_col,
  .news_main,
  .ann_main,
  .faculty_left,
  .course_main,
  .stipend_wrap,
  .info-article,
  .steps_list,
  .year_panel,
  .rasp_one,
  .table_card,
  .graduates .intro
) {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

/* Contacts */
.contacts_page {
  min-height: 0;
}

.contacts_page > .contacts_title {
  margin-bottom: 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 0 !important;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
  box-shadow: none !important;
}

.contacts_subtitle {
  max-width: none;
  margin: 0 0 24px;
  padding: 0 clamp(24px, 3vw, 38px) clamp(24px, 3vw, 38px);
  color: var(--secondary);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 500;
  line-height: 1.55;
}

.contacts_cols {
  align-items: stretch;
  gap: 20px;
}

.contacts_col {
  padding: clamp(22px, 2.5vw, 30px);
}

.contacts_col .col_heading {
  min-height: 42px;
  margin-bottom: 22px;
  color: var(--black);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.contacts_col .contact_item {
  margin-bottom: 16px;
}

.map_placeholder {
  min-height: 300px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
}

/* News and announcements */
.news_grid {
  gap: 24px;
}

.news_grid .news_card {
  height: auto;
}

.news_grid .news_image {
  aspect-ratio: 16 / 7;
  height: auto;
  object-fit: cover;
}

.news_grid .news_name {
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.25;
}

.news_detail_layout,
.ann_detail_layout,
.faculty_layout,
.course_detail_layout {
  align-items: start;
  gap: clamp(22px, 3vw, 36px);
}

.news_main,
.ann_main,
.faculty_left,
.course_main {
  padding: clamp(24px, 3vw, 38px);
}

:is(.news_head, .ann_head, .course_main > .course_head) {
  position: relative;
  margin: 0 0 24px;
  padding-left: 18px;
}

:is(.news_head, .ann_head, .course_main > .course_head)::before {
  position: absolute;
  inset: 4px auto 4px 0;
  width: 4px;
  border-radius:var(--radius-xs);
  background: var(--primary);
  content: "";
}

:is(.news_detail_title, .ann_title, .course_title) {
  margin: 6px 0 0;
  color: var(--black);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.045em;
}

:is(.news_hero, .ann_hero, .course_hero) {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

:is(.news_text, .ann_text, .course_text, .course_lead) {
  color: var(--secondary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}

:is(.news_sidebar, .ann_sidebar, .faculty_right, .course_sidebar) > .sidebar_title {
  margin: 0 0 16px;
  color: var(--black);
  font-size: 20px;
  font-weight: 700;
}

/* Program and course catalogues */
.faculties_track,
.courses_track {
  gap: 22px;
}

:is(.faculties_page, .applicants_page) .faculty_card,
.course_card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

:is(.faculties_page, .applicants_page) .faculty_image,
.course_cover img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

:is(.faculties_page, .applicants_page) .faculty_info {
  padding: 22px;
}

:is(.faculties_page, .applicants_page) .faculty_meta .meta_row {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

:is(.faculties_page, .applicants_page) .faculty_meta .meta_value {
  color: var(--black);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.additional_courses_page > .ac_title {
  margin-bottom: 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 0 !important;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
  box-shadow: none !important;
}

.sections.page_surface > h1.page_title.public_title_has_lead {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: none;
}

.public_page_lead {
  max-width: none;
  margin: 0 0 24px;
  padding: 0 clamp(24px, 3vw, 38px) clamp(24px, 3vw, 38px);
  color: var(--secondary);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 500;
  line-height: 1.55;
}

.additional_courses_page > .ac_lead {
  max-width: none;
  margin: 0 0 24px;
  padding: 0 clamp(24px, 3vw, 38px) clamp(24px, 3vw, 38px);
  color: var(--secondary);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 500;
  line-height: 1.55;
}

.courses_tools,
.graduates .tools,
.docs_tools {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

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

.course_intro {
  align-items: start;
}

.course_main .course_meta .meta_item {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-color: var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.course_main .course_meta :is(dt, dd) {
  justify-self: auto;
  text-align: left;
}

.course_sidebar .sidebar_cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.course_sidebar .course_card {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.course_sidebar .course_cover {
  height: auto;
}

.course_contact_section {
  padding-top: 0;
}

/* Programme details */
.faculty_left .hero_row {
  gap: 28px;
  margin-bottom: 24px;
}

.faculty_left .hero_media {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.faculty_left .faculty_items,
.faculty_left .faculty_application,
.faculty_left :is(.faculty_base_eleven, .faculty_edu_form) {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.faculty_left .faculty_info_banners {
  align-items: stretch;
  gap: 12px;
}

.faculty_left :is(.faculty_base_eleven, .faculty_edu_form) {
  height: auto;
  min-height: 58px;
  margin: 0;
}

.faculty_left .faculty_application {
  margin: 0;
}

.faculties_layout_buttons {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 26px;
}

.faculties_layout_buttons .apply_btn {
  min-height: 48px;
  border-color: var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary);
  box-shadow: none;
  font-size: 14px;
}

.faculties_layout_buttons .apply_btn:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

/* Applicants and forms */
.applicants_page .faculties_desc {
  margin: 0 0 14px;
  color: var(--black);
  font-size: 20px;
}

.applicants_page .applicants_info_banner {
  min-height: 0;
  margin-bottom: 24px;
  border-color: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.applicants_docs {
  margin-top: 0;
  padding-top: 0;
}

.applicants_docs > :is(.applicants_section_title, .applicants_section_title_desc, .docs_block_title) {
  max-width: 900px;
}

.doc_card {
  height: 310px;
  border-color: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.doc_top {
  height: 150px;
}

.doc_index {
  font-size: 62px;
}

.faculties_layout_contact,
.certificate_form_section {
  width: min(860px, 100%);
  margin-inline: auto;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.faculties_layout_contact .contact-form,
.certificate_form_section form,
.transfer-form {
  width: 100%;
  max-width: none;
  padding: 0;
  box-shadow: none;
}

.contact-form input,
.contact-form textarea,
.transfer-form input,
.transfer-form textarea,
.transfer-form select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Student information and document pages */
.stipend_wrap {
  padding: clamp(24px, 3vw, 38px);
}

.stipend_list {
  margin: 0;
  padding-left: 24px;
}

.stipend_list li {
  padding: 10px 0;
  color: var(--secondary);
  font-size: 16px;
  line-height: 1.55;
}

.documents_carousel,
.department_of_interaction .documents_carousel {
  padding: 0;
}

.document_card {
  border-radius: var(--radius-lg);
}

.useinfo .info-article {
  padding: clamp(22px, 2.8vw, 34px);
}

.useinfo .acc__item {
  border-radius: var(--radius-md);
}

.page_area > .dept_text {
  margin: -10px 0 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

/* Transfer and certificate request */
  .transfer_header,
  .cert_sections {
  padding-bottom: clamp(32px, 4vw, 52px);
}

.transfer_header .transfer_lead,
.cert_sections .page_lead {
  max-width: 850px;
  color: var(--secondary);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
}

.steps_list {
  overflow: hidden;
  padding: 0;
}

.steps_list::before,
.steps_list .step::before {
  display: none;
}

.steps_list .step {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 6px 18px;
  margin: 0;
  padding: 22px 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.steps_list .step + .step {
  margin-top: 0;
}

.steps_list .step:last-child {
  border-bottom: 0;
}

.steps_list .step_badge {
  grid-row: 1 / span 3;
  align-self: start;
  justify-self: start;
  margin-top: 2px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
}

.steps_list :is(.step_title, .step_text, .step_hint) {
  grid-column: 2;
}

.steps_list .step_hint {
  margin-top: 6px;
  border-radius: var(--radius-sm);
}

.doc_banner {
  border: 1px solid rgba(var(--primary-rgb), .24);
  border-radius: var(--radius-xl);
  background: var(--primary);
  box-shadow: var(--shadow-md);
}

/* Schedule */
.schedule_info_list {
  gap: 0;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.schedule_info_list .info_row {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.schedule_info_list .info_row:last-child {
  border-bottom: 0;
}

.year_panel {
  padding: 16px;
}

.year_button {
  min-height: 52px;
  border-radius: var(--radius-sm);
  font-size: 16px;
}

.year_button:hover {
  color: var(--white);
  background: var(--primary-dark);
}

.rasp_one {
  width: min(760px, 100%);
  min-height: 0;
  gap: 18px;
  padding: 20px;
}

.pair_card,
.break_card {
  border-color: var(--border);
  border-radius: var(--radius-sm);
}

.break_text {
  color: var(--accent);
}

.page_area .table_card {
  overflow: hidden;
}

.page_area .table_scroller {
  scrollbar-color: var(--primary) var(--primary-soft);
  scrollbar-width: thin;
}

.table_scroll_hint {
  display: none;
}

/* Graduates */
.graduates .intro {
  padding: clamp(22px, 2.8vw, 34px);
}

.graduates .intro_text {
  margin-top: 0;
  color: var(--secondary);
  font-size: 16px;
  line-height: 1.6;
}

.graduates .grid {
  gap: 20px;
}

.graduates .partner_card,
.graduates .cta_card {
  border-color: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1200px) {
  .course_sidebar .sidebar_cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sections.page_surface > h1.page_title {
    margin-bottom: 18px;
    padding: 22px 20px;
    border-radius: var(--radius-lg);
    font-size: clamp(28px, 9vw, 38px);
  }

  .sections.page_surface > h1.page_title::before {
    inset-block: 22px;
  }

  .contacts_page > .contacts_title,
  .additional_courses_page > .ac_title,
  .sections.page_surface > h1.page_title.public_title_has_lead {
    padding-bottom: 9px !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  }

  .table_scroll_hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px 12px;
    color: var(--primary-dark);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
  }

  .table_scroll_hint::before {
    content: "↔";
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
  }

  .contacts_subtitle,
  .additional_courses_page > .ac_lead,
  .public_page_lead {
    padding: 0 20px 22px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .news_main,
  .ann_main,
  .faculty_left,
  .course_main,
  .faculties_layout_contact,
  .certificate_form_section {
    padding: 20px;
    border-radius: var(--radius-lg);
  }

  :is(.news_detail_title, .ann_title, .course_title) {
    font-size: clamp(27px, 8vw, 38px);
  }

  .faculty_left .hero_row {
    gap: 18px;
  }

  .steps_list .step {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .steps_list .step_badge {
    grid-row: auto;
  }

  .steps_list :is(.step_title, .step_text, .step_hint) {
    grid-column: 1;
  }

  .rasp_one {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .courses_tools,
  .graduates .tools,
  .docs_tools {
    padding: 16px;
  }

  .doc_card {
    height: auto;
    min-height: 260px;
  }

  .faculties_layout_buttons .apply_btn {
    width: 100%;
  }

  .course_sidebar .sidebar_cards {
    grid-template-columns: 1fr;
  }
}
