/* 1. Определяем переменные для цветов (удобно для ASP.NET в будущем) */
:root {
	--main-bg: #f8f9fa;
	--header-bg: #2c3e50; /* «Админский» синий */
	--accent: #e74c3c; /* Акцентный красный (как в лого РЕД ОС) */
	--text-dark: #333;
	--white: #ffffff;
}

/* 2. Обнуляем стандартные отступы браузера */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	background-color: var(--main-bg);
	color: var(--text-dark);
	line-height: 1.6;
}

/* 3. Делаем шапку современной */
header {
	background-color: var(--header-bg);
	color: var(--white);
	padding: 20px 0;
	text-align: center;
	position: sticky; /* Приклеиваем меню */
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 4. Стилизуем меню с помощью Flexbox */
nav ul {
	display: flex;
	justify-content: center;
	list-style: none;
	margin-top: 15px;
	gap: 30px; /* Расстояние между пунктами */
}

nav a {
	color: var(--white);
	text-decoration: none;
	font-weight: 500;
	transition: 0.3s; /* Плавный переход при наведении */
}

nav a:hover {
	color: var(--accent);
}

/* Общий контейнер для ограничения ширины контента */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Стили приветственной секции */
.hero {
	background: linear-gradient(135deg, #34495e, #2c3e50);
	color: white;
	padding: 60px 0;
	text-align: center;
	margin-bottom: 40px;
}

.hero h2 {
	font-size: 2.5rem;
	margin-bottom: 10px;
}

/* Настройка сетки карточек */
.categories {
	display: grid;
	grid-template-columns: repeat(
		auto-fit,
		minmax(280px, 1fr)
	); /* Авто-подбор колонок под размер экрана */
	gap: 25px;
	margin-bottom: 50px;
}

/* Стиль отдельной карточки */
.card {
	background: white;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Легкая тень */
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.card:hover {
	transform: translateY(-5px); /* Эффект «всплытия» при наведении */
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card h3 {
	margin-bottom: 15px;
	color: var(--header-bg);
}

.card p {
	font-size: 0.95rem;
	color: #666;
	margin-bottom: 20px;
}

/* Кнопка внутри карточки */
.btn {
	display: inline-block;
	padding: 10px 20px;
	background-color: var(--accent);
	color: white;
	text-decoration: none;
	border-radius: 6px;
	text-align: center;
	font-weight: bold;
	transition: background 0.3s;
}

.btn:hover {
	background-color: #c0392b; /* Более темный оттенок красного */
}

/* Макет с боковой панелью */
.article-layout {
	display: flex;
	gap: 40px;
	margin-top: 30px;
	align-items: flex-start;
}

.sidebar {
	width: 250px;
	position: sticky;
	top: 100px; /* Прилипает при скролле под шапкой */
	background: #fff;
	padding: 20px;
	border-radius: 8px;
}

.sidebar h4 {
	margin-bottom: 15px;
	border-bottom: 2px solid var(--main-bg);
	padding-bottom: 5px;
}
.sidebar ul {
	list-style: none;
}
.sidebar li {
	margin-bottom: 10px;
}
.sidebar a {
	color: #555;
	text-decoration: none;
	font-size: 0.9rem;
}
.sidebar a:hover {
	color: var(--accent);
}

.content {
	flex: 1; /* Занимает все оставшееся место */
	background: #fff;
	padding: 40px;
	border-radius: 8px;
}

.content h2 {
	margin-bottom: 20px;
	color: var(--header-bg);
}
.content p {
	margin-bottom: 15px;
}

/* Оформление блоков с кодом */
.code-block,
.code-wrapper {
	background: #282c34;
	color: #abb2bf;
	padding: 15px;
	border-radius: 6px;
	font-family: 'Consolas', monospace;
	margin: 20px 0;
	overflow-x: auto;
}

.code-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.copy-btn {
	background: #444;
	color: #fff;
	border: none;
	padding: 5px 10px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.8rem;
}

/* Оформление мест под скриншоты */
.image-box {
	margin: 25px 0;
	text-align: center;
}

.placeholder {
	width: 100%;
	height: 300px;
	background: #eee;
	border: 2px dashed #ccc;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #888;
	border-radius: 8px;
}

.caption {
	font-size: 0.85rem;
	color: #777;
	margin-top: 10px;
	font-style: italic;
}

/* Адаптивность: на мобилках убираем сайдбар вверх */
@media (max-width: 768px) {
	.article-layout {
		flex-direction: column;
	}
	.sidebar {
		width: 100%;
		position: static;
	}
}

.tip {
	background-color: #e8f4fd;
	border-left: 5px solid #3498db;
	padding: 15px;
	margin: 20px 0;
	border-radius: 4px;
	font-size: 0.9rem;
}

.tip strong {
	color: #2980b9;
}

.output-block {
	background-color: #f1f3f5;
	border: 1px solid #dee2e6;
	padding: 15px;
	border-radius: 6px;
	margin-top: -10px;
	margin-bottom: 20px;
	font-size: 0.85rem;
}

.output-block strong {
	display: block;
	margin-bottom: 5px;
	color: #666;
}

samp {
	font-family: 'Consolas', monospace;
	color: #2e7d32; /* Зеленый цвет для успешного вывода */
}
