/*
 * Front page (front-page.php, was Bricks template 69): hero card with vertical slider + quick links,
 * latest Aktualitātes, and the "wave" (blob) button (Advanced Scripts "wave animation buttons").
 */

/* ---------- Hero ---------- */
.home-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 0 2.5rem 9.6rem;
}
.home-hero__card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--site-width);
	padding: 16rem 5.5rem 0;
	border-radius: var(--radius-l);
	background: var(--primary) var(--home-hero-bg) no-repeat 345px -105px / 110rem;
}

/* Notification bar (shown until its ACF date) */
.home-notice {
	position: absolute;
	top: 5.6rem;
	left: 5.5rem;
	right: 5.5rem;
	z-index: 2;
	display: flex;
	align-items: center;
	padding: 3.6rem 0;
	background: rgba(155, 203, 235, 0.55);
	border-radius: var(--radius-s);
}
.home-notice__bar {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 10px;
	height: 100%;
	background: #f97068;
	border-radius: var(--radius-s) 0 0 var(--radius-s);
}
.home-notice__icon { padding: 0 2.5rem 0 3rem; }
.home-notice__text { font-size: 1.8rem; font-weight: 400; color: var(--white); }
.home-notice__text:hover { color: var(--white); }

/* Slider (Bricks nested slider / Splide: loop, ttb, 30rem; ltr 41rem below 768px) */
.hero-slider { position: relative; width: 100%; min-height: 30rem; }
.hero-slider__viewport { height: 30rem; overflow: hidden; }
.hero-slider__track {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	height: 100%;
	transition: transform .4s ease;
	will-change: transform;
}
.hero-slider__slide {
	flex: 0 0 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	min-width: 0;
}
.hero-slider .hero-slider__title {
	display: -webkit-box;
	width: 30ch;
	max-width: 100%;
	overflow: hidden;
	font-size: 5.6rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--white);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.hero-slider__link-wrap { padding-bottom: 1rem; border-bottom: 2px solid var(--white); }
.hero-slider__link {
	display: inline-flex;
	margin-top: 4.7rem;
	font-size: 1.6rem;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--white);
}
.hero-slider__link:hover { font-weight: 600; color: var(--white); }

.hero-slider__dots {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 1.8rem;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 1.8rem 0;
}
.hero-slider__dot {
	width: 8px;
	height: 8px;
	margin: 5px;
	padding: 0;
	border-radius: 50%;
	background: rgba(155, 203, 235, 0.54);
}
.hero-slider__dot[aria-current="true"] { border: 1px solid var(--white); }

/* Quick links */
.hero-links {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.6rem;
	margin: 11.4rem 0 5.6rem;
}
.hero-link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	column-gap: 1rem;
	width: 100%;
	max-width: 39.8rem;
	padding: 2.9rem 2rem;
	border: 1px solid var(--white);
	border-radius: var(--radius-s);
}
.hero-link:hover { background: rgba(33, 56, 110, 0.7); border-color: rgba(33, 56, 110, 0.7); }
.hero-link:focus-within { outline: 2px solid var(--white); outline-offset: 2px; }
.hero-link__main { display: flex; align-items: center; gap: 1rem; }
.hero-link__icon { width: 3rem; object-fit: cover; }
.hero-link .hero-link__title { font-size: 2.1rem; line-height: 1.2; color: var(--white); }
.hero-link__anchor,
.hero-link__anchor:hover { color: var(--white); }
.hero-link__anchor::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hero-link__anchor:focus-visible { outline: none; }
.hero-link__arrow {
	flex: 0 0 1rem;
	width: 1rem;
	height: 1.6rem;
	background: var(--white);
	-webkit-mask: url("../../img/chevron.svg") no-repeat center / contain;
	mask: url("../../img/chevron.svg") no-repeat center / contain;
}

@media (max-width: 1147px) {
	.hero-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
	.hero-links { margin-top: 6.4rem; }
}
@media (max-width: 871px) {
	.hero-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero-slider .hero-slider__title { width: 70%; font-size: 2.7rem; }
}
@media (max-width: 767px) {
	.home-hero { padding-bottom: 7.2rem; }
	.home-hero__card { row-gap: 7.5rem; padding: 0 1.6rem; }
	.home-notice { left: 2rem; }
	.home-notice__icon { padding-right: 1.6rem; }
	.home-notice__text { width: 70%; font-size: 1.6rem; }
	.hero-slider { margin-top: 2rem; }
	.hero-slider__viewport { height: 41rem; }
	.hero-slider__track { flex-direction: row; }
	.hero-slider .hero-slider__title { padding-right: 4rem; }
	.hero-slider__link { font-size: 1.4rem; }
	.hero-slider__dots {
		top: auto;
		left: 0;
		right: 0;
		bottom: 1.5rem;
		flex-direction: row;
		padding: 0;
	}
	.hero-links { gap: 1.2rem; margin: -9.1rem 0 4.6rem; }
	.hero-link { padding: 2.3rem 3.2rem; }
	.hero-link__main { column-gap: 1.8rem; }
	.hero-link .hero-link__title { font-size: 1.8rem; }
}
@media (max-width: 582px) {
	.hero-links { grid-template-columns: minmax(0, 1fr); }
	.hero-link { max-width: none; }
}
@media (max-width: 478px) {
	.home-notice { flex-direction: column; justify-content: center; row-gap: 1rem; }
	.home-notice__text { text-align: center; }
	.hero-links { margin-top: -8.1rem; }
}

