/* ===== Content Styles ===== */
/* Стили для текстового контента страниц */
/* Используем высокую специфичность для перекрытия Tailwind */

/* Переопределение Tailwind для списков - максимальная специфичность */
section ul[class*=""] li,
section ol[class*=""] li,
section ul[class] li,
section ol[class] li,
section ul li,
section ol li,
section li {
  line-height: 1.55 !important;
}

section ul[class*=""],
section ol[class*=""],
section ul[class],
section ol[class],
section ul,
section ol {
  line-height: 1.55 !important;
}

/* Контейнер контента */
section > *:first-child {
  margin-top: 0 !important;
}

section > *:last-child {
  margin-bottom: 0 !important;
}

/* Заголовки */
section h2,
section h2:first-child {
  font-size: 1.75rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  letter-spacing: -0.01em !important;
}

section h2:first-child {
  margin-top: 0 !important;
}

section h3,
section h3:first-child {
  font-size: 1.375rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin-top: 1.75rem !important;
  margin-bottom: 0.875rem !important;
  letter-spacing: -0.005em !important;
}

section h3:first-child {
  margin-top: 0 !important;
}

section h4 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.88) !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
}

section h5,
section h6 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.625rem !important;
}

/* Параграфы */
section p {
  font-size: 1rem !important;
  line-height: 1.55 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-top: 0 !important;
  margin-bottom: 1.25rem !important;
}

section p:last-child {
  margin-bottom: 0 !important;
}

/* Списки */
section ul,
section ol {
  margin-top: 0 !important;
  margin-bottom: 2rem !important;
  padding-left: 2.5rem !important;
  color: rgba(255, 255, 255, 0.75) !important;
  line-height: 1.55 !important;
}

section ul:last-child,
section ol:last-child {
  margin-bottom: 0 !important;
}

section ul > li,
section ol > li,
section ul li,
section ol li,
section li {
  font-size: 1rem !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-bottom: 0.35rem !important;
  margin-top: 0 !important;
  display: list-item !important;
  padding-left: 0.5rem !important;
  padding-bottom: 0.35rem !important;
  vertical-align: baseline !important;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.1) !important;
}

/* Дополнительное переопределение для li - максимальная специфичность */
section ul li,
section ol li {
  line-height: 1.4 !important;
}

