/*
Theme Name: Kaliningrad Daily Light
Author: Gemini AI
Description: Легкая и быстрая тема для новостного портала.
Version: 1.2
Text Domain: kd-light
*/

:root {
	--fira: 'Fira Sans',sans-serif;
	--lora: Lora,serif;
	--accent: #08c;
	--text-dark: #222;
	--bg-light: #f8fafc;
	--grey-text: #64748b;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--fira);
	color: var(--text-dark);
	line-height: 1.5;
	background: #fff;
	overflow-x: hidden;
}

.container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}

a {
	text-decoration: none;
	color: inherit;
	transition: .2s;
}

a:hover {
	color: var(--accent);
}

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

.site-header {
	border-bottom: 1px solid #eee;
	padding: 15px 0;
	background: #fff;
	margin-bottom: 40px;
	position: relative;
	z-index: 999;
}

.header-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.header-logo img {
	width: 250px;
	height: auto;
}

.header-nav ul {
	display: flex;
	list-style: none;
	/* gap: 20px; */
	margin: 0;
	padding: 0;
}

.header-nav a {
	font-weight: 600;
	font-family: var(--fira);
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: .5px;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 20px;
}

.header-socials {
	display: flex;
	gap: 8px;
}

.soc-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: #f1f5f9;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 800;
	color: var(--grey-text);
}

.soc-item.vk:hover {
	background: #4c75a3;
	color: #fff;
}

.soc-item.tg:hover {
	background: #08c;
	color: #fff;
}

.soc-item.fb:hover {
	background: #1877f2;
	color: #fff;
}

.header-search form {
	display: flex;
	background: #f1f5f9;
	padding: 6px 12px;
	border-radius: 20px;
	align-items: center;
}

.header-search input {
	border: none;
	background: transparent;
	outline: none;
	width: 100px;
	font-size: 13px;
}

.header-search button {
	border: none;
	background: none;
	cursor: pointer;
	color: var(--grey-text);
	display: flex;
}

.menu-toggle {
	display: none;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 8px;
	cursor: pointer;
	z-index: 10000;
	position: relative;
}

.mobile-search-only {
	display: none;
}

.main-grid {
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

.category-block {
	flex: 1;
	min-width: 0;
}

.sidebar-recent {
	flex: 0 0 300px;
	width: 300px;
	position: sticky;
	top: 20px;
}

.section-title {
	font-size: 14px;
	font-weight: 600;
	font-family: var(--fira);
	text-transform: uppercase;
	border-left: 4px solid var(--accent);
	padding-left: 15px;
	margin: 0 0 25px;
}

.recent-item {
	display: flex;
	gap: 12px;
	margin-bottom: 15px;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 15px;
}

.recent-thumb {
	flex: 0 0 90px;
	height: 65px;
	overflow: hidden;
	border-radius: 4px;
}

.recent-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.recent-text time,.breadcrumb {
	font-size: 11px;
	font-weight: 300;
	color: var(--grey-text);
}

.recent-text h4 {
	margin: 2px 0 0;
	font-size: 14px;
	line-height: 1.3;
	font-family: var(--fira);
	font-weight: 300;
}

.money-grid {
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap: 25px;
}

.card-thumb {
	position: relative;
	height: 160px;
	overflow: hidden;
}

.card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.card-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #ffffffe6;
	backdrop-filter: blur(4px);
	color: #1e293b;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 10px;
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: .5px;
	box-shadow: 0 2px 4px #0000001a;
}

.card-body {
	padding: 15px 5px;
}

.card-date {
	display: block;
	font-size: 11px;
	color: #94a3b8;
	margin-bottom: 8px;
	font-weight: 500;
}

.money-card h4 {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
	color: #1e293b;
	transition: color .2s;
}

.money-card:hover {
	transform: translateY(-5px);
}

.money-card:hover img {
	transform: scale(1.08);
}

.money-card:hover h4 {
	color: var(--accent,#229ED9);
}

@media (max-width: 768px) {
	.money-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.card-thumb {
		height: 200px;
	}
}

.post-meta, .post-date {
	font-size: 11px;
	color: var(--grey-text);
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 5px;
	font-family: var(--fira);
}

.post-title {
	font-size: 28px;
	line-height: 1.2;
	margin-bottom: 25px;
	font-weight: 600;
	font-family: var(--fira);
}

.post-entry {
	font-family: var(--lora);
	font-size: 16.28px;
	line-height: 1.6;
	color: #333;
}

.post-entry p {
	margin-bottom: 20px;
}

/* Основной стиль для первого абзаца текста */
.post-entry p:not(:has(img)):not(:has(figure)):first-of-type {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.5;
    color: #1a1e23;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9; /* Тонкая линия снизу для отделения лида */
}

/* На случай, если первый абзац все же содержит картинку, 
   мы гарантируем, что она не будет иметь лишних отступов */
.post-entry p:has(img) {
    font-weight: normal;
    font-size: 16.28px;
}

.post-featured-image img {
	border-radius: 8px;
	width: 100%;
}

/* Ссылки внутри текста статьи */
.post-entry a {
    color: #2563eb; /* Приятный синий (Royal Blue) */
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3); /* Подчеркивание чуть светлее самого текста */
    text-underline-offset: 3px; /* Отступ линии от букв, чтобы не "резало" хвосты у букв 'р' или 'у' */
    transition: all 0.2s ease;
}

