/**
 * Основные стили темы
 *
 * @package Minimal_Tech_Theme_RU
 * @since 1.0.0
 */

/* ============================================
   Переменные CSS
   ============================================ */
:root {
	--mtt-primary-color: #000000;
	/* Акцентный цвет (ссылки/кнопки) */
	--mtt-link-color-light: #26570d;
	--mtt-link-color-dark: #6e8803;
	--mtt-link-color: var(--mtt-link-color-light);
	--mtt-font-family: 'Roboto', sans-serif;
	--mtt-dark-bg-color: #1a1a1a;
	--mtt-dark-text-color: #ffffff;
	--mtt-light-bg-color: #ffffff;
	--mtt-light-text-color: #000000;
	/* Фон страницы (light/dark) отдельно от фона блоков/карточек */
	--mtt-light-page-bg-color: #eceaeb;
	--mtt-dark-page-bg-color: #1a1a1a;
	/* Фон поверхностей в тёмной теме (карточки/блоки) */
	--mtt-dark-surface-bg-color: rgba(255, 255, 255, 0.03);
	--mtt-text-color-primary: #000000;
	--mtt-text-color-secondary: #666666;
	--mtt-border-color: #e0e0e0;
	--mtt-spacing: 20px;
	--mtt-container-width: 1200px;
	--mtt-header-height: 81px;
}

@media (max-width: 768px) {
	:root {
		--mtt-spacing: 12px;
	}
}

body.dark-mode {
	--mtt-text-color-primary: #ffffff;
	--mtt-text-color-secondary: #999999;
	--mtt-link-color: var(--mtt-link-color-dark);
}

/* ============================================
   Сброс и базовые стили
   ============================================ */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--mtt-font-family);
	font-size: 16px;
	line-height: 1.6;
	color: var(--mtt-light-text-color);
	background-color: var(--mtt-light-page-bg-color);
	transition: background-color 0.3s ease, color 0.3s ease;
}

html {
	background-color: var(--mtt-light-page-bg-color);
}

body.dark-mode {
	background-color: var(--mtt-dark-page-bg-color);
	color: var(--mtt-dark-text-color);
}

html[data-theme="dark"] {
	background-color: var(--mtt-dark-page-bg-color);
}

a {
	color: var(--mtt-link-color);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

a:hover {
	opacity: 0.8;
}

/* Ссылки внутри контента остаются синими, но заголовки и меню - нет */
.entry-title a,
.widget-title,
.main-navigation a {
	color: var(--mtt-text-color-primary) !important;
}

.entry-title a:hover,
.main-navigation a:hover {
	color: var(--mtt-link-color) !important;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ============================================
   Контейнеры и сетка
   ============================================ */
.main-holder {
	display: flex;
	align-items: flex-start;
	gap: 0;
	min-height: calc(100vh - var(--mtt-header-height, 81px));
}

.main-content-wrapper {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 30px;
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
	padding: var(--mtt-spacing);
	align-items: start;
	flex: 1;
}

.main-content-wrapper > * {
	min-width: 0; /* Предотвращает переполнение grid элементов */
}

/* Старый класс для обратной совместимости */
.site-content-wrapper {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: var(--mtt-spacing);
	align-items: start;
}

.container {
	max-width: var(--mtt-container-width);
	margin: 0 auto;
	padding: 0 var(--mtt-spacing);
}

/* ============================================
   Шапка сайта
   ============================================ */
.site-header {
	position: relative;
	z-index: 1000;
	background-color: var(--mtt-light-bg-color);
	border-bottom: 1px solid var(--mtt-border-color);
	padding: 8px 0;
	margin-bottom: 15px;
}

body.dark-mode .site-header {
	background-color: var(--mtt-dark-bg-color);
	border-bottom-color: #333;
}

.header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: var(--mtt-container-width);
	margin: 0 auto;
	padding: 0 var(--mtt-spacing);
	gap: var(--mtt-spacing);
	flex-wrap: wrap;
}

.site-branding {
	flex: 1;
}

.site-logo {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	max-width: 100%;
}

.site-logo__img {
	display: block;
	height: 40px;
	width: auto;
	max-width: 100%;
}

.site-logo__img--dark {
	display: none;
}

body.dark-mode .site-logo__img--light {
	display: none;
}

body.dark-mode .site-logo__img--dark {
	display: block;
}

.site-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
}

.site-title a {
	color: inherit;
}

.site-description {
	font-size: 14px;
	color: var(--mtt-text-color-secondary);
	margin-top: 5px;
}

.main-navigation {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
}

.main-navigation ul,
.primary-menu-list {
	list-style: none;
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	align-items: center;
}

.main-navigation li {
	margin: 0;
	padding: 0;
}

.main-navigation a {
	font-weight: 500;
	font-size: 15px;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.main-navigation a:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .main-navigation a:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.header-search {
	margin-left: var(--mtt-spacing);
}

.header-search .search-form {
	display: flex;
	gap: 5px;
}

.search-input-wrapper {
	position: relative;
	display: inline-block;
}

.header-search .search-field {
	padding: 8px 40px 8px 12px;
	border: 1px solid var(--mtt-border-color);
	border-radius: 4px;
	font-size: 14px;
	min-width: 200px;
}

body.dark-mode .header-search .search-field {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: #333;
	color: var(--mtt-dark-text-color);
}

.header-search .search-submit {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	padding: 0;
	background: none;
	color: var(--mtt-text-color-secondary);
	border: none;
	cursor: pointer;
	font-size: 16px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.header-search .search-submit:hover {
	color: var(--mtt-link-color);
}

.header-search .search-submit i {
	font-size: 16px;
}

.header-search .search-submit i {
	font-size: 16px;
}

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--mtt-border-color);
	padding: 10px 15px;
	cursor: pointer;
	font-size: 16px;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: var(--mtt-spacing);
}

.theme-toggle {
	background: none;
	border: 1px solid var(--mtt-border-color);
	padding: 10px;
	cursor: pointer;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
}

.theme-toggle:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 18px;
	line-height: 1;
}

.theme-toggle-icon::before {
	content: '\f185'; /* Font Awesome sun icon */
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	display: block;
	color: #f39c12; /* Оранжевый цвет для солнца */
	text-align: center;
	line-height: 1;
}

body.dark-mode .theme-toggle-icon::before {
	content: '\f186'; /* Font Awesome moon icon */
	color: #f1c40f; /* Желтый цвет для луны в темной теме, чтобы была видна */
}

/* ============================================
   Сайдбары
   ============================================ */
.widget-area {
	padding: 0;
}

.sidebar-left .widget-area {
	padding: 0;
}

.widget {
	margin-bottom: 30px;
	padding: 0;
	background-color: transparent;
	border-radius: 0;
}

