/**
 * Секции главной с genpower.com/en (factory, numbers, solutions).
 */

/* --- Общее --- */
body.gp-front-page .gp-front-main {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.gp-front-page .gp-front-main > .entry-content,
body.gp-front-page .gp-front-main .wp-block-post-content {
	margin-block: 0;
}

.gp-section-title {
	margin: 0 0 clamp(2rem, 5vw, 3.5rem);
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	font-weight: 700;
	line-height: 1.15;
	color: #0b1a48;
	text-align: center;
}

.gp-section-title span {
	color: #ffb800;
}

/* Кнопка с «уголками» (как на genpower.com) */
.gp-btn-corner {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	min-height: 48px;
	padding: 0.65rem 1.5rem;
	border: 2px solid #ffb800;
	background: transparent;
	color: #ffb800 !important;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	transition: color 0.2s ease, background 0.2s ease;
}

.gp-btn-corner:hover,
.gp-btn-corner:focus-visible {
	background: #ffb800;
	color: #0b1a48 !important;
}

.gp-btn-corner.wp-block-button .wp-block-button__link::before,
.gp-btn-corner.wp-block-button .wp-block-button__link::after,
a.gp-btn-corner::before,
a.gp-btn-corner::after {
	content: "";
	position: absolute;
	width: 12px;
	height: 12px;
	border: 2px solid #ffb800;
	pointer-events: none;
}

.gp-btn-corner.wp-block-button .wp-block-button__link::before,
a.gp-btn-corner::before {
	top: -4px;
	right: -4px;
	border-left: none;
	border-bottom: none;
}

.gp-btn-corner.wp-block-button .wp-block-button__link::after,
a.gp-btn-corner::after {
	bottom: -4px;
	left: -4px;
	border-right: none;
	border-top: none;
}

.gp-solutions__more-wrap.wp-block-buttons {
	margin: 0;
}

/* --- mainpageucgenbg — factory + numbers + solutions (светлая тема) --- */
.gp-mainpageucgenbg {
	position: relative;
	margin: 0 !important;
	padding: clamp(1.25rem, 2.5vw, 2rem) 0 clamp(2.5rem, 5vw, 5%);
	background: #fff;
	border-top: 1px solid #e8e8e8;
	border-radius: 0;
	overflow: hidden;
	box-sizing: border-box;
}

/* Фоновое фото донора — только для тёмной версии; на светлой не показываем */
.gp-debjfimage {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 0;
	pointer-events: none;
}

.gp-debjfimage img {
	width: 100%;
	height: auto;
	display: block;
}

.gp-debjfimagefilm {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #2f3032a8;
}

.gp-mainpage-container {
	position: relative;
	z-index: 1;
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 5.4%;
	box-sizing: border-box;
}

/* Factory — широкая колонка под длинный RU-заголовок */
.gp-dunyaninenbuyukjenfab {
	width: 100%;
	max-width: min(56rem, 94vw);
	margin-inline: clamp(0.75rem, 5vw, 6%) auto;
	padding-left: 0;
	padding-top: clamp(0.75rem, 1.5vw, 1.25rem);
	box-sizing: border-box;
}

/* Снять лимит contentSize (645px) у блоков внутри группы factory */
.gp-dunyaninenbuyukjenfab.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: none;
}

.gp-dunyaninenbuyukjenfab .gp-factory-title,
.gp-dunyaninenbuyukjenfab .gp-factory-lead {
	max-width: none;
	width: 100%;
}

.gp-factory-title {
	margin: 0 0 1rem;
	font-weight: 300;
	font-size: clamp(1.65rem, 1.1vw + 1.1rem, 2.65rem);
	line-height: 1.2;
	color: #0b1a48;
}

.gp-factory-title span {
	display: inline;
	font-weight: 700;
	color: #be0000;
	white-space: nowrap;
}

/* Англ. вариант донора: акцент на отдельной строке — добавьте класс на h2 */
.gp-factory-title.gp-factory-title--stacked span {
	display: block;
	white-space: normal;
}

.gp-factory-lead {
	margin: 0 0 1rem;
	font-weight: 300;
	font-size: clamp(1rem, 2vw, 1.125rem);
	line-height: 1.55;
	color: #686868;
}