section li:last-child {
  margin-bottom: 0 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

section ul > li,
section ul li {
  list-style-type: disc !important;
  line-height: 1.55 !important;
}

/* Красные маркеры для списков */
section ul > li::marker,
section ul li::marker {
  color: rgba(255, 59, 98, 1) !important;
  font-size: 1.2em !important;
}

/* Выравнивание текста с маркером */
section ul > li,
section ul li {
  line-height: 1.4 !important;
}

section ol > li,
section ol li {
  list-style-type: decimal !important;
  line-height: 1.55 !important;
}

/* Вложенные списки */
section ul ul,
section ol ol,
section ul ol,
section ol ul {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

/* Ссылки */
section a:not(.text-white) {
  color: rgba(255, 59, 98, 0.9) !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

section a:not(.text-white):hover {
  color: rgba(255, 59, 98, 1) !important;
  text-decoration: underline !important;
}

/* Выделение текста */
section strong,
section b {
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

section em,
section i {
  font-style: italic !important;
}

/* Горизонтальная линия */
section hr {
  border: none !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
  margin: 2rem 0 !important;
}

/* Цитаты */
section blockquote {
  margin: 1.5rem 0 !important;
  padding-left: 1.5rem !important;
  border-left: 3px solid rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  font-style: italic !important;
}

section blockquote p {
  margin-bottom: 0.75rem !important;
}

section blockquote p:last-child {
  margin-bottom: 0 !important;
}

/* Код */
section code {
  font-family: 'Courier New', monospace !important;
  font-size: 0.9em !important;
  padding: 0.125rem 0.375rem !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.25rem !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

section pre {
  margin: 1.5rem 0 !important;
  padding: 1rem !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem !important;
  overflow-x: auto !important;
  font-family: 'Courier New', monospace !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

section pre code {
  padding: 0 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
}

/* Изображения */
section img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0.5rem !important;
  margin: 1.5rem 0 !important;
}

/* Таблицы */
section table {
  width: 100% !important;
  margin: 1.5rem 0 !important;
  border-collapse: collapse !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
}

section th,
section td {
  padding: 0.75rem 1rem !important;
  text-align: left !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

section th {
  background: rgba(255, 255, 255, 0.05) !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

section td {
  color: rgba(255, 255, 255, 0.75) !important;
}

section tr:last-child td {
  border-bottom: none !important;
}

/* ===== Выделенные блоки ===== */
/* Блоки с вертикальной полосой слева и glass эффектом */

/* Базовый класс */
section .content-highlight,
.content-highlight {
  padding: 1.25rem 1.5rem !important;
  margin: 1.5rem 0 !important;
  border-radius: 0.75rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 4px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
}

/* Красная полоса - включает все стили базового класса */
section .content-highlight-red,
.content-highlight-red {
  padding: 1.25rem 1.5rem !important;
  margin: 1.5rem 0 !important;
  border-radius: 0.75rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 4px solid rgba(255, 59, 98, 0.8) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
}

/* Серая полоса - включает все стили базового класса */
section .content-highlight-gray,
.content-highlight-gray {
  padding: 1.25rem 1.5rem !important;
  margin: 1.5rem 0 !important;
  border-radius: 0.75rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 4px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45) !important;
}

/* Стили для содержимого внутри выделенных блоков */
.content-highlight p {
  margin-top: 0 !important;
  margin-bottom: 0.875rem !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.content-highlight p:last-child {
  margin-bottom: 0 !important;
}

.content-highlight h2,
.content-highlight h3,
.content-highlight h4 {
  margin-top: 0 !important;
  margin-bottom: 0.875rem !important;
}

.content-highlight h2:last-child,
.content-highlight h3:last-child,
.content-highlight h4:last-child {
  margin-bottom: 0 !important;
}

.content-highlight ul,
.content-highlight ol {
  margin-top: 0 !important;
  margin-bottom: 0.875rem !important;
}

.content-highlight ul:last-child,
.content-highlight ol:last-child {
  margin-bottom: 0 !important;
}

/* Адаптивность */
@media (max-width: 768px) {
  section h2 {
    font-size: 1.5rem !important;
    margin-top: 1.75rem !important;
  }
  
  section h3 {
    font-size: 1.25rem !important;
    margin-top: 1.5rem !important;
  }
  
  section p {
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
  }
  
  section ul,
  section ol {
    padding-left: 2rem !important;
  }
  
  .content-highlight {
    padding: 1rem 1.25rem !important;
    margin: 1.25rem 0 !important;
  }
}

/* ===== Стили для селектов ===== */
/* Красивое оформление выпадающих списков */

section select,
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem !important;
  color: rgba(255, 255, 255, 0.95) !important;
  padding: 0.625rem 2.5rem 0.625rem 0.875rem !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4L6 8L10 4' stroke='rgba(255,255,255,0.6)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 12px 12px !important;
}

section select:hover,
select:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.05)) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

section select:focus,
select:focus {
  outline: none !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.06)) !important;
  border-color: rgba(255, 59, 98, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(255, 59, 98, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

section select:active,
select:active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04)) !important;
}

/* Опции внутри селекта */
section select option,
select option {
  background: rgba(14, 22, 43, 0.98) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  padding: 0.5rem 0.75rem !important;
  border: none !important;
}

section select option:hover,
select option:hover {
  background: rgba(255, 59, 98, 0.2) !important;
}

section select option:checked,
select option:checked {
  background: rgba(255, 59, 98, 0.3) !important;
  color: rgba(255, 255, 255, 1) !important;
}

/* Отключенный селект */
section select:disabled,
select:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

/* Адаптивность для селектов */
@media (max-width: 768px) {
  section select,
  select {
    padding: 0.625rem 2.25rem 0.625rem 0.75rem !important;
    font-size: 0.875rem !important;
  }
}

/* Финальное переопределение для списков - максимальный приоритет */
section * ul li,
section * ol li,
section ul * li,
section ol * li,
section ul li *,
section ol li *,
section ul[class*=""] li[class*=""],
section ol[class*=""] li[class*=""],
section ul li,
section ol li,
section ul > li,
section ol > li {
  line-height: 1.4 !important;
}

/* Переопределение для всех возможных комбинаций классов Tailwind */
section ul[class*="leading"] li,
section ol[class*="leading"] li,
section ul li[class*="leading"],
section ol li[class*="leading"],
section ul[class] li[class],
section ol[class] li[class],
section ul li[class],
section ol li[class] {
  line-height: 1.4 !important;
  margin-bottom: 0.35rem !important;
}

/* Абсолютное переопределение - применяется ко всем li внутри section */
section li {
  line-height: 1.4 !important;
  margin-bottom: 0.35rem !important;
}

/* ФИНАЛЬНОЕ ПЕРЕОПРЕДЕЛЕНИЕ - максимальная специфичность в конце файла */
html body section ul li,
html body section ol li,
html body section ul > li,
html body section ol > li,
body section ul li,
body section ol li,
body section ul > li,
body section ol > li {
  line-height: 1.4 !important;
}

/* Переопределение для всех возможных классов Tailwind */
section ul[class*="leading"] li,
section ol[class*="leading"] li,
section ul li[class*="leading"],
section ol li[class*="leading"],
section ul[class] li[class],
section ol[class] li[class],
section ul li[class],
section ol li[class] {
  line-height: 1.4 !important;
}

/* =========================================================
   ADD: Красивое оформление для страницы "Направления"
   (карточки, лид-абзац, компактные списки внутри карточек)
   ========================================================= */

/* Лид-абзац (первый абзац под h2) */
section p.lead {
  font-size: 1.0625rem !important;
  line-height: 1.65 !important;
  color: rgba(255, 255, 255, 0.80) !important;
  margin-bottom: 1.25rem !important;
}

/* Контейнер карточек (если захочешь обернуть всё в один блок) */
section .content-cards,
.content-cards {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
  margin: 1.25rem 0 !important;
}

/* Карточка направления */
section .content-card,
.content-card {
  padding: 1.25rem 1.5rem !important;
  margin: 0 !important;
  border-radius: 0.9rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Мягкая "полоса" сверху как акцент */
section .content-card::before,
.content-card::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, rgba(255,59,98,.75), rgba(255,255,255,.08), rgba(255,255,255,0)) !important;
  opacity: 0.85 !important;
}

/* Заголовок внутри карточки */
section .content-card h3,
.content-card h3 {
  margin-top: 0 !important;
  margin-bottom: 0.65rem !important;
  font-size: 1.25rem !important;
  line-height: 1.35 !important;
}

/* Текст внутри карточки компактнее */
section .content-card p,
.content-card p {
  margin-bottom: 0.9rem !important;
  color: rgba(255, 255, 255, 0.77) !important;
}

/* "Мета-строка" (необязательная) — маленькая подпись */
section .content-meta,
.content-meta {
  font-size: 0.9rem !important;
  color: rgba(255, 255, 255, 0.62) !important;
  margin-bottom: 0.75rem !important;
}

/* Списки внутри карточек — компактнее и без нижних пунктиров */
section .content-card ul,
section .content-card ol,
.content-card ul,
.content-card ol {
  padding-left: 1.6rem !important;
  margin-bottom: 0.75rem !important;
}

section .content-card li,
.content-card li {
  border-bottom: none !important;
  padding-bottom: 0.25rem !important;
  margin-bottom: 0.25rem !important;
}

/* Разделитель между смысловыми блоками */
section .content-divider,
.content-divider {
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent) !important;
  margin: 1.25rem 0 !important;
}

/* Акцентный блок "важно" — чуть ярче (поверх твоего content-highlight-red) */
section .content-highlight-red strong,
.content-highlight-red strong {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Мобила: чуть плотнее карточки */
@media (max-width: 768px) {
  section p.lead {
    font-size: 1rem !important;
  }
  section .content-card,
  .content-card {
    padding: 1rem 1.1rem !important;
    border-radius: 0.85rem !important;
  }
  section .content-card h3,
  .content-card h3 {
    font-size: 1.15rem !important;
  }
}