/*
 * Раздел новостей (news.php, шаблоны Elementor из миграции 068): лента, рубрики, новость, блок на главной.
 * Цвета — фирменные: синий #1B3D79, золото #CB9C45 (наведение #A87D2F), текст #374151, фон блоков #F2F1ED.
 */

/* --- Рубрика и дата --- */
.hb-news-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	font-size: 14px;
	line-height: 1.4;
	color: #6B7280;
}
.hb-news-meta__cat {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: #F2F1ED;
	color: #1B3D79;
	font-weight: 600;
	font-size: 13px;
}
.hb-news-meta--hero {
	color: rgba(255, 255, 255, .85);
	font-size: 15px;
}
.hb-news-meta--hero .hb-news-meta__cat {
	background: #CB9C45;
	color: #fff;
	text-decoration: none;
	transition: background-color .2s;
}
.hb-news-meta--hero a.hb-news-meta__cat:hover,
.hb-news-meta--hero a.hb-news-meta__cat:focus-visible {
	background: #A87D2F;
	color: #fff;
}

/* --- Вкладки рубрик --- */
.hb-news-tabs ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.hb-news-tabs a {
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid #D1D5DB;
	border-radius: 999px;
	color: #1B3D79;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color .2s, border-color .2s, color .2s;
}
.hb-news-tabs a:hover,
.hb-news-tabs a:focus-visible {
	border-color: #1B3D79;
	color: #1B3D79;
	background: #F2F1ED;
}
.hb-news-tabs a[aria-current="page"] {
	background: #1B3D79;
	border-color: #1B3D79;
	color: #fff;
}

/* --- Сетка карточек --- */
.hb-news-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 28px;
}
.hb-news-card {
	height: 100%;
}
.hb-news-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	transition: box-shadow .25s, transform .25s;
}
.hb-news-card__link:hover,
.hb-news-card__link:focus-visible {
	box-shadow: 0 10px 28px rgba(27, 61, 121, .14);
	transform: translateY(-2px);
}
.hb-news-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #F2F1ED;
}
.hb-news-card__img {
	display: block;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .4s;
}
.hb-news-card__img--empty {
	background: #1B3D79 url("images/news-placeholder.svg") center / 96px no-repeat;
}
.hb-news-card__link:hover .hb-news-card__img {
	transform: scale(1.03);
}
.hb-news-card__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 22px 24px;
}
.hb-news-card__title {
	margin: 0;
	color: #00011E;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.45;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s;
}
.hb-news-card__link:hover .hb-news-card__title {
	color: #4072A4;
}
.hb-news-empty {
	margin: 0;
	padding: 40px 0;
	color: #6B7280;
	font-size: 17px;
}

/* --- Нумерация страниц --- */
.hb-news-pages {
	margin-top: 48px;
}
.hb-news-pages ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.hb-news-pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 10px;
	border: 1px solid #E5E7EB;
	border-radius: 6px;
	color: #1B3D79;
	font-weight: 600;
	text-decoration: none;
}
.hb-news-pages a.page-numbers:hover,
.hb-news-pages a.page-numbers:focus-visible {
	border-color: #1B3D79;
	background: #F2F1ED;
}
.hb-news-pages .page-numbers.current {
	background: #1B3D79;
	border-color: #1B3D79;
	color: #fff;
}
.hb-news-pages .page-numbers.dots {
	border: 0;
}

/* --- Новость: шапка --- */
.hb-news-hero .elementor-widget-theme-post-title .elementor-heading-title {
	overflow-wrap: anywhere;
}