/* Эффект при наведении */
.post-entry a:hover {
    color: #1d4ed8; /* Чуть темнее при наведении */
    text-decoration-color: #1d4ed8; /* Линия становится ярче */
}

/* Если ссылка — это кнопка или внутри нее картинка, убираем подчеркивание */
.post-entry a:has(img), 
.post-entry a.button {
    text-decoration: none;
}


.money-grid {
	display: grid;
	grid-template-columns: repeat(3,1fr);
	gap: 25px;
	margin-top: 20px;
}

.money-card h4 {
	margin: 10px 0 0;
	font-size: 16px;
	line-height: 1.4;
	font-weight: 700;
}

.energy-band {
	background: #cbd5e1;
	color: #1f201d;
	padding: 60px 0;
	margin: 60px 0;
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

.energy-band .section-title {
	color: #1f201d;
	border-left-color: #94a3b8;
}

.energy-row {
	display: grid;
	grid-template-columns: repeat(4,1fr);
	gap: 20px;
}

.energy-thumb img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 12px;
}

.energy-card h4 {
	font-size: 15px;
	line-height: 1.3;
	margin: 0;
}

.featured-magazine-grid {
	display: flex;
	gap: 30px;
}

.magazine-main {
	flex: 0 0 60%;
}

.main-post-thumb img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	border-radius: 12px;
}

.main-post h2 {
	font-size: 28px;
	margin: 20px 0 10px;
	font-weight: 600;
	font-family: var(--fira);
}

.magazine-list {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.mag-list-item {
	display: flex;
	gap: 12px;
	align-items: center;
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
}

.mag-list-thumb img {
	width: 90px;
	height: 65px;
	object-fit: cover;
	border-radius: 6px;
}

@media (max-width: 1024px) {
	.header-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background: #fff;
		padding: 20px;
		box-shadow: 0 10px 20px #0000001a;
		border-top: 1px solid #eee;
		z-index: 9999;
	}

	.header-nav.is-open {
		display: block!important;
	}

	.header-nav ul {
		flex-direction: column;
		gap: 0;
	}

	.header-nav li {
		border-bottom: 1px solid #f1f5f9;
	}

	.header-nav a {
		display: block;
		padding: 15px 0;
	}

	.header-right {
		display: none!important;
	}

	.menu-toggle {
		display: flex;
	}

	/* Контейнер поиска */
.mobile-search-only {
    display: block !important;
    position: relative; /* Чтобы иконка позиционировалась относительно этого блока */
    width: 100% !important;
    margin-bottom: 25px;
    box-sizing: border-box;
}

/* Рисуем лупу через CSS */
.mobile-search-only::before {
    content: 'search'; /* Код иконки в Material Icons */
    font-family: 'Material Icons';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
    z-index: 5;
    pointer-events: none; /* Чтобы иконка не мешала клику */
}

/* Само поле ввода */
.mobile-search-only input {
    width: 100% !important;
    padding: 14px 15px 14px 45px !important; /* Большой отступ слева (45px) чтобы текст не ложился на лупу */
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    display: block;
    outline: none;
    -webkit-appearance: none; /* Убираем стандартные тени iOS */
}

/* Фокус */
.mobile-search-only input:focus {
    background: #f8fafc;
    border-color: var(--accent);
}

	.main-grid {
		flex-direction: column;
	}

	.sidebar-recent {
		width: 100%;
		flex: none;
		position: static;
	}

	.money-grid {
		grid-template-columns: repeat(2,1fr);
	}

	.energy-row {
		grid-template-columns: repeat(2,1fr);
	}

	.featured-magazine-grid {
		flex-direction: column;
	}

	.magazine-main {
		flex: none;
	}

	.energy-band {
		width: auto;
		left: 0;
		right: 0;
		margin-left: -20px;
		margin-right: -20px;
	}
}

@media (max-width: 600px) {
	.money-grid {
		grid-template-columns: 1fr;
	}

	.post-title {
		font-size: 24px;
		font-family: var(--fira);
	}

	.post-entry {
		font-size: 16px;
	}
}

.site-footer {
	background: #1a1a1a;
	color: #a1a1a1;
	padding: 50px 0;
	margin-top: 60px;
	font-size: 14px;
	border-top: 4px solid var(--accent);
}

.footer-content {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 30px;
}

.footer-info p {
	color: #fff;
	font-weight: 300;
	font-size: 16px;
	font-family: var(--fira);
	margin: 0 0 10px;
}

