/*
Theme Name: Sumrak
Theme URI: https://example.com/
Author: Sumrak
Description: Tema za ART BAU: fiksna fotografija zalaska sunca kao pozadina, logo u sredini naslovnice i pločice usluga (Leistungen) koje vode na stranice s galerijom slika. Responzivna, pristupačna, font ugrađen u temu (GDPR prijateljski).
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sumrak
Tags: custom-background, custom-menu, featured-images, threaded-comments, translation-ready, blog, one-column, two-columns, accessibility-ready
*/

/* Work Sans (SIL Open Font License), ugrađen lokalno, bez veze s Google serverima */
@font-face {
	font-family: "Work Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/work-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Work Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/work-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Work Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/work-sans-latin-600-normal.woff2") format("woff2");
}

/* ==========================================================================
   1. Tokeni
   ========================================================================== */
:root {
	--dusk: #121629;
	--ember: #f29b4b;
	--brand: #c41e3a;
	--brand-hover: #de2d4d;
	--ember-deep: #d9792a;
	--lantern: #ffd59a;
	--marble: #f1ebdf;
	--ink: #ede6da;
	--muted: #bcb5c6;

	--glass: rgba(15, 17, 32, 0.68);
	--glass-solid: rgba(15, 17, 32, 0.92);
	--glass-edge: rgba(255, 213, 154, 0.2);

	--font-display: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--gutter: clamp(1rem, 4vw, 2rem);
	--bg-dim: 0.4; /* Customizer prepisuje ovu vrednost */
	--header-h: 4.5rem;
}

/* ==========================================================================
   2. Osnova
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--dusk);
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

img,
video,
iframe,
svg {
	max-width: 100%;
	height: auto;
}

img {
	display: block;
}

a {
	color: var(--lantern);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color 0.2s;
}

a:hover {
	color: #fff;
}

:focus-visible {
	outline: 2px solid var(--lantern);
	outline-offset: 3px;
	border-radius: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.6em;
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }

p {
	margin: 0 0 1.2em;
}

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

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 200;
	padding: 0.7rem 1.1rem;
	background: var(--brand);
	color: #fff;
	font-weight: 600;
	border-radius: 2px;
	text-decoration: none;
	transition: top 0.2s;
}

.skip-link:focus {
	top: 1rem;
	color: #fff;
}

.container {
	width: min(1120px, 100% - 2 * var(--gutter));
	margin-inline: auto;
}

.container--narrow {
	width: min(780px, 100% - 2 * var(--gutter));
}

/* ==========================================================================
   3. Pozadina (fiksna fotografija + zatamnjenje)
   ========================================================================== */
.site-bg,
.site-dim {
	position: fixed;
	inset: 0;
	pointer-events: none;
}

.site-bg {
	z-index: -2;
	background-color: var(--dusk);
	background-image: var(--bg-image-mobile);
	background-size: cover;
	background-position: 40% center;
	background-repeat: no-repeat;
}

@media (min-width: 900px) {
	.site-bg {
		background-image: var(--bg-image);
		background-position: center;
	}
}

/* Gradijent odozgo i odozdo da meni i podnožje ostanu čitljivi */
.site-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(10, 12, 26, 0.55) 0%,
		rgba(10, 12, 26, 0) 22%,
		rgba(10, 12, 26, 0) 55%,
		rgba(10, 12, 26, 0.55) 100%
	);
}

.site-dim {
	z-index: -1;
	background: #0b0d1c;
	opacity: var(--bg-dim);
	transition: opacity 0.7s ease;
}

/* Na naslovnici slika je u prvom planu; čim se krene dalje ili na unutrašnjim stranicama, pozadina se priguši radi čitljivosti */
body.is-scrolled .site-dim,
body:not(.has-hero) .site-dim {
	opacity: calc(var(--bg-dim) + 0.3);
}

