/**
 * Iepērcies pēc mērķiem (shop-by-goals)
 * Figma social-proof-section + site grid-container width (same as other blocks).
 */

.shop-by-goals {
	width: 100%;
	position: relative;
	background-color: #e7e7e7;
	/* Same vertical rhythm as categories-home / team / video */
	padding: 48px 0;
	box-sizing: border-box;
	text-align: left;
	color: #0d0d0d;
	font-family: "Satoshi", "Satoshi Variable", sans-serif;
}

@media print, screen and (min-width: 64em) {
	.shop-by-goals {
		padding: 96px 0;
	}
}

/* Uses Foundation .grid-container (max-width: 78rem ≈ 1246px) */
.shop-by-goals__container.grid-container {
	width: 100%;
}

.shop-by-goals__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 32px;
	width: 100%;
	box-sizing: border-box;
}

@media print, screen and (min-width: 64em) {
	.shop-by-goals__inner {
		gap: 48px;
	}
}

.shop-by-goals__heading-wrap {
	width: 100%;
	max-width: 624px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.shop-by-goals__heading-group {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

/* Figma: featured-icon display:none */
.shop-by-goals__icon {
	display: none;
}

/* Same as services-home: uses global .title__h2 (36/44, weight 600) */
.shop-by-goals__heading.title__h2 {
	align-self: stretch;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
	color: #0d0d0d;
}

/*
 * Cards row — Figma .content: flex wrap, gap 32px, font 24px #fff
 * Desktop: 5 equal columns (flex: 1)
 */
.shop-by-goals__content {
	align-self: stretch;
	width: 100%;
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 16px;
	font-size: 24px;
	color: #fff;
	box-sizing: border-box;
}

@media print, screen and (min-width: 40em) {
	.shop-by-goals__content {
		gap: 24px;
	}
}

@media print, screen and (min-width: 64em) {
	.shop-by-goals__content {
		gap: 32px;
		flex-wrap: nowrap;
	}
}

/*
 * Card structure mirrors categories-home__link:
 * img.object-fit cover + dark mask ::after + hover scale(1.1) + red link
 */
.shop-by-goals__card {
	height: 280px;
	flex: 1 1 100%;
	min-width: 0;
	max-width: 100%;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	padding: 24px;
	box-sizing: border-box;
	background-color: #0d0d0d;
	text-decoration: none;
	color: #fff;
	position: relative;
	overflow: hidden;
}

@media print, screen and (min-width: 40em) {
	.shop-by-goals__card {
		/* 2 columns: 1 gap of 24px */
		flex: 1 1 calc((100% - 24px) / 2);
		max-width: calc((100% - 24px) / 2);
	}
}

@media print, screen and (min-width: 64em) {
	.shop-by-goals__card {
		/* 5 columns: 4 gaps of 32px = 128px */
		flex: 1 1 0;
		max-width: none;
		width: auto;
		min-width: 0;
		height: 280px;
		padding: 24px;
	}
}

.shop-by-goals__card-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: all 0.4s;
	z-index: 0;
}

/* Same mask as categories-home — stays on hover */
.shop-by-goals__card::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5) 100%),
		linear-gradient(0deg, rgba(13, 13, 13, 0.5) 0%, rgba(13, 13, 13, 0.5) 100%);
}

.shop-by-goals__card:hover,
.shop-by-goals__card:focus,
.shop-by-goals__card:focus-visible {
	color: #fff;
	text-decoration: none;
}

/* Identical to categories-home: zoom image + red CTA */
.shop-by-goals__card:hover .shop-by-goals__card-image,
.shop-by-goals__card:focus-visible .shop-by-goals__card-image {
	transform: scale(1.1);
}

.shop-by-goals__card:hover .shop-by-goals__card-link,
.shop-by-goals__card:focus-visible .shop-by-goals__card-link {
	color: #c72c2e;
}

/* Figma .celtniecbas-plves-parent — above image + mask */
.shop-by-goals__card-body {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	position: relative;
	z-index: 2;
}

/* Figma <b class="celtniecbas-plves"> — 24 / 32 bold */
.shop-by-goals__card-title {
	align-self: stretch;
	position: relative;
	display: block;
	margin: 0;
	font-family: "Satoshi", "Satoshi Variable", sans-serif;
	font-size: 24px;
	line-height: 32px;
	font-weight: 700;
	font-variation-settings: "wght" 700;
	color: #fff;
}

.shop-by-goals__card-title-line,
.shop-by-goals__card-title-sub {
	display: block;
	margin: 0;
	font-size: 24px;
	line-height: 32px;
	font-weight: 700;
	font-variation-settings: "wght" 700;
}

/* Figma .skatt-kategoriju: 16 / 24, weight 500, underline */
.shop-by-goals__card-link {
	position: relative;
	display: inline-block;
	margin: 0;
	font-family: "Satoshi", "Satoshi Variable", sans-serif;
	font-size: 16px;
	line-height: 24px;
	font-weight: 500;
	font-variation-settings: "wght" 500;
	text-decoration: underline;
	text-underline-offset: 4px;
	color: #fff;
	transition: all 0.3s;
}
