/* Страницы услуг (этап 2, шаг 4; docs/stage2-plan.md): разделы Китай, Индивидуальное производство,
   Полиграфия и их подразделы. Подключается поверх gp.css и gp-article.css на страницах product/gp_service.
   Макеты: design/figma/png/pages/china-*, individ-*, poligrafiya-*, service-sub-*.
   Раскладка как у gp.css: десктоп от 1024, планшет 600-1023, телефон до 600. */

.gp-svc {
	--gp-svc-radius: 20px;
}

/* Пункты с бирюзовым шевроном: баннер и списки в тексте рядом с фото */
.gp-svc-chevrons li,
.gp-svc-body ul > li {
	position: relative;
	padding-left: 26px;
	list-style: none;
}

.gp-svc-chevrons li::before,
.gp-svc-body ul > li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 3px;
	width: 14px;
	height: 14px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M5 2.5 9.5 7 5 11.5' fill='none' stroke='%2314a7a1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gp-svc-chevrons li + li {
	margin-top: 12px;
}

.gp-svc-body ul {
	padding-left: 0;
}

.gp-svc-body ul > li + li {
	margin-top: 12px;
}

/* ---------- Баннер раздела: бежевая карточка и фото ---------- */

.gp-svc-banner {
	display: grid;
	gap: 16px;
	margin-top: 20px;
}

.gp-svc-banner--image {
	grid-template-columns: 748fr 530fr;
}

.gp-svc-banner__card {
	display: flex;
	flex-direction: column;
	min-height: 414px;
	padding: 40px;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-bg);
}

/* Без фото карточка во всю ширину и по высоте содержимого */
.gp-svc-banner:not(.gp-svc-banner--image) .gp-svc-banner__card {
	min-height: 0;
}

.gp-svc-banner__title {
	max-width: 648px;
	margin: 0;
	font-size: var(--gp-h1);
	font-weight: 700;
	line-height: 1.275;
}

.gp-svc-banner .gp-svc-chevrons {
	margin-top: 16px;
}

.gp-svc-banner__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: auto;
	padding-top: 30px;
}

.gp-svc-banner__image {
	width: 100%;
	height: 100%;
	min-height: 0;
	border-radius: var(--gp-svc-radius);
	object-fit: cover;
	background: var(--gp-placeholder);
}

/* ---------- Начало подраздела: фото, заголовок, описание ---------- */

.gp-svc-intro {
	margin-top: 20px;
}

.gp-svc-intro--image {
	display: grid;
	grid-template-columns: 530fr 731fr;
	gap: 32px;
	align-items: start;
}

.gp-svc-intro__image {
	width: 100%;
	height: auto;
	aspect-ratio: 530 / 414;
	border-radius: var(--gp-svc-radius);
	object-fit: cover;
	background: var(--gp-placeholder);
}

.gp-svc-intro__text .gp-h1 {
	font-size: var(--gp-h1);
}

.gp-svc-intro__text .gp-btn {
	margin-top: 30px;
}

/* Подразделы пилюлями */
.gp-svc-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.gp-svc-pills a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 10px 20px;
	border-radius: 20px;
	line-height: 20px;
	background: var(--gp-bg);
}

.gp-svc-pills a:hover {
	color: var(--gp-white);
	background: var(--gp-accent);
}

/* ---------- Цифры: столько колонок, сколько чисел ---------- */

.gp-svc-stats {
	grid-template-columns: repeat(var(--gp-stats, 3), minmax(0, 1fr));
	margin-inline: auto;
}

/* ---------- Кому выгодно: карточки со списками ---------- */

.gp-svc-audience__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
}

.gp-svc-audience__card {
	padding: 30px;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-bg);
}

.gp-svc-audience__card:nth-child(even) {
	background: var(--gp-bg-2);
}

.gp-svc-audience__card h3 {
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
}

.gp-svc-audience__card .gp-dots li::before {
	top: 4px;
	width: 12px;
	height: 12px;
}

