/* ============================================
   Стили для страницы отдельной статьи блога
   ============================================ */

/* Контейнер контента */
.blog-content {
	font-size: 1.125rem;
	line-height: 1.75;
	color: #e5e7eb;
}

/* Параграфы - уменьшаем отступы */
.blog-content p {
	margin-bottom: 0.75rem;
}

/* Пустые параграфы (переносы строк) - убираем отступы */
.blog-content p:empty,
.blog-content p:has(br:only-child) {
	margin-bottom: 0;
	line-height: 1;
	height: 1rem;
}

/* Первый параграф после заголовка */
.blog-content h2 + p,
.blog-content h3 + p,
.blog-content ul + p,
.blog-content ol + p,
.blog-content blockquote + p {
	margin-top: 0;
}

/* Заголовки - уменьшаем отступы */
.blog-content h2 {
	font-size: 1.875rem;
	font-weight: 700;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	color: white;
	line-height: 1.3;
}

.blog-content h3 {
	font-size: 1.5rem;
	font-weight: 600;
	margin-top: 1.25rem;
	margin-bottom: 0.5rem;
	color: #f3f4f6;
	line-height: 1.4;
}

/* Списки - уменьшаем отступы */
.blog-content ul,
.blog-content ol {
	list-style-type: disc;
	margin: 0.5rem 0 0.5rem 1.5rem;
}

.blog-content ol {
	list-style-type: decimal;
}

.blog-content li {
	margin-bottom: 0.25rem;
}

.blog-content li:last-child {
	margin-bottom: 0;
}

/* Цитаты */
.blog-content blockquote {
	border-left: 4px solid #a855f7;
	padding-left: 1.25rem;
	margin: 1rem 0;
	color: #9ca3af;
	font-style: italic;
}

/* Ссылки */
.blog-content a {
	color: #c27bff;
	text-decoration: underline;
	transition: color 0.2s ease;
}

.blog-content a:hover {
	color: #a855f7;
}

/* Форматирование текста */
.blog-content strong {
	font-weight: 700;
	color: white;
}

.blog-content em {
	font-style: italic;
}

.blog-content u {
	text-decoration: underline;
}

.blog-content s {
	text-decoration: line-through;
}

/* Код */
.blog-content pre {
	background: #1f2937;
	border: 1px solid #374151;
	border-radius: 0.75rem;
	padding: 1rem;
	overflow-x: auto;
	margin: 1rem 0;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	font-size: 0.875rem;
	color: #e5e7eb;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.blog-content code {
	background: #1f2937;
	padding: 0.125rem 0.375rem;
	border-radius: 0.375rem;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
	font-size: 0.875rem;
}

/* Изображения */
.blog-content img {
	max-width: 100%;
	height: auto;
	border-radius: 0.75rem;
	margin: 1rem 0;
}

/* Выравнивание изображений */
.blog-content .ql-align-center img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.blog-content .ql-align-right img {
	display: block;
	margin-left: auto;
}

/* Выравнивание текста */
.blog-content .ql-align-center {
	text-align: center;
}

.blog-content .ql-align-right {
	text-align: right;
}

.blog-content .ql-align-justify {
	text-align: justify;
}

/* Таблицы */
.blog-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.blog-content th,
.blog-content td {
	border: 1px solid #374151;
	padding: 0.75rem;
	text-align: left;
}

.blog-content th {
	background: #1f2937;
	font-weight: 600;
}

/* Разделитель */
.blog-content hr {
	border: none;
	border-top: 1px solid #374151;
	margin: 1.5rem 0;
}

/* Ссылки с target="_blank" - добавляем иконку */
.blog-content a[target="_blank"]::after {
	content: " ↗";
	font-size: 0.75em;
	opacity: 0.7;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
	.blog-content {
		font-size: 1rem;
		line-height: 1.6;
	}
	
	.blog-content h2 {
		font-size: 1.5rem;
		margin-top: 1.25rem;
		margin-bottom: 0.5rem;
	}
	
	.blog-content h3 {
		font-size: 1.25rem;
		margin-top: 1rem;
		margin-bottom: 0.5rem;
	}
	
	.blog-content p {
		margin-bottom: 0.5rem;
	}
	
	.blog-content p:empty,
	.blog-content p:has(br:only-child) {
		height: 0.75rem;
	}
	
	.blog-content blockquote {
		padding-left: 0.75rem;
		margin: 0.75rem 0;
	}
	
	.blog-content pre {
		font-size: 0.75rem;
		padding: 0.75rem;
	}
	
	.blog-content ul,
	.blog-content ol {
		margin-left: 1rem;
	}
}