/*
Theme Name: Лесная лента
Description: Тёмная лента коротких заметок о природе: туман, мох, птицы и сезоны.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: lesnaya
Husky Catalog: wordpress
*/
/* Скрытый для глаза, видимый для скринридеров */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   Шрифт и глобальная типографика
   ========================================================================== */
body {
	background-color: #111111 !important;
	color: #f5f5f5 !important;
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Design tokens (CSS variables) for reliable theme switching
   ========================================================================== */
:root {
	--vc-bg: #111111;
	--vc-card: #191919;
	--vc-surface: #2a2a2a;
	--vc-surface-2: #333333;
	--vc-border: #2a2a2a;
	--vc-border-2: #333333;
	--vc-text: #f5f5f5;
	--vc-text-2: #9ca3af;
}

/* ==========================================================================
   Desktop burger drawer: overlay with left+right columns
   ========================================================================== */
.vc-clone-desktop-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: transparent;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}
.vc-clone-desktop-drawer-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

.vc-clone-desktop-drawer {
	position: fixed;
	top: 64px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;
	display: none;
	width: min(1280px, calc(100vw - 32px));
	height: calc(100vh - 80px);
	border-radius: 14px;
	overflow-y: hidden;
	overflow-x: hidden;
	background: var(--vc-card);
	border: 1px solid var(--vc-border);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.vc-clone-desktop-drawer.is-open {
	display: block;
}
.vc-clone-desktop-drawer-shell {
	height: 100%;
	display: grid;
	grid-template-columns: 240px 640px 300px;
	column-gap: 24px;
	padding: 0 16px;
	box-sizing: border-box;
}
.vc-clone-desktop-drawer-left {
	background: transparent;
	border-right: 1px solid var(--vc-border);
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}
.vc-clone-desktop-drawer-middle {
	background: var(--vc-card);
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}
.vc-clone-desktop-drawer-right {
	background: var(--vc-card);
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}
.vc-clone-desktop-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--vc-border);
}
.vc-clone-desktop-drawer-title {
	color: var(--vc-text);
	font-size: 1rem;
	font-weight: 700;
}
.vc-clone-desktop-drawer-close {
	padding: 8px;
	border-radius: 10px;
	color: #9ca3af;
	background: transparent;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.vc-clone-desktop-drawer-close:hover {
	color: var(--vc-text);
	background: color-mix(in srgb, var(--vc-surface) 76%, transparent);
}
.vc-clone-desktop-drawer-content {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 16px;
	min-height: 0;
	scrollbar-gutter: stable;
}
.vc-clone-desktop-drawer::-webkit-scrollbar {
	display: none;
}
.vc-clone-desktop-drawer-content .widget-title,
.vc-clone-desktop-drawer-content .wp-block-heading {
	display: none !important;
}
.vc-clone-desktop-drawer-divider {
	margin: 14px 0 16px;
	height: 1px;
	background: var(--vc-border);
}

@media (max-width: 1280px) {
	.vc-clone-desktop-drawer {
		width: calc(100vw - 24px);
		top: 60px;
		height: calc(100vh - 72px);
	}
	.vc-clone-desktop-drawer-shell {
		grid-template-columns: 220px minmax(0, 1fr) 280px;
		column-gap: 16px;
		padding: 0 10px;
	}
}

/* ==========================================================================
   Светлая тема (только фронтенд): модная светло-серая палитра
   Переключается через body_class: vc-theme-light / vc-theme-dark
   ========================================================================== */
body.vc-theme-light {
	background-color: #f1f3f5 !important;
	color: #0f172a !important;
	--vc-bg: #f1f3f5;
	--vc-card: #ffffff;
	--vc-surface: #eef1f4;
	--vc-surface-2: #e4e8ee;
	--vc-border: #d7dde5;
	--vc-border-2: #cfd6df;
	--vc-text: #111827;
	--vc-text-2: #4b5563;
}
body.vc-theme-light a {
	color: #2563eb;
}
body.vc-theme-light a:hover {
	color: #1d4ed8;
}

/* Переопределяем используемые в разметке Tailwind arbitrary colors (генерятся tailwindcdn). */
body.vc-theme-light .bg-\[\#111111\] { background-color: #f1f3f5 !important; }
body.vc-theme-light .bg-\[\#191919\] { background-color: #ffffff !important; }
body.vc-theme-light .bg-\[\#1a1a1a\] { background-color: #ffffff !important; }
body.vc-theme-light .bg-\[\#2a2a2a\] { background-color: #eef1f4 !important; }
body.vc-theme-light .bg-\[\#333\] { background-color: #e4e8ee !important; }
body.vc-theme-light .bg-white { background-color: #ffffff !important; }

body.vc-theme-light .text-\[\#f5f5f5\] { color: #111827 !important; }
body.vc-theme-light .text-white { color: #111827 !important; }
body.vc-theme-light .text-gray-400 { color: #4b5563 !important; }
body.vc-theme-light .text-gray-500 { color: #6b7280 !important; }
body.vc-theme-light .text-gray-300 { color: #374151 !important; }

body.vc-theme-light .border-\[\#2a2a2a\] { border-color: #d7dde5 !important; }
body.vc-theme-light .border-\[\#333\] { border-color: #cfd6df !important; }
body.vc-theme-light .border-b { border-bottom-color: #d7dde5 !important; }

/* Ховеры, которые в тёмной теме подсвечивают карточки */
body.vc-theme-light .hover\:bg-\[\#191919\]:hover { background-color: #e9edf2 !important; }
body.vc-theme-light .hover\:bg-\[\#2a2a2a\]:hover { background-color: #e3e8ef !important; }
body.vc-theme-light .hover\:bg-\[\#333\]:hover { background-color: #dce3ec !important; }
body.vc-theme-light .hover\:text-white:hover { color: #111827 !important; }

/* Модалки/панели в header.php задаются инлайном — переопределяем через классы */
body.vc-theme-light .vc-clone-modal-box { background: #ffffff !important; box-shadow: 0 25px 60px -20px rgba(17, 24, 39, 0.25) !important; }
body.vc-theme-light .vc-clone-modal-box .modal-head { border-bottom-color: #d7dde5 !important; }
body.vc-theme-light .vc-clone-bell-card { border-bottom-color: #e1e6ee !important; }
body.vc-theme-light .vc-clone-bell-card:hover { background: #f3f6fa !important; }
body.vc-theme-light .vc-clone-header-fixed { background: #f1f3f5 !important; border-bottom-color: #d7dde5 !important; }
body.vc-theme-light .vc-clone-mobile-search-panel,
body.vc-theme-light .vc-clone-mobile-drawer { background: #ffffff !important; }
body.vc-theme-light .vc-clone-mobile-search-panel { border-top-color: #d7dde5 !important; border-right-color: #d7dde5 !important; }

/* Аварийное переопределение инлайн-стилей с тёмными хексами (если что-то пропустили в шаблонах) */
body.vc-theme-light [style*="background:#111111"],
body.vc-theme-light [style*="background: #111111"] { background: var(--vc-bg) !important; }
body.vc-theme-light [style*="background:#191919"],
body.vc-theme-light [style*="background: #191919"] { background: var(--vc-card) !important; }
body.vc-theme-light [style*="background:#1a1a1a"],
body.vc-theme-light [style*="background: #1a1a1a"] { background: var(--vc-card) !important; }
body.vc-theme-light [style*="background:#2a2a2a"],
body.vc-theme-light [style*="background: #2a2a2a"] { background: var(--vc-surface) !important; }
body.vc-theme-light [style*="background:#333"],
body.vc-theme-light [style*="background: #333"] { background: var(--vc-surface-2) !important; }
body.vc-theme-light [style*="border-color:#2a2a2a"],
body.vc-theme-light [style*="border-color: #2a2a2a"],
body.vc-theme-light [style*="border-right:1px solid #2a2a2a"],
body.vc-theme-light [style*="border-bottom:1px solid #2a2a2a"],
body.vc-theme-light [style*="border-top:1px solid #2a2a2a"] { border-color: var(--vc-border) !important; }
body.vc-theme-light [style*="color:#fff"],
body.vc-theme-light [style*="color: #fff"],
body.vc-theme-light [style*="color:#f5f5f5"],
body.vc-theme-light [style*="color: #f5f5f5"] { color: var(--vc-text) !important; }

body.vc-theme-light [style*="background:#000"],
body.vc-theme-light [style*="background: #000"] { background: var(--vc-card) !important; }

/* Контент статьи — светлая типографика */
body.vc-theme-light .entry-content,
body.vc-theme-light .prose {
	color: #0f172a !important;
}
body.vc-theme-light .entry-content p,
body.vc-theme-light .entry-content li,
body.vc-theme-light .entry-content span,
body.vc-theme-light .prose p,
body.vc-theme-light .prose li,
body.vc-theme-light .prose span {
	color: #0f172a !important;
}
body.vc-theme-light .entry-content h1,
body.vc-theme-light .entry-content h2,
body.vc-theme-light .prose h1,
body.vc-theme-light .prose h2 {
	color: #0f172a;
	border-bottom-color: #d7dde5;
}
body.vc-theme-light .entry-content h3,
body.vc-theme-light .entry-content h4,
body.vc-theme-light .entry-content h5,
body.vc-theme-light .entry-content h6,
body.vc-theme-light .prose h3,
body.vc-theme-light .prose h4,
body.vc-theme-light .prose h5,
body.vc-theme-light .prose h6 {
	color: #0f172a;
}
body.vc-theme-light h1,
body.vc-theme-light h2,
body.vc-theme-light h3,
body.vc-theme-light h4,
body.vc-theme-light h5,
body.vc-theme-light h6,
body.vc-theme-light .widget-title {
	color: #0b1220 !important;
}
body.vc-theme-light h3,
body.vc-theme-light h4,
body.vc-theme-light h5,
body.vc-theme-light h6 {
	color: #111827 !important;
}
body.vc-theme-light .entry-content strong,
body.vc-theme-light .prose strong {
	color: #0f172a;
}
body.vc-theme-light .entry-content code,
body.vc-theme-light .prose code {
	background: #eef1f4;
	color: #0f172a;
	border-color: #d7dde5;
}
body.vc-theme-light .entry-content pre,
body.vc-theme-light .prose pre {
	background: #ffffff;
	border-color: #d7dde5;
}
body.vc-theme-light .entry-content hr,
body.vc-theme-light .prose hr {
	background: #d7dde5;
}
body.vc-theme-light .entry-content blockquote,
body.vc-theme-light .prose blockquote {
	border-left-color: #2563eb;
	background: rgba(37, 99, 235, 0.06);
	color: #374151;
}
body.vc-theme-light .entry-content figcaption,
body.vc-theme-light .prose figcaption {
	color: #4b5563 !important;
}

/* Много блоков отдают текст через text-white/text-gray-* внутри карточек */
body.vc-theme-light .text-white,
body.vc-theme-light .text-\[\#f5f5f5\] {
	color: #0f172a !important;
}
body.vc-theme-light .text-gray-300,
body.vc-theme-light .text-gray-400 {
	color: #334155 !important;
}
body.vc-theme-light .text-gray-500 {
	color: #475569 !important;
}
body.vc-theme-light .entry-content img,
body.vc-theme-light .prose img {
	box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
}

/* Ссылки по умолчанию */
a {
	color: #6ba3f7;
	text-decoration: none;
	transition: color 0.2s ease;
}
a:hover {
	color: #8fbcff;
	text-decoration: underline;
}

/* Логотип в шапке */
.custom-logo-link {
	display: block;
	line-height: 0;
}
.custom-logo-link img {
	max-height: 40px;
	width: auto;
	height: auto;
	vertical-align: middle;
}

/* ==========================================================================
   Контент записи (single) — ИТ/технологии, читаемость
   ========================================================================== */
.entry-content,
.prose {
	font-family: "Roboto", sans-serif;
	color: #e8e8e8;
	line-height: 1.75;
	font-size: 1rem;
}

/* Абзацы — отступы между блоками */
.entry-content p,
.prose p {
	margin-top: 0;
	margin-bottom: 1.25em;
}
.entry-content p:first-of-type,
.prose p:first-of-type {
	margin-top: 0;
}

/* Заголовки внутри текста — чёткая иерархия */
.entry-content h1,
.prose h1 {
	font-size: 1.5rem;
	font-weight: 700;
	color: #ffffff;
	margin-top: 1.75em;
	margin-bottom: 0.5em;
	line-height: 1.3;
	letter-spacing: -0.02em;
}
.entry-content h1:first-child,
.prose h1:first-child {
	margin-top: 0;
}

.entry-content h2,
.prose h2 {
	font-size: 1.35rem;
	font-weight: 700;
	color: #ffffff;
	margin-top: 1.75em;
	margin-bottom: 0.6em;
	line-height: 1.35;
	border-bottom: 1px solid #2a2a2a;
	padding-bottom: 0.35em;
	letter-spacing: -0.01em;
}
.entry-content h2:first-child,
.prose h2:first-child {
	margin-top: 0;
}

.entry-content h3,
.prose h3 {
	font-size: 1.2rem;
	font-weight: 600;
	color: #f0f0f0;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
	line-height: 1.4;
}
.entry-content h4,
.prose h4 {
	font-size: 1.08rem;
	font-weight: 600;
	color: #e8e8e8;
	margin-top: 1.35em;
	margin-bottom: 0.45em;
	line-height: 1.4;
}
.entry-content h5,
.prose h5 {
	font-size: 1rem;
	font-weight: 600;
	color: #e0e0e0;
	margin-top: 1.2em;
	margin-bottom: 0.4em;
	line-height: 1.4;
}
.entry-content h6,
.prose h6 {
	font-size: 0.95rem;
	font-weight: 600;
	color: #d8d8d8;
	margin-top: 1.1em;
	margin-bottom: 0.35em;
	line-height: 1.4;
}

/* Ссылки в тексте — светло-синий, заметные */
.entry-content a,
.prose a {
	color: #6ba3f7;
	text-decoration: none;
	border-bottom: 1px solid rgba(107, 163, 247, 0.35);
	transition: color 0.2s ease, border-color 0.2s ease;
}
.entry-content a:hover,
.prose a:hover {
	color: #8fbcff;
	border-bottom-color: #6ba3f7;
	text-decoration: none;
}

/* Списки */
.entry-content ul,
.prose ul {
	list-style: disc;
	padding-left: 1.6em;
	margin: 1em 0 1.25em;
}
.entry-content ul li,
.prose ul li {
	margin-bottom: 0.4em;
}
.entry-content ol,
.prose ol {
	list-style: decimal;
	padding-left: 1.6em;
	margin: 1em 0 1.25em;
}
.entry-content ol li,
.prose ol li {
	margin-bottom: 0.4em;
}

/* Цитаты — акцент для цитат и важных мыслей */
.entry-content blockquote,
.prose blockquote {
	border-left: 4px solid #4683d9;
	background: rgba(70, 131, 217, 0.06);
	padding: 1em 1.25em;
	margin: 1.5em 0;
	color: #c5c5c5;
	font-style: normal;
	border-radius: 0 8px 8px 0;
}
.entry-content blockquote p:last-child,
.prose blockquote p:last-child {
	margin-bottom: 0;
}

/* Картинки в тексте */
.entry-content img,
.prose img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
	margin: 1.25em 0;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.entry-content figure,
.prose figure {
	margin: 1.25em 0;
}
.entry-content figcaption,
.prose figcaption {
	font-size: 0.9rem;
	color: #888;
	margin-top: 0.5em;
	text-align: center;
}

/* Код и пре-форматирование — для ИТ-контента */
.entry-content code,
.prose code {
	font-family: "Roboto Mono", Consolas, Monaco, monospace;
	font-size: 0.9em;
	background: #252525;
	color: #b8d4ff;
	padding: 0.2em 0.5em;
	border-radius: 6px;
	border: 1px solid #333;
}
.entry-content pre,
.prose pre {
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 10px;
	padding: 1.25em 1.5em;
	overflow-x: auto;
	margin: 1.25em 0;
	line-height: 1.6;
}
.entry-content pre code,
.prose pre code {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.9rem;
	color: #e0e0e0;
}

/* Горизонтальная линия */
.entry-content hr,
.prose hr {
	border: none;
	height: 1px;
	background: #2a2a2a;
	margin: 1.75em 0;
}

/* Таблицы — для сравнений и данных */
.entry-content table,
.prose table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.25em 0;
	font-size: 0.95rem;
}
.entry-content th,
.entry-content td,
.prose th,
.prose td {
	border: 1px solid #2a2a2a;
	padding: 0.6em 0.9em;
	text-align: left;
}
.entry-content th,
.prose th {
	background: #1f1f1f;
	color: #f5f5f5;
	font-weight: 600;
}
.entry-content tr:nth-child(even) td,
.prose tr:nth-child(even) td {
	background: rgba(255, 255, 255, 0.02);
}

/* Выделение (strong, em) */
.entry-content strong,
.prose strong {
	color: #f5f5f5;
	font-weight: 600;
}
.entry-content em,
.prose em {
	color: #d8d8d8;
	font-style: italic;
}

/* Блок новостей в ленте + line-clamp (если нет Tailwind) */
.vc-clone-news-block .line-clamp-1 {
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vc-clone-news-block .line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vc-clone-news-block .line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vc-clone-news-block .vc-clone-news-item {
	color: inherit;
	cursor: pointer;
}
.vc-clone-news-block .vc-clone-news-item:hover {
	color: inherit;
}