.footer-info small {
	display: block;
	line-height: 1.4;
	max-width: 400px;
}

.footer-links {
	display: flex;
	gap: 25px;
	flex-wrap: wrap;
}

.footer-links a {
	color: #a1a1a1;
	transition: color .3s;
	font-family: var(--fira);
}

.footer-links a:hover {
	color: #fff;
}

@media (max-width: 768px) {
	.footer-content {
		flex-direction: column;
		text-align: center;
		align-items: center;
	}

	.footer-links {
		justify-content: center;
		gap: 15px;
	}

	html,body {
		overflow-x: hidden;
	}

	.container {
		padding-left: 15px!important;
		padding-right: 15px!important;
		width: 100%!important;
		box-sizing: border-box!important;
	}

	.energy-band {
		width: auto!important;
		margin-left: -15px!important;
		margin-right: -15px!important;
		left: auto!important;
		right: auto!important;
		padding: 40px 15px!important;
	}

	.energy-row {
		display: block!important;
	}

	.featured-magazine-grid,.main-grid,.money-grid {
		display: block!important;
		width: 100%!important;
	}

	.money-card,.energy-card,.mag-list-item {
		width: 100%!important;
		margin-bottom: 30px!important;
	}

	.card-thumb img,.energy-thumb img,.main-post-thumb img,.mag-list-thumb img {
		width: 100%!important;
		height: auto!important;
		aspect-ratio: 16 / 9;
		border-radius: 8px;
	}

	.main-post h2 {
		font-size: 22px!important;
		font-family: var(--fira);
		line-height: 1.3;
	}

	.sidebar-recent {
		position: static!important;
		width: 100%!important;
	}
}

.no-results-box {
	text-align: center;
	padding: 60px 20px;
	background: #f8fafc;
	border-radius: 12px;
	border: 2px dashed #e2e8f0;
}

.no-results-box h2 {
	margin: 0 0 10px;
	font-size: 24px;
}

.no-results-box p {
	color: #64748b;
	margin-bottom: 30px;
}

.no-results-search {
	max-width: 400px;
	margin: 0 auto;
}

.no-results-search form {
	display: flex;
	background: #fff;
	border: 1px solid #cbd5e1;
	padding: 5px 15px;
	border-radius: 30px;
	align-items: center;
	box-shadow: 0 4px 6px -1px #0000001a;
}

.no-results-search input {
	flex: 1;
	border: none;
	padding: 10px;
	outline: none;
	font-size: 16px;
}

.no-results-search button {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--accent);
	display: flex;
}

.realty-grid {
	display: flex;
	gap: 20px;
	height: 450px;
}

.realty-main {
	flex: 2;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
}

.realty-side {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.realty-card {
	display: block;
	height: 100%;
	position: relative;
	background: #eee;
	border-radius: 12px;
	overflow: hidden;
}

.realty-card.small {
	height: calc(50% - 10px);
	display: flex;
	flex-direction: column;
}

.realty-thumb {
	width: 100%;
	height: 100%;
}

.realty-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}

.realty-card:hover img {
	transform: scale(1.05);
}

.realty-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 30px;
	background: linear-gradient(to top,#000c,transparent);
	color: #fff;
}

.realty-overlay h4 {
	font-size: 22px;
	margin: 10px 0 0;
	line-height: 1.2;
}

.realty-info {
	padding: 12px;
	background: #fff;
	border: 1px solid #eee;
	border-top: none;
	border-radius: 0 0 12px 12px;
}

.realty-info h4 {
	font-size: 14px;
	margin: 5px 0 0;
	color: var(--text-dark);
	font-family: var(--fira);
}

.realty-card.large {
	transition: all .3s ease;
}

.realty-card.large:hover .realty-overlay {
	background: linear-gradient(to top,var(--accent),transparent);
}

@media (max-width: 768px) {
	.realty-grid {
		flex-direction: column;
		height: auto;
	}

	.realty-main {
		height: 300px;
	}

	.realty-overlay h4 {
		font-size: 18px;
		font-family: var(--fira);
	}

	.realty-card.small {
		flex-direction: column;
		height: auto;
	}
}

.section-wrapper {
	margin-bottom: 80px!important;
	display: block;
	clear: both;
}

.realty-grid {
	margin-top: 20px;
}

.realty-section-border {
	border-top: 1px solid #eee;
	padding-top: 40px;
}

.realty-card.small {
	display: flex!important;
	flex-direction: column;
	text-decoration: none;
	background: #fff;
	border: 1px solid #eee;
	height: calc(50% - 10px);
}

.realty-card.small .realty-thumb {
	height: 120px;
	flex-shrink: 0;
}

.realty-info {
	padding: 10px 15px;
	display: block!important;
}

.realty-info h4 {
	margin: 5px 0 0;
	font-size: 15px;
	font-family: var(--fira);
	line-height: 1.3;
	color: #222;
	font-weight: 600;
}