.gp-dunyaninenbuyukjenfab-btn {
	margin-top: 5%;
}

/* Старый блок mainpagearamabox в редакторе → красная кнопка с текстом из aria-label */
.gp-solutions__intro-more .gp-mainpagearamabox {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0.65rem 1.5rem;
	border: 0;
	border-radius: 0;
	background: #be0000;
	color: #fff;
	font-size: 18px;
	line-height: 1.5;
	font-weight: 400;
	text-decoration: none;
	transition: background 1s ease;
}

.gp-solutions__intro-more .gp-mainpagearamabox:hover,
.gp-solutions__intro-more .gp-mainpagearamabox:focus-visible {
	background: #880505;
	color: #fff;
}

.gp-solutions__intro-more .gp-mainpagearamabox img {
	display: none;
}

.gp-solutions__intro-more .gp-mainpagearamabox::after {
	content: attr(aria-label);
	color: #fff;
}

/* --- Numbers: спокойные блоки Gutenberg (без таймлайна) --- */
.gp-numbers-section {
	position: relative;
	width: 100%;
	max-width: none;
	padding-top: clamp(2rem, 5vw, 3.5rem);
	padding-bottom: clamp(2rem, 6vw, 12%);
}

.gp-numbers-section.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: none;
}

.gp-numbers-section__title {
	margin: 0 0 clamp(2rem, 5vw, 3.5rem);
	font-weight: 400;
	font-size: clamp(1.5rem, 3vw, 2rem);
	color: #0b1a48;
}

.gp-numbers-section__title span {
	display: block;
	font-weight: 700;
}

.gp-num-row {
	width: 100%;
	max-width: none;
	margin: 0 0 clamp(1.75rem, 4vw, 3rem);
}

.gp-num-row.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: none;
}

.gp-num-row:last-child {
	margin-bottom: 0;
}

.gp-num-row__cols {
	gap: clamp(1rem, 3vw, 2rem);
}

/* Шире текстовая колонка (перебивает 42/58 в разметке блоков) */
.gp-num-row__col-icon {
	flex-basis: 34% !important;
	width: 34% !important;
}

.gp-num-row__col-text {
	flex-basis: 66% !important;
	width: 66% !important;
}

.gp-num-row__icon {
	margin: 0;
}

.gp-num-row__icon img {
	display: block;
	width: 100%;
	max-width: min(300px, 100%);
	height: auto;
	max-height: clamp(140px, 22vw, 250px);
	margin-inline: auto;
	object-fit: contain;
}

.gp-num-row__value {
	margin: 0 0 0.5rem;
	font-weight: 400;
	font-size: clamp(2rem, 5vw, 65px);
	line-height: 1.1;
	color: #be0000;
}

.gp-num-row__value sup {
	font-size: 0.35em;
	vertical-align: super;
}

.gp-num-row__text {
	margin: 0;
	max-width: none;
	width: 100%;
	font-weight: 400;
	font-size: clamp(15px, 0.35vw + 14px, 18px);
	line-height: 1.55;
	color: #686868;
}

/* Factory / оболочка */
@media (max-width: 960px) {
	.gp-dunyaninenbuyukjenfab {
		max-width: none;
		margin-inline: 0;
		padding-top: 1rem;
	}

	.gp-numbers-section {
		padding-top: clamp(1.75rem, 4vw, 2.5rem);
	}
}

/* Узкий экран: колонки WP складываются — иконка сверху, текст снизу */
@media (max-width: 781px) {
	.gp-num-row__col-icon,
	.gp-num-row__col-text {
		flex-basis: 100% !important;
		width: 100% !important;
	}
}

/* --- Solutions --- */
.gp-solutions {
	padding: 0 5.4% clamp(4rem, 10vw, 6rem);
	background: transparent;
	color: #231f20;
}

.gp-solutions__inner {
	max-width: 1340px;
	margin: 0 auto;
}

.gp-solutions__title {
	margin: 0 0 1rem;
	font-weight: 700;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.15;
	text-align: left;
	color: #0b1a48;
}

