/* Сучасне оформлення поверх legacy app.css. Підключається після main.css,
   перед responsive.css. */

:root {
  --rf-brand: #035FFE;
  --rf-brand-dark: #0047C2;
  --rf-ink: #0F1B2D;
  --rf-muted: #5A6B7E;
  --rf-line: #E3EAF4;
  --rf-bg: #F4F7FE;
  --rf-card: #FFFFFF;
  --rf-radius: 16px;
  --rf-font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --rf-font-display: 'Manrope', 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
}
html, body {
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--rf-font-ui);
  color: var(--rf-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- шапка ---------- */
.header {
  background: #fff;
  border-bottom: 1px solid var(--rf-line);
  padding: 14px 0;
}
.header__title a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}
.header__title {
  font-family: var(--rf-font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--rf-ink);
}
.header__search {
  gap: 8px;
}
.header__search_input {
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--rf-line);
  border-radius: 12px;
  background: var(--rf-bg);
  font: 15px/1.4 var(--rf-font-ui);
  color: var(--rf-ink);
  transition: border-color .15s, background .15s;
}
.header__search_input:focus {
  outline: none;
  border-color: var(--rf-brand);
  background: #fff;
}
.header__search_btn {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--rf-brand);
  color: #fff;
  font: 600 15px/1 var(--rf-font-ui);
  cursor: pointer;
  transition: background .15s;
}
.header__search_btn:hover {
  background: var(--rf-brand-dark);
}
.header__auth_icon {
  opacity: .55;
}

/* ---------- хлібні крихти ---------- */
.breadcrumbs {
  margin: 0 0 18px;
  font: 14px/1.4 var(--rf-font-ui);
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}
.breadcrumbs li {
  color: var(--rf-muted);
  min-width: 0;
}
.breadcrumbs li + li::before {
  content: "/";
  color: #C9D8F0;
  margin: 0 8px;
}
.breadcrumbs a {
  color: var(--rf-muted);
  text-decoration: none;
  transition: color .15s;
}
.breadcrumbs a:hover {
  color: var(--rf-brand);
}
.breadcrumbs span {
  color: var(--rf-ink);
  font-weight: 500;
}
.breadcrumbs li:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ---------- заголовки ---------- */
h1, h2, h3,
.categories__title h1,
.performers__title,
.profile__data_title > div:first-child {
  font-family: var(--rf-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rf-ink);
}
.categories__title h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 8px 0 24px;
}

/* ---------- картки категорій ---------- */
.categories__item {
  background: var(--rf-card);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  box-shadow: 0 1px 2px rgba(15, 27, 45, .04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
}
.categories__item_img {
  flex: 0 0 auto;
}
.categories__item_img img {
  max-width: 64px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.categories__item_info {
  position: static;
  padding: 0 20px 18px 20px;
  margin-top: auto;
}
.categories__item_info-title {
  width: auto;
}
.categories__item:hover {
  transform: translateY(-2px);
  border-color: #C9D8F0;
  box-shadow: 0 10px 24px rgba(15, 27, 45, .08);
}
.categories__item_line {
  height: 3px;
  border-radius: 0 0 3px 3px;
}
.categories__item img {
  transition: transform .15s ease;
}
.categories__item:hover img {
  transform: scale(1.05);
}
.categories__item_title,
.categories__item_name {
  font-family: var(--rf-font-ui);
  font-weight: 600;
  color: var(--rf-ink);
}
.categories__item_count {
  color: var(--rf-muted);
  font-size: 13px;
}

/* ---------- списки рефератів / результати ---------- */
.performers__items {
  gap: 12px;
}
.list__item {
  display: block;
  background: var(--rf-card);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  padding: 20px 22px;
  color: var(--rf-ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.list__item:hover {
  border-color: #C9D8F0;
  box-shadow: 0 8px 20px rgba(15, 27, 45, .07);
  transform: translateY(-1px);
}
.list__item div:first-child {
  font-family: var(--rf-font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

/* ---------- сторінка реферату ---------- */
.profile__data {
  background: var(--rf-card);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  padding: 24px;
}
.profile__data_title {
  font-family: var(--rf-font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.profile__data_info-block {
  gap: 8px 28px;
}
.profile__data_info-item {
  font-size: 15px;
  color: var(--rf-ink);
}
.profile__data_info-item span {
  color: var(--rf-muted) !important;
}
.profile__data_block {
  font: 17px/1.75 var(--rf-font-ui);
  color: #1B2735;
  max-width: 900px;
}
.profile__data_block p {
  margin: 0 0 18px;
}

/* ---------- пагінація ---------- */
.performers__pagination_item {
  border: 1px solid var(--rf-line);
  border-radius: 10px;
  color: var(--rf-ink);
  transition: background .15s, border-color .15s;
}
.performers__pagination_item:hover {
  border-color: #C9D8F0;
  background: var(--rf-bg);
}
.performers__pagination_item.active {
  background: var(--rf-brand);
  border-color: var(--rf-brand);
  color: #fff;
}

/* ---------- футер ---------- */
.bottom {
  background: var(--rf-ink);
  color: #C9D3E0;
  padding: 48px 12% 28px;
  border-radius: 0;
}
.bottom__row {
  align-items: flex-start;
  justify-content: space-between;
}
.bottom__menu-wrapper {
  width: auto !important;
}
.bottom__right-menu,
.bottom__menu-list,
.bottom__menu-item {
  white-space: nowrap;
}
.bottom__menu-header {
  font-family: var(--rf-font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  color: #fff;
  text-transform: none;
}
.bottom__menu-item .bottom__menu-link,
.bottom__menu-link {
  color: #C9D3E0 !important;
  font: 15px/1.6 var(--rf-font-ui);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
.bottom__menu-item a:hover,
.bottom__menu-link:hover {
  color: #fff !important;
}
.bottom__menu-item {
  margin-bottom: 4px;
}
.bottom__row-copyright {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 32px;
  padding-top: 20px;
}
.bottom__copyright-text {
  color: #8FA0B5;
  font: 14px/1.5 var(--rf-font-ui);
}

/* ---------- сторінки-списки категорій ---------- */
.program,
.order,
.performers__pagination_block {
  font-family: var(--rf-font-ui);
}

/* кнопки-посилання */
button, .sbttn, input[type="submit"] {
  font-family: var(--rf-font-ui);
}
