/* ==========================================================================
   Sākumlapa (Figma 130:81 / mobile 181:2)
   ========================================================================== */

/* --------------------------------------------------------------- Hero */

.hero-home {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 770px;
	color: var(--c-white);
	isolation: isolate;
}

.hero-home__media,
.hero-home__media img,
.hero-home__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-home__video::-webkit-media-controls-start-playback-button {
	display: none; /* iOS shows a play glyph over a video whose autoplay was refused (Low Power Mode) */
}

.hero-home__media {
	z-index: -1;
	background: #000; /* pure black while the video loads, same as the overlay */
}

.hero-home__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.hero-home__content {
	padding-block: 60px;
}

.hero-home__title {
	display: flex;
	flex-direction: column;
	font-size: clamp(32px, calc(32px + (100vw - 375px) * 18 / 1065), 50px);
	line-height: 1.22;
	letter-spacing: 0.012em;
	text-transform: uppercase;
}

.hero-home__text {
	max-width: 680px;
	margin-top: 24px;
	font-size: 18px;
	line-height: 29.75px;
}

.hero-home__buttons {
	gap: 22px;
	margin-top: 82px;
}

@media (max-width: 1023px) {
	.hero-home {
		min-height: 600px;
	}

	.hero-home__buttons {
		margin-top: 48px;
	}
}

@media (max-width: 767px) {
	.hero-home {
		align-items: flex-end;
		min-height: 560px;
	}

	.hero-home__media::after {
		background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.92) 100%);
	}

	.hero-home__video:not(.hero-home__video--mobile) {
		display: none;
	}

	.hero-home__content {
		padding-block: 150px 32px;
	}

	.hero-home__title {
		line-height: 1.1875;
		letter-spacing: 0.0125em;
	}

	.hero-home__title span {
		display: inline;
	}

	.hero-home__title span + span::before {
		content: " ";
	}

	.hero-home__title {
		display: block;
	}

	.hero-home__text {
		margin-top: 16px;
		font-size: 15px;
		line-height: 24px;
	}

	.hero-home__buttons {
		margin-top: 24px;
		gap: 12px;
	}
}

/* ----------------------------------------------------- Category strip */

.cat-strip {
	min-height: 550px;
	padding: 112px 0 80px;
	background: var(--c-ink);
	color: var(--c-white);
}

.cat-strip__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 286px));
	column-gap: 67px;
	margin-block: 0;
}

.cat-strip__item {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cat-strip__icon {
	width: 45px;
	height: 45px;
	color: var(--c-muted);
}

.cat-strip__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.cat-strip__title {
	font-size: 18px;
	line-height: 27px;
	letter-spacing: 0.0333em;
}

.cat-strip__text {
	margin-bottom: 10px;
	color: var(--c-muted);
	font-size: 14px;
	line-height: 22px;
}

@media (max-width: 1279px) {
	.cat-strip__list {
		column-gap: 40px;
	}
}

@media (max-width: 1023px) {
	.cat-strip {
		min-height: 0;
		padding: 64px 0;
	}

	.cat-strip__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 48px 40px;
	}
}

@media (max-width: 767px) {
	.cat-strip {
		padding: 40px 0;
	}

	.cat-strip__list {
		display: block;
	}

	.cat-strip__item {
		flex-direction: row;
		gap: 18px;
		padding: 24px 0;
		border-bottom: 1px solid var(--c-ink-80);
	}

	.cat-strip__icon {
		flex: none;
		width: 36px;
		height: 36px;
	}

	.cat-strip__body {
		gap: 8px;
	}

	.cat-strip__title {
		font-size: 17px;
		line-height: 24px;
		letter-spacing: 0.0294em;
	}

	.cat-strip__text {
		margin-bottom: 0;
		color: var(--c-muted-60);
	}
}

/* ------------------------------------------------------ Image slider */
/* Desktop: 5 images visible in a full-bleed row, 15 px left inset, 10 px gaps; main.js moves it on
   by one image every few seconds in an endless loop (clones after the originals) and adds arrows. */

.img-slider {
	position: relative;
	padding: 10px 0 0 15px;
}

.img-slider__rail {
	margin: 0;
	overflow: hidden;
	scroll-snap-type: none;
}

.img-slider__slide {
	width: calc((100% - 40px) / 5);
}

.img-slider__slide img {
	width: 100%;
	aspect-ratio: 373 / 306;
	object-fit: cover;
}

