/*
Theme Name: VK Đakovo
Theme URI: https://vk-djakovo.hr/
Author: VK Đakovo
Description: Moderna tema za Vaterpolo klub Đakovo u klupskim bojama.
Version: 3.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: vk-djakovo
*/

:root {
	--ink: #0b0c2a;
	--ink-2: #15174d;
	--indigo: #2b2c8f;
	--indigo-2: #4446c9;
	--indigo-soft: #eef0ff;
	--gold: #ffc61a;
	--gold-2: #ffd84d;
	--bg: #f5f6fb;
	--surface: #ffffff;
	--text: #1a1c3a;
	--muted: #5f6385;
	--border: #e5e7f3;
	--radius: 20px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(11, 12, 42, .04), 0 10px 30px -12px rgba(11, 12, 42, .14);
	--shadow-lg: 0 30px 60px -20px rgba(11, 12, 42, .35);
	--container: 1200px;
	--header-h: 76px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.7;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }

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

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--indigo-2); }

h1, h2, h3, h4 { line-height: 1.15; color: var(--ink); margin: 0 0 .6em; font-weight: 800; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.25rem; letter-spacing: -.015em; }

::selection { background: var(--gold); color: var(--ink); }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 1rem; left: 1rem; z-index: 1000;
	padding: .6rem 1rem; background: #fff; border-radius: 8px;
}

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

/* ---------- Top bar ---------- */
.topbar {
	background: var(--ink);
	color: rgba(255, 255, 255, .7);
	font-size: .85rem;
	position: relative;
	z-index: 101;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 42px; }
.topbar-right ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.topbar-right a { color: rgba(255, 255, 255, .8); text-decoration: none; font-weight: 600; }
.topbar-right a:hover { color: var(--gold); }
.topbar-text { font-weight: 500; }

.socials { display: flex; align-items: center; gap: .35rem; }
.social {
	display: grid;
	place-items: center;
	width: 30px; height: 30px;
	border-radius: 50%;
	color: rgba(255, 255, 255, .85);
	transition: background .2s, color .2s, transform .2s var(--ease);
}
.social svg { width: 16px; height: 16px; }
.social:hover { transform: translateY(-2px); color: #fff; }
.social--facebook:hover { background: #1877f2; }
.social--instagram:hover { background: radial-gradient(circle at 30% 110%, #ffdb8b 0%, #ee653d 30%, #d42e81 60%, #a237b2 85%); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-h);
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--border);
	transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(11, 12, 42, .45); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%; }

.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-crest { width: 52px; height: 52px; object-fit: contain; transition: transform .4s var(--ease); }
.brand:hover .brand-crest { transform: rotate(-10deg) scale(1.06); }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-sub { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--indigo); margin-top: .2rem; }

.main-nav { display: flex; align-items: center; height: 100%; }
.main-nav > div { height: 100%; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > div > ul { display: flex; align-items: stretch; height: 100%; }
.main-nav li { position: relative; display: flex; align-items: center; }
.main-nav a {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 .85rem;
	color: var(--ink);
	font-weight: 700;
	font-size: .93rem;
	text-decoration: none;
	transition: color .2s;
}
.main-nav > div > ul > li > a::after {
	content: "";
	position: absolute;
	left: .85rem; right: .85rem; bottom: -1px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--gold);
	transform: scaleX(0);
	transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--indigo); }
.main-nav > div > ul > li > a:hover::after,
.main-nav > div > ul > .current-menu-item > a::after,
.main-nav > div > ul > .current_page_item > a::after,
.main-nav > div > ul > .current-menu-ancestor > a::after { transform: scaleX(1); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--indigo); }
.main-nav .menu-item-has-children > a { padding-right: 1.4rem; }
.main-nav .menu-item-has-children > a::before {
	content: "";
	position: absolute;
	right: .6rem; top: 50%;
	width: 6px; height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	opacity: .6;
}

.main-nav ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 230px;
	padding: .5rem;
	background: #fff;
	border: 1px solid var(--border);
	border-top: 3px solid var(--gold);
	border-radius: 0 0 14px 14px;
	box-shadow: var(--shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: .2s var(--ease);
}
.main-nav ul ul li { display: block; }
.main-nav ul ul a { height: auto; padding: .6rem .8rem; border-radius: 8px; font-weight: 600; }
.main-nav ul ul a:hover { background: var(--indigo-soft); }
.main-nav li:hover > ul,
.main-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }

