/* Блоки «Специалисты», «Сертификаты», «Статьи», «Вопрос-ответ» и SEO-текст.
   Разметка: templates/views/views-view*{specialists,certificates,stati,faq}--block-1 */

/* ---------- Общая шапка блока со ссылкой ---------- */
.articles__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 26px;
}

.articles__head h2 {
	margin: 0;
}

.articles__all {
	flex: none;
	font-size: 16px;
	font-weight: 600;
	color: #a25c05;
	text-decoration: none;
	border-bottom: 1px solid rgba(162, 92, 5, 0.4);
	transition: color 0.2s, border-color 0.2s;
}

.articles__all:hover {
	color: #f79521;
	border-bottom-color: #f79521;
}

/* ---------- Специалисты: карусель портретов ---------- */
/* Подписи не выводим — блок показывает только лица, как в образце. */
.team-swiper,
.certs-swiper {
	padding-bottom: 42px;
}

.team__item {
	height: auto;
	overflow: hidden;
	border-radius: 12px;
	background: #f2ede5;
}

.team__item img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: top center;
}

/* ---------- Сертификаты: карусель сканов ---------- */
/* Без рамки и подложки: документ показываем как есть, а не в карточке */
.certs__item {
	height: auto;
}

/* Документ показываем целиком: по краям печати и реквизиты */
/* Листы разной пропорции: задаём высоту, ширину считает браузер — тогда все
   документы в ряду одного роста, а не вписаны каждый в свой прямоугольник. */
.certs__item img {
	display: block;
	height: 320px;
	width: auto;
	max-width: 100%;
	margin: 0 auto;
}

/* Точки листания в фирменном цвете */
.team-swiper .swiper-pagination-bullet,
.certs-swiper .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #c9c1b6;
	opacity: 1;
}

.team-swiper .swiper-pagination-bullet-active,
.certs-swiper .swiper-pagination-bullet-active {
	background: #f79521;
}

/* ---------- Статьи ---------- */
.articles__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.article-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #e6e0d7;
	border-radius: 12px;
	background: #ffffff;
	color: #11202c;
	text-decoration: none;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
	border-color: #f79521;
	box-shadow: 0 14px 34px -22px rgba(17, 32, 44, 0.5);
	transform: translateY(-2px);
}

.article-card__img {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f2ede5;
}

.article-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.article-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 18px 20px 20px;
}

.article-card__title {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
}

.article-card__text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #5a5a5a;
	/* ровно три строки: карточки в ряду остаются одной высоты */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.article-card__more {
	margin-top: auto;
	font-size: 14px;
	font-weight: 600;
	color: #a25c05;
}

.article-card:hover .article-card__more {
	color: #f79521;
}

/* ---------- Вопрос-ответ ---------- */
.faq__list {
	display: flex;
	flex-direction: column;
	gap: 3px;
	max-width: 900px;
}

.faq__item {
	border: 1px solid #e6e0d7;
	border-radius: 10px;
	background: #ffffff;
	overflow: hidden;
}

.faq__item[open] {
	border-color: #f79521;
}

.faq__question {
	position: relative;
	padding: 11px 56px 11px 22px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: #11202c;
	cursor: pointer;
	list-style: none;
	transition: color 0.2s;
}

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

.faq__question:hover {
	color: #a25c05;
}

/* Плюс превращается в минус поворотом одной из палочек */
.faq__question::before,
.faq__question::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 24px;
	width: 15px;
	height: 2px;
	border-radius: 1px;
	background: #f79521;
	transition: transform 0.25s ease;
}

.faq__question::after {
	transform: rotate(90deg);
}

.faq__item[open] .faq__question::after {
	transform: rotate(0deg);
}

.faq__answer {
	padding: 0 22px 14px;
	font-size: 16px;
	line-height: 1.6;
	color: #5a5a5a;
}

.faq__answer p {
	margin: 0;
}

/* ---------- SEO-текст ---------- */
.seo-text {
	padding: 34px 0 6px;
	border-top: 1px solid #e6e0d7;
}

.seo-text__inner {
	max-width: 76ch;
	font-size: 15px;
	line-height: 1.7;
	color: #7a7a7a;
}

.seo-text__inner h2,
.seo-text__inner h3 {
	font-size: 19px;
	color: #5a5a5a;
}

