/*NOTE: This file is intended for programmers. Aspro technical support is not advised to work with him.*/

/* Examples (uncomment to use):*/

/* Expand site width */
/* body .wrapper { max-width: 1400px !important;  } */

/* Set site background image */
/* body {  background: url(image_source) top no-repeat; }

/* Hide compare button */
/* a.compare_item { display: none !important;  }*/

*{}

@media screen and (min-width: 1025px) {
  .section-content-catalog .items-4 .sections-block__item-image-wrapper--PICTURES, .section-content-catalog .items-5 .sections-block__item-image-wrapper--PICTURES {
    --section-image-width: 220px;
    --section-image-height: 220px;
  }

  .section-content-category .items-4 .sections-block__item-image-wrapper--PICTURES, .section-content-category .items-5 .sections-block__item-image-wrapper--PICTURES {
    --section-image-width: 150px;
    --section-image-height: 150px;
    margin-top: -30px;
  }

  .section-content-catalog .sections-block__item-image, .section-content-category .sections-block__item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.nav.nav-tabs .head-block__item:nth-child(2) {display:none;}

.contact-property__value a:hover {
  color: #0277ff;
}

.footer__address .address__text a {
  color: inherit;
}

.form .captcha-row {
  display: none !important;
}

.grecaptcha-badge {
	display: none !important;
}

/* Floating table of contents for blog articles (desktop only). */
@media (min-width: 1200px) {
	.mm-article-toc-floating {
		position: fixed;
		z-index: 30;
		top: 110px;
		right: 20px !important;
		width: 320px;
		max-width: calc(100vw - 40px);
		max-height: calc(100vh - 130px);
		overflow-y: auto;
		box-sizing: border-box;
		border: 1px solid var(--stroke_black, #e5e5e5);
		border-top: 3px solid var(--theme-base-color, #2f6b9c);
		border-radius: var(--border-radius, 8px);
		background: var(--card_bg_black, #fff);
		box-shadow: 0 5px 30px rgba(34, 34, 34, .1);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateX(28px);
		transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
	}

	.mm-article-toc-floating.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateX(0);
		transition-delay: 0s;
	}

	.mm-article-toc-floating__inner {
		padding: 23px 24px 24px;
	}

	.mm-article-toc-floating__inner > :first-child {
		margin-top: 0;
	}

	.mm-article-toc-floating__inner > :last-child {
		margin-bottom: 0;
	}

	.mm-article-toc-floating__inner h2,
	.mm-article-toc-floating__inner h3 {
		position: relative;
		padding: 0 0 15px;
		margin: 0 0 20px;
		border-bottom: 1px solid var(--stroke_black, #ededed);
		color: var(--white_text_black, #222);
		font-size: 24px;
		font-weight: 500;
		line-height: 1.2;
	}

	.mm-article-toc-floating__inner h2::after,
	.mm-article-toc-floating__inner h3::after {
		content: '';
		position: absolute;
		left: 0;
		bottom: -1px;
		width: 44px;
		height: 2px;
		border-radius: 2px;
		background: var(--theme-base-color, #2f6b9c);
	}

	.mm-article-toc-floating__inner > ol {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.mm-article-toc-floating__inner > ol > li {
		margin: 0 0 11px;
		padding: 1px 0;
		line-height: 1.35;
	}

	.mm-article-toc-floating__inner > ol > li::before {
		content: none;
		display: none;
	}

	.mm-article-toc-floating__inner > ol > li:last-child {
		margin-bottom: 0;
	}

	.mm-article-toc-floating__inner a {
		color: var(--fill_dark_lite_hover, #2f6b9c);
		font-size: 15px;
		line-height: 1.4;
		text-decoration: underline dotted !important;
		text-decoration-thickness: 1px;
		text-underline-offset: 3px;
		transition: color .2s ease, opacity .2s ease;
	}

	.mm-article-toc-floating__inner a:hover {
		color: var(--theme-base-color, #2f6b9c);
		text-decoration: underline dotted !important;
	}

	.mm-article-toc-floating::-webkit-scrollbar {
		width: 6px;
	}

	.mm-article-toc-floating::-webkit-scrollbar-thumb {
		border-radius: 6px;
		background: rgba(120, 128, 138, .45);
	}
}

/* Do not reserve or show the floating copy on tablets and phones. */
@media (max-width: 1199px) {
	.mm-article-toc-floating {
		display: none !important;
	}
}

/* FAQ block linked to the current blog article through section UF_BLOG. */
.mm-article-faq {
	margin-top: 50px;
	margin-bottom: 44px;
}

.mm-article-faq__title {
	margin: 0 0 24px;
	color: var(--white_text_black, #222);
	font-size: 28px;
	font-weight: 500;
	line-height: calc(1em + 10px);
}

.mm-article-faq__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mm-article-faq__item {
	margin: 0;
	border: 1px solid var(--stroke_black, #e5e5e5);
	border-radius: var(--border-radius, 8px);
	background: var(--card_bg_black, #fff);
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.mm-article-faq__item.is-open {
	border-color: var(--theme-base-color, #2f6b9c);
	box-shadow: 0 5px 20px rgba(34, 34, 34, .08);
}

.mm-article-faq__question {
	position: relative;
	display: block;
	padding: 20px 64px 20px 24px;
	color: var(--white_text_black, #222);
	cursor: pointer;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	list-style: none;
	transition: background-color .2s ease, color .2s ease;
}

.mm-article-faq__question::-webkit-details-marker {
	display: none;
}

.mm-article-faq__question::marker {
	display: none;
	content: '';
}

.mm-article-faq__question::before {
	content: '';
	position: absolute;
	top: 50%;
	right: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--stroke_black, #dfe3e8);
	border-radius: 50%;
	background: var(--card_bg_black, #fff);
	transform: translateY(-50%);
	transition: background-color .25s ease, border-color .25s ease, transform .35s ease;
}

.mm-article-faq__question::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 32px;
	width: 12px;
	height: 12px;
	color: var(--theme-base-color, #2f6b9c);
	background:
		linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
		linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
	transform: translateY(-50%);
	transition: color .25s ease, transform .35s ease;
}

.mm-article-faq__item.is-open .mm-article-faq__question::before {
	background: var(--theme-base-color, #2f6b9c);
	border-color: var(--theme-base-color, #2f6b9c);
	transform: translateY(-50%) rotate(180deg);
}

.mm-article-faq__item.is-open .mm-article-faq__question::after {
	color: #fff;
	background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat;
	transform: translateY(-50%) rotate(180deg);
}

.mm-article-faq__question:hover {
	background: var(--darkerblack_bg_black, #f8f8f8);
}

.mm-article-faq__item.is-open .mm-article-faq__question {
	color: var(--theme-base-color, #2f6b9c);
}

.mm-article-faq__answer {
	display: block;
	box-sizing: border-box;
	height: 0;
	padding: 0 24px;
	border-top: 1px solid transparent;
	color: var(--basic_text_black, #555);
	font-size: 16px;
	line-height: 1.6;
	overflow: hidden;
	opacity: 0;
	transition:
		height .42s cubic-bezier(.22, .61, .36, 1),
		border-color .3s ease,
		opacity .25s ease;
}

.mm-article-faq__item.is-open .mm-article-faq__answer {
	border-top-color: var(--stroke_black, #e5e5e5);
	opacity: 1;
}

.mm-article-faq__answer > div {
	min-height: 0;
	padding: 18px 0 22px;
	overflow: hidden;
	opacity: 0;
	transform: translateY(-8px);
	transition: transform .4s cubic-bezier(.22, .61, .36, 1), opacity .25s ease;
}

.mm-article-faq__item.is-open .mm-article-faq__answer > div {
	opacity: 1;
	transform: translateY(0);
}

.mm-article-faq__answer > div > :first-child {
	margin-top: 0;
}

.mm-article-faq__answer > div > :last-child {
	margin-bottom: 0;
}

/* Align only the blog reading column with the desktop/tablet header zone. */
@media (min-width: 601px) {
	#main .blog-page .detail.blog .content.mm-blog-content-aligned,
	#main .right_block .detail.blog .content.mm-blog-content-aligned,
	#main .blog-page .mm-article-faq.mm-blog-content-aligned,
	#main .right_block .mm-article-faq.mm-blog-content-aligned {
		box-sizing: border-box;
		width: var(--mm-blog-content-width, 100%) !important;
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		position: relative;
		left: var(--mm-blog-content-offset, 0px);
	}
}

@media (max-width: 600px) {
	.mm-article-faq {
		margin-top: 36px;
		margin-bottom: 30px;
	}

	.mm-article-faq__title {
		margin-bottom: 18px;
		font-size: 24px;
	}

	.mm-article-faq__question {
		padding: 17px 56px 17px 18px;
		font-size: 16px;
	}

	.mm-article-faq__question::after {
		right: 26px;
	}

	.mm-article-faq__answer {
		padding-right: 18px;
		padding-left: 18px;
		font-size: 15px;
	}

	.mm-article-faq__answer > div {
		padding-top: 16px;
		padding-bottom: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mm-article-faq__item,
	.mm-article-faq__question::before,
	.mm-article-faq__question::after,
	.mm-article-faq__answer,
	.mm-article-faq__answer > div {
		transition-duration: .01ms !important;
	}
}

/* Blog card view counter. The icon follows the current text color of the theme. */
.blog-list__item-views {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--fill_dark_lite, #999);
	line-height: 18px;
}

.blog-list__item-views-icon {
	display: block;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

/* Blog detail meta shown below the article title. */
.topic__heading .mm-blog-detail-meta {
	flex: 0 0 100%;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 7px;
	color: var(--fill_dark_lite, #999);
	font-size: 14px;
	line-height: 18px;
}

.mm-blog-detail-meta__separator {
	margin: 0 10px;
}

.mm-blog-detail-meta__views {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.mm-blog-detail-meta__views-icon {
	display: block;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

@media (max-width: 600px) {
	.topic__heading .mm-blog-detail-meta {
		margin-top: 5px;
	}
}

/*
 * Blog list and blog sections: side column on the right.
 * div.right_block gets .mm-blog-with-sidebar from components/bitrix/news/blog/sidebar_layout.php,
 * .left_block is its next sibling (footer.php). content-md is a row-reverse flexbox
 * for "side_left" themes and a row flexbox for "side_right", so the order is set for both.
 */
@media (min-width: 992px) {
	.container > .row > .maxwidth-theme > .content-md > .right_block.mm-blog-with-sidebar {
		order: 1;
	}

	.side_right .container > .row > .maxwidth-theme > .content-md > .right_block.mm-blog-with-sidebar {
		order: 0;
	}

	.container > .row > .maxwidth-theme > .content-md > .right_block.mm-blog-with-sidebar ~ .left_block {
		padding-left: var(--padding);
		padding-right: 0;
	}
}

/* Tablets and phones: the theme hides the side column, the blog filters go below the list. */
@media (max-width: 991px) {
	.container > .row > .maxwidth-theme > .content-md > .right_block.mm-blog-with-sidebar ~ .left_block {
		display: block;
		width: 100%;
		padding: 40px 0 0;
	}

	.container > .row > .maxwidth-theme > .content-md > .right_block.mm-blog-with-sidebar ~ .left_block > div {
		display: block !important;
	}

	.right_block.mm-blog-with-sidebar ~ .left_block .sidearea > :not(.mm-blog-sidebar-filters) {
		display: none;
	}
}

.mm-blog-sidebar-filters {
	margin-bottom: 32px;
}

.mm-blog-sidebar-block + .mm-blog-sidebar-block {
	margin-top: 32px;
}

.mm-blog-sidebar-block__title {
	margin-bottom: 14px;
	line-height: 1.4;
}

.mm-blog-sidebar-sections {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mm-blog-sidebar-section {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 12px;
	border-radius: var(--border-radius, 8px);
	color: var(--white_text_black, #333);
	font-size: 15px;
	line-height: 22px;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.mm-blog-sidebar-section:hover {
	background: var(--darkerblack_bg_black, #f5f5f5);
	color: var(--theme-base-color, #222);
}

.mm-blog-sidebar-section--level-2 { padding-left: 26px; }
.mm-blog-sidebar-section--level-3 { padding-left: 40px; }
.mm-blog-sidebar-section--level-4 { padding-left: 54px; }

.mm-blog-sidebar-section.mm-blog-filter-is-active {
	background: var(--darkerblack_bg_black, #f5f5f5);
	color: var(--theme-base-color, #222);
	font-weight: 500;
}

.mm-blog-sidebar-section__name {
	min-width: 0;
}

.mm-blog-sidebar-section__count {
	flex-shrink: 0;
	color: var(--fill_dark_lite, #999);
	font-size: 14px;
	font-weight: 400;
}

.mm-blog-filter-tag {
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.mm-blog-filter-tag.mm-blog-filter-is-active,
.mm-blog-filter-tag.mm-blog-filter-is-active:hover {
	border-color: var(--theme-base-color, #222);
	background-color: var(--theme-base-color, #222);
	color: #fff;
}

.mm-blog-filter-tag.mm-blog-filter-is-active .chip__label {
	color: #fff;
}

/* AJAX switching of the article list: fade out, replace, fade in. */
.mm-blog-results {
	transition: opacity .25s ease, transform .25s ease;
}

.mm-blog-results.mm-blog-results--leaving {
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
}

.mm-blog-results.mm-blog-results--entering {
	opacity: 0;
	transform: translateY(-8px);
	transition: none;
}

.mm-blog-results.mm-blog-results--loading {
	min-height: 200px;
}

@media (prefers-reduced-motion: reduce) {
	.mm-blog-results,
	.mm-blog-sidebar-section,
	.mm-blog-filter-tag {
		transition-duration: .01ms !important;
	}

	.mm-blog-results.mm-blog-results--leaving,
	.mm-blog-results.mm-blog-results--entering {
		transform: none;
	}
}

/*
 * Blog cards (news.list/blog-list): category / date / views in one row,
 * pinned to the bottom of the card so all cards of a grid row line up.
 * Chain: .blog-list__item > .blog-list__item-text-wrapper > .blog-list__item-text-top-part
 * are already flex columns that stretch to the card height (height-100, flex-grow-1).
 */
.blog-list__item-text-bottom-part {
	flex-wrap: nowrap;
	align-items: center;
	min-width: 0;
	margin-top: auto;
	/* keeps the former 9px gap under the title */
	padding-top: 9px;
}

/* Only the category shrinks, with an ellipsis. */
.blog-list__item-text-bottom-part .blog-list__item-section {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.blog-list__item-text-bottom-part .blog-list__item-text-bottom-part__separator,
.blog-list__item-text-bottom-part .blog-list__item-period,
.blog-list__item-text-bottom-part .blog-list__item-views {
	flex: 0 0 auto;
	white-space: nowrap;
}

/*
 * Blog article, phones only: main image at the start of the article.
 * The image comes from the article HTML (.detail.blog .content) as the first
 * block: <img>, <p><img></p> or <p><strong><img></strong></p>, with width/height
 * attributes (e.g. 1170x659). max-width:100% narrowed it to the screen while the
 * height attribute kept 659px, so the photo was squeezed and filled the screen.
 * Articles without it show the preview picture in .detail-image.
 * Width follows the column, height follows the photo's own proportions.
 * Desktop and tablets are not affected.
 */
@media (max-width: 767px) {
	.detail.blog .detail-image img,
	.detail.blog .content > img:first-child,
	.detail.blog .content > :first-child > img:first-child,
	.detail.blog .content > :first-child > :first-child > img:first-child {
		display: block;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		/* natural proportions: covers often carry text, they are not cropped */
		height: auto;
		/* only tall (portrait) photos are limited and cropped around the centre */
		max-height: min(100vw, 60vh);
		object-fit: cover;
		object-position: center center;
		margin: 0 0 24px;
		border-radius: var(--border-radius, 8px);
	}

	/* Inside <p> the paragraph gives the 24px gap; .detail-image has its own gap. */
	.detail.blog .detail-image img,
	.detail.blog .content > :first-child > img:first-child,
	.detail.blog .content > :first-child > :first-child > img:first-child {
		margin-bottom: 0;
	}

	/* The <br> after the image would add an empty text line under it. */
	.detail.blog .content > :first-child > img:first-child + br,
	.detail.blog .content > :first-child > :first-child > img:first-child + br {
		display: none;
	}
}

/*
 * FAQ (components/bitrix/news/blog/faq_from_blog.php), phones only.
 * <summary class="mm-article-faq__question"> becomes a flex row: question text on
 * the left, a round 40px button on the right. The button is ::before as a normal
 * flex item; the plus is drawn inside it with two centred gradients, so it cannot
 * drift out of the circle (before: circle and sign were positioned separately and
 * the sign sat 6px off). Open state: the same plus turned 45deg = "×".
 * Desktop keeps the rules above.
 */
@media (max-width: 767px) {
	.mm-article-faq .mm-article-faq__question {
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 16px 16px 16px 18px;
	}

	.mm-article-faq .mm-article-faq__question::before {
		order: 2;
		position: static;
		top: auto;
		right: auto;
		flex: 0 0 40px;
		box-sizing: border-box;
		width: 40px;
		height: 40px;
		min-width: 40px;
		aspect-ratio: 1 / 1;
		margin-left: auto;
		border: 1px solid var(--stroke_black, #dfe3e8);
		border-radius: 50%;
		color: var(--theme-base-color, #2f6b9c);
		background:
			linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
			linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
			var(--card_bg_black, #fff);
		transform: none;
		transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .35s ease;
	}

	/* The sign is part of ::before now. */
	.mm-article-faq .mm-article-faq__question::after {
		content: none;
		display: none;
	}

	.mm-article-faq .mm-article-faq__item.is-open .mm-article-faq__question::before {
		border-color: var(--theme-base-color, #2f6b9c);
		color: #fff;
		background:
			linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
			linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat,
			var(--theme-base-color, #2f6b9c);
		transform: rotate(45deg);
	}
}