.gp-solutions__intro-more,
.gp-mainpagearamabox-wrap.gp-solutions__intro-more {
	margin: 0 0 1.5rem;
}

.gp-solutions__intro-more .wp-block-button {
	margin: 0;
}
/* Кнопки More у вкладок решений — общий стиль gp-btn-corner */
.gp-solutions .gp-btn-corner .wp-block-button__link {
	position: relative;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 700;
	font-size: 0.95rem;
	min-width: 140px;
	min-height: 48px;
}

.gp-solutions__stage {
	display: grid;
	grid-template-columns: minmax(12rem, 36%) minmax(0, 1fr);
	gap: clamp(1.25rem, 4vw, 3rem);
	align-items: center;
}

.gp-solutions__copy {
	position: relative;
	min-height: 10rem;
	text-align: left;
}

.gp-solutions__panel {
	display: none;
	animation: gp-sol-fade 0.35s ease;
}

.gp-solutions__panel.is-active {
	display: block;
}

.gp-solutions__panel-title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.35rem, 2.5vw, 2.5rem);
	font-weight: 300;
	line-height: 0.965;
	color: #5a8f00;
}

.gp-solutions__visual {
	position: relative;
}

.gp-solutions__images {
	position: relative;
	min-height: min(380px, 48vh);
	overflow: visible;
	background: transparent;
}

/* Карта решений (sol-*.webp) — фон под пинами */
.gp-solutions__figure {
	position: absolute;
	inset: 0;
	z-index: 1;
	margin: 0;
	width: 100%;
	height: 100%;
}

.gp-solutions__figure img,
.gp-solutions__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: min(380px, 48vh);
	object-fit: contain;
	object-position: center;
}

.gp-solutions__pins {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}

.gp-solutions__pin {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: translate(-50%, -50%);
	pointer-events: auto;
	border: none;
	padding: 0;
	background: transparent;
	cursor: pointer;
	line-height: normal;
}

.gp-solutions__pin-marker {
	display: block;
	width: 32px;
	height: auto;
	flex-shrink: 0;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
	transition: transform 0.2s ease;
}

.gp-solutions__pin:hover .gp-solutions__pin-marker,
.gp-solutions__pin.is-active .gp-solutions__pin-marker {
	transform: scale(1.1);
}

/* Всплывашка над пином (донор: .tooltip-enerji) */
.gp-solutions__pin-flag {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	z-index: 5;
}

.gp-solutions__pin-flag-box {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	min-width: min(280px, 70vw);
	max-width: min(320px, 85vw);
	padding: 1rem 1.35rem;
	background: #fff;
	border: 1px solid #abd33d;
	border-radius: 4px;
	box-shadow: 0 4px 18px rgba(11, 26, 72, 0.12);
	box-sizing: border-box;
	text-align: left;
}

.gp-solutions__pin-flag-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	background: url("../img/home/salyangozbuton.png") center / contain no-repeat;
}

.gp-solutions__pin-flag-text {
	display: block;
	color: #0b1a48;
	font-weight: 700;
	font-size: 0.9rem;
	line-height: 1.3;
}

/* Вертикальная «ножка» — по центру, стыкуется с маркером */
.gp-solutions__pin-flag-stem {
	display: block;
	width: 2px;
	height: 1.35rem;
	margin: 0;
	background: #abd33d;
	flex-shrink: 0;
}

.gp-solutions__pin:hover .gp-solutions__pin-flag,
.gp-solutions__pin.is-active .gp-solutions__pin-flag,
.gp-solutions__pin:focus-visible .gp-solutions__pin-flag {
	opacity: 1;
	visibility: visible;
}

.gp-solutions__pin.is-active {
	z-index: 6;
}

@media (max-width: 960px) {
	.gp-solutions__stage {
		grid-template-columns: 1fr;
	}

	.gp-solutions__copy {
		order: 1;
		min-height: 8rem;
	}

	.gp-solutions__visual {
		order: 2;
	}
}

@keyframes gp-sol-fade {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gp-solutions__figure,
	.gp-solutions__panel {
		animation: none;
		transition: none;
	}
}