.seo-text__inner p {
	margin: 0 0 12px;
}

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

@media (max-width: 700px) {
	.articles__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.faq__question {
		padding: 10px 48px 10px 16px;
		font-size: 15.5px;
	}

	.faq__answer {
		padding: 0 16px 12px;
		font-size: 15px;
	}
}

/* Браузер прячет содержимое закрытого <details> сам, но правило темы
   перебивает это и ответ виден всегда. Скрываем явно. */
.faq__item:not([open]) .faq__answer {
	display: none;
}

/* ---------- Эксперт в блоке вопросов ---------- */
.faq-expert {
	margin-bottom: 26px;
}

.faq-expert__label {
	margin-bottom: 14px;
	font-size: 15px;
	color: #7a7a7a;
}

.faq-expert__card {
	display: flex;
	/* фото по верху: имя и должность читаются с первой строки, а не от центра */
	align-items: flex-start;
	gap: 18px;
}

.faq-expert__photo {
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
	overflow: hidden;
	border-radius: 50%;
	background: #f2ede5;
}

.faq-expert__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.faq-expert__name {
	margin-bottom: 4px;
	font-size: 19px;
	font-weight: 700;
	color: #11202c;
}

.faq-expert__line {
	font-size: 15px;
	line-height: 1.5;
	color: #5a5a5a;
}

/* Развёрнутый ответ: абзацы, а не одна строка */
.faq__answer p + p {
	margin-top: 10px;
}

@media (max-width: 700px) {
	.faq-expert__card {
		gap: 14px;
	}

	.faq-expert__photo {
		flex-basis: 64px;
		width: 64px;
		height: 64px;
	}

	.faq-expert__name {
		font-size: 17px;
	}

	.faq-expert__line {
		font-size: 14px;
	}
}

/* Портреты сотрудников сняты горизонтально, за рабочим столом. В квадратном
   аватаре лицо занимает малую часть кадра, поэтому приближаем к нему:
   масштаб с точкой отсчёта там, где обычно оказывается голова. */
.faq-expert__photo img {
	transform: scale(1.7);
	transform-origin: 57% 22%;
}

.seo-text__title {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 700;
	color: #11202c;
}


/* ---------- Наше производство: слайдер по три снимка ---------- */
.prod-swiper {
	padding-bottom: 42px;
}

.prod__item {
	position: relative;
	height: auto;
	margin: 0;
	overflow: hidden;
	border-radius: 12px;
	background: #f2ede5;
}

.prod__item img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* подпись поверх нижнего края: снимки цеха часто тёмные снизу */
.prod__item figcaption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 28px 18px 14px;
	background: linear-gradient(180deg, rgba(17, 32, 44, 0) 0%, rgba(17, 32, 44, 0.8) 100%);
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
}

.prod-swiper .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #c9c1b6;
	opacity: 1;
}

.prod-swiper .swiper-pagination-bullet-active {
	background: #f79521;
}

/* У details в теме свои margin по 1em сверху и снизу — они складывались
   с gap списка, и вопросы стояли слишком разреженно. Сжимаем до трети. */
.faq__item {
	margin-top: 0.33em;
	margin-bottom: 0.33em;
}

/* SEO-блок главной приходит из block_content голыми полями — оформляем
   его по именам полей внутри общей секции .seo-text. */
.seo-text .field--name-field-seo-title {
	margin-bottom: 14px;
	font-size: 22px;
	font-weight: 700;
	color: #11202c;
}

.seo-text .field--name-body {
	max-width: 76ch;
	font-size: 15px;
	line-height: 1.7;
	color: #7a7a7a;
}

.seo-text .field--name-body p {
	margin: 0 0 12px;
}

/* пустой блок не рисует полосу сверху */
.seo-text:not(:has(p)) {
	display: none;
}

/* Подзаголовки и списки внутри SEO-текста */
.seo-text__inner h3,
.seo-text .field--name-body h3 {
	margin: 22px 0 10px;
	font-size: 18px;
	font-weight: 700;
	color: #a25c05;
}

.seo-text__inner ul,
.seo-text .field--name-body ul {
	margin: 0 0 12px;
	padding-left: 20px;
	list-style: disc outside;
}

.seo-text__inner li,
.seo-text .field--name-body li {
	margin-bottom: 4px;
	list-style: inherit;
}
