/* study.css - Основные стили образовательного портала */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #64748b;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Шапка специальности */
.speciality-header {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  padding: 48px 32px;
  margin-bottom: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.speciality-code {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.speciality-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.speciality-description {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.5;
}

/* Заголовки */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-description {
  color: var(--text-light);
  font-size: 16px;
}

/* Аккордеон */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.accordion-header {
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: none;
  width: 100%;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
  gap: 12px;
}

.accordion-header:hover {
  background: #f1f5f9;
}

.accordion-header.active {
  background: var(--primary);
  color: white;
}

.accordion-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  opacity: 0.6;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
  opacity: 1;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.accordion-content.open {
  max-height: none;
  padding: 24px;
}

/* Текст внутри аккордеона */
.accordion-content p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.accordion-content p:last-child {
  margin-bottom: 0;
}

/* Карточки */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

/* Изображения */
figure {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Код */
pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

code {
  font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
}

.inline-code {
  background: #f1f5f9;
  color: #e11d48;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-weight: 500;
}

/* Заметки */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}

.alert-info {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-left: 4px solid var(--primary);
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--warning);
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success);
}

/* Сетка */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

/* Таблицы */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.info-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.info-table td:first-child {
  font-weight: 600;
  width: 180px;
  color: var(--text);
}

.info-table tr:last-child td {
  border-bottom: none;
}

/* Списки */
.styled-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.styled-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 15px;
}

.styled-list li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 4px;
}

.numbered-list {
  padding-left: 20px;
  margin: 12px 0;
}

.numbered-list li {
  padding: 8px 0;
  font-size: 15px;
  line-height: 1.6;
}

/* Ссылки в тексте */
a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Разделитель */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Видео */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 24px 0;
  box-shadow: var(--shadow);
}

.video-container video,
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Адаптивность */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .speciality-header {
    padding: 32px 20px;
  }
  
  .speciality-title {
    font-size: 28px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .accordion-content.open {
    padding: 16px;
  }
}

/* Подсветка при наведении на аккордеон */
.accordion {
  transition: box-shadow 0.3s ease;
}

.accordion:hover {
  box-shadow: var(--shadow-md);
}