.realty-info time {
	font-size: 12px;
	font-family: var(--fira);
	color: var(--accent);
}

.realty-info h4 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.related-posts {
	margin-top: 50px;
	padding-top: 30px;
	border-top: 1px solid #f1f5f9;
	clear: both;
}

.related-posts .section-title {
	margin-bottom: 20px;
	font-size: 20px;
	font-family: var(--fira);
	color: #1e293b;
}

.post-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	padding: 25px 0;
	border-top: 1px solid #f1f5f9;
	margin-top: 30px;
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 0;
	flex: 1;
}

.tags-title {
	font-size: 13px;
	font-weight: 700;
	color: #94a3b8;
	margin-right: 5px;
	text-transform: uppercase;
	letter-spacing: .5px;
}

.post-tags a {
	text-decoration: none!important;
	padding: 6px 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	color: #475569!important;
	font-size: 12px;
	font-weight: 500;
	transition: all .2s ease;
}

.post-tags a:hover {
	border-color: #cbd5e1;
	background-color: #fff;
	color: #1e293b!important;
	box-shadow: 0 2px 4px #0000000d;
}

.post-share {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0;
	border: none;
	margin: 0;
	flex-shrink: 0;
}

.share-title {
	font-size: 12px;
	font-weight: 700;
	color: #94a3b8;
	text-transform: uppercase;
}

@media (max-width: 768px) {
	.post-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}

	.post-share {
		width: 100%;
		justify-content: space-between;
		padding-top: 15px;
		border-top: 1px dashed #f1f5f9;
	}
}

.share-buttons {
	display: flex;
	gap: 12px;
}

.share-btn-item {
	text-decoration: none!important;
	width: 44px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: transparent;
	color: #64748b!important;
	font-size: 11px;
	font-weight: 700;
	transition: all .2s ease-in-out;
}

.share-btn-item:hover {
	border-color: #94a3b8;
	background-color: #f8fafc!important;
	color: #1e293b!important;
	transform: translateY(-2px);
}

.site-footer {
	background-color: #f0f7ff;
	color: #475569;
	padding: 60px 0 30px;
	font-size: 13px;
	line-height: 1.6;
	margin-top: 80px;
	border-top: 1px solid #e2e8f0;
}

.site-footer a {
	color: #1e293b;
	text-decoration: none;
	transition: color .2s;
	font-weight: 500;
	text-decoration: underline;
}

.site-footer a:hover {
	color: var(--accent);
	text-decoration: none;
}

.footer-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 30px;
	border-bottom: 1px solid #cbd5e1;
	margin-bottom: 30px;
}

.footer-brand {
	display: flex;
	align-items: center;
	gap: 15px;
}

.footer-nav {
	display: flex;
	gap: 20px;
}

.footer-nav a {
	font-weight: 600;
	text-transform: uppercase;
	font-size: 12px;
	font-family: var(--fira);
	color: #334155;
}

.footer-middle {
	margin-bottom: 30px;
}

.footer-bottom {
	font-size: 12px;
	border-top: 1px solid #cbd5e1;
	padding-top: 20px;
	color: #64748b;
}

.legal-warning {
	margin-top: 15px;
	font-size: 12px;
	font-style: italic;
	color: #94a3b8;
}

@media (max-width: 768px) {
	.footer-top {
		flex-direction: column;
		gap: 25px;
		text-align: center;
	}

	.footer-nav {
		flex-wrap: wrap;
		justify-content: center;
	}

	.footer-brand {
		flex-direction: column;
	}
}

.about-page {
	max-width: 900px;
	margin: 40px auto;
}

.about-container {
	background: #fff;
	padding: 50px;
	border-radius: 15px;
	box-shadow: 0 10px 30px #0000000d;
}

.about-header {
	text-align: center;
	margin-bottom: 40px;
	border-bottom: 2px solid #f0f7ff;
	padding-bottom: 30px;
}

.about-subtitle {
	font-size: 18px;
	font-family: var(--fira);
	color: #64748b;
	margin-top: 10px;
}

.about-content h2 {
	color: var(--accent);
	margin: 30px 0 15px;
	font-size: 24px;
}

.about-content p {
	font-size: 17px;
	line-height: 1.8;
	color: #334155;
	margin-bottom: 20px;
}

.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 40px 0;
}

.about-stat {
	background: #f0f7ff;
	padding: 30px;
	border-radius: 12px;
	text-align: center;
}

.stat-num {
	display: block;
	font-size: 42px;
	font-weight: 800;
	color: var(--accent);
}

.stat-desc {
	font-size: 14px;
	color: #475569;
	font-weight: 600;
}

.about-contacts-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 30px;
	border-radius: 12px;
	margin-top: 50px;
}

@media (max-width: 768px) {
	.about-container {
		padding: 25px;
	}

	.about-grid {
		grid-template-columns: 1fr;
	}
}

