/*
Theme Name: Čista Tema
Author: Prilagođena tema
Description: Čisto bijelo zaglavlje s logotipom u sredini, PT Serif font, zlatni datum i gumb "Učitaj više" (10 vijesti), horizontalni slider galerija unutar članka ili stranice sa strelicama na hover, swipe podrškom na mobitelu i otvaranjem slike na stranici.
Version: 1.9
Text Domain: cista-tema
*/

:root {
	--bg-page: #ffffff;
	--bg-header: #ffffff;
	--text-main: #111111;
	--text-muted: #555555;
	--gold-soft: #f5e6b3;
	--gold-btn: #c89d28;
	--gold-btn-hover: #b0881c;
	--border-light: #e8e8e8;
	--thumb-active: #1da1f2;
}

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

body {
	margin: 0;
	padding: 0;
	background-color: var(--bg-page);
	color: var(--text-main);
	font-family: "PT Serif", Georgia, Cambria, "Times New Roman", serif;
	line-height: 1.65;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	opacity: 0.75;
}

.container {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ZAGLAVLJE */
.site-header {
	background-color: var(--bg-header);
	border-bottom: 1px solid var(--border-light);
	padding: 28px 0 20px;
}

.header-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 18px;
}

.site-logo {
	display: flex;
	justify-content: center;
	align-items: center;
}

.site-logo img {
	max-height: 75px;
	width: auto;
	height: auto;
	display: block;
}

.site-title-text {
	font-size: 1.8rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

.main-navigation a {
	font-size: 0.98rem;
	font-weight: 400;
	padding: 4px 0;
}

/* GLAVNI SADRŽAJ I SIDEBAR */
.site-main {
	padding: 44px 0 64px;
}

.content-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
}

.content-layout.has-sidebar {
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
}

@media (max-width: 860px) {
	.content-layout.has-sidebar {
		grid-template-columns: 1fr;
	}
}

/* DATUM OBJAVE - BLAGO ZLATNA PODLOGA, CRNA SLOVA */
.post-date {
	display: inline-block;
	background-color: var(--gold-soft);
	color: #111111;
	font-size: 0.82rem;
	line-height: 1.3;
	padding: 3px 9px;
	border-radius: 4px;
}

/* PRVA ISTAKNUTA VIJEST */
.featured-post {
	padding-bottom: 32px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--border-light);
}

.featured-post-thumb {
	display: block;
	margin-bottom: 18px;
	overflow: hidden;
	border-radius: 10px;
}

.featured-post-thumb img {
	width: 100%;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	display: block;
	border-radius: 10px;
}

.featured-post-title {
	margin: 0 0 10px;
	font-size: 1.95rem;
	line-height: 1.25;
	font-weight: 700;
}

/* OSTALE VIJESTI - SAMO NASLOVI */
.other-posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.other-post-item {
	padding: 15px 0;
	border-bottom: 1px solid var(--border-light);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.other-post-item:last-child {
	border-bottom: none;
}

.other-post-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 400;
	line-height: 1.4;
}

.other-post-item .post-date {
	white-space: nowrap;
	flex-shrink: 0;
}

/* GUMB UČITAJ VIŠE */
.load-more-wrap {
	margin-top: 28px;
	display: flex;
	justify-content: center;
}