/* ==========================================================================
   4. Zaglavlje i navigacija
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: linear-gradient(to bottom, rgba(10, 12, 26, 0.72), rgba(10, 12, 26, 0));
	transition: background-color 0.4s, box-shadow 0.4s;
}

body.is-scrolled .site-header,
body:not(.has-hero) .site-header {
	background: var(--glass);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	backdrop-filter: blur(16px) saturate(1.2);
	box-shadow: 0 1px 0 var(--glass-edge);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: var(--header-h);
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	min-width: 0;
}

.brand-text {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0.01em;
}

.brand-text a {
	display: inline-flex;
	gap: 0.35em;
	color: #f4f1f1;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none;
}

.brand-bau {
	color: var(--brand);
}

.brand-text a:hover .brand-bau {
	color: var(--brand-hover);
}

/* Na naslovnici je logo veliki u sredini, pa se u zaglavlju pojavi tek kad se krene dalje */
.has-hero .brand {
	opacity: 0;
	transition: opacity 0.4s;
}

.has-hero.is-scrolled .brand,
.has-hero .brand:focus-within {
	opacity: 1;
}

/* Meni */
.primary-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav a {
	display: block;
	padding: 0.5rem 0;
	color: var(--ink);
	text-decoration: none;
	font-size: 0.98rem;
	text-decoration: underline transparent;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.35em;
	transition: text-decoration-color 0.2s, color 0.2s;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-ancestor > a {
	color: #fff;
	text-decoration-color: var(--brand);
}

.primary-nav li {
	position: relative;
}

/* Podmeniji (desktop) */
.primary-nav .sub-menu,
.primary-nav .children {
	display: none;
}

@media (min-width: 861px) {
	.primary-nav .sub-menu,
	.primary-nav .children {
		position: absolute;
		top: 100%;
		left: -1rem;
		z-index: 10;
		min-width: 14rem;
		padding: 0.6rem 1rem;
		flex-direction: column;
		gap: 0;
		background: var(--glass-solid);
		border: 1px solid var(--glass-edge);
		border-radius: 4px;
		box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
	}

	.primary-nav li:hover > .sub-menu,
	.primary-nav li:focus-within > .sub-menu,
	.primary-nav li:hover > .children,
	.primary-nav li:focus-within > .children {
		display: flex;
	}
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 1rem;
	font: inherit;
	font-size: 0.95rem;
	color: var(--ink);
	background: transparent;
	border: 1px solid var(--glass-edge);
	border-radius: 2px;
	cursor: pointer;
}

.nav-toggle-bars {
	display: grid;
	gap: 4px;
}

.nav-toggle-bars span {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 860px) {
	.nav-toggle {
		display: inline-flex;
	}

	.primary-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		padding: 0.5rem var(--gutter) 1.2rem;
		background: var(--glass-solid);
		-webkit-backdrop-filter: blur(16px);
		backdrop-filter: blur(16px);
		border-bottom: 1px solid var(--glass-edge);
	}

	.primary-nav.is-open {
		display: block;
	}

	.primary-nav ul {
		flex-direction: column;
		gap: 0;
	}

	.primary-nav a {
		padding: 0.8rem 0;
		font-size: 1.05rem;
		border-bottom: 1px solid rgba(255, 213, 154, 0.1);
	}

	.primary-nav .sub-menu,
	.primary-nav .children {
		display: block;
		padding-left: 1rem;
	}
}

/* ==========================================================================
   5. Naslovnica: logo u sredini, pločice oko njega, laserske zrake
   ========================================================================== */
.stage {
	width: min(1180px, 100% - 2 * var(--gutter));
	margin-inline: auto;
	padding-block: 1rem 3rem;
}

/* Mobilni/tablet i "grid" način: logo gore, pločice u mreži ispod */
.stage-map {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 1.2rem;
}

.stage-beams {
	display: none;
}

