/* Homepage sections are full-bleed and self-spaced; remove Kadence's default
   content-area vertical margin (5rem) so the hero sits flush under the header
   and the footer butts up under the last section. Scoped to the homepage. */
.home .content-area {
	margin-top: 0;
	margin-bottom: 0;
}

/* Hero — full-width parallax banner. The image is the front page's featured
   image, applied as a fixed-attachment background via enqueue.php. Text-free
   by design; a solid teal band shows until a featured image is set. */

.front-hero {
	min-height: 60vh;
	background-color: var(--color-teal);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

/* Service blocks */

.front-services {
	padding: var(--space-xl) var(--space-sm);
}

.front-services__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-md);
	max-width: var(--max-width);
	margin: 0 auto;
	list-style: none;
	padding: 0;
}

.front-services__item {
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	transition: var(--transition-bounce), box-shadow 0.3s ease;
}

.front-services__item:hover,
.front-services__item:focus-within {
	transform: translateY(-12px) scale(1.03);
	box-shadow: var(--shadow-card-hover);
	z-index: 1; /* keep the popped card above its neighbours (grid item) */
}

.front-services__item--teal {
	background: var(--color-teal);
}

.front-services__item--coral {
	background: var(--color-coral);
}

.front-services__item--green {
	background: var(--color-green);
}

.front-services__item--yellow {
	background: var(--color-yellow);
}

/* Whole card is one link; the CTA is a visual affordance inside it */
.front-services__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	height: 100%;
	padding: var(--space-lg) var(--space-md);
	border-radius: var(--radius-card);
	color: var(--color-white);
	text-align: center;
	text-decoration: none;
}

.front-services__title {
	color: var(--color-white);
	font-family: var(--font-head);
	font-size: var(--font-size-lg);
	margin: 0;
}

.front-services__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	background: var(--color-white);
	box-shadow: var(--shadow-card);
	color: inherit;
}

.front-services__icon svg {
	width: 2.25rem;
	height: 2.25rem;
}

.front-services__item--teal .front-services__icon {
	color: var(--color-teal);
}

.front-services__item--coral .front-services__icon {
	color: var(--color-coral);
}

.front-services__item--green .front-services__icon {
	color: var(--color-green);
}

.front-services__item--yellow .front-services__icon {
	color: var(--color-yellow);
}

/* Prevent Kadence's underline-on-hover on the whole-card link. */
.front-services__card:hover,
.front-services__card:focus-visible {
	text-decoration: none;
}

/* News feed */

.front-news {
	background: var(--color-white);
	padding: var(--space-xl) var(--space-sm);
}

.front-news__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.front-news__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	margin-bottom: var(--space-lg);
}

.front-news__title {
	margin: 0;
	color: var(--color-coral);
	font-size: var(--font-size-md);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.front-news__title::before {
	content: "•";
	margin-right: 0.6em;
}

.front-news__title::after {
	content: "•";
	margin-left: 0.6em;
}

.front-news__filter {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
}

.front-news__filter-link {
	display: inline-block;
	padding: var(--space-xs) var(--space-sm);
	border-radius: var(--radius);
	color: var(--color-white);
	font-family: var(--font-head);
	font-size: var(--font-size-sm);
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

/* Keep text white / un-underlined in every hover-focus state (beats Kadence). */
.front-news__filter-link:hover,
.front-news__filter-link:focus {
	color: var(--color-white);
	text-decoration: none;
}

/* Tactile lift on hover/keyboard-focus — rises with a subtle pop and soft
   shadow, consistent with the cards. The selected chip stays put (it keeps its
   ring instead). */
.front-news__filter-link:not(.is-active):hover,
.front-news__filter-link:not(.is-active):focus-visible {
	transform: translateY(-3px) scale(1.04);
	box-shadow: var(--shadow-card);
	z-index: 1;
}

.front-news__filter-link--teal {
	background: var(--color-teal);
}

.front-news__filter-link--coral {
	background: var(--color-coral);
}

.front-news__filter-link--green {
	background: var(--color-green);
}

.front-news__filter-link--yellow {
	background: var(--color-yellow);
}

/* Selected filter — a white inset ring marks the active chip. */
.front-news__filter-link.is-active {
	box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}

/* Filter transition — fade the current cards out, then stagger the new ones in
   with a subtle rise (never an instant hard swap). */
.front-news__grid.is-exiting {
	opacity: 0;
	transition: opacity 0.2s ease;
}

@keyframes slapic-news-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.front-news__grid.is-entering > * {
	animation: slapic-news-in 0.4s ease both;
}

.front-news__grid.is-entering > *:nth-child(2) {
	animation-delay: 0.06s;
}

.front-news__grid.is-entering > *:nth-child(3) {
	animation-delay: 0.12s;
}

.front-news__grid.is-entering > *:nth-child(4) {
	animation-delay: 0.18s;
}

.front-news__grid.is-entering > *:nth-child(5) {
	animation-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
	.front-news__grid.is-exiting {
		transition: none;
	}

	.front-news__grid.is-entering > * {
		animation: none;
	}
}

.front-news__empty {
	grid-column: 1 / -1;
	color: var(--color-text);
}

/* minmax(0, …) not a bare 1fr: the card's clamped excerpt is a -webkit-box,
   which reports its full unwrapped text width as min-content, and a bare fr
   track takes min-content as its floor — inflating the column past the
   viewport on mobile. */
.front-news__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-lg);
}