/* --- Новость: текст --- */
.hb-news-cover img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
	object-fit: cover;
	border-radius: 8px;
}
.hb-news-content {
	color: #374151;
	font-size: 17px;
	line-height: 1.75;
	overflow-wrap: break-word;
}
.hb-news-content > .elementor-widget-container > *:first-child {
	margin-top: 0;
}
.hb-news-content p,
.hb-news-content ul,
.hb-news-content ol,
.hb-news-content table,
.hb-news-content figure {
	margin: 0 0 1.2em;
}
.hb-news-content h2,
.hb-news-content h3 {
	margin: 1.6em 0 .6em;
	color: #00011E;
	line-height: 1.35;
}
.hb-news-content h2 { font-size: 24px; }
.hb-news-content h3 { font-size: 20px; }
.hb-news-content a {
	color: #1B3D79;
	text-decoration: underline;
	text-underline-offset: 2px;
	overflow-wrap: anywhere;
}
.hb-news-content a:hover {
	color: #A87D2F;
}
.hb-news-content ul,
.hb-news-content ol {
	padding-left: 1.4em;
}
.hb-news-content blockquote {
	margin: 0 0 1.2em;
	padding: 4px 0 4px 20px;
	border-left: 3px solid #CB9C45;
	color: #1B3D79;
}
.hb-news-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 15px;
}
.hb-news-content td,
.hb-news-content th {
	padding: 8px 12px;
	border: 1px solid #E5E7EB;
	vertical-align: top;
}
.hb-news-content iframe {
	display: block;
	width: 100%;
	min-height: 480px;
	border: 0;
}
/* Галерея: ровная сетка квадратов, клик — лайтбокс */
.hb-news-content .wp-block-gallery {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px !important;
	margin: 1.6em 0;
}
.hb-news-content .wp-block-gallery .wp-block-image {
	width: auto !important;
	margin: 0 !important;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 6px;
}
.hb-news-content .wp-block-gallery .wp-block-image a,
.hb-news-content .wp-block-gallery .wp-block-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
.hb-news-content .wp-block-gallery .wp-block-image img {
	transition: transform .3s;
}
.hb-news-content .wp-block-gallery .wp-block-image a:hover img {
	transform: scale(1.04);
}
.hb-news-content .wp-block-image:not(.wp-block-gallery .wp-block-image) img {
	border-radius: 8px;
	height: auto;
}

/* --- Поделиться --- */
.hb-news-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding-top: 24px;
	border-top: 1px solid #E5E7EB;
}
.hb-news-share__label {
	margin-right: 6px;
	color: #374151;
	font-weight: 600;
}
.hb-news-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #E5E7EB;
	border-radius: 50%;
	background: #fff;
	color: #1B3D79;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.hb-news-share__btn svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}
.hb-news-share__btn:hover,
.hb-news-share__btn:focus-visible,
.hb-news-share__btn.is-done {
	background: #1B3D79;
	border-color: #1B3D79;
	color: #fff;
}

/* --- Боковая колонка новости --- */
.hb-news-aside__box {
	padding: 24px;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	background: #fff;
}
.hb-news-aside__box + .hb-news-aside__box {
	margin-top: 24px;
}
.hb-news-aside__h {
	margin: 0 0 16px;
	color: #00011E;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
}
.hb-news-aside__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.hb-news-aside__list li + li {
	border-top: 1px solid #E5E7EB;
}
.hb-news-aside__list a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 0;
	color: #00011E;
	text-decoration: none;
}
.hb-news-aside__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s;
}
.hb-news-aside__list a:hover .hb-news-aside__title {
	color: #4072A4;
}
.hb-news-aside__list time {
	color: #6B7280;
	font-size: 13px;
}
.hb-news-aside__all,
.hb-news-more {
	display: inline-block;
	margin-top: 8px;
	color: #1B3D79;
	font-weight: 600;
	text-decoration: none;
}
.hb-news-aside__all:hover,
.hb-news-more:hover {
	color: #A87D2F;
}
.hb-news-aside__box--apply {
	border: 0;
	background: #1B3D79;
	color: rgba(255, 255, 255, .9);
}
.hb-news-aside__box--apply .hb-news-aside__h {
	color: #fff;
}
.hb-news-aside__box--apply p {
	margin: 0 0 18px;
	line-height: 1.6;
}
.hb-news-aside__btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 4px;
	background: #CB9C45;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color .2s;
}
.hb-news-aside__btn:hover,
.hb-news-aside__btn:focus-visible {
	background: #A87D2F;
}

/* --- Другие новости --- */
.hb-news-related__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 28px;
}
.hb-news-related__h {
	margin: 0;
	color: #00011E;
	font-size: 28px;
	line-height: 1.3;
}

/* --- Блок на главной: кнопка «Все новости» --- */
.hb-news-more-wrap {
	margin-top: 40px;
	text-align: center;
}
.hb-news-more-btn {
	display: inline-block;
	padding: 15px 34px;
	border-radius: 4px;
	background: #CB9C45;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color .2s;
}
.hb-news-more-btn:hover,
.hb-news-more-btn:focus-visible {
	background: #A87D2F;
}

/* --- Планшет и телефон --- */
@media (max-width: 1024px) {
	.hb-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.hb-news-grid--home .hb-news-card:nth-child(3) { display: none; }
}
@media (max-width: 767px) {
	.hb-news-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.hb-news-grid--home .hb-news-card:nth-child(3) { display: block; }
	.hb-news-card__title { font-size: 17px; }
	.hb-news-tabs ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
	.hb-news-tabs li { flex: 0 0 auto; }
	.hb-news-content { font-size: 16px; }
	.hb-news-content .wp-block-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-news-content iframe { min-height: 360px; }
	.hb-news-related__h { font-size: 22px; }
	.hb-news-meta--hero { font-size: 14px; }
}
