/*
 * Homepage layout — PolisMarket Pro.
 *
 * Loaded only on the front page (see polismarket_pro_assets()). Everything
 * here is scoped under .pm-home so it never leaks into the service pages,
 * which keep the shared rules from style.css.
 *
 * Design rules from the brief: static interface, no scroll animation, no
 * floating decoration; hover states only on buttons, links and cards.
 */

.pm-home {
	background: var(--pm-white);
	/* the hero image is allowed to run past the container towards the screen
	   edge (as in the design), so the page must not scroll sideways */
	overflow: hidden;
}

/* ---------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------ */

.pm-home .pm-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
	gap: clamp(24px, 2.6vw, 36px);
	align-items: start;
	padding: clamp(10px, 0.8vw, 11px) 0 clamp(30px, 3.6vw, 52px);
}

.pm-home .pm-hero__body {
	padding-top: clamp(0px, 5.1vw, 73px);
}

.pm-home .pm-hero__title {
	max-width: none;
	margin: 0;
	color: var(--pm-navy);
	font-family: var(--pm-font-head);
	font-size: clamp(30px, 3.25vw, 46px);
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.33;
}

/* The design breaks the headline after "яке"; on narrow screens the two
   halves run together as normal text. `color` resets the old `.pm-hero h1
   span` accent rule that still lives in style.css for the service pages. */
.pm-home .pm-hero__title span {
	display: block;
	color: inherit;
}

.pm-home .pm-hero__lead {
	max-width: 34em;
	margin: clamp(18px, 1.6vw, 23px) 0 0;
	color: var(--pm-muted);
	font-size: clamp(15px, 1.2vw, 17.5px);
	line-height: 1.85;
}

.pm-home .pm-hero__points {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(16px, 2vw, 30px);
	margin: clamp(24px, 3vw, 46px) 0 0;
	padding: 0;
	list-style: none;
}

.pm-home .pm-hero__points li {
	display: flex;
	gap: 11px;
	align-items: center;
	min-width: 0;
}

.pm-home .pm-hero__point-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	flex: 0 0 auto;
	border-radius: 999px;
}

.pm-home .pm-hero__point-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.pm-home .pm-hero__point-icon--green {
	background: var(--pm-green-soft);
	color: var(--pm-green);
}

.pm-home .pm-hero__point-icon--violet {
	background: var(--pm-blue-soft);
	color: var(--pm-blue);
}

.pm-home .pm-hero__points strong {
	display: block;
	color: var(--pm-ink);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
}

.pm-home .pm-hero__points strong + span {
	display: block;
	color: var(--pm-muted);
	font-size: 13.5px;
	line-height: 1.35;
}

.pm-home .pm-hero__media img {
	/* past 1280px the photo grows into the side margin, matching the design
	   where the car nearly touches the right edge of the screen */
	width: calc(100% + max(0px, (100vw - var(--pm-width)) / 2 - 20px));
	max-width: none;
	height: auto;
	margin-left: auto;
}

/* ---------------------------------------------------------------------
 * ОСЦПВ / КАСКО — the two promoted products
 * ------------------------------------------------------------------ */

.pm-products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(18px, 2.3vw, 32px);
	padding: 0;
}

.pm-product {
	display: flex;
	flex-direction: column;
	position: relative;
	padding: clamp(24px, 2.4vw, 34px) clamp(24px, 2.4vw, 34px) clamp(24px, 2.8vw, 40px);
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius-card);
	background: var(--pm-white);
	box-shadow: var(--pm-shadow-soft);
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pm-product:hover {
	border-color: #d7dcec;
	box-shadow: 0 16px 38px rgba(12, 17, 87, 0.09);
}