.socials--nav { display: none; }

.menu-toggle {
	display: none;
	width: 46px; height: 46px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
}
.menu-toggle .bars { display: grid; gap: 5px; width: 20px; margin: auto; }
.menu-toggle .bars span { height: 2px; background: var(--ink); border-radius: 2px; transition: .25s var(--ease); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
	.menu-toggle { display: block; }
	.main-nav {
		position: absolute;
		top: 100%;
		left: 0; right: 0;
		height: calc(100vh - var(--header-h));
		height: calc(100dvh - var(--header-h));
		flex-direction: column;
		align-items: stretch;
		justify-content: space-between;
		background: #fff;
		padding: 1rem 1.25rem 2rem;
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: .25s var(--ease);
	}
	.main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.main-nav > div { height: auto; }
	.main-nav > div > ul { flex-direction: column; height: auto; }
	.main-nav li { display: block; }
	.main-nav a { height: auto; padding: 1rem .25rem; font-size: 1.3rem; border-bottom: 1px solid var(--border); }
	.main-nav > div > ul > li > a::after { left: 0; right: auto; width: 4px; height: 60%; top: 20%; bottom: auto; border-radius: 0 3px 3px 0; transform: scaleY(0); left: -1.25rem; }
	.main-nav > div > ul > .current-menu-item > a::after,
	.main-nav > div > ul > .current_page_item > a::after { transform: scaleY(1); }
	.main-nav .menu-item-has-children > a::before { display: none; }
	.main-nav ul ul {
		position: static;
		opacity: 1; visibility: visible; transform: none;
		border: 0; box-shadow: none; padding: 0 0 0 1rem; min-width: 0;
	}
	.main-nav ul ul a { font-size: 1.05rem; }
	.socials--nav { display: flex; gap: .75rem; padding-top: 1.5rem; }
	.main-nav .socials--nav .social {
		display: grid;
		place-items: center;
		width: 48px; height: 48px;
		padding: 0;
		border: 0;
		background: var(--ink);
		color: #fff;
	}
	.socials--nav .social svg { width: 22px; height: 22px; }
}
@media (max-width: 600px) {
	.topbar-right { display: none; }
	.topbar-inner { justify-content: center; height: 38px; }
	.brand-crest { width: 44px; height: 44px; }
	.brand-name { font-size: 1rem; }
}

/* ---------- Buttons & chips ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .95rem 1.6rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: .98rem;
	text-decoration: none;
	transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 12px 30px -10px rgba(255, 198, 26, .7); }
.btn-gold:hover { background: var(--gold-2); color: var(--ink); }
.btn-glass {
	color: #fff;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .25);
	backdrop-filter: blur(8px);
}
.btn-glass:hover { color: #fff; background: rgba(255, 255, 255, .16); }

.chip {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	padding: .3rem .8rem;
	border-radius: 999px;
	background: var(--indigo-soft);
	color: var(--indigo);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .01em;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.chip:hover { background: var(--indigo); color: #fff; }

/* ---------- Spotlight (front page slider) ---------- */
.spotlight {
	position: relative;
	background: var(--ink);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
	padding-bottom: 2.25rem;
}
.spotlight-glow {
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(50% 60% at 15% 100%, rgba(68, 70, 201, .45), transparent 70%),
		radial-gradient(30% 40% at 0% 0%, rgba(255, 198, 26, .14), transparent 70%);
}
.spotlight-watermark {
	position: absolute;
	left: -110px; bottom: -150px;
	z-index: -1;
	width: 460px; height: 460px;
	opacity: .06;
	filter: grayscale(1) brightness(3);
	pointer-events: none;
}

.spotlight-slides { display: grid; }
.slide {
	grid-area: 1 / 1;
	position: relative;
	min-height: clamp(400px, 52vh, 520px);
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s var(--ease), visibility .8s;
}
.slide.is-active { opacity: 1; visibility: visible; }

.slide-media {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: 70%;
	z-index: -1;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%);
	mask-image: linear-gradient(to right, transparent 0%, #000 14%);
}
.slide-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, var(--ink) 0%, transparent 22%);
}
.slide-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; display: block; }
.slide.is-active .slide-media img { animation: slide-zoom 6.5s cubic-bezier(.16, .84, .3, 1) both; }
@keyframes slide-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.slide-title, .slide-excerpt, .slide-tags time { text-shadow: 0 2px 18px rgba(11, 12, 42, .85), 0 1px 3px rgba(11, 12, 42, .6); }
@media (min-width: 861px) and (max-width: 1240px) {
	.slide-media { width: 78%; }
}