body.dark-mode .widget {
	background-color: transparent;
}

.widget-title {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 12px;
	color: var(--mtt-text-color-primary);
}

.widget ul {
	list-style: none;
}

.widget li {
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--mtt-border-color);
}

.widget li:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

body.dark-mode .widget li {
	border-bottom-color: #333;
}

/* Левый сайдбар - sticky слева, прижат к левому краю */
.sidebar-left {
	position: sticky;
	top: calc(var(--mtt-header-height, 81px) + var(--mtt-spacing));
	align-self: start;
	width: 280px;
	max-height: calc(100vh - var(--mtt-header-height, 81px) - var(--mtt-spacing));
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 100;
	background-color: var(--mtt-light-bg-color);
	border-right: 1px solid var(--mtt-border-color);
	padding: var(--mtt-spacing);
	flex-shrink: 0;
	border-radius: 15px;
	margin-left: 10px;
}

/* Кнопка гамбургера для левого сайдбара (McButton) */
.McButton {
	display: none;
	position: relative;
	width: 44px;
	height: 24px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	margin-right: 15px;
	z-index: 1001;
}

.McButton b {
	position: absolute;
	left: 0;
	width: 40px;
	height: 3px;
	background-color: var(--mtt-text-color-primary);
	transition: background-color 0.2s ease;
}

.McButton b:nth-child(1) {
	top: 0;
}

.McButton b:nth-child(2) {
	top: 50%;
	transform: translateY(-50%);
}

.McButton b:nth-child(3) {
	top: 100%;
	transform: translateY(-100%);
}

body.dark-mode .McButton b {
	background-color: var(--mtt-text-color-primary);
}

body.dark-mode .sidebar-left {
	background-color: var(--mtt-dark-bg-color);
	border-right-color: #333;
}

/* Скрываем элементы мобильного хедера на десктопе */
.mobile-header-elements {
	display: none;
}

/* На десктопе скрываем слайдер */
@media (min-width: 1025px) {
	.featured-slider.mobile-only {
		display: none;
	}

	.sidebar-right .featured-block {
		display: block;
	}
}

.sidebar-left .sidebar__inner {
	position: relative;
	width: 100%;
}

/* Клонированные элементы хедера для PC версии */
@media (min-width: 1200px) {
	.header-elements-clone {
		position: relative;
		opacity: 0;
		transform: translateY(-10px);
		pointer-events: none;
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: 1px solid transparent;
		will-change: opacity, transform, max-height, margin-bottom, padding-bottom;
		overflow: hidden;
		/* Плавная анимация всех свойств */
		transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
		            transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		            max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		            margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		            padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		            border-bottom-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		max-height: 0;
	}

	body.dark-mode .header-elements-clone {
		border-bottom-color: transparent;
	}

	.header-elements-clone.is-visible {
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
		will-change: auto;
		max-height: 500px; /* Достаточно большое значение для контента */
		margin-bottom: 20px;
		padding-bottom: 20px;
		border-bottom-color: var(--mtt-border-color);
	}

	body.dark-mode .header-elements-clone.is-visible {
		border-bottom-color: #333;
	}

	/* Стили для клонированного логотипа */
	.header-elements-clone .site-branding {
		margin-bottom: 15px;
		display: block;
	}

	.header-elements-clone .site-branding .custom-logo,
	.header-elements-clone .site-branding .site-title,
	.header-elements-clone .site-branding .site-logo {
		display: block;
		margin-bottom: 0;
	}

	.header-elements-clone .site-branding .site-logo__img {
		height: 26px;
	}

	.header-elements-clone .site-branding .site-title {
		font-size: 18px;
		line-height: 1.2;
	}

	.header-elements-clone .site-branding .site-description {
		display: none; /* Скрываем описание в сайдбаре */
	}

	/* Стили для клонированного меню */
	.header-elements-clone .main-navigation {
		flex: none;
		display: block;
		margin-bottom: 15px;
	}

	.header-elements-clone .main-navigation ul,
	.header-elements-clone .primary-menu-list {
		flex-direction: column;
		gap: 10px;
		align-items: flex-start;
	}

	.header-elements-clone .main-navigation a {
		display: block;
		width: 100%;
		padding: 8px 0;
		font-size: 14px;
	}

	/* Стили для клонированного поиска */
	.header-elements-clone .header-search {
		margin-left: 0;
		margin-bottom: 15px;
	}

	.header-elements-clone .header-search .search-form {
		width: 100%;
	}

	.header-elements-clone .header-search .search-field {
		width: 100%;
		min-width: auto;
		font-size: 14px;
	}

	/* Стили для клонированного переключателя темы */
	.header-elements-clone .header-actions {
		display: flex;
		justify-content: flex-start;
	}

	/* Плавная синхронная анимация для всех клонированных элементов */
	.header-elements-clone > * {
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		will-change: opacity, transform;
	}

	.header-elements-clone.is-visible > * {
		opacity: 1;
		transform: translateY(0);
		will-change: auto;
	}

	/* Последовательное появление элементов с минимальными задержками для плавности */
	.header-elements-clone.is-visible > *:nth-child(1) {
		transition-delay: 0s;
	}

	.header-elements-clone.is-visible > *:nth-child(2) {
		transition-delay: 0.03s;
	}

	.header-elements-clone.is-visible > *:nth-child(3) {
		transition-delay: 0.06s;
	}

	.header-elements-clone.is-visible > *:nth-child(4) {
		transition-delay: 0.09s;
	}
}

/* Блок "Самое важное" - редизайн по образцу rozetked.me */
.important-block {
	background-color: var(--mtt-light-bg-color);
	border-radius: 15px;
	padding: 15px;
	margin-bottom: 30px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	border: 1px solid var(--mtt-border-color);
}

body.dark-mode .important-block {
	background-color: var(--mtt-dark-surface-bg-color);
	border-color: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.important-block__title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 12px 0;
	color: var(--mtt-text-color-primary);
	padding-bottom: 10px;
	border-bottom: 2px solid var(--mtt-border-color);
}

body.dark-mode .important-block__title {
	border-bottom-color: #333;
}

.important-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.important-list__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--mtt-border-color);
	transition: background-color 0.2s ease;
}

body.dark-mode .important-list__item {
	border-bottom-color: #333;
}

.important-list__item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.important-list__item:hover {
	background-color: rgba(0, 0, 0, 0.02);
	padding-left: 5px;
	padding-right: 5px;
	margin-left: -5px;
	margin-right: -5px;
	border-radius: 5px;
}

body.dark-mode .important-list__item:hover {
	background-color: rgba(255, 255, 255, 0.05);
}

.important-time {
	font-size: 13px;
	font-weight: 500;
	color: var(--mtt-text-color-secondary);
	min-width: 50px;
	flex-shrink: 0;
	white-space: nowrap;
}