/* ---------- Текстовые блоки ---------- */

.gp-svc-text--beige {
	padding: 60px 40px 40px;
	border-radius: 30px;
	background: var(--gp-bg);
}

.gp-svc-text > * + * {
	margin-top: 30px;
}

.gp-svc-text > .gp-h2 + * {
	margin-top: 0;
}

.gp-svc-cols--2 {
	columns: 2;
	column-gap: 40px;
}

.gp-svc-cols--2 > * {
	break-inside: avoid;
}

.gp-svc-cols--2 :where(h2, h3) {
	column-span: all;
}

.gp-svc-cols ul {
	padding-left: 0;
	list-style: none;
}

.gp-svc-cols ul > li {
	position: relative;
	padding-left: 24px;
}

.gp-svc-cols ul > li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--gp-teal);
}

.gp-svc-cols ul > li + li {
	margin-top: 12px;
}

.gp-svc-cols h2 {
	margin-top: 40px;
}

/* Фото рядом с подзаголовком и текстом */
.gp-svc-media--left,
.gp-svc-media--right {
	display: grid;
	grid-template-columns: 530fr 748fr;
	gap: 16px;
	align-items: start;
}

.gp-svc-media--right {
	grid-template-columns: 748fr 530fr;
}

.gp-svc-media--right .gp-svc-media__image {
	order: 2;
}

.gp-svc-media__image {
	width: 100%;
	height: auto;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-placeholder);
}

.gp-svc-media__subtitle {
	margin-bottom: 16px;
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
}

.gp-svc-media__text > .gp-btn {
	margin-top: 20px;
}

/* Карточки «фото и текст» с заголовком-плашкой, фото по очереди слева и справа */
.gp-svc-features {
	display: grid;
	gap: 20px;
}

.gp-svc-feature {
	display: grid;
	gap: 40px;
	align-items: stretch;
}

.gp-svc-feature--image {
	grid-template-columns: 381fr 793fr;
}

.gp-svc-feature--image:nth-child(even) {
	grid-template-columns: 793fr 381fr;
}

.gp-svc-feature--image:nth-child(even) .gp-svc-feature__image {
	order: 2;
}

.gp-svc-feature__image {
	width: 100%;
	height: 100%;
	min-height: 200px;
	max-height: 260px;
	border-radius: var(--gp-svc-radius);
	object-fit: cover;
	background: var(--gp-placeholder);
}

.gp-svc-feature__text {
	padding: 20px 30px 24px;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-white);
}

.gp-svc-tag {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin-bottom: 20px;
	padding: 6px 23px;
	border: 1px solid var(--gp-accent);
	border-radius: 30px;
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
	color: var(--gp-accent);
}

/* Белая плашка с кнопкой «Заказать» и примечание на тёмно-бежевом */
.gp-svc-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	padding: 30px;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-white);
}

.gp-svc-text:not(.gp-svc-text--beige) .gp-svc-cta {
	background: var(--gp-bg);
}

.gp-svc-cta p {
	max-width: 940px;
}

.gp-svc-cta .gp-btn {
	flex-shrink: 0;
	min-width: 208px;
}

.gp-svc-cta a,
.gp-svc-note a {
	font-weight: 700;
	color: var(--gp-accent);
}

.gp-svc-note {
	padding: 30px;
	border-radius: var(--gp-svc-radius);
	text-align: center;
	background: var(--gp-bg-2);
}

/* ---------- Подразделы карточками ---------- */

.gp-svc-cats__list {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}

.gp-svc-cat {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding-bottom: 20px;
	border-radius: var(--gp-svc-radius);
	text-align: center;
	background: var(--gp-bg);
	transition: background-color var(--gp-ease), box-shadow var(--gp-ease);
}

