/* ========================
   style.css — Базовые стили и переменные
   ========================
   Этот файл содержит:
   - CSS-переменные (цвета, шрифты, отступы)
   - Базовые сбросы и стили
   - Сетку и контейнеры
   - Шапку сайта (header)
   - Навигацию (nav)
   - Кнопки (btn)
   - Подвал (footer)
   ======================== */

/* ========================
   1. CSS-переменные
   ========================
   Цветовая палитра:
   - primary: основной цвет (тёмно-синий)
   - accent: акцентный цвет (латунный)
   - bg: основной фон
   - text: основной текст
   ======================== */

:root {
  /* Цвета */
  --color-primary: #003366;       /* Основной — тёмно-синий */
  --color-primary-light: #004080; /* Светлее для hover */
  --color-accent: #c9a84c;        /* Акцент — латунный */
  --color-accent-hover: #b8943e;  /* Тёмнее для hover */
  --color-bg: #ffffff;            /* Основной фон */
  --color-bg-secondary: #f5f5f5;   /* Вторичный фон (карточки) */
  --color-text: #333333;          /* Основной текст */
  --color-text-white: #ffffff;    /* Текст на цветных фонах */
  --color-border: #e0e0e0;        /* Границы */
  --color-text-secondary: #888888;/* Вторичный текст */
  
  /* Шрифты */
  --font-serif: Georgia, serif;
  --font-sans: Arial, Helvetica, sans-serif;
  
  /* Размеры и отступы */
  --radius: 12px;                 /* Скругление */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Тень */
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12); /* Тень для hover */
  --transition: all 0.3s ease;    /* Плавность */
  
  /* Медиа-запросы */
  --breakpoint-mobile: 768px;
  --breakpoint-small: 480px;
}

/* ========================
   2. Сброс и базовые стили
   ======================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-size: 17px;
  line-height: 1.625; /* ≈27.6px — оптимально для чтения */
}

/* ========================
   4. Скроллбар и выделение текста
   ======================== */

/* Выделение текста курсором */
::selection {
  background: var(--color-accent);
  color: var(--color-text-white);
}

::-moz-selection {
  background: var(--color-accent);
  color: var(--color-text-white);
}

/* Вертикальный скроллбар для всех элементов */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 5px;
  border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-light);
}

::-webkit-scrollbar-thumb:active {
  background: #002a52;
}

/* Стили для кнопок (наконечников) скроллбара */
::-webkit-scrollbar-button {
  width: 10px;
  height: 20px;
  background: var(--color-bg);
  border-radius: 3px;
}

::-webkit-scrollbar-button:hover {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-button:active {
  background: var(--color-primary);
}

/* Цвет стрелок на кнопках — основной цвет, чтобы их было видно */
::-webkit-scrollbar-button:vertical:decrement {
  border-bottom: 6px solid var(--color-primary);
}

::-webkit-scrollbar-button:vertical:increment {
  border-top: 6px solid var(--color-primary);
}

::-webkit-scrollbar-button:horizontal:decrement {
  border-right: 6px solid var(--color-primary);
}

::-webkit-scrollbar-button:horizontal:increment {
  border-left: 6px solid var(--color-primary);
}

::-webkit-scrollbar-button:vertical:decrement:hover {
  border-bottom-color: var(--color-primary-light);
}

::-webkit-scrollbar-button:vertical:increment:hover {
  border-top-color: var(--color-primary-light);
}

::-webkit-scrollbar-button:horizontal:decrement:hover {
  border-right-color: var(--color-primary-light);
}

::-webkit-scrollbar-button:horizontal:increment:hover {
  border-left-color: var(--color-primary-light);
}

/* ========================
   5. Сетка и контейнеры
   ======================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================
   6. Заголовки
   ======================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--color-primary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 32px;
  line-height: 1.25;
}

h2 {
  font-size: 2rem;
  margin-bottom: 28px;
  margin-top: 40px;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 12px;
  line-height: 1.25;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  margin-top: 32px;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  margin-top: 24px;
  line-height: 1.35;
}

h5 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  margin-top: 20px;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  margin-bottom: 12px;
  margin-top: 16px;
  font-weight: 600;
}

p {
  margin-bottom: 20px;
  margin-top: 0;
  text-align: justify;
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========================
   7. Списки (БЭМ-стили, в академическом стиле кафедры ТП и МЭТ)
   ======================== */

/* Базовый сброс для всех списков — только внутри контента */
.list,
.list--ordered,
.list--unordered {
  margin: 24px 0;
  padding-left: 0; /* Сбрасываем браузерные отступы */
  list-style: none; /* Убираем стандартные маркеры */
}

/* --- Общие стили для элементов списка --- */
.list__item {
  position: relative;
  margin-bottom: 16px;
  padding-left: 28px; /* Место под маркер/циферу */
  color: var(--color-text);
  line-height: 1.6;
}

.list__item:last-child {
  margin-bottom: 0;
}

/* --- Нумерованные списки (для алгоритмов, шагов, этапов) --- */
.list--ordered {
  counter-reset: list-item-counter;
}

.list--ordered .list__item {
  counter-increment: list-item-counter;
  padding-left: 36px; /* Чуть больше места под цифры */
}

.list--ordered .list__item::before {
  content: counter(list-item-counter) ".";
  position: absolute;
  left: 0;
  top: 4px;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-accent); /* Латунный акцент как в навигации */
  background: rgba(201, 168, 76, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  text-align: center;
}

/* --- Маркированные списки (классические пункты) --- */
.list--unordered .list__item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
}