.back-to-top {
	position: fixed;
	right: 20px;
	top: 50%;
	/* transform: translateY(-50%) translateX(100px); */
	background-color: var(--accent);
	color: #fff;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px #0003;
	transition: all .4s cubic-bezier(0.175,0.885,0.32,1.275);
	z-index: 1000;
	opacity: 0;
}

.back-to-top.show {
	/* transform: translateY(-50%) translateX(0); */
	opacity: 1;
}

.back-to-top:hover {
	background-color: #334155;
	/* transform: translateY(-50%) scale(1.1); */
}

.back-to-top .material-icons {
	font-size: 24px;
}

@media (max-width: 768px) {
	.back-to-top {
		top: auto;
		bottom: 30px;
		transform: translateY(0) translateX(100px);
	}

	.back-to-top.show {
		transform: translateY(0) translateX(0);
	}
}

.archive-list {
	margin-top: 30px;
}

.archive-post-item {
	display: flex;
	gap: 25px;
	margin-bottom: 40px;
	padding-bottom: 35px;
	border-bottom: 1px solid #edf2f7;
	transition: transform .2s ease;
}

.archive-post-item:last-child {
	border-bottom: none;
}

.archive-post-thumb {
	flex: 0 0 240px;
	max-width: 240px;
}

.archive-post-thumb img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.archive-post-content h2 {
	font-size: 20px;
	font-family: var(--fira);
	line-height: 1.3;
	margin: 8px 0 12px;
}

.archive-post-content h2 a {
	color: #1a202c;
	text-decoration: none;
}

.archive-post-content h2 a:hover {
	color: var(--accent);
}

.archive-post-content p {
	font-size: 15px;
	color: #4a5568;
	line-height: 1.5;
}

@media (max-width: 768px) {
	.archive-post-item {
		flex-direction: column;
		gap: 15px;
		margin-bottom: 30px;
		padding-bottom: 30px;
	}

	.archive-post-thumb {
		flex: none;
		max-width: 100%;
	}

	.archive-post-thumb img {
		height: 200px;
	}
}

.footer-social {
	display: flex;
	gap: 10px;
	align-items: center;
}

.social-btn {
	text-decoration: none!important;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: transparent;
	color: #64748b!important;
	font-size: 11px;
	font-weight: 600;
	transition: all .2s ease-in-out;
}

.social-btn:hover {
	border-color: var(--accent);
	color: var(--accent)!important;
	background-color: rgba(var(--accent-rgb),0.05);
	transform: translateY(-2px);
}

@media (max-width: 768px) {
	.footer-social {
		justify-content: center;
		margin-top: 15px;
	}
}

.soc-item,.social-btn {
	text-decoration: none!important;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: transparent;
	color: #64748b!important;
	font-size: 10px;
	font-weight: 700;
	transition: all .2s ease-in-out;
}

.soc-item:hover,.social-btn:hover {
	border-color: #94a3b8;
	color: #1e293b!important;
	background-color: #f8fafc!important;
	transform: translateY(-1px);
	filter: none!important;
}

.soc-item.vk:hover,.soc-item.tg:hover,.soc-item.fb:hover,.soc-item.x:hover,.social-btn.vk:hover,.social-btn.tg:hover {
	background-color: #f8fafc!important;
	color: #1e293b!important;
}

.header-socials {
	display: flex;
	gap: 8px;
	margin-right: 15px;
	align-items: center;
}

@media (max-width: 992px) {
	.header-socials {
		display: none;
	}
}

.header-search form {
	display: flex;
	align-items: center;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 2px 8px;
	transition: border-color .2s;
}

.header-search form:focus-within {
	border-color: var(--accent);
}

.header-search input {
	border: none!important;
	outline: none!important;
	padding: 6px;
	font-size: 14px;
	width: 120px;
}

.header-search button {
	background: none;
	border: none;
	color: #64748b;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.header-search button .material-icons {
	font-size: 20px;
}

.tg-subscribe-box {
	display: flex;
	align-items: center;
	gap: 20px;
	background-color: #f0f9ff;
	border: 1px solid #e0f2fe;
	border-radius: 12px;
	padding: 24px;
	margin: 40px 0;
}

.tg-icon {
	width: 50px;
	height: 50px;
	background: #229ED9;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.tg-icon .material-icons {
	font-size: 24px;
	transform: rotate(-20deg) translateX(2px);
}

.tg-content {
	flex-grow: 1;
}

.tg-content h4 {
	margin: 0 0 4px!important;
	font-size: 18px;
	color: #0c4a6e;
	font-weight: 700;
}

.tg-content p {
	margin: 0!important;
	font-size: 14px;
	color: #334155;
	line-height: 1.4;
}

.tg-btn {
	text-decoration: none!important;
	background-color: #229ED9;
	color: #fff!important;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	transition: all .2s ease;
	box-shadow: 0 4px 6px -1px #229ed933;
}

.tg-btn:hover {
	background-color: #1c8adb;
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px #229ed94d;
}