.img-slider__arrow {
	position: absolute;
	top: calc(50% - 4.5px); /* image centre: 10 px top padding, 19 px of dots below */
	z-index: 1;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-top: -24px;
	background: var(--c-white);
	color: var(--c-ink);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.img-slider__arrow[hidden] {
	display: none;
}

.img-slider__arrow svg {
	width: 24px;
	height: 24px;
}

.img-slider__arrow:hover {
	background: var(--c-ink);
	color: var(--c-white);
}

.img-slider__arrow--prev {
	left: 15px;
}

.img-slider__arrow--next {
	right: 0;
}

.img-slider__dots {
	margin-top: 16px;
}

@media (max-width: 1023px) {
	.img-slider {
		padding: 16px 0 24px;
	}

	.img-slider__rail {
		padding-inline: var(--gutter);
		scroll-padding-inline: var(--gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.img-slider__arrow {
		display: none;
	}

	.img-slider__slide {
		width: min(300px, 80vw);
	}

	.img-slider__slide img {
		aspect-ratio: 4 / 3;
	}

	.img-slider__dots {
		display: flex;
		margin-top: 16px;
	}
}

/* --------------------------------------------------------- Par mums */

.about-home__inner {
	display: grid;
	grid-template-columns: 430px minmax(0, 1fr);
	gap: 110px;
}

.about-home__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.about-home__title {
	font-size: clamp(26px, calc(26px + (100vw - 375px) * 14 / 1065), 40px);
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.about-home__bar {
	width: 64px;
	height: 4px;
	background: var(--c-ink);
}

.about-home__button {
	margin-top: 14px;
}

.about-home__body {
	display: flex;
	flex-direction: column;
	gap: 26px;
	color: var(--c-muted);
	font-size: 17px;
	line-height: 29px;
}

.about-home__text p + p {
	margin-top: 29px;
}

.about-home__points {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	margin: 0;
	padding-top: 20px;
}

.about-home__point {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 6px;
}

.about-home__point::before {
	content: "";
	width: 40px;
	height: 3px;
	background: var(--c-ink);
}

.about-home__point-title {
	color: var(--c-ink);
	font-size: 15px;
	line-height: 22px;
	letter-spacing: 0.02em;
}

.about-home__point-text {
	font-size: 13px;
	line-height: 20px;
}

@media (max-width: 1279px) {
	.about-home__inner {
		grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
		gap: 64px;
	}
}

@media (max-width: 1023px) {
	.about-home__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
}

@media (max-width: 767px) {
	.about-home__inner {
		display: flex;
		flex-direction: column;
		gap: 24px;
	}

	.about-home__head,
	.about-home__body {
		display: contents;
	}

	.about-home__head .kicker {
		order: 1;
	}

	.about-home__title {
		order: 2;
		margin-top: -14px;
	}

	.about-home__bar,
	.about-home__text {
		display: none;
	}

	.about-home__intro {
		order: 3;
		font-size: 15px;
		line-height: 24px;
	}

	.about-home__points {
		order: 4;
		display: block;
		padding-top: 0;
		border-top: 1px solid var(--c-line);
	}

	.about-home__point {
		gap: 4px;
		padding: 14px 0;
		border-bottom: 1px solid var(--c-line);
	}

	.about-home__point::before {
		content: none;
	}

	.about-home__point-title {
		letter-spacing: 0;
	}

	.about-home__button {
		order: 5;
		align-self: stretch;
		margin-top: 0;
		min-height: 58px;
	}
}

/* -------------------------------------------------- Category gallery */

.cat-gallery {
	padding-bottom: 86px;
}

.cat-gallery__row {
	display: grid;
	grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
	align-items: center;
	gap: 80px;
}

.cat-gallery__row + .cat-gallery__row {
	margin-top: 50px;
}

.cat-gallery__row--reverse {
	grid-template-columns: minmax(0, 1fr) minmax(0, 660px);
}

.cat-gallery__row--reverse .cat-gallery__media {
	order: 2;
}

.cat-gallery__media {
	position: relative;
	display: flex;
	align-items: flex-end;
	aspect-ratio: 660 / 440;
	padding: 28px 32px;
	overflow: hidden;
	background: var(--c-placeholder);
	isolation: isolate;
}

.cat-gallery__media img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cat-gallery__media::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: -1;
	height: 200px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.cat-gallery__label {
	color: var(--c-white);
	font-size: 12px;
	font-weight: var(--fw-bold);
	line-height: 20px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.cat-gallery__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 22px;
}

.cat-gallery__button {
	margin-top: 4px;
}

.cat-gallery__list {
	margin: 60px 0 0;
	border-top: 1px solid var(--c-line);
}

.cat-gallery__item {
	position: relative;
	display: grid;
	grid-template-columns: 56px 400px minmax(0, 1fr) auto;
	align-items: center;
	gap: 40px;
	padding: 34px 0;
	border-bottom: 1px solid var(--c-line);
}

.cat-gallery__num {
	color: var(--c-muted);
	font-size: 20px;
	font-weight: var(--fw-bold);
	line-height: 26px;
	letter-spacing: 0.025em;
}

.cat-gallery__item-title {
	font-size: 23px;
	line-height: 30px;
}

.cat-gallery__item-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.cat-gallery__item-text {
	color: var(--c-muted);
	font-size: 15px;
	line-height: 23px;
}

.cat-gallery__item-more {
	color: var(--c-ink);
	font-size: 14px;
	font-weight: var(--fw-bold);
	line-height: 22px;
	letter-spacing: 0.0429em;
	text-transform: uppercase;
	transition: color var(--t-fast) var(--ease);
}

.cat-gallery__item-title a {
	transition: color var(--t-fast) var(--ease);
}

/* One hover signal for the whole row: title and "Skatīt" (with its underline) fade to grey together,
   like the .link-u links. Only with a real pointer, so a tap on a phone does not leave the row grey. */
@media (hover: hover) {
	.cat-gallery__item:hover .cat-gallery__item-title a,
	.cat-gallery__item:hover .cat-gallery__item-more {
		color: var(--c-muted);
	}
}

@media (max-width: 1279px) {
	.cat-gallery__row,
	.cat-gallery__row--reverse {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 48px;
	}

	.cat-gallery__item {
		grid-template-columns: 40px minmax(0, 300px) minmax(0, 1fr) auto;
		gap: 24px;
	}
}

@media (max-width: 1023px) {
	.cat-gallery__row,
	.cat-gallery__row--reverse {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.cat-gallery__row--reverse .cat-gallery__media {
		order: 0;
	}
}

@media (max-width: 767px) {
	.cat-gallery {
		padding: 24px 0 48px;
	}

	.cat-gallery__row,
	.cat-gallery__row--reverse {
		gap: 14px;
	}

	.cat-gallery__row + .cat-gallery__row {
		margin-top: 24px;
	}

	.cat-gallery__media {
		aspect-ratio: auto;
		height: 240px;
	}

	.cat-gallery__media::after,
	.cat-gallery__label {
		display: none;
	}

	.cat-gallery__body {
		gap: 14px;
	}

	.cat-gallery__button {
		margin-top: 0;
	}

	.cat-gallery__list {
		margin-top: 24px;
	}

	.cat-gallery__item {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 20px 0;
	}

	.cat-gallery__num {
		display: none;
	}

	.cat-gallery__item-title {
		font-size: 18px;
		line-height: 24px;
	}

	.cat-gallery__item-text {
		font-size: 13px;
		line-height: 20px;
	}

	.cat-gallery__item-more {
		display: inline-flex;
		flex-direction: column;
		gap: 2px;
		padding-top: 6px;
		font-size: 12px;
		letter-spacing: 0.05em;
	}

	.cat-gallery__item-more::after {
		content: "";
		height: 2px;
		background: currentColor;
	}
}

/* -------------------------------------------------------- Jaunumi */

.news-latest {
	padding: 92px 0 95px;
}

.news-latest .news-latest__text {
	max-width: 917px;
}

.news-latest__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
	margin: 0;
	overflow: visible;
}

.news-latest__grid > li {
	display: flex;
}

.news-latest__grid .post-card {
	flex: 1;
}

.news-latest__dots {
	display: none;
}

.news-latest__button {
	margin-top: 63px;
}

@media (max-width: 1023px) {
	.news-latest__grid {
		display: flex;
		gap: 12px;
		margin-inline: calc(-1 * var(--gutter));
		padding-inline: var(--gutter);
		scroll-padding-inline: var(--gutter);
		overflow-x: auto;
	}

	.news-latest__grid > li {
		width: min(300px, 80vw);
	}

	.news-latest__dots {
		display: flex;
		justify-content: flex-start;
		margin-top: 24px;
	}

	.news-latest__button {
		margin-top: 24px;
	}
}

@media (max-width: 767px) {
	.news-latest {
		padding: 48px 0;
	}

	.news-latest__text {
		display: none;
	}
}