.pm-product__badge {
	display: inline-block;
	align-self: flex-start;
	margin: 0;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.pm-product--green .pm-product__badge {
	background: var(--pm-green-soft);
	color: var(--pm-green-dark);
}

.pm-product--violet .pm-product__badge {
	background: var(--pm-blue-soft);
	color: var(--pm-blue);
}

/* Column reserved on the right of every card for the pinned illustration. */
.pm-product__head {
	margin-top: clamp(16px, 2vw, 29px);
	padding-right: clamp(160px, 17vw, 234px);
}

.pm-product__title {
	margin: 0;
	font-family: var(--pm-font-head);
	font-size: clamp(28px, 2.6vw, 36px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.1;
}

.pm-product--green .pm-product__title {
	color: var(--pm-green);
}

.pm-product--violet .pm-product__title {
	color: var(--pm-blue);
}

.pm-product__text {
	margin: 12px 0 0;
	color: var(--pm-muted);
	font-size: 15px;
	line-height: 1.75;
}

.pm-product__media {
	position: absolute;
	top: clamp(56px, 6vw, 86px);
	right: clamp(16px, 2vw, 30px);
	display: block;
	width: clamp(120px, 13.5vw, 190px);
}

.pm-product__media img {
	width: 100%;
	height: auto;
}

.pm-product__list {
	display: grid;
	gap: 13px;
	margin: clamp(16px, 1.5vw, 22px) 0 0;
	/* the list sits below the illustration, so it needs less clearance than
	   the heading block above it */
	padding: 0 clamp(120px, 14vw, 200px) 0 0;
	list-style: none;
}

.pm-product__list li {
	display: flex;
	gap: 11px;
	align-items: center;
	color: var(--pm-ink);
	font-size: 14.5px;
	line-height: 1.45;
}

.pm-product__list svg {
	display: block;
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.pm-product--green .pm-product__list svg {
	color: var(--pm-green);
}

.pm-product--violet .pm-product__list svg {
	color: var(--pm-blue);
}

.pm-product__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 24px;
	align-items: center;
	margin-top: auto;
	padding-top: clamp(22px, 3.2vw, 46px);
}

.pm-product__footer .pm-button {
	min-height: 55px;
	padding: 15px 30px;
	gap: 14px;
}

.pm-product__footer .pm-button svg {
	width: 19px;
	height: 19px;
}

.pm-product__note {
	margin: 0;
	font-family: var(--pm-font-head);
	font-size: 16px;
	font-weight: 700;
}

.pm-product--green .pm-product__note {
	color: var(--pm-green);
}

.pm-product--violet .pm-product__note {
	color: var(--pm-blue);
}

/* ---------------------------------------------------------------------
 * Why us — one band of four
 * ------------------------------------------------------------------ */

.pm-benefits {
	padding: clamp(22px, 3.4vw, 49px) 0 0;
}

.pm-benefits__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(20px, 2.2vw, 34px);
	margin: 0;
	padding: clamp(22px, 2.7vw, 38px) clamp(22px, 2.4vw, 34px);
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius-card);
	background: var(--pm-white);
	box-shadow: var(--pm-shadow-soft);
	list-style: none;
}

.pm-benefit {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	min-width: 0;
}

.pm-benefit__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	flex: 0 0 auto;
	border-radius: 12px;
	background: var(--pm-blue-soft);
	color: var(--pm-blue);
}

.pm-benefit__icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.pm-benefit h2 {
	margin: 0;
	color: var(--pm-navy);
	font-family: var(--pm-font-head);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.35;
}

.pm-benefit p {
	margin: 7px 0 0;
	color: var(--pm-muted);
	font-size: 13.5px;
	line-height: 1.55;
}

/* ---------------------------------------------------------------------
 * How it works
 * ------------------------------------------------------------------ */

.pm-how {
	padding: clamp(44px, 5vw, 74px) 0 clamp(20px, 2.4vw, 34px);
}

.pm-how__title {
	margin: 0 0 clamp(24px, 1.9vw, 27px);
	color: var(--pm-navy);
	font-family: var(--pm-font-head);
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.25;
	text-align: center;
}

.pm-how__list {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Connector line behind the circles; hidden when the list wraps. */
.pm-how__list::before {
	position: absolute;
	top: 52px;
	left: 12.5%;
	z-index: 0;
	width: 75%;
	height: 1px;
	background: var(--pm-line);
	content: "";
}

.pm-step {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.pm-step__badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 28px;
}

.pm-step__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border: 1px solid var(--pm-line);
	border-radius: 999px;
	background: var(--pm-white);
	color: var(--pm-blue);
}

.pm-step__icon svg {
	display: block;
	width: 36px;
	height: 36px;
}

