/*
 * Novosti page (page-news.php).
 *
 * Loaded AFTER services.css so the service-* layout primitives
 * (.service-hero, .service-content, .service-sidebar, .service-section,
 * .service-form, .service-poslovnice) are available. This file owns:
 *   - the overlay-header rules keyed to .page-template-page-news,
 *   - the news listing layout (.news-grid: 2-up grid of vertical cards),
 *   - the news-card BEM block (mirror of .home-blog-card from home.css,
 *     namespaced so tweaks on the news page don't bleed to the homepage),
 *   - the Figma-spec pagination row (round circles + prev/next arrows).
 *
 * The .news-card design intentionally tracks .home-blog-card (image-on-top
 * vertical card with meta / title / excerpt / "Saznaj više" + plus icon).
 * Edit values here when the news page should diverge.
 *
 * Figma reference: frame `83:3065` ("NOVOSTI BLOG", 1440 desktop only).
 */

/* --------------------------------------------------------------
 * Overlay header — matches every other inner template.
 * -------------------------------------------------------------- */
.page-template-page-news .site-header {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10;
}

.page-template-page-news .site-main {
	margin-top: 0;
	overflow-x: clip;
}

/* --------------------------------------------------------------
 * News listing — 2-column grid of vertical cards (per Figma).
 * -------------------------------------------------------------- */
.news-list-section {
	margin-bottom: 56px;
}

.news-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.news-list__empty {
	margin: 0;
	padding: 32px 30px;
	background: #fff;
	border: 1px solid #c3c3c3;
	border-radius: var(--radius-md);
	color: var(--color-text-muted);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 26px;
}

/* --------------------------------------------------------------
 * .news-card — namespaced mirror of .home-blog-card. Keep the
 * values in sync with that block unless the news page should
 * intentionally differ. See home.css starting at .home-blog-card.
 * -------------------------------------------------------------- */
.news-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #cacaca;
	border-radius: 10px;
}

.news-card__media,
.news-card__media img,
.news-card__media .news-card__media-placeholder {
	display: block;
	width: 100%;
	height: 210px;
}

.news-card__media img,
.news-card__media .news-card__media-placeholder {
	border-radius: 10px;
}

.news-card__media img {
	object-fit: cover;
}

.news-card__media .news-card__media-placeholder {
	background: linear-gradient(135deg, #d8d8d8 0%, #ececec 100%);
}

.news-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 26px 30px 22px;
}

.news-card .news-card__meta {
	display: flex;
	gap: 6px;
	align-items: baseline;
	margin: 0 0 8px;
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 13px;
	line-height: 26px;
	color: #6a6a6a;
}

.news-card .news-card__meta time {
	font: inherit;
	color: #6a6a6a;
	letter-spacing: inherit;
	text-transform: none;
}

.news-card .news-card__title {
	margin: 0 0 14px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 18px;
	line-height: 28px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #0a0a0a;
}

.news-card .news-card__title a {
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-decoration: none;
}

.news-card .news-card__title a:hover,
.news-card .news-card__title a:focus {
	color: #bb2548;
	text-decoration: none;
}

.news-card .news-card__excerpt {
	margin: 0 0 22px;
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #565656;
}

.news-card__more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: auto -30px 0;
	padding: 18px 30px 0;
	border-top: 1px solid #e6e6e6;
	color: #0a0a0a;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	text-decoration: none;
}

.news-card__more:hover,
.news-card__more:focus {
	color: #bb2548;
	text-decoration: none;
}

.news-card__more > span:first-child {
	font: inherit;
	letter-spacing: inherit;
}

.news-card__plus {
	position: relative;
	display: block;
	width: 50px;
	height: 50px;
	flex: 0 0 50px;
	background: #0a0a0a;
	border-radius: 50%;
	transition: background-color 180ms ease;
}

.news-card__more:hover .news-card__plus,
.news-card__more:focus .news-card__plus {
	background: #bb2548;
}

.news-card__plus::before,
.news-card__plus::after {
	position: absolute;
	top: 50%;
	left: 50%;
	background: #fff;
	content: "";
	transform: translate(-50%, -50%);
}

.news-card__plus::before {
	width: 2px;
	height: 18px;
}

.news-card__plus::after {
	width: 20px;
	height: 2px;
}

/* --------------------------------------------------------------
 * Pagination — Figma anchors (frame 83:3065 / ellipse 84:27..33):
 *   each pill = 66px circle, ~8px gutters
 *   inactive  = transparent bg, ink number
 *   active    = brand red bg, white number
 *   prev/next = transparent bg with chevron glyph
 *   "…"       = same circle, ink dots
 * -------------------------------------------------------------- */
.news-pagination {
	margin: 0;
}

.news-pagination__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-pagination__item {
	margin: 0;
}

.news-pagination__item .page-numbers,
.news-pagination__item > a.page-numbers,
.news-pagination__item > span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 50%;
	color: var(--color-ink);
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.5px;
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.news-pagination__item > a.page-numbers:hover,
.news-pagination__item > a.page-numbers:focus {
	background: rgba(187, 37, 72, 0.08);
	border-color: var(--color-brand-red);
	color: var(--color-brand-red);
}

.news-pagination__item > span.page-numbers.current {
	background: var(--color-brand-red);
	border-color: var(--color-brand-red);
	color: #fff;
}

.news-pagination__item > span.page-numbers.dots {
	letter-spacing: 2px;
	background: transparent;
	color: var(--color-ink);
}

.news-pagination__item > a.page-numbers.prev,
.news-pagination__item > a.page-numbers.next {
	position: relative;
}

.news-pagination__arrow {
	position: relative;
	display: inline-block;
	width: 16px;
	height: 12px;
}

.news-pagination__arrow::before {
	position: absolute;
	top: 50%;
	left: 50%;
	display: block;
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: "";
	transform: translate(-50%, -50%) rotate(45deg);
}

.news-pagination__arrow--prev::before {
	transform: translate(-50%, -50%) rotate(-135deg);
}

.news-pagination .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
	white-space: nowrap;
}

/* --------------------------------------------------------------
 * Responsive
 * -------------------------------------------------------------- */
@media screen and (max-width: 991px) {
	.news-list-section {
		margin-bottom: 48px;
	}

	.news-grid {
		gap: 24px;
		margin-bottom: 32px;
	}

	.news-card__body {
		padding: 22px 22px 20px;
	}

	.news-card__more {
		margin: auto -22px 0;
		padding: 14px 22px 0;
	}

	.news-pagination__list {
		gap: 6px;
	}

	.news-pagination__item .page-numbers,
	.news-pagination__item > a.page-numbers,
	.news-pagination__item > span.page-numbers {
		width: 56px;
		height: 56px;
		font-size: 16px;
	}
}

@media screen and (max-width: 599px) {
	.news-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 24px;
	}

	.news-card__body {
		padding: 22px;
	}

	.news-pagination__list {
		gap: 4px;
	}

	.news-pagination__item .page-numbers,
	.news-pagination__item > a.page-numbers,
	.news-pagination__item > span.page-numbers {
		width: 44px;
		height: 44px;
		font-size: 14px;
	}

	.news-pagination__arrow {
		width: 12px;
		height: 10px;
	}

	.news-pagination__arrow::before {
		width: 6px;
		height: 6px;
	}
}