/* Logo: kartica istog stila kao pločice */
.stage-logo {
	grid-column: 1 / -1;
	order: -1;
	justify-self: center;
	width: min(100%, 320px);
	padding: 1rem 1.2rem;
	background: rgba(16, 14, 18, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 20px 50px rgba(4, 5, 14, 0.45);
	transition: border-color 0.25s, box-shadow 0.25s;
}

.stage-logo-title {
	margin: 0;
	font-size: 1rem;
	line-height: 0;
}

.stage-logo img {
	display: block;
	width: 100%;
	height: auto;
}

.stage-empty {
	grid-column: 1 / -1;
}

/* Raspored oko loga (desktop): okvir fiksnog odnosa stranica, sve u procentima */
@media (min-width: 1000px) {
	.stage {
		padding-block: 0.5rem 1.5rem;
	}

	.stage-map:not(.stage-map--grid) {
		position: relative;
		display: block;
		container-type: inline-size;
		aspect-ratio: 1300 / 860;
		/* da cijeli raspored stane u visinu ekrana */
		width: min(100%, calc((100vh - var(--header-h) - 2rem) * 1.5116));
		width: min(100%, calc((100svh - var(--header-h) - 2rem) * 1.5116));
		margin-inline: auto;
	}

	.stage-map:not(.stage-map--grid) .stage-beams {
		position: absolute;
		inset: 0;
		z-index: 0;
		display: block;
		width: 100%;
		height: 100%;
		overflow: visible;
		pointer-events: none;
	}

	.stage-map:not(.stage-map--grid) .stage-logo {
		position: absolute;
		left: 50%;
		top: 50%;
		z-index: 2;
		width: 24cqw;
		padding: 1cqw 1.2cqw;
		background: rgba(16, 14, 18, 0.97);
		transform: translate(-50%, -50%);
	}

	/* Pločice su 15% manje nego prije (212 px umjesto 250 px pri punoj širini) */
	.stage-map:not(.stage-map--grid) .tile {
		position: absolute;
		left: calc(var(--x) * 1%);
		top: calc(var(--y) * 1%);
		z-index: 2;
		width: 18cqw;
		font-size: clamp(0.62rem, 1.18cqw, 0.9rem);
		background: rgba(16, 14, 18, 0.97);
		transform: translate(-50%, -50%);
	}

	.stage-map:not(.stage-map--grid) .tile-body {
		padding: 0.83em 1em 1em;
		gap: 0.7em;
	}

	.stage-map:not(.stage-map--grid) .tile-title {
		font-size: 1.06em;
	}

	.stage-map:not(.stage-map--grid) .tile-sub {
		margin-top: 0.2em;
		font-size: 0.8em;
	}

	.stage-map:not(.stage-map--grid) .tile-arrow {
		width: 1.75em;
		height: 1.75em;
	}

	.stage-map:not(.stage-map--grid) .tile-arrow svg {
		width: 1em;
		height: 1em;
	}
}

/* Laserske zrake: tanke i prigušene dok se ne pređe mišem preko pločice */
.beam,
.beam-glow {
	vector-effect: non-scaling-stroke;
	stroke-linecap: round;
}

.beam {
	stroke: rgba(255, 255, 255, 0.22);
	stroke-width: 1;
	transition: stroke 0.25s, stroke-width 0.25s;
}

.beam-glow {
	stroke: #ff1f45;
	stroke-width: 8;
	opacity: 0;
	transition: opacity 0.25s;
}

.beam.is-lit {
	stroke: #ff3a5a;
	stroke-width: 2.2;
}

.beam-glow.is-lit {
	opacity: 0.38;
}

.stage-map.has-lit .stage-logo {
	border-color: rgba(255, 58, 90, 0.7);
	box-shadow: 0 0 30px rgba(255, 31, 69, 0.3), 0 20px 50px rgba(4, 5, 14, 0.45);
}

/* Pločica usluge */
.tile {
	position: relative;
	display: flex;
	flex-direction: column;
	background: rgba(16, 14, 18, 0.88);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 20px 50px rgba(4, 5, 14, 0.45);
	transition: border-color 0.25s;
}

.tile-media {
	aspect-ratio: 230 / 142;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.06);
}

