/* CB Sermons — listing + single.
   Uses Kadence's global palette variables so it inherits the site rather than
   hard-coding colours; the fallbacks match the current palette. */

.cbs-wrap {
	--cbs-accent: var(--global-palette1, #0b67ab);
	--cbs-text:   var(--global-palette4, #3e4c59);
	--cbs-muted:  var(--global-palette6, #7b8794);
	--cbs-rule:   rgba(123, 135, 148, .25);
	--cbs-bg:     var(--global-palette8, #f9f9fb);

	max-width: 820px;
	margin: 0 auto;
	padding: clamp(2rem, 6vw, 4.5rem) 1.25rem clamp(3rem, 8vw, 5rem);
	color: var(--cbs-text);
}

/* ---- heading ---- */

.cbs-head { margin-bottom: 2.5rem; }

.cbs-eyebrow {
	margin: 0 0 .35rem;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--cbs-accent);
}

.cbs-title {
	margin: 0;
	font-weight: 1000;
	line-height: 1.05;
	text-transform: uppercase;
	font-size: clamp(1.9rem, 5vw, 3rem);
}

.cbs-standfirst { margin: .75rem 0 0; color: var(--cbs-muted); }

.cbs-back { margin: 2rem 0 0; }
.cbs-back a,
.cbs-head .cbs-back a { color: var(--cbs-accent); text-decoration: none; font-weight: 600; }
.cbs-back a:hover { text-decoration: underline; }

/* ---- filters: three dropdowns side by side ---- */

.cbs-filters {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	align-items: end;
	margin: 0 0 .5rem;
}

.cbs-filter { display: block; margin: 0; }

.cbs-filter-label {
	display: block;
	margin-bottom: .35rem;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--cbs-muted);
}

.cbs-filter select {
	width: 100%;
	padding: .6rem 2.2rem .6rem .8rem;
	border: 1px solid var(--cbs-rule);
	border-radius: 8px;
	background-color: #fff;
	color: var(--cbs-text);
	font: inherit;
	cursor: pointer;
}
.cbs-filter select:hover,
.cbs-filter select:focus { border-color: var(--cbs-accent); }
.cbs-filter select:focus { outline: 2px solid var(--cbs-accent); outline-offset: 1px; }

.cbs-filter-go { grid-column: 1 / -1; justify-self: start; }

.cbs-filter-reset {
	grid-column: 1 / -1;
	justify-self: start;
	font-size: .9rem;
	font-weight: 600;
	color: var(--cbs-accent);
	text-decoration: none;
}
.cbs-filter-reset:hover { text-decoration: underline; }

/* ---- listing: image left third, text right ---- */

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

.cbs-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 1.75rem;
	align-items: center;
	padding: 1.5rem 0;
	border-top: 1px solid var(--cbs-rule);
}
.cbs-item:last-child { border-bottom: 1px solid var(--cbs-rule); }

.cbs-thumb {
	display: block;
	aspect-ratio: 5 / 4;              /* "almost square" */
	overflow: hidden;
	border-radius: 8px;
	background: var(--cbs-bg);
}
.cbs-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}
a.cbs-thumb:hover img { transform: scale(1.04); }

/* No image set: a tinted tile with the series name, so the grid stays even. */
.cbs-thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 1rem;
	background: linear-gradient(135deg, var(--cbs-accent), #073f69);
	color: #fff;
	text-align: center;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: 2px;
	line-height: 1.4;
	text-transform: uppercase;
}

.cbs-item-body { min-width: 0; }

.cbs-date {
	display: block;
	margin: 0 0 .5rem;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--cbs-muted);
}

/* The theme sets text-transform: capitalize on all headings site-wide, which turns
   "Tvorca pokoja" into "Tvorca Pokoja". Sermon titles show exactly as typed. */
.cbs-item-title { margin: 0 0 .35rem; font-size: 1.45rem; line-height: 1.25; text-transform: none; }
.cbs-item-title a { color: inherit; text-decoration: none; }
.cbs-item-title a:hover { color: var(--cbs-accent); }
.cbs-item:hover .cbs-item-title a { color: var(--cbs-accent); }

/* ---- taxonomy line ---- */

.cbs-terms {
	margin: 0;
	font-size: .85rem;
	color: var(--cbs-muted);
}
.cbs-terms a { color: var(--cbs-muted); text-decoration: none; border-bottom: 1px dotted currentColor; }
.cbs-terms a:hover { color: var(--cbs-accent); }
.cbs-terms .cbs-sep { opacity: .45; margin: 0 .55rem; }

/* ---- players ---- */

.cbs-player { width: 100%; margin-top: .9rem; }
.cbs-play { margin: 2rem 0; padding: 1.25rem; background: var(--cbs-bg); border-radius: 10px; }
.cbs-play .cbs-player { margin-top: 0; }
.cbs-dl { margin: .75rem 0 0; font-size: .9rem; }
.cbs-dl a { color: var(--cbs-accent); text-decoration: none; font-weight: 600; }
.cbs-dl a:hover { text-decoration: underline; }

/* ---- single ---- */

.cbs-single .cbs-head { margin-bottom: 1.5rem; }
.cbs-single-title { margin-bottom: .5rem; text-transform: none; }
.cbs-body { margin: 2rem 0; line-height: 1.75; }

.cbs-peers { margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--cbs-rule); }
.cbs-peers-title { margin: 0 0 .75rem; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.cbs-peers-title a { color: var(--cbs-accent); text-decoration: none; }
.cbs-peer-list { list-style: none; margin: 0; padding: 0; }
.cbs-peer-list li { padding: .4rem 0; border-bottom: 1px solid var(--cbs-rule); }
.cbs-peer-list a { color: inherit; text-decoration: none; }
.cbs-peer-list a:hover { color: var(--cbs-accent); }
.cbs-peer-date { float: right; font-size: .8rem; color: var(--cbs-muted); }

/* ---- prev / next ---- */

.cbs-nav {
	display: flex;
	gap: 1rem;
	margin: 2.5rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--cbs-rule);
}
.cbs-nav a {
	flex: 1 1 0;
	padding: .9rem 1rem;
	border: 1px solid var(--cbs-rule);
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	line-height: 1.35;
}
.cbs-nav a:hover { border-color: var(--cbs-accent); }
.cbs-nav a span {
	display: block;
	margin-bottom: .2rem;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--cbs-muted);
}
.cbs-nav-next { text-align: right; }

.cbs-empty { margin: 2rem 0; color: var(--cbs-muted); }

@media (max-width: 760px) {
	.cbs-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.cbs-filters { grid-template-columns: 1fr; }
	.cbs-item { grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; align-items: start; }
	.cbs-item-title { font-size: 1.15rem; }
	.cbs-thumb-fallback { font-size: .55rem; letter-spacing: 1px; padding: .4rem; }
	.cbs-nav { flex-direction: column; }
	.cbs-nav-next { text-align: left; }
	.cbs-peer-date { float: none; display: block; }
}