.important-list__title {
	font-size: 15px;
	font-weight: 500;
	margin: 0;
	line-height: 1.4;
	flex: 1;
	min-width: 0;
}

.important-list__link {
	color: var(--mtt-text-color-primary);
	text-decoration: none;
	transition: color 0.2s ease;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.important-list__link:hover {
	color: var(--mtt-link-color);
}

/* Пагинация и кнопка "Загрузить ещё" */
.pagination-wrap {
	margin: 30px 0;
	text-align: center;
}

.pagination-wrap .nav-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.pagination-wrap .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--mtt-light-bg-color);
	color: var(--mtt-text-color-primary);
	text-decoration: none;
	font-size: 14px;
	border: 1px solid var(--mtt-border-color);
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.dark-mode .pagination-wrap .page-numbers {
	background: var(--mtt-dark-surface-bg-color);
	border-color: #333;
	color: var(--mtt-text-color-primary);
}

.pagination-wrap .page-numbers:hover {
	background: var(--mtt-link-color);
	border-color: var(--mtt-link-color);
	color: #fff;
}

.pagination-wrap .page-numbers.current {
	background: var(--mtt-link-color);
	border-color: var(--mtt-link-color);
	color: #fff;
	cursor: default;
}

.pagination-wrap .page-numbers.prev,
.pagination-wrap .page-numbers.next {
	padding: 0 14px;
}

.mtt-load-more-wrap {
	margin: 24px 0 8px;
	text-align: center;
}

.mtt-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 20px;
	border-radius: 999px;
	border: 1px solid var(--mtt-link-color);
	background: transparent;
	color: var(--mtt-link-color);
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.mtt-load-more:hover {
	background: var(--mtt-link-color);
	color: #fff;
	transform: translateY(-1px);
}

.mtt-load-more--loading {
	opacity: 0.6;
	cursor: default;
	pointer-events: none;
}

.social-list,
.brother-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.social-list li,
.brother-list li {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.social-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	text-decoration: none;
	color: var(--mtt-text-color-primary);
	transition: color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
	color: var(--mtt-link-color);
	transform: translateX(5px);
}

.social-link i {
	font-size: 20px;
	width: 24px;
	text-align: center;
	flex-shrink: 0;
}

.social-link-text {
	flex: 1;
}

.brother-list a {
	display: block;
	padding: 6px 0;
	text-decoration: none;
	color: var(--mtt-text-color-primary);
	transition: color 0.2s ease;
}

.brother-list a:hover {
	color: var(--mtt-link-color);
}

/* Правый сайдбар */
.sidebar-right {
	order: 3;
	min-width: 0;
	position: relative;
	align-self: start;
	width: 300px;
	flex-shrink: 0;
}

.sidebar-right .sidebar__inner {
	position: relative;
	width: 100%;
	max-width: 300px;
	box-sizing: border-box;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.sidebar-right .sidebar__inner::-webkit-scrollbar {
	width: 6px;
}

.sidebar-right .sidebar__inner::-webkit-scrollbar-track {
	background: transparent;
}

.sidebar-right .sidebar__inner::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

.sidebar-right .sidebar__inner::-webkit-scrollbar-thumb:hover {
	background-color: rgba(0, 0, 0, 0.3);
}

/* Библиотека sticky-sidebar полностью управляет позиционированием */
/* Не переопределяем стили библиотеки - она сама устанавливает position, top, bottom, transform и т.д. */

.suggest-button {
	display: block;
	width: 100%;
	padding: 15px;
	background-color: var(--mtt-link-color);
	color: #fff;
	text-align: center;
	border-radius: 0;
	font-weight: 600;
	transition: opacity 0.2s ease;
	margin-bottom: 30px;
	border-radius: 6px;
}

.suggest-button:hover {
	opacity: 0.9;
	color: #fff;
}

.featured-block {
	margin-bottom: var(--mtt-spacing);
}

/* Слайдер featured-block для мобильной и планшетной версии */
.featured-slider {
	display: none;
	margin-bottom: var(--mtt-spacing);
	position: relative;
	overflow: hidden;
	border-radius: 10px;
}

.featured-slider__container {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
	padding: 0 12px;
	box-sizing: border-box;
}

.featured-slider__track {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	gap: 8px;
	transition: transform 0.35s ease-out;
	will-change: transform;
}

.featured-slider__slide {
	position: relative;
	flex: 0 0 82%;
	width: 82%;
	height: 100%;
	min-width: 0;
	cursor: pointer;
}

.featured-slider__slide .article-photo-preview {
	margin-bottom: 0;
	border-radius: 10px;
	height: 100%;
	display: block;
	position: relative;
}

.featured-slider__slide .article-photo-preview__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.featured-slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 15px;
	padding: 0 15px;
}

.featured-slider__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background-color: rgba(0, 0, 0, 0.3);
	cursor: pointer;
	padding: 0;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

body.dark-mode .featured-slider__dot {
	background-color: rgba(255, 255, 255, 0.3);
}

.featured-slider__dot.active {
	background-color: var(--mtt-link-color);
	transform: scale(1.2);
}

.featured-slider__dot:hover {
	background-color: var(--mtt-link-color);
	opacity: 0.8;
}

/* Старые классы для обратной совместимости */
.featured-image,
.video-thumbnail,
.news-thumbnail,
.guide-thumbnail {
	display: block;
	margin-bottom: 10px;
	border-radius: 10px;
	overflow: hidden;
}