/* Шахматный фон, как в макете: при шести карточках в ряд тёмные - 2, 4, 6, 7, 9, 11 из каждых 12 */
@media (min-width: 1280px) {
	.gp-svc-cats__list li:is(:nth-child(12n + 2), :nth-child(12n + 4), :nth-child(12n + 6), :nth-child(12n + 7), :nth-child(12n + 9), :nth-child(12n + 11)) .gp-svc-cat {
		background: var(--gp-bg-2);
	}
}

.gp-svc-cat__image {
	display: block;
	width: 100%;
	min-height: 0;
	overflow: hidden;
	aspect-ratio: 202 / 162;
}

.gp-svc-cat__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Фото раздела вместо вырезанного предмета - скруглённой картинкой с полями */
.gp-svc-cat__image--photo {
	padding: 16px 16px 0;
}

.gp-svc-cat__image--photo img {
	border-radius: 12px;
	object-fit: cover;
}

.gp-svc-cat__name {
	margin: 12px 20px 16px;
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
	/* Firefox не переносит слова с заглавной буквы: без anywhere длинное слово выходит за карточку */
	overflow-wrap: anywhere;
	hyphens: auto;
}

.gp-svc-cat .gp-pill-btn {
	margin-top: auto;
	background: var(--gp-white);
}

.gp-svc-cat:hover {
	background: var(--gp-white) !important;
	box-shadow: var(--gp-shadow);
}

.gp-svc-cat:hover .gp-svc-cat__name {
	color: var(--gp-accent);
}

.gp-svc-cat:hover .gp-pill-btn {
	color: var(--gp-white);
	background: var(--gp-accent);
}

/* ---------- Бежевая полоса во всю ширину: преимущества и условия ---------- */

.gp-svc-band {
	padding-block: 60px;
	border-radius: 30px;
	background: var(--gp-bg);
}

.gp-svc-benefits {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.gp-svc-benefits--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gp-svc-benefit {
	padding: 30px;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-white);
}

.gp-svc-benefit h3 {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
}

.gp-svc-benefit__icon {
	width: 40px;
	height: 40px;
	color: var(--gp-accent);
}

.gp-svc-benefit p {
	margin-top: 12px;
}

.gp-svc-benefit a,
.gp-svc-term a,
.gp-svc-step a,
.gp-svc-audience__card a {
	color: var(--gp-accent);
}

.gp-svc-terms {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.gp-svc-term {
	display: flex;
	flex-direction: column;
	gap: 40px;
	min-width: 0;
	padding: 20px 20px 20px 12px;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-white);
}

.gp-svc-term__label {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	min-height: 40px;
	padding-right: 16px;
	border: 1px solid var(--gp-accent);
	border-radius: 30px;
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
	color: var(--gp-accent);
	overflow-wrap: anywhere;
	hyphens: auto;
}

.gp-svc-term__value {
	padding-left: 8px;
}

.gp-svc-term__label:not(:has(.gp-svc-term__icon)) {
	padding-left: 16px;
}

.gp-svc-term__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: -1px 0 -1px -1px;
	border-radius: 50%;
	color: var(--gp-white);
	background: var(--gp-accent);
}

.gp-svc-term__icon svg {
	width: 20px;
	height: 20px;
}

.gp-svc-term__value {
	margin-top: auto;
}

/* ---------- Процесс: заголовок слева, первый шаг справа, остальные рядом ниже ---------- */

.gp-svc-process {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.gp-svc-process__title {
	align-self: center;
	margin: 0;
}

.gp-svc-process__steps {
	display: contents;
}

.gp-svc-step {
	padding: 30px;
	border-radius: var(--gp-svc-radius);
	background: var(--gp-bg);
}

.gp-svc-process__title + .gp-svc-process__steps .gp-svc-step:first-child {
	grid-column: span 2;
}

.gp-svc-step:nth-child(even) {
	background: var(--gp-bg-2);
}

.gp-svc-step h3 {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 50px;
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
}

.gp-svc-step__num {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	font-size: 36px;
	line-height: 1;
	color: var(--gp-white);
	background: var(--gp-accent);
}

.gp-svc-step p {
	margin-top: 16px;
}

/* ---------- Кейсы: по два на экран, у кейса фото со стрелками ---------- */

.gp-svc-cases__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 16px) / 2);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.gp-svc-cases__track::-webkit-scrollbar {
	display: none;
}