.btn-load-more {
	background-color: var(--gold-btn);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 12px 26px;
	font-family: "PT Serif", Georgia, serif;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-load-more:hover:not(:disabled) {
	background-color: var(--gold-btn-hover);
	opacity: 1;
}

.btn-load-more:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* HORIZONTALNI SLIDER UNUTAR ČLANKA ILI STRANICE */
.entry-inline-gallery {
	margin: 24px 0 28px;
	width: 100%;
}

.gallery-slider-viewport {
	position: relative;
	width: 100%;
	background-color: #141414;
	overflow: hidden;
	touch-action: pan-y;
}

.gallery-slider-track {
	display: flex;
	flex-direction: row;
	width: 100%;
	transform: translateX(0%);
	transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}

.gallery-slider-track.is-dragging {
	transition: none;
}

.gallery-slide {
	flex: 0 0 100%;
	width: 100%;
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 260px;
}

.gallery-slide-trigger {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.gallery-slide img {
	display: block;
	max-width: 100%;
	width: auto;
	height: auto;
	max-height: 580px;
	object-fit: contain;
	-webkit-user-drag: none;
	user-select: none;
}

.gallery-slide-caption {
	position: absolute;
	left: 16px;
	bottom: 16px;
	max-width: calc(100% - 32px);
	background-color: #0d0d0d;
	color: #f7dc74;
	padding: 6px 14px;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	border-radius: 2px;
	pointer-events: none;
}

/* STRELICE SLIDERA - VIDLJIVE PRILIKOM PRELASKA MIŠEM NA DESKTOPU */
.gallery-nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	width: 44px;
	height: 52px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background-color: rgba(14, 14, 14, 0.78);
	color: #ffffff;
	font-family: Arial, sans-serif;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.22s ease, visibility 0.22s ease, background-color 0.18s ease, transform 0.18s ease;
}

.gallery-slider-viewport:hover .gallery-nav-arrow,
.gallery-slider-viewport:focus-within .gallery-nav-arrow {
	opacity: 1;
	visibility: visible;
}

.gallery-nav-arrow:hover {
	background-color: var(--gold-btn);
	border-color: var(--gold-btn);
	color: #ffffff;
}

.gallery-nav-prev {
	left: 14px;
}

.gallery-nav-next {
	right: 14px;
}

.gallery-thumbs-wrapper {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
}

.gallery-scroll-btn {
	flex: 0 0 34px;
	height: 76px;
	border: 1px solid var(--border-light);
	background-color: #fafafa;
	color: var(--text-main);
	font-family: inherit;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 2px;
	transition: background-color 0.15s ease;
}

.gallery-scroll-btn:hover {
	background-color: var(--gold-soft);
}

.gallery-thumbs-strip {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	gap: 6px;
	padding-bottom: 6px;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.gallery-thumb-btn {
	flex: 0 0 112px;
	width: 112px;
	height: 76px;
	padding: 0;
	border: 2px solid transparent;
	background-color: #efefef;
	cursor: pointer;
	overflow: hidden;
	position: relative;
	transition: border-color 0.15s ease, opacity 0.15s ease;
}

.gallery-thumb-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gallery-thumb-btn.is-active {
	border-color: var(--thumb-active);
}

.gallery-thumb-btn:not(.is-active) img {
	opacity: 0.78;
}

.gallery-thumb-btn:hover img {
	opacity: 1;
}

/* MOBILNA VERZIJA - SAKRIVENE STRELICE NA GLAVNOJ SLICI, SLIDER PRSTOM */
@media (max-width: 768px) {
	.gallery-nav-arrow,
	.gallery-slider-viewport:hover .gallery-nav-arrow,
	.gallery-slider-viewport:focus-within .gallery-nav-arrow {
		display: none !important;
		opacity: 0 !important;
		visibility: hidden !important;
	}

	.gallery-slide img {
		max-height: 360px;
	}

	.gallery-slide-caption {
		font-size: 0.9rem;
		left: 10px;
		bottom: 10px;
		padding: 5px 10px;
	}

	.gallery-scroll-btn {
		flex: 0 0 28px;
		height: 58px;
		font-size: 1.05rem;
	}

	.gallery-thumb-btn {
		flex: 0 0 84px;
		width: 84px;
		height: 58px;
	}
}

/* POJEDINAČNI POST I STRANICA */
.single-post-header,
.page-header {
	margin-bottom: 24px;
}

.single-post-title,
.page-title {
	margin: 0 0 10px;
	font-size: 2.05rem;
	line-height: 1.25;
}

.single-post-thumb,
.page-thumb {
	margin-bottom: 24px;
}

.single-post-thumb img,
.page-thumb img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
}

.entry-content {
	font-size: 1.08rem;
}

.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

/* SIDEBAR */
.site-sidebar {
	border-left: 1px solid var(--border-light);
	padding-left: 28px;
}

@media (max-width: 860px) {
	.site-sidebar {
		border-left: none;
		border-top: 1px solid var(--border-light);
		padding-left: 0;
		padding-top: 32px;
	}
}

.widget {
	margin-bottom: 32px;
}

.widget:last-child {
	margin-bottom: 0;
}

.widget-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

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

.widget li {
	padding: 6px 0;
	border-bottom: 1px solid #f2f2f2;
	font-size: 0.95rem;
}

/* PODNOŽJE */
.site-footer {
	border-top: 1px solid var(--border-light);
	padding: 28px 0;
	text-align: center;
	font-size: 0.9rem;
	color: var(--text-muted);
	background-color: #ffffff;
}