.tile-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tile-body {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.85rem 1rem 1rem;
}

.tile-title {
	margin: 0;
	font-size: 1.08rem;
	font-weight: 500;
	line-height: 1.2;
	text-wrap: balance;
}

.tile-title a {
	color: #fff;
	text-decoration: none;
}

/* Cela pločica je klikabilna */
.tile-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tile-sub {
	margin: 0.25rem 0 0;
	font-size: 0.82rem;
	line-height: 1.4;
	color: #d3cdda;
}

.tile-arrow {
	display: grid;
	flex: none;
	place-items: center;
	width: 28px;
	height: 28px;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.75);
	transition: background-color 0.2s, border-color 0.2s;
}

.tile:hover,
.tile:focus-within {
	border-color: var(--brand);
}

.tile:hover .tile-arrow,
.tile:focus-within .tile-arrow {
	background: var(--brand);
	border-color: var(--brand);
}

.tile-title a:focus-visible {
	outline: none;
}

.tile:has(.tile-title a:focus-visible) {
	outline: 2px solid var(--lantern);
	outline-offset: 3px;
}

/* Pregled usluga (arhiva) */
.tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 1.5rem;
}

/* ==========================================================================
   5b. Stranica usluge i galerija
   ========================================================================== */
.back-link {
	margin: 0 0 1rem;
	font-size: 0.95rem;
}

.back-link a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--ink);
	text-decoration: none;
}

.back-link a:hover {
	color: #fff;
}

.back-arrow {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	transform: scaleX(-1);
}

.service-header {
	margin-bottom: 1.6rem;
}

.service-header .entry-title {
	margin-bottom: 0.2em;
}

.service-sub {
	margin: 0;
	font-size: 1.1rem;
	color: var(--lantern);
}

.entry-content.entry-content--wide {
	max-width: none;
	margin-inline: 0;
}

.entry-content.entry-content--wide > p {
	max-width: 68ch;
}

/* Galerija: mreža slika, klik otvara uvećan prikaz */
.wp-block-gallery.has-nested-images {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 0.8rem !important;
	margin: 2rem 0 0;
}

.wp-block-gallery.has-nested-images:empty {
	display: none !important;
}

.wp-block-gallery.has-nested-images figure.wp-block-image {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	flex: none !important;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
}

.wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.35s ease;
}

.wp-block-gallery.has-nested-images figure.wp-block-image:hover img {
	transform: scale(1.04);
}

.wp-block-gallery.has-nested-images figure.wp-block-image a,
.gallery a {
	display: block;
	cursor: zoom-in;
}

.gallery .gallery-icon img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* CTA i ostale usluge */
.cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem 2rem;
	margin-top: 1.5rem;
}

.cta-title {
	margin-bottom: 0.2em;
	font-size: 1.4rem;
}

.cta-text {
	margin: 0;
	color: var(--muted);
}

.cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
}

.button--ghost {
	color: #fff;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.7);
}

.button--ghost:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
}

.more-services {
	margin-top: 2rem;
}

.more-title {
	margin-bottom: 0.7em;
	font-size: 1.1rem;
	color: var(--muted);
	font-weight: 500;
}

.chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.chip-list a {
	display: inline-block;
	padding: 0.5rem 1rem;
	color: var(--ink);
	text-decoration: none;
	background: var(--glass);
	border: 1px solid var(--glass-edge);
	transition: border-color 0.2s, background-color 0.2s;
}

.chip-list a:hover {
	color: #fff;
	background: var(--brand);
	border-color: var(--brand);
}

/* Lightbox */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 3.5rem 1rem;
	background: rgba(6, 7, 16, 0.94);
}

.lightbox[hidden] {
	display: none;
}