.gp-svc-case {
	display: flex;
	flex-direction: column;
	padding: 20px;
	border: 1px solid var(--gp-line);
	border-radius: var(--gp-svc-radius);
	scroll-snap-align: start;
}

.gp-svc-case__photos {
	position: relative;
}

.gp-svc-case__strip {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 12px) / 2);
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.gp-svc-case__strip::-webkit-scrollbar {
	display: none;
}

.gp-svc-case__strip img,
.gp-svc-case__empty {
	width: 100%;
	height: auto;
	aspect-ratio: 293 / 220;
	border-radius: var(--gp-svc-radius);
	object-fit: cover;
	background: var(--gp-bg);
	scroll-snap-align: start;
}

.gp-svc-case__arrow {
	position: absolute;
	top: 50%;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-top: -30px;
	border-radius: 50%;
	background: var(--gp-white);
	opacity: 0;
	transition: opacity var(--gp-ease), color var(--gp-ease);
}

.gp-svc-case__arrow svg {
	width: 20px;
	height: 20px;
}

.gp-svc-case__arrow:hover {
	color: var(--gp-accent);
}

.gp-svc-case__arrow--prev {
	left: 20px;
}

.gp-svc-case__arrow--next {
	right: 20px;
}

.gp-svc-case__photos:hover .gp-svc-case__arrow:not([disabled]),
.gp-svc-case__arrow:focus-visible {
	opacity: 1;
}

@media (hover: none) {
	.gp-svc-case__arrow:not([disabled]) {
		opacity: 1;
	}
}

.gp-svc-case__arrow[disabled] {
	pointer-events: none;
}

.gp-svc-case__title {
	margin-top: 20px;
	font-size: var(--gp-h3);
	font-weight: 700;
	line-height: 1.3;
}

.gp-svc-case__task {
	margin-top: 8px;
}

.gp-svc-case__facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: auto 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--gp-line);
}

.gp-svc-case__task + .gp-svc-case__facts,
.gp-svc-case__title + .gp-svc-case__facts {
	margin-top: 20px;
}

.gp-svc-case__facts dt {
	font-size: 14px;
}

.gp-svc-case__facts dd {
	margin: 8px 0 0;
	font-weight: 700;
	color: var(--gp-accent);
}

.gp-svc-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 30px;
}

.gp-svc-dots button {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gp-line);
	transition: background-color var(--gp-ease), width var(--gp-ease), height var(--gp-ease);
}

.gp-svc-dots .is-active {
	width: 12px;
	height: 12px;
	background: var(--gp-accent);
}

/* ---------- Ноутбук: колонки поуже ---------- */