@media (max-width: 640px) {
	.tg-subscribe-box {
		flex-direction: column;
		text-align: center;
		padding: 20px;
	}

	.tg-btn {
		width: 100%;
	}
}

.money-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	transition: transform .4s cubic-bezier(0.25,1,0.5,1),box-shadow .4s cubic-bezier(0.25,1,0.5,1);
	will-change: transform;
}

.card-thumb {
	position: relative;
	height: 160px;
	overflow: hidden;
	-webkit-mask-image: -webkit-radial-gradient(white,black);
}

.card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(0.25,1,0.5,1);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transform: translateZ(0);
}

.money-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 24px #1e293b1f;
}

.money-card:hover img {
	transform: scale(1.05) translateZ(0);
}

.sidebar-recent {
	position: sticky;
	top: 20px;
}

.recent-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.recent-item {
	display: flex;
	gap: 12px;
	text-decoration: none!important;
	transition: all .3s ease;
}

.recent-thumb {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
}

.recent-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.recent-badge {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: #1e293bb3;
	color: #fff;
	font-size: 8px;
	text-transform: uppercase;
	text-align: center;
	padding: 2px 0;
	font-weight: 300;
}

.recent-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.recent-time {
	font-size: 10px;
	color: #94a3b8;
	margin-bottom: 4px;
	font-weight: 600;
}

.recent-text h4 {
	margin: 0;
	font-size: 13px;
	line-height: 1.3;
	color: #1e293b;
	transition: color .2s ease;
}

.recent-item:hover .recent-thumb img {
	transform: scale(1.1);
}

.recent-item:hover h4 {
	color: var(--accent,#229ED9);
}

.sidebar-recent .recent-item {
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
}

.sidebar-recent .recent-item:last-child {
	border-bottom: none;
}

.sidebar-recent {
	position: sticky;
	top: 20px;
	align-self: flex-start;
}

.energy-row {
	display: grid;
	grid-template-columns: repeat(4,1fr);
	gap: 20px;
}

.energy-card-wide {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px #0000000d;
	transition: transform .4s cubic-bezier(0.25,1,0.5,1),box-shadow .4s cubic-bezier(0.25,1,0.5,1);
	will-change: transform;
}

.energy-card-wide a {
	text-decoration: none!important;
}

.energy-thumb {
	position: relative;
	height: 180px;
	overflow: hidden;
	-webkit-mask-image: -webkit-radial-gradient(white,black);
}

.energy-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(0.25,1,0.5,1);
	backface-visibility: hidden;
	transform: translateZ(0);
}

.energy-info {
	padding: 15px;
}

.energy-info h4 {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #1e293b;
	font-weight: 700;
	transition: color .2s;
}

.energy-card-wide:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 25px -5px #0000001a 0 10px 10px -5px #0000000a;
}

.energy-card-wide:hover img {
	transform: scale(1.07) translateZ(0);
}

.energy-card-wide:hover h4 {
	color: var(--accent,#229ED9);
}

@media (max-width: 1024px) {
	.energy-row {
		grid-template-columns: repeat(2,1fr);
	}
}

@media (max-width: 640px) {
	.energy-row {
		grid-template-columns: 1fr;
	}
}

.featured-magazine-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 30px;
	margin-top: 20px;
}

.main-post {
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	transition: all .4s cubic-bezier(0.25,1,0.5,1);
}

.main-post-thumb {
	position: relative;
	height: 350px;
	overflow: hidden;
}

.main-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}

.main-post-content {
	padding: 25px;
}

.main-post-content h2 {
	font-size: 24px;
	margin: 10px 0;
	color: #1e293b;
	line-height: 1.2;
}

.main-post:hover {
	box-shadow: 0 20px 25px -5px #0000001a;
}

.main-post:hover img {
	transform: scale(1.03);
}

.magazine-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.mag-list-item {
	display: flex;
	gap: 15px;
	text-decoration: none!important;
	padding-bottom: 15px;
	border-bottom: 1px solid #f1f5f9;
	transition: all .2s ease;
}

.mag-list-item:last-child {
	border-bottom: none;
}

.mag-list-thumb {
	width: 100px;
	height: 70px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
}

.mag-list-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mag-list-text h4 {
	margin: 4px 0 0;
	font-size: 14px;
	color: #1e293b;
	line-height: 1.4;
}