.pm-step__number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-top: 16px;
	border-radius: 999px;
	background: var(--pm-green);
	color: var(--pm-white);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1;
}

.pm-step h3 {
	margin: 0;
	color: var(--pm-navy);
	font-family: var(--pm-font-head);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.pm-step p {
	max-width: 15em;
	margin: 10px 0 0;
	color: var(--pm-muted);
	font-size: 13.5px;
	line-height: 1.65;
}

/* ---------------------------------------------------------------------
 * Consultation band
 * ------------------------------------------------------------------ */

.pm-consult {
	padding: clamp(24px, 2.2vw, 31px) 0 0;
}

.pm-consult__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.72fr);
	gap: clamp(20px, 2.6vw, 40px);
	align-items: center;
	padding: 0 0 0 clamp(24px, 3vw, 44px);
	border: 1px solid var(--pm-line);
	border-radius: var(--pm-radius-card);
	background: var(--pm-white);
	box-shadow: var(--pm-shadow-soft);
	overflow: hidden;
}

.pm-consult__body {
	padding: clamp(26px, 4.2vw, 60px) 0;
}

.pm-consult__body h2 {
	margin: 0;
	color: var(--pm-navy);
	font-family: var(--pm-font-head);
	font-size: clamp(22px, 2.1vw, 28px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.pm-consult__body p {
	max-width: 30em;
	margin: 14px 0 0;
	color: var(--pm-muted);
	font-size: 15px;
	line-height: 1.75;
}

.pm-consult .pm-button svg {
	width: 20px;
	height: 20px;
}

.pm-consult__media {
	align-self: end;
}

.pm-consult__media img {
	width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------
 * Client reviews — replaces the newsletter band, same shape and tone
 * ------------------------------------------------------------------ */

.pm-testimonials {
	padding: clamp(26px, 2.4vw, 34px) 0 0;
}

.pm-testimonials__inner {
	padding: clamp(24px, 2.8vw, 38px);
	border-radius: var(--pm-radius-card);
	background: var(--pm-soft);
}

.pm-testimonials__head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	margin-bottom: clamp(20px, 2.2vw, 28px);
}

.pm-testimonials__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: var(--pm-blue-soft);
	color: var(--pm-blue);
}

.pm-testimonials__icon svg {
	display: block;
	width: 26px;
	height: 26px;
}

.pm-testimonials__head h2 {
	margin: 0;
	color: var(--pm-navy);
	font-family: var(--pm-font-head);
	font-size: clamp(20px, 2vw, 26px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.pm-testimonials__head p {
	margin: 6px 0 0;
	color: var(--pm-muted);
	font-size: 14.5px;
	line-height: 1.6;
}

.pm-testimonials__nav {
	display: flex;
	gap: 10px;
}

.pm-testimonials__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--pm-line);
	border-radius: 999px;
	background: var(--pm-white);
	color: var(--pm-navy);
	cursor: pointer;
	transition: border-color 140ms ease, color 140ms ease;
}

.pm-testimonials__arrow:hover:not(:disabled) {
	border-color: var(--pm-blue);
	color: var(--pm-blue);
}

.pm-testimonials__arrow:disabled {
	color: #b9bed2;
	cursor: default;
}

.pm-testimonials__arrow svg {
	display: block;
	width: 20px;
	height: 20px;
}

.pm-testimonials__arrow:first-child svg {
	transform: rotate(90deg);
}

.pm-testimonials__arrow:last-child svg {
	transform: rotate(-90deg);
}

.pm-testimonials__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(14px, 1.6vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pm-testimonial[hidden] {
	display: none;
}

.pm-testimonial {
	display: flex;
	flex-direction: column;
	padding: clamp(18px, 1.8vw, 24px);
	border: 1px solid var(--pm-line);
	border-radius: 16px;
	background: var(--pm-white);
}

.pm-testimonial__top {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: 14px;
}

.pm-testimonial__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	border-radius: 999px;
	background: var(--pm-blue-soft);
	color: var(--pm-blue);
	font-size: 14px;
	font-weight: 700;
}

.pm-testimonial h3 {
	margin: 0;
	color: var(--pm-navy);
	font-family: var(--pm-font-head);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.pm-testimonial__rating {
	display: flex;
	gap: 2px;
	margin: 5px 0 0;
	color: #f0a92e;
}

.pm-testimonial__rating svg {
	display: block;
	width: 14px;
	height: 14px;
}

.pm-testimonial__text {
	margin: 0;
	color: var(--pm-muted);
	font-size: 14px;
	line-height: 1.7;
}

.pm-testimonials__dots {
	display: flex;
	gap: 7px;
	justify-content: center;
	margin-top: clamp(18px, 2vw, 24px);
}

.pm-testimonials__dots span {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #d5d9e8;
}

.pm-testimonials__dots span.is-active {
	width: 22px;
	background: var(--pm-blue);
}

/* ---------------------------------------------------------------------
 * Responsive — tablet
 * ------------------------------------------------------------------ */

@media (max-width: 1080px) {
	.pm-home .pm-hero {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.pm-home .pm-hero__media {
		order: -1;
		max-width: 560px;
	}

	.pm-home .pm-hero__body {
		padding-top: 0;
	}

	.pm-benefits__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pm-how__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 20px;
	}

	.pm-how__list::before {
		display: none;
	}

	.pm-consult__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		padding-right: clamp(24px, 3vw, 40px);
	}

	.pm-consult__media {
		grid-column: 1 / -1;
		max-width: 420px;
		margin: 0 auto;
	}

	.pm-testimonials__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.pm-products {
		grid-template-columns: 1fr;
	}

	.pm-testimonials__head {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.pm-testimonials__nav {
		grid-column: 1 / -1;
	}
}

/* ---------------------------------------------------------------------
 * Responsive — phone (320–680px)
 * ------------------------------------------------------------------ */

@media (max-width: 680px) {
	.pm-home .pm-hero {
		padding: 26px 0 22px;
	}

	.pm-home .pm-hero__title {
		font-size: clamp(26px, 7.4vw, 34px);
		line-height: 1.22;
	}

	.pm-home .pm-hero__title span {
		display: inline;
	}

	.pm-home .pm-hero__lead {
		font-size: 15.5px;
		line-height: 1.7;
	}

	.pm-home .pm-hero__points {
		gap: 14px;
	}

	.pm-home .pm-hero__points li {
		width: 100%;
	}

	.pm-home .pm-hero__media {
		max-width: 100%;
	}

	.pm-product__head {
		padding-right: 96px;
	}

	.pm-product__list {
		padding-right: 96px;
	}

	.pm-product__media {
		top: 46px;
		right: 14px;
		width: 80px;
	}

	.pm-product__footer .pm-button {
		width: 100%;
	}

	.pm-product__note {
		width: 100%;
		text-align: center;
	}

	.pm-benefits__list {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.pm-how {
		padding-top: 38px;
	}

	.pm-how__list {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.pm-step {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		gap: 4px 16px;
		align-items: center;
		text-align: left;
	}

	.pm-step__badge {
		grid-row: span 2;
		margin-bottom: 0;
	}

	.pm-step__icon {
		width: 64px;
		height: 64px;
	}

	.pm-step__icon svg {
		width: 26px;
		height: 26px;
	}

	.pm-step p {
		max-width: none;
	}

	.pm-consult__inner {
		grid-template-columns: 1fr;
		padding: 0 20px;
	}

	.pm-consult__body {
		padding: 24px 0 0;
	}

	.pm-consult .pm-button {
		width: 100%;
	}

	.pm-consult__media {
		max-width: 320px;
		margin: 4px auto 0;
	}

	.pm-testimonials__inner {
		padding: 22px 18px;
	}

	.pm-testimonials__head {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 14px;
	}

	.pm-testimonials__icon {
		width: 46px;
		height: 46px;
		border-radius: 13px;
	}

	.pm-testimonials__icon svg {
		width: 22px;
		height: 22px;
	}

	.pm-testimonials__nav {
		justify-content: center;
	}

	.pm-testimonials__list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.pm-product__head {
		padding-right: 0;
	}

	.pm-product__list {
		padding-right: 0;
	}

	/* purely decorative — dropped so the copy keeps the full card width */
	.pm-product__media {
		display: none;
	}
}

@media (max-width: 400px) {
	.pm-product {
		padding: 20px 18px;
	}

	.pm-product__title {
		font-size: 26px;
	}
}