.lightbox-img {
	max-width: min(1400px, 100%);
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	font: inherit;
	font-size: 1.5rem;
	line-height: 1;
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 2px;
	cursor: pointer;
}

.lightbox-btn:hover {
	background: var(--brand);
	border-color: var(--brand);
}

.lightbox-close {
	top: 0.8rem;
	right: 0.8rem;
}

.lightbox-prev,
.lightbox-next {
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-prev {
	left: 0.8rem;
}

.lightbox-next {
	right: 0.8rem;
}

.lightbox-count {
	position: absolute;
	bottom: 1rem;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 0.9rem;
	color: var(--muted);
}

body.lightbox-open {
	overflow: hidden;
}

/* ==========================================================================
   6. Dugmad
   ========================================================================== */
.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"],
.comment-form .submit {
	display: inline-block;
	padding: 0.85rem 1.7rem;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background: var(--brand);
	border: 0;
	border-radius: 2px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.2s;
}

.button:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
	color: #fff;
	background: var(--brand-hover);
}

.button:active,
button[type="submit"]:active,
input[type="submit"]:active {
	transform: translateY(1px);
}

/* ==========================================================================
   7. Glavni sadržaj i staklene ploče
   ========================================================================== */
.site-main {
	min-height: 40vh;
}

.content-area {
	padding-block: clamp(2rem, 6vw, 4.5rem);
}

.panel {
	background: var(--glass);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	border: 1px solid var(--glass-edge);
	border-radius: 4px;
	box-shadow: 0 24px 60px rgba(4, 5, 14, 0.35);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.panel,
	body.is-scrolled .site-header,
	body:not(.has-hero) .site-header {
		background: var(--glass-solid);
	}
}

.panel--padded {
	padding: clamp(1.4rem, 4vw, 3rem);
}

.page-header {
	margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.page-title {
	margin-bottom: 0.3em;
}

.page-description {
	max-width: 60ch;
	color: var(--muted);
}

/* ==========================================================================
   8. Kartice članaka
   ========================================================================== */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
	gap: 1.5rem;
}

.card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--glass);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
	border: 1px solid var(--glass-edge);
	border-radius: 4px;
	box-shadow: 0 24px 60px rgba(4, 5, 14, 0.3);
	transition: border-color 0.25s;
}

.card:hover,
.card:focus-within {
	border-color: rgba(255, 213, 154, 0.5);
}

.card-media {
	display: block;
	aspect-ratio: 800 / 520;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.4rem 1.5rem 1.6rem;
}

.card-title {
	margin-bottom: 0.5em;
	font-size: 1.4rem;
}

.card-title a {
	color: inherit;
	text-decoration: none;
}

.card-title a:hover {
	color: var(--lantern);
}

.card-excerpt {
	flex: 1;
	color: var(--muted);
	font-size: 0.98rem;
}

.card-excerpt p:last-child {
	margin-bottom: 0;
}

.card-link {
	align-self: flex-start;
	margin-top: 1.1rem;
	font-weight: 600;
	text-decoration-color: var(--ember);
	text-decoration-thickness: 2px;
}

/* Prvi članak na naslovnici/blogu je širi */
@media (min-width: 860px) {
	.post-grid--lead > .card:first-child {
		grid-column: 1 / -1;
		flex-direction: row;
	}

	.post-grid--lead > .card:first-child .card-media {
		flex: 0 0 52%;
		aspect-ratio: auto;
		min-height: 320px;
	}

	.post-grid--lead > .card:first-child .card-body {
		justify-content: center;
		padding: 2.2rem 2.4rem;
	}

	.post-grid--lead > .card:first-child .card-title {
		font-size: 2rem;
	}
}

/* Meta podaci */
.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1.1rem;
	margin: 0 0 0.7rem;
	font-size: 0.88rem;
	color: var(--muted);
}

.meta a {
	color: var(--ember);
	text-decoration: none;
}

.meta a:hover {
	color: var(--lantern);
}