.front-news__more {
	text-align: center;
	margin-top: var(--space-md);
}

/* Photo grid */

.front-photos {
	background: var(--color-bg);
	padding: var(--space-xl) var(--space-sm);
}

.front-photos__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.front-photos__title {
	text-align: center;
	margin-bottom: var(--space-lg);
}

.front-photos__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-xs);
}

.front-photos__item {
	display: block;
	line-height: 0;
	transition: var(--transition);
}

.front-photos__item:hover {
	opacity: 0.85;
}

.front-photos__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--radius);
}

.front-photos__more {
	text-align: center;
	margin-top: var(--space-md);
}

/* Media queries */

@media (min-width: 600px) {
	.front-services__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.front-news__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.front-photos__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	/* Parallax — background-attachment:fixed is unreliable/janky on mobile &
	   iOS, so only larger screens get the effect; mobile scrolls normally. */
	.front-hero {
		background-attachment: fixed;
	}

	.front-services__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.front-news__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.front-photos__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* "Zajedno u svakom koraku" — thank-you section */

.front-thanks {
	padding: var(--space-xl) var(--space-sm);
}

.front-thanks__card {
	max-width: var(--max-width);
	margin: 0 auto;
	background: var(--color-white);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	padding: var(--space-lg);
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-lg);
	align-items: center;
	transition: box-shadow 0.3s ease;
}

.front-thanks__card:hover {
	box-shadow: var(--shadow-card-hover);
}

.front-thanks__kicker {
	margin: 0 0 var(--space-sm);
	color: var(--color-coral);
	font-family: var(--font-head);
	font-size: var(--font-size-md);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.front-thanks__kicker::before,
.front-thanks__kicker::after {
	content: "•";
	margin: 0 0.6em;
}

.front-thanks__heading {
	margin: 0 0 var(--space-sm);
	font-size: var(--font-size-xl);
	line-height: 1.25;
}

.front-thanks__body {
	margin: 0;
	max-width: 46ch;
}

/* "Mama, budi zdrava!" — campaign section */

.front-campaign {
	padding: var(--space-xl) var(--space-sm);
}

.front-campaign__card {
	max-width: var(--max-width);
	margin: 0 auto;
	background: var(--color-white);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	padding: var(--space-lg);
}

.front-campaign__heading {
	margin: 0 0 var(--space-lg);
	text-align: center;
	font-size: var(--font-size-2xl);
}

.front-campaign__intro {
	max-width: 760px;
	margin: 0 auto var(--space-lg);
}

.front-campaign__intro p {
	margin: 0 0 var(--space-sm);
}

.front-campaign__intro p:last-child {
	margin-bottom: 0;
}

.front-campaign__videos {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-sm);
}

/* Shared video-frame component — used by both sections above */

.front-video-frame {
	position: relative;
	aspect-ratio: 3 / 2;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--color-heading);
	transition: var(--transition-bounce);
}

.front-video-frame:hover,
.front-video-frame:focus-within {
	transform: scale(1.015);
}

.front-video-frame__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.front-video-frame__video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.front-video-frame__trigger {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
}

/* Kadence globally styles button:hover/:focus/:active with its palette blue
   and a drop shadow; button:hover (0,1,1) out-specifies a single class
   (0,1,0), so all three states must be neutralised explicitly — see the same
   pattern in legal-page.css. */
.front-video-frame__trigger:hover,
.front-video-frame__trigger:focus,
.front-video-frame__trigger:active {
	background: transparent;
	box-shadow: none;
}

.front-video-frame__play-icon {
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-white);
	box-shadow: var(--shadow-card);
	transition: var(--transition);
}

.front-video-frame__trigger:hover .front-video-frame__play-icon,
.front-video-frame__trigger:focus-visible .front-video-frame__play-icon {
	background: var(--color-coral);
}

.front-video-frame__play-icon svg {
	width: 1.4rem;
	height: 1.4rem;
	margin-left: 3px;
	fill: var(--color-coral);
	transition: var(--transition);
}

.front-video-frame__trigger:hover .front-video-frame__play-icon svg,
.front-video-frame__trigger:focus-visible .front-video-frame__play-icon svg {
	fill: var(--color-white);
}

/* Media queries */

@media (min-width: 700px) {
	.front-thanks__card {
		grid-template-columns: 1fr 1fr;
		padding: var(--space-xl);
	}

	.front-campaign__videos {
		grid-template-columns: 1fr 1fr;
	}

	.front-campaign__card {
		padding: var(--space-xl);
	}
}