.mag-list-item:hover h4 {
	color: var(--accent,#229ED9);
}

@media (max-width: 992px) {
	.featured-magazine-grid {
		grid-template-columns: 1fr;
	}
}

.money-card {
	background: #fff;
	border-radius: 12px;
	border: 1px solid transparent;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: all .4s cubic-bezier(0.25,1,0.5,1);
	padding: 0 0 15px;
}

.money-card a {
	text-decoration: none!important;
	display: block;
}

.money-card .card-body,.money-card h4 {
	padding: 12px 15px 0;
	margin: 0;
}

.money-card h4 {
	font-size: 15px;
	line-height: 1.4;
	color: #1e293b;
	transition: color .2s;
}

.money-card:hover {
	border-color: #e2e8f0;
	background-color: #f8fafc;
	transform: translateY(-5px);
	box-shadow: 0 10px 20px #0000000d;
}

.money-card:hover h4 {
	color: var(--accent,#229ED9);
}

.money-card .card-thumb {
	height: 150px;
	overflow: hidden;
}

.money-card .card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.money-card:hover .card-thumb img {
	transform: scale(1.05);
}

.realty-clean-grid {
	display: grid;
	grid-template-columns: repeat(4,1fr);
	gap: 20px;
	margin-top: 25px;
}

.realty-card-new {
	background: #fff;
	border-radius: 12px;
	border: 1px solid #f1f5f9;
	overflow: hidden;
	transition: all .4s cubic-bezier(0.25,1,0.5,1);
	display: flex;
	flex-direction: column;
	will-change: transform;
}

.realty-card-new a {
	text-decoration: none!important;
}

.realty-thumb-new {
	position: relative;
	height: 160px;
	overflow: hidden;
	backface-visibility: hidden;
	-webkit-mask-image: -webkit-radial-gradient(white,black);
}

.realty-thumb-new img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(0.25,1,0.5,1);
	transform: translateZ(0);
}

.realty-body-new {
	padding: 15px;
	flex-grow: 1;
}

.realty-body-new h4 {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: #1e293b;
	font-weight: 700;
	transition: color .3s ease;
}

.realty-card-new:hover {
	transform: translateY(-8px);
	border-color: #cbd5e1;
	box-shadow: 0 15px 30px -5px #00000014;
	background: #fcfdfe;
}

.realty-card-new:hover img {
	transform: scale(1.08) translateZ(0);
}

.realty-card-new:hover h4 {
	color: var(--accent,#229ED9);
}

@media (max-width: 1100px) {
	.realty-clean-grid {
		grid-template-columns: repeat(2,1fr);
	}
}

@media (max-width: 640px) {
	.realty-clean-grid {
		grid-template-columns: 1fr;
	}
}

.site-footer {
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	padding: 50px 0 30px;
	color: #475569;
	font-size: 14px;
	line-height: 1.6;
}

.footer-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding-bottom: 30px;
	border-bottom: 1px solid #e2e8f0;
	margin-bottom: 30px;
}

.footer-brand {
	display: flex;
	gap: 15px;
	align-items: center;
}

.footer-brand img {
	filter: grayscale(1);
	opacity: .7;
}

.footer-brand strong {
	color: #1e293b;
	letter-spacing: .5px;
}

.footer-social {
	display: flex;
	gap: 10px;
}

.social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #e2e8f0;
	color: #64748b!important;
	text-decoration: none;
	font-size: 11px;
	font-weight: 800;
	transition: all .3s ease;
}

.social-btn:hover {
	color: #fff!important;
	transform: translateY(-3px);
}

.social-btn.vk:hover {
	background: #07F;
}

.social-btn.tg:hover {
	background: #229ED9;
}

.social-btn.fb:hover {
	background: #1877F2;
}

.social-btn.x:hover {
	background: #000;
}

.footer-middle,.footer-bottom {
	margin-bottom: 25px;
}

.footer-middle a {
	color: #1f201d;
	text-decoration: none;
	font-weight: 400;
	text-decoration: underline;
}

.footer-middle a:hover {
	text-decoration: none;
}

.legal-warning {
	font-size: 13px;
	color: #94a3b8;
	margin-top: 15px;
	font-style: italic;
	line-height: 1.4;
}

.back-to-top {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	background: #1e293b;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all .3s ease;
	box-shadow: 0 4px 12px #00000026;
	z-index: 1000;
}

.back-to-top.show {
	opacity: 1;
	visibility: visible;
}

.back-to-top:hover {
	background: #229ED9;
	transform: scale(1.1);
}

@media (max-width: 768px) {
	.footer-top {
		flex-direction: column;
		gap: 20px;
		text-align: center;
	}

	.footer-brand {
		flex-direction: column;
		margin: 0 auto;
	}

	.footer-social {
		margin: 0 auto;
	}
}

.image-caption {
    font-family: var(--lora);
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
    font-style: italic;
}

.sidebar-dynamic-area {
    margin-top: 35px;
	font-size:12px;
}

/* Расстояние между самими виджетами (Sape и Рекламой) */
.sidebar-block {
    margin-bottom: 35px;
}

/* Стиль для ссылок Sape */
.sidebar-block ul {
    list-style: none;
    padding: 0;
}

.sidebar-block ul li {
    padding: 10px 0;
    border-bottom: 1px solid #fee2e2; /* Твой нежно-розовый */
    line-height: 1.4;
}

.sidebar-block ul li:last-child {
    border-bottom: none;
}