@media (max-width: 1279px) {
	.gp-svc-cats__list {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.gp-svc-terms {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Планшет ---------- */

@media (max-width: 1023px) {
	.gp-svc {
		--gp-svc-radius: 16px;
	}

	.gp-svc-banner--image,
	.gp-svc-intro--image {
		grid-template-columns: 1fr;
	}

	.gp-svc-banner__card {
		min-height: 0;
		padding: 24px 20px 20px;
	}

	.gp-svc-banner__image {
		height: auto;
		aspect-ratio: 736 / 240;
	}

	.gp-svc-intro--image {
		gap: 24px;
	}

	.gp-svc-intro__image {
		aspect-ratio: 736 / 400;
	}

	.gp-svc-stats b {
		font-size: 32px;
	}

	.gp-svc-stats span {
		font-size: 14px;
	}

	.gp-svc-text--beige {
		padding: 40px 20px 20px;
	}

	.gp-svc-media--left,
	.gp-svc-media--right,
	.gp-svc-feature--image,
	.gp-svc-feature--image:nth-child(even) {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.gp-svc-media--right .gp-svc-media__image,
	.gp-svc-feature--image:nth-child(even) .gp-svc-feature__image {
		order: 0;
	}

	.gp-svc-media__image {
		max-height: 420px;
		object-fit: cover;
	}

	.gp-svc-feature__image {
		max-height: 240px;
	}

	.gp-svc-cta {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		padding: 20px;
	}

	.gp-svc-cta .gp-btn {
		align-self: flex-start;
	}

	.gp-svc-note {
		padding: 20px;
	}

	.gp-svc-cats__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.gp-svc-cat__image {
		aspect-ratio: 172 / 100;
	}

	.gp-svc-cat__name {
		margin: 8px 12px 12px;
		font-size: 16px;
	}

	.gp-svc-band {
		padding-block: 40px;
	}

	.gp-svc-benefits {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gp-svc-benefit {
		padding: 20px;
	}

	.gp-svc-process {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gp-svc-process__title {
		grid-column: 1 / -1;
	}

	.gp-svc-process__title + .gp-svc-process__steps .gp-svc-step:first-child {
		grid-column: auto;
	}

	.gp-svc-step {
		padding: 20px;
	}

	.gp-svc-cases__track {
		grid-auto-columns: 100%;
	}
}

/* ---------- Телефон ---------- */

@media (max-width: 599px) {
	.gp-svc-banner__title {
		font-size: 28px;
	}

	.gp-svc-banner__buttons {
		flex-direction: column;
		padding-top: 20px;
	}

	.gp-svc-banner__buttons .gp-btn,
	.gp-svc-cta .gp-btn {
		width: 100%;
		align-self: stretch;
	}

	.gp-svc-banner__image {
		aspect-ratio: 448 / 160;
	}

	.gp-svc-pills {
		gap: 8px;
	}

	.gp-svc-pills a {
		font-size: 14px;
	}

	.gp-svc-stats {
		grid-template-columns: repeat(var(--gp-stats, 3), minmax(0, 1fr));
		row-gap: 20px;
	}

	.gp-svc-stats span {
		font-size: 14px;
	}

	.gp-svc-audience__cards {
		grid-template-columns: 1fr;
	}

	.gp-svc-audience__card {
		padding: 20px;
	}

	.gp-svc-cols--2 {
		columns: 1;
	}

	.gp-svc-text--beige {
		padding: 30px 16px 16px;
		border-radius: 20px;
	}

	.gp-svc-feature__text {
		padding: 20px;
	}

	.gp-svc-tag {
		font-size: 16px;
	}

	.gp-svc-cats__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}

	.gp-svc-cat {
		padding-bottom: 12px;
	}

	.gp-svc-cat__name {
		margin: 8px 6px 0;
		font-size: 14px;
	}

	.gp-svc-cat .gp-pill-btn {
		display: none;
	}

	.gp-svc-benefits,
	.gp-svc-benefits--2 {
		grid-template-columns: 1fr;
	}

	.gp-svc-benefit h3 {
		font-size: 16px;
	}

	.gp-svc-terms {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.gp-svc-term {
		gap: 24px;
		padding: 12px;
	}

	.gp-svc-term__label {
		font-size: 16px;
	}

	.gp-svc-process {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.gp-svc-step h3 {
		gap: 16px;
		min-height: 40px;
		font-size: 16px;
	}

	.gp-svc-step__num {
		width: 40px;
		height: 40px;
		font-size: 28px;
	}

	.gp-svc-case {
		padding: 16px;
	}

	.gp-svc-case__strip {
		grid-auto-columns: 100%;
	}

	.gp-svc-case__arrow {
		width: 48px;
		height: 48px;
		margin-top: -24px;
	}

	.gp-svc-case__facts {
		gap: 8px;
	}
}
