/*
 * Foto i video galerija — listing + single.
 *
 * Loaded AFTER services.css (and news.css on the listing) so the layout
 * primitives (.service-hero, .service-content, .service-sidebar,
 * .service-section, .news-card, .news-grid, .news-pagination) are
 * already available. This file owns only what's specific to this
 * surface pair:
 *   - overlay-header rules keyed to .page-template-page-foto-i-video-galerija
 *     and to .single-foto_video_galerija (WP-default body class on
 *     every CPT single),
 *   - the date meta line inside .service-hero on the single template.
 *
 * Typography for the post body is intentionally inherited from
 * global.css so single galleries read the same as everywhere else.
 */

/* --------------------------------------------------------------
 * Overlay header — listing Page (template page-foto-i-video-galerija.php).
 * -------------------------------------------------------------- */
.page-template-page-foto-i-video-galerija .site-header {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10;
}

.page-template-page-foto-i-video-galerija .site-main {
	margin-top: 0;
	overflow-x: clip;
}

/* --------------------------------------------------------------
 * Overlay header — single CPT post (body class .single-foto_video_galerija).
 * -------------------------------------------------------------- */
.single-foto_video_galerija .site-header {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10;
}

.single-foto_video_galerija .site-main {
	margin-top: 0;
	overflow-x: clip;
}

/* --------------------------------------------------------------
 * Hero date meta — small line above the title inside .service-hero
 * on the single template.
 * -------------------------------------------------------------- */
.single-fivg-hero__meta {
	margin: 0 0 14px;
	font-family: var(--font-heading);
	font-weight: 500;
	font-size: 13px;
	line-height: 20px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

.single-fivg-hero__meta time {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}

/* --------------------------------------------------------------
 * Listing — col-8 grid + cards.
 *
 * Translated 1:1 from Figma frame `VIDEO I FOTO GALERIJA` (`84:172`):
 *   - 2-column grid, 30px col gap, ~39px row gap (Figma values
 *     row-1 button-bottom y=1226 → row-2 image-top y=1265).
 *   - Each card has no border / background / inner padding; the
 *     image fills the column width as a 1:1 square with 10px
 *     rounding, then title + red CTA button stack below it.
 *   - Title sits 27px below the image (Figma 1093→1120) and the
 *     button sits 25px below the title (Figma 1144→1172 for the
 *     1-line case, 1731→1757 for the 3-line case — same gap).
 *
 * Empty + pagination keep the same visual treatment as the news
 * listing (the design uses the identical numeric pills there).
 * -------------------------------------------------------------- */
.fivg-list-section {
	margin-bottom: 56px;
}

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

.fivg-card {
	display: flex;
	flex-direction: column;
}

.fivg-card__media {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #eaeaea;
	border-radius: 10px;
}

.fivg-card__media img,
.fivg-card__media .fivg-card__media-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

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

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

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

.fivg-card__cta {
	align-self: flex-start;
	margin-top: 25px;
}

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

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

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

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

	.fivg-card__title {
		margin-top: 22px;
		font-size: 17px;
		line-height: 26px;
	}

	.fivg-card__cta {
		margin-top: 20px;
	}
}