.sidebar-block ul li a:hover {
    color: var(--accent);
}

/* Основной контейнер навигации */
/* ==========================================================================
   НАВИГАЦИЯ (ГЛАВНОЕ МЕНЮ)
   ========================================================================== */

.nav-list {
    display: flex !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center;
    flex-wrap: nowrap;
}

/* Сброс отступов для всех li внутри навигации, чтобы не мешали общие стили сайта */
.nav-list li {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Ссылки верхнего уровня */
.nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 8px 8px !important; /* Максимальная плотность */
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px; /* Оптимально для плотного меню */
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-list > li > a:hover {
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   ВЫПАДАЮЩЕЕ ПОДМЕНЮ
   -------------------------------------------------------------------------- */

.nav-list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-top: 3px solid var(--accent);
    margin: 0 !important;
    padding: 5px 0 !important;
    z-index: 9999;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

/* Показываем при наведении */
.nav-list li:hover > .sub-menu {
    display: block !important;
}

/* Разворот последнего пункта (Ещё), чтобы не вылетал за экран */
.nav-list > li:last-child .sub-menu {
    left: auto;
    right: 0;
}

/* Ссылки внутри подменю */
.nav-list .sub-menu li a {
    display: block !important;
    width: 100% !important;
    padding: 10px 15px !important;
    color: #475569;
    font-size: 13px;
    text-decoration: none;
    box-sizing: border-box !important;
    transition: all 0.2s ease;
    background-color: transparent;
}

.nav-list .sub-menu li a:hover {
    background-color: #f8fafc !important; /* Светло-розовый */
    color: var(--accent) !important;
    /* padding-left: 20px !important; */
}

/* --------------------------------------------------------------------------
   ИКОНКИ (MATERIAL ICONS)
   -------------------------------------------------------------------------- */

.nav-list .menu-item-has-children > a::after,
.nav-list > li:last-child > a::before {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

.nav-list .menu-item-has-children > a::after {
    content: 'expand_more';
    font-size: 13px;
    margin-left: 2px;
    opacity: 0.5;
}

.nav-list > li:last-child > a::before {
    content: 'more_horiz';
    font-size: 13px;
    margin-right: 4px;
    opacity: 0.7;
}

/* Подсветка иконок при наведении */
.nav-list li:hover > a::after,
.nav-list li:hover > a::before {
    opacity: 1;
    color: var(--accent);
}

/* ==========================================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ МЕНЮ
   ========================================================================== */

@media (max-width: 768px) {
    /* 1. Превращаем горизонтальный ряд в вертикальный список */
    .nav-list {
        display: none; /* Скрыто по умолчанию, открывается по кнопке-бургер */
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: #ffffff;
        padding: 10px 0 !important;
    }

    /* Класс для открытия меню (будет добавляться через JS) */
    .nav-list.is-open {
        display: flex !important;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-list > li > a {
        padding: 12px 20px !important;
        font-size: 16px; /* На телефоне лучше шрифт покрупнее */
        justify-content:间;
    }

    /* 2. Делаем подменю частью основного списка (развернутым) */
    .nav-list .sub-menu {
        display: block !important; /* Всегда видно в мобильной версии */
        position: static !important; /* Убираем наложение поверх контента */
        width: 100% !important;
        box-shadow: none !important;
        border-top: none !important;
        background: #f8fafc; /* Чуть темнее фон для вложенных пунктов */
        padding: 0 !important;
    }

    .nav-list .sub-menu li a {
        padding: 10px 20px 10px 40px !important; /* Большой отступ слева для иерархии */
        font-size: 14px;
        border-bottom: none;
    }

    /* 3. Убираем стрелочки, так как меню уже развернуто */
    .nav-list .menu-item-has-children > a::after {
        display: none !important;
    }
}

.recent-thumb {
    position: relative; /* Чтобы бейдж не улетал */
    overflow: hidden;
}

.recent-thumb img {
    display: block;
    width: 100%;
    height: 80px; /* Укажи свою высоту */
    object-fit: cover;
}

.card-thumb img, 
.energy-thumb img, 
.main-post-thumb img, 
.mag-list-thumb img, 
.realty-thumb-new img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Это заставит заглушку аккуратно заполнить область без растяжения */
}

/* Контейнер пагинации */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
}

/* Общие стили для ссылок и текущей страницы */
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* Стиль для стрелок (иконок) */
.pagination .page-numbers .material-icons {
    font-size: 20px;
    vertical-align: middle;
}

/* Наведение на обычную кнопку */
.pagination a.page-numbers:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Активная страница */
.pagination .page-numbers.current {
    background: #2563eb; /* Тот же синий, что у ссылок */
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Точки (разделитель страниц ...) */
.pagination .page-numbers.dots {
    background: transparent;
    color: #cbd5e1;
    cursor: default;
}

/* Отступы для крайних кнопок "Назад" и "Вперед" */
.pagination .prev, .pagination .next {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}