/* Новый формат - заголовок на картинке с градиентом (как на rozetked.me) */
.article-photo-preview {
	display: block;
	position: relative;
	margin-bottom: var(--mtt-spacing);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-photo-preview:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article-photo-preview__img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.article-photo-preview__title {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0;
	padding: 20px 15px 15px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.article-photo-preview:hover .article-photo-preview__title {
	color: #ffffff;
}

.featured-block h3,
.featured-block h4 {
	font-size: 16px;
}

.featured-description {
	font-size: 14px;
	color: var(--mtt-text-color-secondary);
}

/* ============================================
   Основной контент
   ============================================ */
.site-content {
	order: 2;
	min-width: 0;
}


.posts-grid {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.post-card {
	background-color: var(--mtt-light-bg-color);
	border-radius: 15px;
	padding: 15px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	border: 1px solid var(--mtt-border-color);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.dark-mode .post-card {
	background-color: var(--mtt-dark-surface-bg-color);
	border-color: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.post-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

body.dark-mode .post-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.post-thumbnail {
	margin-left: -15px;
	margin-right: -15px;
	margin-bottom: 20px;
	border-radius: 0;
	overflow: hidden;
}

.post-thumbnail-top {
	margin-top: -15px;
	margin-bottom: 20px;
	border-radius: 15px 15px 0 0;
}

.post-thumbnail-top:first-child {
	margin-top: -15px;
}

.post-thumbnail-bottom {
	margin-top: 20px;
}

.post-thumbnail img {
	width: 100%;
	max-height: 350px;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
	transform: scale(1.02);
}

.entry-header {
	margin-bottom: var(--mtt-spacing);
}

.post-card .entry-title{
	text-align: left;
}

.entry-title {
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 15px;
	line-height: 1.3;
	color: var(--mtt-text-color-primary);
	    text-align: center;
}

.entry-title a {
	color: var(--mtt-text-color-primary);
	text-decoration: none;
	transition: color 0.2s ease;
}

.entry-title a:hover {
	color: var(--mtt-link-color);
}

/* Ограничение заголовков карточек двумя строками (главная/архивы/поиск и др., кроме single) */
body:not(.single) .post-card .entry-title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.entry-meta {
	font-size: 14px;
	color: var(--mtt-text-color-secondary);
	display: flex;
	gap: 15px;
	align-items: center;
	flex-wrap: wrap;
}

/* Мета-информация в header (только для single страниц) */
.entry-header .entry-meta {
	margin-bottom: 20px;
}
@media screen and (max-width: 768px) {
	.entry-header .entry-meta {
		margin-bottom: 10px;
	}
}
/* Мета-информация в footer (для списков) */
.entry-footer .entry-meta {
	margin-bottom: 0;
}

.entry-date {
	font-weight: 500;
}

.entry-author {
	font-weight: 400;
}

.entry-author a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.entry-author a:hover {
	color: var(--mtt-link-color);
}

.entry-content {
	font-size: 16px;
	line-height: 1.7;
	margin-bottom: 10px;
	color: var(--mtt-text-color-primary);
}

.entry-content p {
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
}

/* Убираем line-clamp для страниц записей */
.single .entry-content p {
	display: block;
	overflow: visible;
	text-overflow: clip;
	-webkit-line-clamp: none;
	line-clamp: none;
	-webkit-box-orient: initial;
}

.read-more {
	display: inline-block;
	color: var(--mtt-link-color);
	text-decoration: none;
	font-weight: 500;
	margin-top: 8px;
	font-size: 15px;
	transition: opacity 0.2s ease;
}

/* Ссылки в контенте остаются синими */
.entry-content a,
.read-more {
	color: var(--mtt-link-color);
}

.read-more:hover {
	opacity: 0.8;
}

.entry-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	padding-top: 15px;
	margin-top: 15px;
	border-top: 1px solid var(--mtt-border-color);
}

.entry-footer-right {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

body.dark-mode .entry-footer {
	border-top-color: #333;
}

.entry-tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.tag-link {
	font-size: 12px;
	padding: 4px 8px;
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 3px;
}

body.dark-mode .tag-link {
	background-color: rgba(255, 255, 255, 0.1);
}

.comments-link {
	font-size: 14px;
	color: var(--mtt-text-color-secondary);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
}

.comments-link:hover {
	color: var(--mtt-link-color);
}

.comments-icon {
	font-size: 14px;
	display: none; /* По умолчанию скрыта на десктопе */
}

.comments-text {
	display: inline;
}

/* ============================================
   Отдельная запись
   ============================================ */

/* Контейнер для страницы записи */
.single-post-container {
	max-width: 990px;
	margin: 0 auto;
	padding: 0 20px;
	width: 100%;
}

/* Статья на single-странице должна выглядеть как карточка */
.single .single-post-container > article {
	background-color: var(--mtt-light-bg-color);
	border-radius: 15px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	border: 1px solid var(--mtt-border-color);
	overflow: hidden;
}
@media (max-width: 768px) {
	.single .single-post-container > article {
		padding: 10px;
	}
}
body.dark-mode.single .single-post-container > article {
	background-color: var(--mtt-dark-surface-bg-color);
	border-color: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Центрируем meta на single */
.single .entry-header .entry-meta {
	justify-content: center;
	text-align: center;
}


/* Featured image на single во всю ширину карточки (без бокового паддинга) */
.single .entry-thumbnail {
	margin-left: -20px;
	margin-right: -20px;
}

.single .entry-thumbnail-top {
	margin-top: 15px;
	margin-bottom: 20px;
}

.single .entry-thumbnail-bottom {
	margin-top: 20px;
	margin-bottom: 0;
}

.single .entry-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}

/* Скрываем правый сайдбар на страницах записей */
.single .main-content-wrapper {
	grid-template-columns: 1fr;
}

.single .sidebar-right {
	display: none;
}

.entry-thumbnail-top {
	margin-bottom: var(--mtt-spacing);
}

.entry-thumbnail-bottom {
	margin-top: var(--mtt-spacing);
}

.entry-video {
	margin: var(--mtt-spacing) 0;
}

.entry-video-embed {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
}

.entry-video-embed iframe,
.entry-video-embed object,
.entry-video-embed embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* HTML5 видео внутри entry-video-embed (mp4 fallback) */
.entry-video-embed video,
.entry-video-embed .mejs-container,
.entry-video-embed .wp-video {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
}

.entry-video-embed video {
	object-fit: contain;
	display: block;
}

.video-switcher {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
}

.video-platform-btn {
	padding: 10px 20px;
	background-color: rgba(0, 0, 0, 0.05);
	border: 1px solid var(--mtt-border-color);
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

body.dark-mode .video-platform-btn {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: #333;
}

.video-platform-btn.active {
	background-color: var(--mtt-link-color);
	color: #fff;
	border-color: var(--mtt-link-color);
}

/* В тёмной теме body.dark-mode .video-platform-btn по специфичности сильнее, чем .active — переопределяем явно */
body.dark-mode .video-platform-btn.active {
	background-color: var(--mtt-link-color);
	color: #fff;
	border-color: var(--mtt-link-color);
}

.video-embed-container {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
}

.video-embed-container iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Видео в сайдбаре */
.video-embed-sidebar {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
	margin-bottom: 15px;
	border-radius: 10px;
	overflow: hidden;
}

.video-embed-sidebar iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.video-embed-sidebar video,
.video-embed-sidebar .mejs-container,
.video-embed-sidebar .wp-video {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
}

.video-embed-sidebar video {
	object-fit: contain;
	display: block;
}

/* Видео внутри контента поста */
.entry-content video,
.entry-content .wp-block-video video,
.entry-content .wp-video video {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Галерея изображений в single (news/guides/videos) */
.tg-gallery {
	margin-top: var(--mtt-spacing);
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 15px;
}

.tg-gallery__item {
	margin: 0;
}

.tg-gallery__img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	border-radius: 10px;
}

.tg-gallery__caption {
	margin-top: 5px;
	font-size: 13px;
	color: var(--mtt-text-color-secondary);
}

@media screen and (max-width: 1024px) {
	.tg-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 600px) {
	.tg-gallery {
		grid-template-columns: 1fr;
	}
}

/* Лайтбокс для галереи изображений в single (news/guides/videos) */
.tg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
}

.tg-lightbox--visible {
	display: flex;
}

.tg-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
}

.tg-lightbox__content {
	position: relative;
	z-index: 1;
	max-width: 1000px;
	width: 100%;
	max-height: 100vh;
	padding: 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.tg-lightbox__image-wrap {
	position: relative;
	max-width: 100%;
	max-height: calc(100vh - 140px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.tg-lightbox__image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
	border-radius: 10px;
}

.tg-lightbox__caption {
	margin-top: 15px;
	font-size: 14px;
	color: #ffffff;
	text-align: center;
	max-width: 90%;
}

.tg-lightbox__close {
	position: absolute;
	top: 15px;
	right: 20px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	font-size: 22px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.1s ease;
}

.tg-lightbox__close:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: translateY(-1px);
}

.tg-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.1s ease;
}

.tg-lightbox__nav--prev {
	left: 20px;
}

.tg-lightbox__nav--next {
	right: 20px;
}

.tg-lightbox__nav:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: translateY(-50%) translateY(-1px);
}

/* Блокировка скролла страницы при открытом лайтбоксе */
body.tg-lightbox-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.tg-lightbox__content {
		padding: 10px;
	}

	.tg-lightbox__image-wrap {
		max-height: calc(100vh - 120px);
	}

	.tg-lightbox__close {
		top: 10px;
		right: 10px;
		width: 32px;
		height: 32px;
		font-size: 20px;
	}

	.tg-lightbox__nav {
		width: 38px;
		height: 38px;
		font-size: 20px;
	}

	.tg-lightbox__nav--prev {
		left: 10px;
	}

	.tg-lightbox__nav--next {
		right: 10px;
	}

	.tg-lightbox__caption {
		margin-top: 10px;
		font-size: 13px;
		padding: 0 10px;
	}
}

/* Виджет "Свежее видео" как единый блок (фон + подпись) */
.latest-video {
	border-radius: 15px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	overflow: hidden;
}

body.dark-mode .latest-video {
	background-color: var(--mtt-dark-surface-bg-color);
	border-color: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.latest-video .video-embed-sidebar {
	margin-bottom: 0;
	border-radius: 15px 15px 0 0;
}

.latest-video .video-caption {
	margin: 0;
	padding: 12px 15px;
	border-top: 1px solid var(--mtt-border-color);
	background-color: var(--mtt-light-bg-color);
}

body.dark-mode .latest-video .video-caption {
	border-top-color: #333;
	background-color: transparent;
}

/* Подпись под видео в сайдбаре */
.latest-video .video-caption {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
}

.latest-video .video-caption a {
	color: var(--mtt-text-color-primary) !important;
	text-decoration: none;
	transition: color 0.2s ease;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.latest-video .video-caption a:hover {
	color: var(--mtt-link-color) !important;
}

/* ============================================
   Подвал
   ============================================ */
.site-footer {
	background-color: rgba(0, 0, 0, 0.02);
	border-top: 1px solid var(--mtt-border-color);
	padding: var(--mtt-spacing) 0;
	margin-top: var(--mtt-spacing);
}

body.dark-mode .site-footer {
	background-color: rgba(255, 255, 255, 0.05);
	border-top-color: #333;
}

.footer-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--mtt-spacing);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--mtt-spacing);
}

.footer-navigation ul {
	list-style: none;
	display: flex;
	gap: var(--mtt-spacing);
	flex-wrap: wrap;
}

.site-info {
	font-size: 14px;
	color: var(--mtt-text-color-secondary);
}

/* ============================================
   Пагинация
   ============================================ */
.posts-navigation,
.post-navigation {
	margin: var(--mtt-spacing) 0;
	padding: var(--mtt-spacing);
	border-top: 1px solid var(--mtt-border-color);
}

body.dark-mode .posts-navigation,
body.dark-mode .post-navigation {
	border-top-color: #333;
}

/* Навигация по записям (single) — аккуратные карточки */
.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	margin: 0;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: block;
	padding: 15px;
	background-color: var(--mtt-light-bg-color);
	border: 1px solid var(--mtt-border-color);
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	color: var(--mtt-text-color-primary);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.dark-mode .post-navigation .nav-previous a,
body.dark-mode .post-navigation .nav-next a {
	background-color: var(--mtt-dark-surface-bg-color);
	border-color: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: rgba(0, 0, 0, 0.15);
}

body.dark-mode .post-navigation .nav-previous a:hover,
body.dark-mode .post-navigation .nav-next a:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	border-color: rgba(255, 255, 255, 0.15);
}