/* --- Вложенные списки (подпункты) --- */
.list__nested {
  margin-top: 16px;
  padding-left: 16px;
  margin-bottom: 16px;
}

.list__nested .list__item {
  padding-left: 20px; /* Меньше отступ для вложенности */
}

.list__nested .list--unordered .list__item::before {
  width: 5px;
  height: 5px;
}

.list__nested .list--ordered .list__item::before {
  width: 20px;
  height: 20px;
  font-size: 11px;
}

/* --- Списки определений (термины + пояснения) — для лекций по химии/нанотеху --- */
.list--definition {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px 24px;
  align-items: baseline;
  margin: 24px 0;
}

.list--definition .list__item {
  padding-left: 0;
  margin-bottom: 12px;
}

.list--definition .list__term {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-primary);
  grid-column-start: 1;
  display: block;
}

.list--definition .list__desc {
  grid-column-start: 2;
  color: var(--color-text);
}

/* --- Интерактивные/акцентные списки (для важных выводов, «что запомнить») --- */
.list--highlight {
  border: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 28px 0;
}

.list--highlight .list__item {
  padding-left: 32px;
  margin-bottom: 16px;
}

.list--highlight .list--ordered .list__item::before,
.list--highlight .list--unordered .list__item::before {
  color: var(--color-primary-light);
  background: rgba(0, 51, 102, 0.08);
}

.list--highlight .list__item:last-child {
  margin-bottom: 0;
}

/* --- Адаптивность списков --- */
@media (max-width: 768px) {
  .list__item {
    padding-left: 24px;
  }

  .list--ordered .list__item::before {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .list--definition {
    grid-template-columns: auto;
    gap: 8px 0;
  }

  .list--definition .list__term {
    display: inline-block;
    margin-bottom: 4px;
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 2px;
  }
}

/* ========================
   8. Таблицы
   ======================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th {
  font-family: var(--font-serif);
  color: var(--color-text-white);
  background-color: var(--color-primary);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

th a {
  color: var(--color-text-white);
}

td {
  border: 1px solid var(--color-border);
  padding: 14px 16px;
  vertical-align: top;
  background: var(--color-bg);
}

tbody tr:nth-child(even) td {
  background-color: rgba(0, 0, 0, 0.02);
}

tbody tr:hover td {
  background-color: rgba(201, 168, 76, 0.06);
}

/* ========================
   8. Основной контент (page-content)
   ======================== */

.page-content {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 16px;
}

.page-content__title {
  font-family: var(--font-serif);
  color: var(--color-primary);
  margin-bottom: 16px;
}

.page-content__text {
  color: var(--color-text);
  line-height: 1.625;
}

/* ========================
   9. Шапка сайта (Header)
   ======================== */

.header {
  background-color: var(--color-primary);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header__container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 80px;
  gap: 16px;
}

/* Логотип */
.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-white);
  transition: var(--transition);
}

.header__logo:hover {
  transform: scale(1.02);
}

.header__logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.header__logo-title {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--color-text-white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.header__logo:hover .header__logo-title {
  letter-spacing: 1px;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
}

.header__logo-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.75;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  transition: all 0.3s ease;
}

.header__logo:hover .header__logo-subtitle {
  letter-spacing: 5px;
  opacity: 1;
}

/* ========================
   10. Навигация (Nav)
   ======================== */

