/* -----------------------------------------------------------------------------
   telix.pl category / archive listing (golem.de-style)
   Loaded on post archives (category, tag, author, date). No sidebar via the
   GP Premium Layout Element; this file handles the header + list styling.
-------------------------------------------------------------------------------- */

.telix-archive {
	--telix-accent: #ffcc00;       /* yellow — bars/markers/badges */
	--telix-accent-text: #9a7a00;  /* gold — readable accent text on white */
	--telix-accent-ink: #14181f;   /* text on yellow */
	--telix-ink: #14181f;
	--telix-muted: #6b7280;
	--telix-line: #e4e7ec;
	max-width: 900px;
	margin: 0 auto;
	padding: 8px 0 16px;
}

.telix-archive a { text-decoration: none; color: inherit; }

/* ----- Archive header ------------------------------------------------------ */
.telix-archive__head {
	margin-bottom: 24px;
	padding-bottom: 12px;
	border-bottom: 3px solid var(--telix-accent);
}
.telix-archive__title {
	font-size: 1.9rem;
	font-weight: 800;
	letter-spacing: -.01em;
	margin: 0;
	color: var(--telix-ink);
}
.telix-archive__desc {
	margin-top: 8px;
	color: var(--telix-muted);
	font-size: .95rem;
	line-height: 1.5;
}

/* ----- Search header extras ------------------------------------------------ */
.telix-search__query { color: var(--telix-accent-text); }

.telix-search__form {
	display: flex;
	gap: 8px;
	margin-top: 14px;
	max-width: 460px;
}
.telix-search__form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid var(--telix-line);
	border-radius: 4px;
	font-size: .95rem;
}
.telix-search__form input[type="search"]:focus {
	outline: none;
	border-color: var(--telix-ink);
}
.telix-search__form button {
	flex: 0 0 auto;
	padding: 10px 20px;
	border: 0;
	border-radius: 4px;
	background: var(--telix-ink);
	color: #fff;
	font-weight: 600;
	font-size: .9rem;
	cursor: pointer;
	transition: background .15s ease;
}
.telix-search__form button:hover { background: var(--telix-accent); color: var(--telix-accent-ink); }

/* ----- List items ---------------------------------------------------------- */
.telix-archive__item {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	padding: 18px 0;
	border-bottom: 1px solid var(--telix-line);
}

.telix-archive__thumb {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: 5px;
	overflow: hidden;
	background: #f0f1f4;
}
.telix-archive__thumb img,
.telix-archive__ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.telix-archive__ph { background: linear-gradient(135deg, #eceef2, #dfe3e9); }
.telix-archive__thumb:hover img { transform: scale(1.04); }

.telix-archive__text { min-width: 0; }

/* Kicker (shown on author/date archives only) */
.telix-archive__text .telix-kicker {
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--telix-accent-text);
	margin-bottom: 4px;
}
.telix-archive__text .telix-kicker:hover { text-decoration: underline; }

.telix-archive__item-title {
	font-size: 1.22rem;
	line-height: 1.3;
	font-weight: 700;
	margin: 0 0 6px;
	color: var(--telix-ink);
}
.telix-archive__item-title a:hover { color: var(--telix-accent-text); }

.telix-archive__excerpt {
	margin: 0 0 8px;
	font-size: .92rem;
	line-height: 1.55;
	color: var(--telix-muted);
}

.telix-archive__date {
	font-size: .78rem;
	color: var(--telix-muted);
}

.telix-archive__empty {
	padding: 40px 0;
	color: var(--telix-muted);
}

/* [telix_catlist] "more" link on category-landing pages */
.telix-catlist__more { margin: 22px 0 0; }
.telix-catlist__more a {
	display: inline-block;
	font-weight: 700;
	font-size: .9rem;
	color: var(--telix-accent-text);
	text-decoration: none;
}
.telix-catlist__more a:hover { text-decoration: underline; }

/* ----- Pagination ---------------------------------------------------------- */
.telix-archive .pagination,
.telix-archive__pagination {
	margin-top: 30px;
	display: flex;
	justify-content: center;
}
.telix-archive .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.telix-archive .nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--telix-line);
	border-radius: 4px;
	font-size: .9rem;
	font-weight: 600;
	color: var(--telix-ink);
	background: #fff;
}
.telix-archive .nav-links .page-numbers:hover {
	border-color: var(--telix-ink);
}
.telix-archive .nav-links .page-numbers.current {
	background: var(--telix-ink);
	border-color: var(--telix-ink);
	color: #fff;
}
.telix-archive .nav-links .page-numbers.dots {
	border-color: transparent;
}

/* ----- Two-column layout with the "Najczęściej czytane" rail --------------- */
/* The rail variant gets more room than the plain 900px single column. */
.telix-archive--rail { max-width: 1180px; }
.telix-archive--rail .telix-archive__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 44px;
	align-items: start;
}
.telix-archive__main { min-width: 0; }
.telix-archive__rail {
	position: sticky;
	top: 20px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* Most-read box — mirrors the homepage rail (archive.css loads on its own, so the
   shared .telix-box / .telix-mostread rules are repeated here rather than imported). */
.telix-archive__rail .telix-box__head {
	font-size: .95rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--telix-ink);
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--telix-line);
	position: relative;
}
.telix-archive__rail .telix-box__head::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 44px;
	height: 2px;
	background: var(--telix-accent);
}
.telix-mostread__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: telix-mr;
}
.telix-mostread__list li {
	counter-increment: telix-mr;
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding: 11px 12px;
	margin: 0 -12px;          /* hover card bleeds into the gutter; content stays aligned */
	border-radius: 10px;
	border-bottom: 1px solid var(--telix-line);
	font-size: .92rem;
	line-height: 1.4;
	transition: background .15s ease, box-shadow .15s ease;
}
.telix-mostread__list li:last-child { border-bottom: 0; }
.telix-mostread__list li:hover {
	background: #fff;
	border-bottom-color: transparent;
	box-shadow: 0 8px 22px rgba(20, 24, 31, .12);
}
.telix-mostread__list li::before {
	content: counter(telix-mr);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: var(--telix-accent);
	color: var(--telix-accent-ink, #14181f);
	font-weight: 800;
	font-size: .9rem;
}
.telix-mostread__list a { transition: color .15s ease; }
.telix-mostread__list a:hover { color: var(--telix-accent-text); }

/* ----- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
	/* Rail drops below the list on tablet/mobile. */
	.telix-archive--rail .telix-archive__body { grid-template-columns: 1fr; gap: 32px; }
	.telix-archive__rail { position: static; }
}
@media (max-width: 600px) {
	.telix-archive__title { font-size: 1.5rem; }
	.telix-archive__item { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
	.telix-archive__item-title { font-size: 1.05rem; }
	.telix-archive__excerpt { display: none; }
}