/* ---------- Latest Aktualitātes ---------- */
.home-news { padding-bottom: 9.8rem; }
.home-news__inner { display: flex; flex-direction: column; padding: 0 2.4rem; }
.home-news__top {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.home-news .home-news__title { font-size: 3.9rem; color: var(--secondary); }
.home-news__grid {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 2.5rem 3.2rem;
	padding-top: 6.6rem; /* Bricks rendered 5.2rem + a 1.4rem offset of the first row; rows 2.5rem apart */
}
.home-news__grid .news-card .news-card__img { min-height: 22rem; max-height: 27rem; }
.home-news__grid .news-card:nth-of-type(-n+3) .news-card__img { min-height: 27rem; }
.home-news__grid .news-card:nth-of-type(n+4) {
	flex-direction: row;
	row-gap: 0;
	width: 48.5%;
}
.home-news__grid .news-card:nth-of-type(n+4) .news-card__media { flex: 0 0 16.4rem; }
.home-news__grid .news-card:nth-of-type(n+4) .news-card__img {
	width: 16.4rem;
	min-width: 16.4rem;
	min-height: 22rem;
	max-height: none;
	height: 100%;
	border-radius: var(--radius-s) 0 0 var(--radius-s);
}
.home-news__grid .news-card:nth-of-type(n+4) .news-card__body { flex: 1 1 auto; height: 100%; padding-top: 2.5rem; padding-left: 0; }
.home-news__grid .news-card:nth-of-type(n+4) .news-card__link { font-size: 1.8rem; line-height: 1.2; }

.home-news__all {
	display: none;
	align-self: center;
	margin-top: 4rem;
	padding: 1.4rem 2.4rem;
	font-size: 1.8rem;
	font-weight: 600;
	color: var(--primary);
	border: 1px solid var(--primary);
	border-radius: var(--radius-s);
}
.home-news__all:hover { color: var(--white); background: var(--primary); }

@media (max-width: 1159px) {
	.home-news__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.home-news__grid .news-card { width: 100%; }
	.home-news__grid .news-card:nth-of-type(n+4) { display: none; }
}
@media (max-width: 767px) {
	.home-news { padding-bottom: 8.8rem; }
	.home-news .home-news__title { font-size: 2.7rem; }
	.home-news__grid { grid-template-columns: minmax(0, 1fr); gap: 3.2rem; }
	.home-news__grid .news-card .news-card__title { font-size: 1.9rem; }
	.home-news__wave { display: none !important; }
	.home-news__all { display: flex; }
}

/* ---------- Wave (blob) button: ju_wave_button() ---------- */
.wave-buttons { text-align: center; border-radius: 30px; }
.wave-buttons .goo-svg { position: absolute; width: 0; height: 0; }
.blob-btn {
	position: relative;
	z-index: 0;
	display: inline-block;
	padding: 1.4rem 2.4rem;
	font-size: 1.8rem;
	font-weight: 700;
	line-height: var(--body-line-height);
	text-align: center;
	vertical-align: middle;
	color: var(--primary);
	background: transparent;
	border-radius: 30px;
	cursor: pointer;
	transition: color .5s;
}
.blob-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border: 1px solid var(--primary);
	border-radius: 30px;
}
.blob-btn::after {
	content: "";
	position: absolute;
	inset: 3px;
	z-index: -2;
	border-radius: 30px;
	background: transparent;
	transition: all .3s .2s;
}
.blob-btn__inner {
	position: absolute;
	inset: 1px;
	z-index: -1;
	overflow: hidden;
	border-radius: 29px;
	background: var(--white);
}
.blob-btn__blobs {
	position: absolute;
	inset: 0;
	display: block;
	pointer-events: none;
	filter: url("#goo");
	transform: translateZ(0);
	will-change: transform;
}
.blob-btn__blob {
	position: absolute;
	top: 0;
	width: 25%;
	height: 100%;
	border-radius: 50%;
	background: var(--primary);
	transform: translate3d(0, 150%, 0) scale(1.4);
	transition: transform .45s;
}
.blob-btn__blob:nth-child(1) { left: 0; transition-delay: 0s; }
.blob-btn__blob:nth-child(2) { left: 30%; transition-delay: .08s; }
.blob-btn__blob:nth-child(3) { left: 60%; transition-delay: .16s; }
.blob-btn__blob:nth-child(4) { left: 90%; transition-delay: .24s; }
.blob-btn:hover { color: var(--white); }
.blob-btn:hover::after { inset: 0; transition-delay: 0s; }
.blob-btn:hover .blob-btn__blob { transform: translateZ(0) scale(1.4); }