.nav {
  display: flex;
  align-items: center;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.nav__item {
  position: relative;
}

/* Ссылка навигации */
.nav__link {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text-white);
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

/* Активная ссылка */
.nav__link--active {
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Подчёркивание при hover */
.nav__link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link--active::after {
  width: 60%;
}

.nav__link:hover,
.nav__link:focus-visible {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  outline: none;
}

.nav__link:focus-visible {
  outline: 2px dashed var(--color-accent);
  outline-offset: 4px;
}

/* Выпадающее меню */
.nav__item--dropdown {
  position: relative;
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) rotateX(-90deg);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  min-width: 180px;
  background: var(--color-bg);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 8px 0;
  transition: opacity 0.25s ease-out,
              transform 0.3s ease-out,
              visibility 0s 0.3s;
  list-style: none;
  z-index: 100;
  margin: 0;
}

.nav__item--dropdown:hover .nav__dropdown-menu,
.nav__item--dropdown:focus-within .nav__dropdown-menu {
  opacity: 1;
  transform: translateX(-50%) rotateX(0deg);
  visibility: visible;
  transition-delay: 0s, 0s, 0s;
}

.nav__dropdown-link {
  display: block;
  padding: 10px 20px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: background-color 0.2s ease, padding-left 0.2s ease;
  white-space: nowrap;
}

.nav__dropdown-link:hover,
.nav__dropdown-link:focus-visible {
  background-color: var(--color-bg-secondary);
  padding-left: 26px;
  outline: none;
}

.nav__dropdown-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.nav__link--dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link--dropdown::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--color-accent);
  margin-left: 4px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__item--dropdown:hover .nav__link--dropdown::before {
  transform: rotate(180deg);
}

/* Бургер-меню */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1100;
}

.nav__toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-text-white);
  margin: 5px 0;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ========================
   11. Кнопки (Btn)
   ======================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-white);
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
  margin-bottom: 20px;
}

/* Hover-состояние */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.28);
  background-color: var(--color-primary-light);
}

/* Focused-состояние */
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: none;
}

/* Active-состояние */
.btn:active {
  transform: translateY(0) scale(0.98);
  background-color: #002a52;
}

/* Акцентная кнопка */
.btn--accent {
  background-color: var(--color-accent);
  color: #1a1a1d;
}

.btn--accent:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}

/* Обводка */
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-text-white);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

/* Маленькая */
.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* Большая */
.btn-lg {
  padding: 18px 36px;
  font-size: 1.05rem;
  margin-bottom: 28px;
}

/* ========================
   12. Подвал (Footer)
   ======================== */

.site-footer {
  background-color: #121214;
  color: var(--color-text-secondary);
  padding: 56px 0 24px;
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 36px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Бренд-блок */
.footer__brand {
  display: flex;
  flex-direction: column;
}

.footer__brand-title {
  font-family: var(--font-serif);
  color: var(--color-text-white);
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 4px;
}

.footer__brand-subtitle {
  color: var(--color-accent);
  font-weight: 500;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.footer__brand-description {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.825rem;
  line-height: 1.3;
  margin-top: 4px;
}

/* Навигация подвала */
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer__nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: var(--transition);
  padding: 8px 12px;
  border-radius: var(--radius);
}

.footer__nav-item:hover {
  color: var(--color-bg);
  background: rgba(0, 51, 102, 0.08);
  transform: translateY(-1px);
}

/* Мета-блок */
.footer__meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer__meta-item {
  margin-bottom: 12px;
}

.footer__meta-item:last-child {
  margin-bottom: 0;
}

.footer__license {
  font-size: 0.85rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.footer__ornament {
  margin-top: 28px;
  padding: 0 24px;
}

.footer__ornament-svg {
  width: 100%;
  height: 4px;
  display: block;
}

/* ========================
   13. Адаптивность
   ======================== */

/* Планшеты и мобильные */
@media (max-width: 768px) {
  .header__container {
    min-height: 64px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }

  .footer__brand-title,
  .footer__brand-subtitle,
  .footer__brand-description,
  .footer__license,
  .footer__copyright {
    text-align: center;
  }

  .footer__nav {
    justify-content: center;
    gap: 14px;
  }

  .footer__nav-item {
    padding: 6px 10px;
    font-size: 0.875rem;
  }

  .site-footer {
    padding: 36px 0 16px;
  }
}

/* Маленькие экраны */
@media (max-width: 480px) {
  .header__logo-title {
    font-size: 18px;
  }

  .header__logo-subtitle {
    font-size: 9px;
  }

  .header__logo-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .container {
    padding: 0 16px;
  }

  .container {
    max-width: 100%;
  }
}

/* ========================
   14. Модальные окна
   ======================== */

/* Оверлей (затемнение фона) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 51, 102, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* Контейнер модального окна */
.modal-container {
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 640px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Заголовок модального окна */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--color-primary);
  color: var(--color-text-white);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-white);
}