.post-navigation .nav-subtitle {
	display: block;
	font-size: 12px;
	color: var(--mtt-text-color-secondary);
	margin-bottom: 6px;
}

.post-navigation .nav-title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--mtt-text-color-primary);
}

@media (max-width: 768px) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}
}

.page-numbers {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}

.page-numbers a,
.page-numbers span {
	padding: 8px 12px;
	border: 1px solid var(--mtt-border-color);
	border-radius: 4px;
}

body.dark-mode .page-numbers a,
body.dark-mode .page-numbers span {
	border-color: #333;
}

.page-numbers .current {
	background-color: var(--mtt-link-color);
	color: #fff;
	border-color: var(--mtt-link-color);
}

/* ============================================
   Блок "Поделиться"
   ============================================ */
.share-block {
	margin: 40px 0;
	padding: 30px 0;
	border-top: 1px solid var(--mtt-border-color);
	border-bottom: 1px solid var(--mtt-border-color);
}

body.dark-mode .share-block {
	border-top-color: #333;
	border-bottom-color: #333;
}

.share-block__title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 20px;
	color: var(--mtt-text-color-primary);
	text-align: center;
}

.share-block__inner {
	display: flex;
	justify-content: center;
}

.share-buttons {
	list-style: none;
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.share-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding: 12px;
	width: 44px;
	height: 44px;
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 50%;
	border: 1px solid var(--mtt-border-color);
	border-radius: 6px;
	text-decoration: none;
	color: var(--mtt-text-color-primary);
	transition: all 0.2s ease;
	font-size: 14px;
	font-weight: 500;
}

body.dark-mode .share-button {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: #333;
}