.slide-content { padding-block: 3.5rem 2rem; }
.slide-copy { max-width: 500px; }
.slide-copy > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.slide.is-active .slide-copy > * { opacity: 1; transform: none; }
.slide.is-active .slide-copy > :nth-child(2) { transition-delay: .1s; }
.slide.is-active .slide-copy > :nth-child(3) { transition-delay: .2s; }
.slide.is-active .slide-copy > :nth-child(4) { transition-delay: .3s; }

.slide-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1.1rem; font-size: .88rem; color: rgba(255, 255, 255, .7); }
.slide-tags .chip { background: var(--gold); color: var(--ink); }
.slide-tags .chip:hover { background: #fff; }
.slide-title { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 1rem; }
.slide-title a { color: #fff; text-decoration: none; }
.slide-title a:hover { color: var(--gold-2); }
.slide-excerpt { color: rgba(255, 255, 255, .75); font-size: 1.08rem; margin: 0 0 1.8rem; }

.spotlight-tabs {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(200px, 1fr);
	gap: 1.25rem;
	overflow-x: auto;
	scrollbar-width: none;
}
.spotlight-tabs::-webkit-scrollbar { display: none; }
.tab {
	display: grid;
	align-content: start;
	gap: .45rem;
	padding: 0 0 .5rem;
	background: none;
	border: 0;
	border-radius: 0;
	color: rgba(255, 255, 255, .55);
	text-align: left;
	font: inherit;
	cursor: pointer;
	transition: color .3s;
}
.tab:hover, .tab.is-active { color: #fff; }
.tab-progress { display: block; height: 3px; margin-bottom: .7rem; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.tab-progress span { display: block; height: 100%; width: 0; background: var(--gold); }
.tab.is-active .tab-progress span { animation: tab-progress var(--slide-duration, 7s) linear forwards; }
.spotlight.is-paused .tab.is-active .tab-progress span { animation-play-state: paused; }
.tab.is-done .tab-progress span { width: 100%; }
@keyframes tab-progress { from { width: 0; } to { width: 100%; } }
.tab-cat { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); opacity: .85; }
.tab-title {
	font-weight: 700;
	font-size: .98rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 860px) {
	.slide { min-height: 0; align-items: flex-end; }
	.slide-media { position: relative; width: 100%; height: clamp(220px, 52vw, 380px); -webkit-mask-image: none; mask-image: none; }
	.slide-media::after { background: linear-gradient(0deg, var(--ink) 0%, rgba(11, 12, 42, .6) 22%, transparent 55%); }
	.spotlight-tabs {
		-webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
		mask-image: linear-gradient(to right, #000 82%, transparent);
	}
	.slide { flex-direction: column; align-items: stretch; }
	.slide-content { padding-block: 0 1.5rem; margin-top: -3rem; }
	.slide-title { font-size: clamp(1.8rem, 7vw, 2.4rem); }
	.spotlight-tabs { grid-auto-columns: 72%; }
	.slide-excerpt { display: none; }
	.slide-title { margin-bottom: 1.4rem; }
	.spotlight-watermark { width: 280px; height: 280px; left: auto; right: -90px; bottom: -90px; }
}

/* ---------- Stats ---------- */
.stats {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin-top: 3rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.stat { padding: 1.6rem 1.8rem; display: grid; gap: .2rem; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat strong {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.1;
	color: var(--indigo);
}
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 700px) {
	.stats { grid-template-columns: 1fr; margin-top: 2rem; }
	.stat + .stat { border-left: 0; border-top: 1px solid var(--border); }
	.stat { padding: 1.1rem 1.4rem; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; }
}

/* ---------- Inner page band ---------- */
.band {
	position: relative;
	padding: 3.5rem 0 4rem;
	background: linear-gradient(120deg, var(--ink) 0%, var(--ink-2) 55%, var(--indigo) 100%);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
}
.band--narrow { padding-bottom: 8rem; }
.band-glow {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(40% 80% at 90% 0%, rgba(255, 198, 26, .22), transparent 60%),
		radial-gradient(50% 80% at 0% 100%, rgba(68, 70, 201, .45), transparent 60%);
}
.band-inner { max-width: 860px; }
.band--narrow .band-inner { margin-inline: auto; text-align: center; }
.band h1 { color: #fff; margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.035em; }
.band p { margin: .9rem 0 0; color: rgba(255, 255, 255, .75); font-size: 1.1rem; }
.band-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .75rem;
	margin-bottom: 1.1rem;
	font-size: .9rem;
	color: rgba(255, 255, 255, .7);
}
.band-meta .chip { background: var(--gold); color: var(--ink); }
.band-meta .chip:hover { background: #fff; }

/* ---------- Main ---------- */
.site-main { padding: 4.5rem 0 6rem; }
.site-main--overlap { padding-top: 0; }
.site-main--overlap .entry { margin-top: -5rem; position: relative; }

.section-head { margin-bottom: 2.25rem; }
.section-head h2 { margin: 0; }
.kicker {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--indigo);
	margin-bottom: .5rem;
}
.kicker::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--gold); }

/* ---------- Cards ---------- */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--indigo), var(--gold));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .45s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -24px rgba(11, 12, 42, .35); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }

.card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--indigo-soft); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.05); }

.card-body { padding: 1.6rem 1.6rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.2rem; }

.date-badge {
	display: inline-grid;
	grid-template-columns: auto auto;
	grid-template-rows: auto auto;
	column-gap: .55rem;
	align-items: center;
	line-height: 1;
}
.date-badge .d {
	grid-row: span 2;
	font-size: 2.2rem;
	font-weight: 800;
	letter-spacing: -.04em;
	color: var(--ink);
}
.date-badge .m { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--indigo); align-self: end; }
.date-badge .y { font-size: .78rem; color: var(--muted); align-self: start; padding-top: .15rem; }

.card-title { font-size: 1.3rem; margin: 0 0 .65rem; line-height: 1.25; }
.card-link { color: var(--ink); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card-link { color: var(--indigo); }

.card-excerpt { color: var(--muted); font-size: .96rem; margin: 0 0 1.4rem; }
.card-excerpt p { margin: 0; }

.card-more {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	align-self: flex-start;
	font-weight: 700;
	font-size: .9rem;
	color: var(--indigo);
}
.card-more svg { transition: transform .3s var(--ease); }
.card:hover .card-more svg { transform: translateX(5px); }

.card.is-featured {
	grid-column: 1 / -1;
	background: linear-gradient(125deg, var(--ink) 0%, var(--ink-2) 50%, var(--indigo) 100%);
	border: 0;
	color: #fff;
	box-shadow: var(--shadow-lg);
}
.card.is-featured::after {
	content: "";
	position: absolute;
	right: -80px; bottom: -120px;
	width: 360px; height: 360px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 198, 26, .28), transparent 65%);
	pointer-events: none;
}
.card.is-featured .card-body { padding: clamp(1.8rem, 4vw, 3rem); }
.card.is-featured .card-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -.035em; max-width: 22ch; }
.card.is-featured .card-link,
.card.is-featured:hover .card-link { color: #fff; }
.card.is-featured .card-excerpt { color: rgba(255, 255, 255, .72); font-size: 1.05rem; max-width: 60ch; }
.card.is-featured .date-badge .d { color: #fff; }
.card.is-featured .date-badge .m { color: var(--gold); }
.card.is-featured .date-badge .y { color: rgba(255, 255, 255, .6); }
.card.is-featured .chip { background: rgba(255, 255, 255, .12); color: #fff; }
.card.is-featured .chip:hover { background: var(--gold); color: var(--ink); }
.card.is-featured .card-more {
	padding: .75rem 1.3rem;
	border-radius: 999px;
	background: var(--gold);
	color: var(--ink);
}
.card.is-featured .card-top { justify-content: flex-start; gap: 1.25rem; }
@media (min-width: 860px) {
	.card.is-featured.has-thumb { flex-direction: row; }
	.card.is-featured.has-thumb .card-thumb { flex: 0 0 48%; aspect-ratio: auto; }
}

.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-visible { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .35s var(--ease); }
.js .reveal.is-visible:hover { transform: translateY(-6px); }
.post-grid > :nth-child(3n + 2).is-visible { transition-delay: .08s; }
.post-grid > :nth-child(3n + 3).is-visible { transition-delay: .16s; }
.post-grid > .is-visible:hover { transition-delay: 0s; }

/* ---------- Single / page ---------- */
.entry {
	max-width: 860px;
	margin-inline: auto;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	padding: clamp(1.5rem, 5vw, 3.5rem);
}
.entry-thumb { margin: 0 0 2rem; border-radius: var(--radius-sm); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }

.entry-content { font-size: 1.06rem; }
.entry-content > * { margin-top: 0; margin-bottom: 1.3em; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content blockquote {
	margin-inline: 0;
	padding: 1rem 1.5rem;
	border-left: 4px solid var(--gold);
	background: var(--indigo-soft);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	font-size: 1.1rem;
	color: var(--ink);
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: .75rem .9rem; border-bottom: 1px solid var(--border); text-align: left; }
.entry-content th { background: var(--indigo-soft); color: var(--ink); }
.entry-content tr:hover td { background: #fafbff; }

/* PDF / file block */
.entry-content .wp-block-file {
	display: flex;
	flex-direction: column;
	gap: .9rem;
	padding: 1rem;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
.entry-content .wp-block-file > a {
	order: -1;
	display: flex;
	align-items: center;
	gap: .7rem;
	padding: .2rem .4rem;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
}
.entry-content .wp-block-file > a::before {
	content: "PDF";
	flex: none;
	display: grid;
	place-items: center;
	width: 42px; height: 42px;
	border-radius: 10px;
	background: var(--indigo);
	color: var(--gold);
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .05em;
}
.entry-content .wp-block-file > a::after { content: "↗"; margin-left: auto; color: var(--muted); font-weight: 400; }
.entry-content .wp-block-file > a:hover { color: var(--indigo); }
.entry-content .wp-block-file__button { display: none !important; }
.entry-content .wp-block-file__embed {
	width: 100%;
	height: min(85vh, 1000px) !important;
	border: 0;
	border-radius: var(--radius-sm);
	background: #fff;
	box-shadow: 0 0 0 1px var(--border);
}
@media (max-width: 600px) {
	.entry-content .wp-block-file__embed { height: 72vh !important; }
}

.gallery, .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.gallery .gallery-item { margin: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; transition: transform .4s var(--ease); }
.gallery a:hover img { transform: scale(1.03); }
.gallery .gallery-item a, .wp-block-gallery figure { display: block; overflow: hidden; border-radius: 10px; }
.wp-block-gallery figure img { transition: transform .4s var(--ease); }
.wp-block-gallery figure:hover img { transform: scale(1.03); }
.entry-content img.is-zoomable { cursor: pointer; }
.entry-content .lightbox-trigger { display: none !important; }

/* Lightbox gallery */
.lightbox-open, .lightbox-open body { overflow: hidden; }
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	background: rgba(8, 9, 32, .94);
	color: #fff;
	animation: lightbox-in .25s var(--ease);
}
@supports (backdrop-filter: blur(8px)) {
	.lightbox { background: rgba(8, 9, 32, .86); backdrop-filter: blur(10px); }
}
.lightbox[hidden] { display: none; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .75rem 1rem;
	font-size: .9rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: rgba(255, 255, 255, .75);
}
.lightbox button {
	font: inherit;
	color: #fff;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 999px;
	cursor: pointer;
	transition: background .2s, border-color .2s, color .2s;
}
.lightbox button:hover, .lightbox button:focus-visible { background: var(--gold); border-color: var(--gold); color: var(--ink); outline: none; }
.lightbox-close, .lightbox-nav { display: grid; place-items: center; padding: 0; }
.lightbox-close svg, .lightbox-nav svg { display: block; }
.lightbox-close { width: 44px; height: 44px; }
.lightbox-stage {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4.5rem;
}
.lightbox-figure {
	margin: 0;
	height: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .75rem;
}
.lightbox-figure img {
	max-width: 100%;
	max-height: calc(100% - 2.5rem);
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
	transition: opacity .2s;
}
.lightbox.is-loading .lightbox-figure img { opacity: .35; }
.lightbox-figure figcaption { color: rgba(255, 255, 255, .85); font-size: .95rem; text-align: center; max-width: 60ch; }
.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-thumbs {
	display: flex;
	gap: .5rem;
	padding: .75rem 1rem 1rem;
	overflow-x: auto;
	scrollbar-width: none;
	justify-content: safe center;
}
.lightbox-thumbs::-webkit-scrollbar { display: none; }
.lightbox .lightbox-thumbs button {
	flex: 0 0 auto;
	width: 72px;
	height: 54px;
	padding: 0;
	border-radius: 6px;
	border: 2px solid transparent;
	overflow: hidden;
	opacity: .5;
	transition: opacity .2s, border-color .2s;
}
.lightbox .lightbox-thumbs button:hover { opacity: .85; background: none; }
.lightbox .lightbox-thumbs button.is-active { opacity: 1; border-color: var(--gold); }
.lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-title {
	color: #fff;
	font-size: 1rem;
	letter-spacing: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	margin-right: 1rem;
}
.lightbox-actions { display: flex; gap: .5rem; flex: none; }
.lightbox-external {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	color: #fff;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 999px;
	transition: background .2s, border-color .2s, color .2s;
}
.lightbox-external:hover, .lightbox-external:focus-visible { background: var(--gold); border-color: var(--gold); color: var(--ink); outline: none; }
.lightbox-external svg { display: block; }
.lightbox--pdf .lightbox-stage { padding: 0 1rem 1rem; }
.lightbox--pdf iframe {
	width: min(1000px, 100%);
	height: 100%;
	border: 0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.lightbox.is-single .lightbox-nav, .lightbox.is-single .lightbox-thumbs { display: none; }
@media (max-width: 700px) {
	.lightbox-stage { padding: 0 .5rem; }
	.lightbox-nav { top: auto; bottom: .5rem; transform: none; width: 44px; height: 44px; background: rgba(8, 9, 32, .6); }
	.lightbox-prev { left: .75rem; }
	.lightbox-next { right: .75rem; }
	.lightbox-figure img { max-height: calc(100% - 4rem); }
	.lightbox .lightbox-thumbs button { width: 56px; height: 42px; }
}
.wp-caption, figure { max-width: 100%; margin-inline: 0; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }

.post-nav {
	max-width: 860px;
	margin: 1.5rem auto 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
.post-nav-item {
	display: grid;
	gap: .25rem;
	padding: 1.25rem 1.4rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-decoration: none;
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-nav-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-nav-item span { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.post-nav-item strong { color: var(--ink); line-height: 1.3; }
.post-nav-item.is-next { grid-column: 2; text-align: right; }
@media (max-width: 600px) {
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-item.is-next { grid-column: auto; }
}

/* ---------- Pagination ---------- */
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding: 0 .9rem;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--border);
	text-decoration: none;
	color: var(--ink);
	font-weight: 700;
	transition: .2s;
}
.pagination a.page-numbers:hover { border-color: var(--indigo); color: var(--indigo); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--gold); }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="search"], input[type="url"], textarea {
	width: 100%;
	font: inherit;
	padding: .8rem 1rem;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: #fff;
}
input:focus, textarea:focus { outline: 3px solid rgba(68, 70, 201, .25); border-color: var(--indigo-2); }
button, input[type="submit"] {
	font: inherit;
	font-weight: 700;
	padding: .8rem 1.4rem;
	border: 0;
	border-radius: 999px;
	background: var(--ink);
	color: #fff;
	cursor: pointer;
}
.search-form { display: flex; gap: .5rem; }
.empty-state { text-align: center; max-width: 560px; }

/* ---------- Footer ---------- */
.site-footer {
	position: relative;
	background: var(--ink);
	color: rgba(255, 255, 255, .65);
	font-size: .95rem;
	overflow: hidden;
}
.site-footer::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--indigo-2), var(--gold), var(--indigo-2));
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-top {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) 2fr;
	gap: 3rem;
	padding: 4.5rem 0 3rem;
}
.footer-brand { display: flex; align-items: flex-start; gap: 1.1rem; }
.footer-crest { width: 84px; height: 84px; object-fit: contain; flex: none; }
.footer-brand strong { display: block; color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: .35rem; }
.footer-brand p { margin: 0; }
.socials--footer { margin-top: 1.1rem; gap: .5rem; }
.socials--footer .social { width: 40px; height: 40px; background: rgba(255, 255, 255, .08); }
.socials--footer .social svg { width: 18px; height: 18px; }
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 2rem;
}
.footer-widgets h2, .footer-widgets .widget-title, .footer-widgets h3, .footer-widgets .wp-block-heading {
	color: #fff;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	margin: 0 0 1rem;
}
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets li { margin-bottom: .45rem; }
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.4rem 0 1.8rem;
	border-top: 1px solid rgba(255, 255, 255, .08);
	font-size: .85rem;
	color: rgba(255, 255, 255, .5);
}
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
.to-top { font-weight: 700; }
@media (max-width: 760px) {
	.footer-top { grid-template-columns: 1fr; gap: 2.25rem; padding-top: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