/* Кнопка закрытия */
.modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  color: var(--color-text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.modal-close-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

.modal-close-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Тело модального окна */
.modal-body {
  padding: 32px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body p {
  margin-bottom: 20px;
  line-height: 1.7;
  margin-top: 0;
}

.modal-body h2 {
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 12px;
  font-size: 1.5rem;
}

.modal-body h3 {
  margin-top: 24px;
  margin-bottom: 16px;
}

/* Нижний колонтитул модального окна */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
}

/* Увеличенное модальное окно (для карт) */
.modal-container--large {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
}

/* Уменьшенное модальное окно */
.modal-container--small {
  max-width: 480px;
  width: 90%;
  max-height: 70vh;
}

/* ========================
   16. Улучшенные карточки (БЭМ)
   ======================== */

/* Унифицированная карточка контента */
.content-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: linear-gradient(180deg, #ffffff 0%, #f9f9fb 100%);
  border-color: var(--color-primary);
}

/* Цветные бейджи для дисциплин - сохраняют цвета при hover */
.content-card__badge--mathematics {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #0d47a1;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(13, 71, 161, 0.15);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.content-card__badge--physics {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #1b5e20;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(27, 94, 32, 0.15);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.content-card__badge--chemistry {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  color: #880e4f;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(136, 14, 79, 0.15);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.content-card__badge--special {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(230, 81, 0, 0.15);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

/* Иконка в заголовке карточки */
.content-card__title::before {
  content: "• ";
  color: var(--color-accent);
  margin-right: 0.25rem;
  font-weight: 700;
}

/* Линия после заголовка */
.content-card__subtitle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.content-card__subtitle::before {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin-bottom: 0.75rem;
}

.content-card__badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.content-card__content {
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.content-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.content-card__meta-item {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.content-card__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* ========================
   17. Выпадающие списки (Select)
   ======================== */

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  
  /* Базовые стили */
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  
  /* SVG стрелка */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='var(--color-primary)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}

select:hover {
  border-color: var(--color-primary);
}

select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

select::-ms-expand {
  display: none;
}

/* Анимация появления */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-overlay.active .modal-container {
  animation: modalFadeIn 0.3s ease-out;
}

/* Стили для контента внутри модального окна */
.modal-content {
  color: var(--color-text);
  line-height: 1.6;
}

.modal-content ul,
.modal-content ol {
  margin: 12px 0;
  padding-left: 24px;
}

.modal-content li {
  margin-bottom: 8px;
}

.modal-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.modal-content a:hover {
  color: var(--color-primary-light);
}

/* Адаптивность модальных окон */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: 24px 20px;
  }

  .modal-body p {
    margin-bottom: 16px;
  }

  .modal-body h2 {
    font-size: 1.3rem;
  }

  .modal-footer {
    padding: 16px 20px;
  }

  .modal-footer .btn {
    padding: 10px 20px;
  }

  .modal-container--large {
    max-width: 95%;
  }

  .modal-container--small {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .modal-container {
    width: 98%;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 12px;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-close-btn {
    padding: 6px;
  }
}

/* ========================
   15. Блоки страниц (БЭМ)
   ======================== */

/* Секции страниц */
.page-section {
  margin: 32px 0;
}

.page-section__hero {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
}

.page-section__hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-section__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
}

.page-section__description {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
  color: var(--color-text);
  line-height: 1.7;
}

.page-section__categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Универсальные карточки страниц */
.page-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9f9fb 100%);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.page-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--color-accent);
}

.page-card__title {
  font-family: var(--font-serif);
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border);
}

.page-card__description {
  margin-bottom: 0;
  color: var(--color-text);
  line-height: 1.65;
}

/* Пустое состояние */
.page-empty {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-secondary);
}

/* Адаптивность блоков страниц */
@media (max-width: 768px) {
  .page-section__hero h1 {
    font-size: 1.75rem;
  }

  .page-section__subtitle {
    font-size: 1rem;
  }

  .page-section__categories {
    grid-template-columns: 1fr;
  }
}