/* ==========================================================================
   9. Pojedinačan članak / stranica
   ========================================================================== */
.entry-header {
	margin-bottom: 1.8rem;
}

.entry-title {
	font-size: clamp(2rem, 5vw, 3.2rem);
	margin-bottom: 0.4em;
}

.entry-thumb {
	margin: 0 0 2rem;
	overflow: hidden;
	border-radius: 4px;
}

.entry-thumb img {
	width: 100%;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content {
	max-width: 68ch;
	margin-inline: auto;
	font-size: 1.0625rem;
	line-height: 1.8;
}

.entry-content > .alignwide,
.entry-content > .alignfull {
	max-width: none;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 1.8em;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
	margin: 0 0 1.2em;
}

.entry-content li + li {
	margin-top: 0.3em;
}

.entry-content li::marker {
	color: var(--brand);
}

blockquote,
.wp-block-quote {
	margin: 1.8em 0;
	padding: 0.2em 0 0.2em 1.4em;
	border-left: 3px solid var(--brand);
	font-family: var(--font-display);
	font-size: 1.2em;
	font-style: italic;
	color: var(--marble);
}

blockquote cite,
.wp-block-quote cite {
	display: block;
	margin-top: 0.6em;
	font-family: var(--font-body);
	font-size: 0.85rem;
	font-style: normal;
	color: var(--muted);
}

hr,
.wp-block-separator {
	height: 1px;
	margin: 2.5rem 0;
	border: 0;
	background: var(--glass-edge);
}

pre,
code,
kbd {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

code,
kbd {
	padding: 0.15em 0.4em;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 5px;
}

pre {
	padding: 1.1rem 1.3rem;
	overflow-x: auto;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid var(--glass-edge);
	border-radius: 3px;
}

pre code {
	padding: 0;
	background: none;
}

table {
	width: 100%;
	margin-bottom: 1.5em;
	border-collapse: collapse;
	font-size: 0.97rem;
}

th,
td {
	padding: 0.65rem 0.8rem;
	text-align: left;
	border-bottom: 1px solid var(--glass-edge);
}

th {
	color: #fff;
	font-weight: 600;
}

figure {
	margin: 1.8em 0;
}

figcaption,
.wp-caption-text,
.wp-element-caption {
	margin-top: 0.6rem;
	font-size: 0.88rem;
	color: var(--muted);
}

.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-footer {
	max-width: 68ch;
	margin: 2.5rem auto 0;
	padding-top: 1.4rem;
	border-top: 1px solid var(--glass-edge);
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tag-list a {
	display: inline-block;
	padding: 0.2rem 0.85rem;
	font-size: 0.88rem;
	color: var(--ink);
	text-decoration: none;
	border: 1px solid var(--glass-edge);
	border-radius: 2px;
}

.tag-list a:hover {
	color: var(--dusk);
	background: var(--lantern);
	border-color: var(--lantern);
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-top: 1.5rem;
}

.post-nav a {
	display: block;
	height: 100%;
	padding: 1.1rem 1.3rem;
	color: var(--ink);
	text-decoration: none;
	background: var(--glass);
	border: 1px solid var(--glass-edge);
	border-radius: 4px;
	transition: border-color 0.2s;
}

.post-nav a:hover {
	border-color: rgba(255, 213, 154, 0.5);
}

.post-nav small {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--muted);
}

.post-nav .nav-next {
	grid-column: 2;
	text-align: right;
}

.post-nav .nav-previous:only-child {
	grid-column: 1;
}

@media (max-width: 600px) {
	.post-nav {
		grid-template-columns: 1fr;
	}

	.post-nav .nav-next {
		grid-column: 1;
		text-align: left;
	}
}

/* ==========================================================================
   10. Paginacija
   ========================================================================== */
.pagination,
.navigation.pagination {
	margin-top: 2.5rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6rem;
	height: 2.6rem;
	padding: 0 0.9rem;
	color: var(--ink);
	text-decoration: none;
	background: var(--glass);
	border: 1px solid var(--glass-edge);
	border-radius: 2px;
}

a.page-numbers:hover {
	color: var(--dusk);
	background: var(--lantern);
}

.page-numbers.current {
	color: #fff;
	background: var(--brand);
	border-color: var(--brand);
	font-weight: 600;
}

/* ==========================================================================
   11. Formulari
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
	width: 100%;
	padding: 0.8rem 1rem;
	font: inherit;
	color: var(--ink);
	background: rgba(8, 10, 22, 0.55);
	border: 1px solid var(--glass-edge);
	border-radius: 3px;
}

input::placeholder,
textarea::placeholder {
	color: var(--muted);
}

input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--lantern);
	outline-offset: 1px;
	border-color: transparent;
}

label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.95rem;
}

.search-form {
	display: flex;
	gap: 0.6rem;
	max-width: 32rem;
}

.search-form label {
	flex: 1;
	margin: 0;
}

/* ==========================================================================
   12. Komentari
   ========================================================================== */
.comments-area {
	max-width: 68ch;
	margin: 2.5rem auto 0;
}

.comments-title {
	font-size: 1.5rem;
}

.comment-list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 0;
	padding-left: clamp(1rem, 4vw, 2.2rem);
	list-style: none;
}

.comment-body {
	padding: 1.2rem 0;
	border-bottom: 1px solid var(--glass-edge);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3rem 0.8rem;
	margin-bottom: 0.6rem;
	font-size: 0.88rem;
	color: var(--muted);
}

.comment-meta .avatar {
	border-radius: 50%;
}

.comment-meta a {
	color: var(--muted);
}

.comment-author .fn {
	font-style: normal;
	font-weight: 600;
	color: #fff;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.reply a {
	font-size: 0.9rem;
	font-weight: 600;
}

.comment-respond {
	margin-top: 1.5rem;
}

.comment-form p {
	margin-bottom: 1rem;
}

/* ==========================================================================
   13. Widgeti i podnožje
   ========================================================================== */
.site-footer {
	margin-top: 2rem;
	background: var(--glass);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
	backdrop-filter: blur(16px) saturate(1.2);
	border-top: 1px solid var(--glass-edge);
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 2rem;
	padding-block: 3rem 1.5rem;
}

.widget {
	font-size: 0.97rem;
}

.widget-title {
	margin-bottom: 0.7em;
	font-size: 1.1rem;
	color: var(--lantern);
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding: 0.3rem 0;
}

.widget a {
	color: var(--ink);
	text-decoration: none;
}

.widget a:hover {
	color: var(--lantern);
	text-decoration: underline;
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem 2rem;
	padding-block: 1.4rem;
	font-size: 0.9rem;
	color: var(--muted);
}

.footer-bottom p {
	margin: 0;
}

.footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-nav a {
	color: var(--muted);
	text-decoration: none;
}

.footer-nav a:hover {
	color: var(--lantern);
	text-decoration: underline;
}

.footer-widgets + .footer-bottom {
	border-top: 1px solid var(--glass-edge);
}

/* ==========================================================================
   14. 404 i prazni rezultati
   ========================================================================== */
.empty-state {
	text-align: center;
}

.empty-state .search-form {
	margin: 1.5rem auto;
}

.empty-state p {
	max-width: 46ch;
	margin-inline: auto;
	color: var(--muted);
}

/* ==========================================================================
   15. WordPress blokovi (osnovno)
   ========================================================================== */
.wp-block-image img,
.wp-block-gallery img {
	border-radius: 3px;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--lantern);
	background: transparent;
	border: 2px solid var(--lantern);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	color: var(--dusk);
	background: var(--lantern);
}

.wp-block-group.has-background,
.wp-block-cover {
	border-radius: 4px;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.8rem;
}

.gallery-item {
	margin: 0;
}

/* ==========================================================================
   16. Smanjeno kretanje
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