.share-button:hover {
	background-color: var(--mtt-link-color);
	color: #fff;
	border-color: var(--mtt-link-color);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-button__icon {
	font-weight: 700;
	font-size: 12px;
}

.share-button__text {
	display: none; /* Скрываем текст, показываем только иконки */
}

.share-button i {
	font-size: 20px;
	line-height: 1;
}

/* ============================================
   Комментарии
   ============================================ */
.comments-area {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid var(--mtt-border-color);
}

body.dark-mode .comments-area {
	border-top-color: #333;
}

/* Комментарии на single как отдельная карточка */
.single .comments-area {
	margin-top: 20px;
	padding: 20px;
	border: 1px solid var(--mtt-border-color);
	border-radius: 15px;
	background-color: var(--mtt-light-bg-color);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark-mode.single .comments-area {
	border-color: #333;
	background-color: var(--mtt-dark-surface-bg-color);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.single .comments-area .comment-form {
	background-color: transparent;
	border: none;
	padding: 0;
	margin-top: 30px;
}

/* Форма добавления комментария (respond) — аккуратная типографика */
.single .comment-respond {
	margin-top: 10px;
}

.single .comment-reply-title {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 700;
	color: var(--mtt-text-color-primary);
	text-align: center;
}

.single .comment-reply-title small {
	font-size: 13px;
	font-weight: 400;
	margin-left: 8px;
}

.single #cancel-comment-reply-link {
	color: var(--mtt-link-color);
	text-decoration: none;
}

.single #cancel-comment-reply-link:hover {
	text-decoration: underline;
}

.single .logged-in-as {
	margin: 0 0 15px;
	font-size: 13px;
	color: var(--mtt-text-color-secondary);
	text-align: center;
}

.single .logged-in-as a {
	color: var(--mtt-link-color);
	text-decoration: none;
}

.single .logged-in-as a:hover {
	text-decoration: underline;
}

.single .required-field-message {
	display: block;
	margin-top: 6px;
}

.single .comment-form-comment textarea {
	min-height: 160px;
	resize: vertical;
}

.single .form-submit input[type="submit"] {
	display: block;
	width: 100%;
	max-width: 320px;
	margin: 0 auto;
}

.comments-title {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 30px;
	color: var(--mtt-text-color-primary);
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .comment {
	margin-bottom: 30px;
	padding: 20px;
	background-color: rgba(0, 0, 0, 0.02);
	border-radius: 8px;
	border: 1px solid var(--mtt-border-color);
}

body.dark-mode .comment-list .comment {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: #333;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.comment-author .avatar {
	border-radius: 50%;
	width: 48px;
	height: 48px;
}

.comment-author .fn {
	font-weight: 600;
	font-size: 16px;
	color: var(--mtt-text-color-primary);
	text-decoration: none;
}

.comment-author .fn:hover {
	color: var(--mtt-link-color);
}

.comment-metadata {
	font-size: 13px;
	color: var(--mtt-text-color-secondary);
	margin-bottom: 12px;
}

.comment-metadata a {
	color: var(--mtt-text-color-secondary);
	text-decoration: none;
}

.comment-metadata a:hover {
	color: var(--mtt-link-color);
}

.comment-content {
	font-size: 15px;
	line-height: 1.6;
	color: var(--mtt-text-color-primary);
	margin-bottom: 10px;
}

.comment-content p {
	margin-bottom: 10px;
}

.comment-reply-link {
	font-size: 13px;
	color: var(--mtt-link-color);
	text-decoration: none;
	font-weight: 500;
}

.comment-reply-link:hover {
	text-decoration: underline;
}

/* Вложенные комментарии */
.comment-list .children {
	list-style: none;
	margin: 20px 0 0 40px;
	padding: 0;
}

.comment-list .children .comment {
	background-color: rgba(0, 0, 0, 0.01);
}

body.dark-mode .comment-list .children .comment {
	background-color: rgba(255, 255, 255, 0.02);
}

/* Форма комментариев */
.comment-form {
	margin-top: 40px;
	padding: 30px;
	background-color: rgba(0, 0, 0, 0.02);
	border-radius: 8px;
	border: 1px solid var(--mtt-border-color);
}

body.dark-mode .comment-form {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: #333;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
	display: block;
	font-weight: 500;
	margin-bottom: 8px;
	color: var(--mtt-text-color-primary);
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--mtt-border-color);
	border-radius: 6px;
	font-size: 15px;
	font-family: inherit;
	background-color: var(--mtt-light-bg-color);
	color: var(--mtt-text-color-primary);
	transition: border-color 0.2s ease;
}

body.dark-mode .comment-form-comment textarea,
body.dark-mode .comment-form-author input,
body.dark-mode .comment-form-email input,
body.dark-mode .comment-form-url input {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: #333;
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
	outline: none;
	border-color: var(--mtt-link-color);
}

.comment-form-comment {
	margin-bottom: 20px;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
	margin-bottom: 20px;
}

.comment-form-cookies-consent {
	margin-bottom: 20px;
}

.comment-form-cookies-consent label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

.comment-form-cookies-consent input[type="checkbox"] {
	width: auto;
}

.form-submit {
	margin-top: 20px;
}

.form-submit input[type="submit"] {
	padding: 12px 30px;
	background-color: var(--mtt-link-color);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.form-submit input[type="submit"]:hover {
	background-color: #0052a3;
	transform: translateY(-1px);
}

.form-submit input[type="submit"]:active {
	transform: translateY(0);
}

/* ============================================
   Утилиты
   ============================================ */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.no-posts {
	text-align: center;
	padding: var(--mtt-spacing);
}

/* ============================================
   Адаптивность
   ============================================ */
@media (max-width: 1200px) {
	.main-content-wrapper {
		grid-template-columns: 1fr 280px;
		gap: 30px;
		max-width: 100%;
		padding: var(--mtt-spacing) 15px;
	}

	.sidebar-left {
		width: 240px;
	}

	.sidebar-right {
		width: 280px;
	}

	.sidebar-right .sidebar__inner {
		max-width: 280px;
	}

	.sidebar-right.is-affixed .sidebar__inner {
		width: 280px !important;
		max-width: 280px !important;
	}
}

@media (max-width: 1200px) {
	/* Показываем кнопку гамбургера на экранах до 1200px */
	.McButton {
		display: block;
	}

	/* На планшетах и мобильных показываем элементы мобильного хедера в сайдбаре */
	.mobile-header-elements {
		display: block;
	}

	/* Левый сайдбар скрыт по умолчанию, открывается через гамбургер */
	.sidebar-left {
		position: fixed;
		top: var(--mtt-header-height, 81px);
		left: 0;
		width: 280px;
		height: calc(100vh - var(--mtt-header-height, 81px));
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		z-index: 999;
		box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
		padding-top: 0;
		overflow-y: auto;
		overflow-x: hidden;
	}

	.sidebar-left.is-open {
		transform: translateX(0);
		margin-left: 0px;
	}

	/* Добавляем отступ сверху для контента сайдбара, чтобы хедер не перекрывал */
	.sidebar-left.is-open .sidebar__inner {
		padding-top: var(--mtt-spacing);
	}

	/* Оверлей при открытом меню */
	.sidebar-overlay {
		display: none;
		position: fixed;
		top: var(--mtt-header-height, 81px);
		left: 0;
		right: 0;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.5);
		z-index: 998;
	}

	.sidebar-overlay.is-active {
		display: block;
	}
}

@media (max-width: 1024px) {
	/* Показываем слайдер на планшетной и мобильной версии */
	.featured-slider.mobile-only {
		display: block;
	}

	/* Скрываем featured-block в правом сайдбаре на мобильной и планшетной версии */
	.sidebar-right .featured-block {
		display: none;
	}
}

@media (max-width: 768px) {
	/* Закрепляем хедер на мобильных */
	.site-header {
		position: sticky;
		top: 0;
		left: 0;
		right: 0;
		padding: 8px 0;
		margin-bottom: 10px;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}

	body.dark-mode .site-header {
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	}

	/* Левый сайдбар скрыт на мобильных */
	.main-holder {
		flex-direction: column;
	}

	.sidebar-left {
		width: 280px;
		height: 1100px;
        top: 40px;
        margin-left: 0px;
	}

	.main-content-wrapper {
		grid-template-columns: 1fr;
		gap: 15px;
		max-width: 100%;
		padding: var(--mtt-spacing) 12px;
		width: 100%;
	}

	.sidebar-right {
		order: 2;
		width: 100%;
		position: relative;
	    padding: 12px;
	}

	.sidebar-right .sidebar__inner {
		width: 100%;
		max-width: 100%;
		position: relative;
		overflow: visible;
	}

	.site-content {
		order: 1;
	}

	.footer-container {
		margin-left: 0;
	}

	/* Хедер на мобильной версии - только логотип и бургер */
	.header-container {
		justify-content: space-between;
		align-items: center;
		flex-wrap: nowrap;
	}

	.site-branding {
		flex: 1;
		text-align: left;
	}

	/* Скрываем элементы хедера на мобильной версии */
	.main-navigation,
	.header-search,
	.header-actions {
		display: none !important;
	}

	/* Показываем элементы в сайдбаре на мобильной версии */
	.mobile-header-elements {
		display: block;
		margin-bottom: 20px;
		padding-bottom: 20px;
		border-bottom: 1px solid var(--mtt-border-color);
	}

	body.dark-mode .mobile-header-elements {
		border-bottom-color: #333;
	}

	.mobile-navigation {
		margin-bottom: 15px;
	}

	.mobile-primary-menu-list {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.mobile-primary-menu-list li {
		margin: 0;
		padding: 0;
	}

	.mobile-primary-menu-list a {
		display: block;
		padding: 8px 0;
		font-weight: 500;
		font-size: 15px;
		color: var(--mtt-text-color-primary);
		text-decoration: none;
		border-bottom: 1px solid var(--mtt-border-color);
		transition: color 0.2s ease;
	}

	body.dark-mode .mobile-primary-menu-list a {
		border-bottom-color: #333;
	}

	.mobile-primary-menu-list a:hover {
		color: var(--mtt-link-color);
	}

	.mobile-header-search {
		margin-bottom: 15px;
	}

	.mobile-header-search .search-form {
		width: 100%;
	}

	.mobile-header-search .search-input-wrapper {
		position: relative;
		width: 100%;
		display: block;
	}

	.mobile-header-search .search-field {
		width: 100%;
		padding: 10px 40px 10px 12px;
		border: 1px solid var(--mtt-border-color);
		border-radius: 4px;
		font-size: 15px;
		box-sizing: border-box;
	}

	body.dark-mode .mobile-header-search .search-field {
		background-color: var(--mtt-dark-bg-color);
		border-color: #333;
		color: var(--mtt-text-color-primary);
	}

	.mobile-header-search .search-submit {
		position: absolute;
		right: 8px;
		top: 50%;
		transform: translateY(-50%);
		padding: 0;
		background: none;
		color: var(--mtt-text-color-secondary);
		border: none;
		cursor: pointer;
		font-size: 18px;
		width: 32px;
		height: 32px;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: color 0.2s ease;
	}

	.mobile-header-search .search-submit:hover {
		color: var(--mtt-link-color);
	}

	.mobile-header-search .search-submit i {
		font-size: 18px;
	}

	/* Переключатель темы в самом низу */
	.mobile-header-actions {
		display: flex;
		justify-content: flex-start;
		margin-top: 15px;
		padding-top: 15px;
		border-top: 1px solid var(--mtt-border-color);
	}

	body.dark-mode .mobile-header-actions {
		border-top-color: #333;
	}

	.mobile-header-actions .theme-toggle {
		width: 44px;
		height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.footer-container {
		flex-direction: column;
		text-align: center;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	/* Планшетная версия */
	.main-content-wrapper {
		padding: var(--mtt-spacing) 20px;
		max-width: 100%;
	}

	.post-card {
		padding: 20px;
		border-radius: 15px;
	}

	.post-thumbnail {
		margin-left: -20px;
		margin-right: -20px;
	}

	.post-thumbnail-top,
	.post-thumbnail-top:first-child {
		margin-top: -20px;
	}

	.entry-title {
		font-size: 22px;
		line-height: 1.3;
		margin-bottom: 12px;
	}

	.entry-content {
		font-size: 16px;
		line-height: 1.6;
	}

	.important-block {
		padding: 20px;
		border-radius: 15px;
	}

	.important-block__title {
		font-size: 20px;
		margin-bottom: 18px;
	}

	.featured-slider {
		margin-bottom: 30px;
		border-radius: 15px;
	}

	.featured-slider__container {
		height: 250px;
	}

	.featured-slider__slide .article-photo-preview {
		border-radius: 15px;
	}

	.sidebar-right {
		width: 280px;
	}

	.sidebar-right .sidebar__inner {
		max-width: 280px;
	}

	/* Видео-эмбеды на планшетной версии */
	.post-video-embed,
	.video-embed-sidebar {
		position: relative;
		padding-bottom: 56.25%; /* 16:9 */
		height: 0;
		overflow: hidden;
		margin-bottom: 20px;
	}

	.post-video-embed iframe,
	.video-embed-sidebar iframe {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		border: none;
	}
}

@media (max-width: 480px) {
	:root {
		--mtt-spacing: 12px;
	}

	.site-header {
		padding: 8px 0;
	}

	.header-container {
		padding: 0 15px;
		gap: 10px;
	}

	.site-title {
		font-size: 20px;
		line-height: 1.2;
	}

	.site-logo__img {
		height: 32px;
	}

	.site-title a {
		display: flex;
		align-items: center;
	}

	.McButton {
		width: 28px;
		height: 20px;
		margin-right: 10px;
	}

	.McButton b {
		width: 28px;
		height: 2px;
	}

	.entry-title {
		font-size: 18px;
		line-height: 1.3;
		margin-bottom: 10px;
	}

	.post-card {
		padding: 12px;
		border-radius: 10px;
		margin-bottom: 15px;
	}

	.post-thumbnail {
		margin-left: -12px;
		margin-right: -12px;
		margin-top: -12px;
		border-radius: 10px 10px 0 0;
	}

	.post-thumbnail-top {
		margin-top: -12px;
		border-radius: 10px 10px 0 0;
	}

	.post-thumbnail img {
		width: 100%;
		height: auto;
		display: block;
	}

	.entry-content {
		font-size: 15px;
		line-height: 1.6;
	}

	.entry-footer {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 8px;
		padding-top: 10px;
		margin-top: 10px;
		font-size: 12px;
		line-height: 1.4;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.entry-footer .entry-meta {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 8px;
		font-size: 12px;
		margin: 0;
		color: var(--mtt-text-color-secondary);
	}

	.entry-footer-right {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 8px;
		margin-left: auto;
		flex-shrink: 0;
	}

	.entry-date {
		font-size: 12px;
		white-space: nowrap;
		color: var(--mtt-text-color-secondary);
	}

	.entry-author {
		font-size: 12px;
		white-space: nowrap;
		color: var(--mtt-text-color-secondary);
	}

	/* Разделитель между элементами */
	.entry-date::after {
		content: '•';
		margin: 0 6px;
		color: var(--mtt-text-color-secondary);
		opacity: 0.5;
	}

	/* Скрываем текст "Автор:" на мобильной версии, оставляем только имя */
	.entry-author {
		font-size: 0;
	}

	.entry-author a {
		font-size: 12px;
		display: inline;
	}

	.entry-author::before {
		content: '•';
		margin: 0 6px;
		color: var(--mtt-text-color-secondary);
		opacity: 0.5;
		font-size: 12px;
	}

	.entry-author a {
		font-size: 12px;
		color: var(--mtt-text-color-secondary);
		text-decoration: none;
	}

	.entry-author a:hover {
		color: var(--mtt-link-color);
	}

	.comments-link {
		display: flex;
		align-items: center;
		gap: 4px;
		font-size: 12px;
		white-space: nowrap;
		color: var(--mtt-text-color-secondary);
		text-decoration: none;
	}

	.comments-link:hover {
		color: var(--mtt-link-color);
	}

	.comments-icon {
		font-size: 14px;
		display: none; /* По умолчанию скрыта на десктопе */
	}

	.comments-text {
		display: inline;
	}

	/* На мобильной версии показываем иконку, скрываем текст */
	@media (max-width: 480px) {
		.comments-icon {
			display: inline-block;
		}

		.comments-text {
			display: none;
		}
	}

	.entry-tags {
		display: none; /* Скрываем теги на мобильной версии */
	}

	.important-block {
		padding: 12px;
		margin-bottom: 20px;
		border-radius: 10px;
	}

	.important-block__title {
		font-size: 16px;
		margin-bottom: 10px;
		padding-bottom: 8px;
		line-height: 1.3;
	}

	.important-list__item {
		padding: 6px 0;
		gap: 8px;
		align-items: center;
	}

	.important-time {
		font-size: 12px;
		min-width: 42px;
		flex-shrink: 0;
		margin-top: 0;
		white-space: nowrap;
	}

	.important-list__title {
		font-size: 13px;
		line-height: 1.3;
		flex: 1;
		min-width: 0;
	}

	.important-list__title a {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		display: block;
	}

	.featured-slider {
		margin-left: 0;
		margin-right: 0;
		border-radius: 10px;
		margin-bottom: 20px;
		overflow: visible;
	}

	.featured-slider__container {
		height: 200px;
		border-radius: 10px;
		overflow: hidden;
		padding: 0 12px;
	}

	.featured-slider__slide .article-photo-preview {
		border-radius: 10px;
	}

	.featured-slider__dots {
		margin-top: 12px;
		padding: 0 15px;
	}

	.container {
		padding: 0px;
	}
	.main-container{
		padding: 12px;
	}
	.main-content-wrapper {
		padding: 0px;
		gap: 15px;
	}

	/* Видео-эмбеды на мобильной версии */
	.post-video-embed,
	.video-embed-sidebar {
		position: relative;
		padding-bottom: 56.25%; /* 16:9 */
		height: 0;
		overflow: hidden;
		margin-bottom: 15px;
	}

	.post-video-embed iframe,
	.video-embed-sidebar iframe {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		border: none;
	}

	/* Футер на мобильной версии */
	.site-footer {
		padding: 30px 15px;
		margin-top: 40px;
	}

	.footer-container {
		flex-direction: column;
		gap: 20px;
		text-align: center;
	}

	.footer-navigation ul {
		flex-direction: column;
		gap: 15px;
	}

	.site-info {
		font-size: 14px;
		color: var(--mtt-text-color-secondary);
	}

	/* Адаптивные стили для страниц записей */
	.single-post-container {
		padding: 0px;
	}

	.share-block {
		margin: 30px 0;
		padding: 20px 0;
	}

	.share-block__title {
		font-size: 16px;
		margin-bottom: 15px;
	}

	.share-buttons {
		gap: 10px;
	}

	.share-button {
		padding: 10px;
		width: 40px;
		height: 40px;
	}

	.share-button i {
		font-size: 18px;
	}

	.comments-area {
		margin-top: 30px;
		padding-top: 20px;
	}

	.comments-title {
		font-size: 20px;
		margin-bottom: 20px;
	}

	.comment-list .comment {
		padding: 15px;
		margin-bottom: 20px;
	}

	.comment-author .avatar {
		width: 40px;
		height: 40px;
	}

	.comment-author .fn {
		font-size: 14px;
	}

	.comment-content {
		font-size: 14px;
	}

	.comment-list .children {
		margin-left: 20px;
	}

	.comment-form {
		padding: 20px;
		margin-top: 30px;
	}

	.comment-form-comment textarea,
	.comment-form-author input,
	.comment-form-email input,
	.comment-form-url input {
		padding: 10px;
		font-size: 14px;
	}

	.form-submit input[type="submit"] {
		padding: 10px 25px;
		font-size: 14px;
		width: 100%;
	}
}

@media (max-width: 768px) {
	.single-post-container {
		padding: 0 15px;
	}

	.share-buttons {
		flex-direction: row;
		justify-content: center;
	}

	.share-button {
		width: 44px;
		height: 44px;
		justify-content: center;
	}

	.comment-list .children {
		margin-left: 10px;
	}
}
