/* Huby tematyczne o-lekach.pl
   Kroje pisma, kolor linków i wygląd nagłówków H2 pochodzą z motywu.
   Wtyczka dodaje tylko układ sekcji i kilka neutralnych kolorów. */

.olk-hub {
	--hub-ink: #1f2a37;
	--hub-muted: #5f6b7a;
	--hub-rule: #dde3ec;
	--hub-surface: #f3f5fb;
	--hub-star: #c98f00;
	color: var(--hub-ink);
}

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

.olk-hub__section {
	margin: 2.75rem 0 0;
	scroll-margin-top: 5rem;
}

.olk-hub h3 {
	font-size: 1.1rem;
	margin: 0 0 .75rem;
}

.olk-hub__lead { color: var(--hub-muted); }
.olk-hub__muted { color: var(--hub-muted); }
.olk-hub__small { font-size: .85rem; }

/* ---------- Wstęp i spis sekcji ---------- */

.olk-hub__intro > :last-child { margin-bottom: 0; }

.olk-hub__stats {
	font-size: 1.05rem;
}

.olk-hub__toc {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1.25rem;
	margin: 1.75rem 0 0;
	padding: .8rem 0;
	border-top: 1px solid var(--hub-rule);
	border-bottom: 1px solid var(--hub-rule);
	font-size: .95rem;
}

.olk-hub__toc-label { color: var(--hub-muted); }
.olk-hub__toc a { text-decoration: none; font-weight: 600; }
.olk-hub__toc a:hover { text-decoration: underline; }

/* ---------- Kategorie: indeks jak spis działów w aptece ---------- */

.olk-hub__cats {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	column-gap: 2.5rem;
}

.olk-hub__cats li { margin: 0; padding: 0; border-bottom: 1px solid var(--hub-rule); }
.olk-hub__cats li::before { content: none; }

.olk-hub__cats a {
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 1rem;
	align-items: baseline;
	padding: .7rem 0;
	text-decoration: none;
}

.olk-hub__cat-name { font-weight: 600; }
.olk-hub__cats a:hover .olk-hub__cat-name { text-decoration: underline; }

.olk-hub__cat-note {
	grid-column: 1;
	grid-row: 2;
	font-size: .85rem;
	color: var(--hub-muted);
}

.olk-hub__cat-n {
	grid-column: 2;
	grid-row: 1;
	font-size: .85rem;
	color: var(--hub-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ---------- Opinie ---------- */

.olk-hub__cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem 3rem;
	margin-top: 1rem;
}

@media (min-width: 820px) {
	.olk-hub__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.olk-hub__rank { margin: 0 0 .5rem; padding: 0; list-style: none; counter-reset: hubrank; }
.olk-hub__rank li { counter-increment: hubrank; }
.olk-hub__rank li > a::before { content: counter(hubrank) ". "; color: var(--hub-muted); font-weight: 400; }

.olk-hub__rank li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .2rem 1rem;
	padding: .55rem 0;
	border-bottom: 1px solid var(--hub-rule);
}

.olk-hub__rank a { font-weight: 600; text-decoration: none; }
.olk-hub__rank a:hover { text-decoration: underline; }
.olk-hub__suffix { font-weight: 400; }
.olk-hub__score { white-space: nowrap; font-size: .95rem; }

.olk-hub__stars {
	color: var(--hub-star);
	letter-spacing: .04em;
	margin-right: .25rem;
}

.olk-hub__quote {
	margin: 0 0 1.25rem;
	padding: .2rem 0 .2rem 1rem;
	border-left: 3px solid var(--hub-rule);
}

.olk-hub__quote figcaption { font-weight: 600; margin-bottom: .25rem; }
.olk-hub__quote blockquote { margin: 0; padding: 0; border: 0; background: none; font-style: normal; }
.olk-hub__quote blockquote p { margin: 0; }
.olk-hub__quote .olk-hub__small { margin: .4rem 0 0; }
.olk-hub__quote .olk-hub__small a { margin-left: .5rem; }

.olk-hub__button {
	display: inline-block;
	padding: .6rem 1.1rem;
	border: 1px solid currentColor;
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none;
}

.olk-hub__button:hover { text-decoration: underline; }

/* ---------- Substancje (bez kompendium) ---------- */

.olk-hub__subs {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	columns: 12rem auto;
	column-gap: 1.5rem;
}

.olk-hub__subs li { margin: 0; padding: .15rem 0; break-inside: avoid; }
.olk-hub__subs li::before { content: none; }

.olk-hub__subgroup { margin: 1.25rem 0 0; }
.olk-hub__subgroup h3 { font-size: 1rem; margin: 0 0 .4rem; padding-bottom: .35rem; border-bottom: 1px solid var(--hub-rule); }
.olk-hub__subs li a { text-decoration: none; }
.olk-hub__subs li a:hover { text-decoration: underline; }
.olk-hub__sub-n { margin-left: .3rem; font-size: .75rem; color: var(--hub-muted); vertical-align: super; line-height: 0; font-variant-numeric: tabular-nums; }

/* ---------- Artykuły ---------- */

.olk-hub__articles {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.75rem 1.5rem;
}

.olk-hub__articles li { margin: 0; padding: 0; }
@media (min-width: 560px) { .olk-hub__articles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .olk-hub__articles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.olk-hub__articles li::before { content: none; }
.olk-hub__articles a { display: block; text-decoration: none; }

.olk-hub__art-img {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 4px;
	background: var(--hub-surface);
	margin-bottom: .6rem;
}

.olk-hub__art-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.olk-hub__art-title { display: block; font-weight: 600; line-height: 1.35; }
.olk-hub__articles a:hover .olk-hub__art-title { text-decoration: underline; }

/* ---------- Nowości ---------- */

.olk-hub__list { list-style: none; margin: 0; padding: 0; }
.olk-hub__list li { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--hub-rule); }
.olk-hub__list li::before { content: none; }
.olk-hub__list a { display: block; font-weight: 600; text-decoration: none; }
.olk-hub__list a:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */

.olk-hub__faq { margin-top: 1rem; border-top: 1px solid var(--hub-rule); }
.olk-hub__faq details { border-bottom: 1px solid var(--hub-rule); }

.olk-hub__faq summary {
	cursor: pointer;
	list-style: none;
	padding: .9rem 2rem .9rem 0;
	font-weight: 600;
	position: relative;
}

.olk-hub__faq summary::-webkit-details-marker { display: none; }

.olk-hub__faq summary::after {
	content: "+";
	position: absolute;
	right: .25rem;
	top: .75rem;
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--hub-muted);
}

.olk-hub__faq details[open] summary::after { content: "−"; }
.olk-hub__faq summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.olk-hub__answer { padding: 0 0 1rem; }
.olk-hub__answer > :last-child { margin-bottom: 0; }

/* ---------- Stopka wiarygodności ---------- */

.olk-hub__trust {
	margin: 3rem 0 0;
	padding: 1rem 1.25rem;
	background: var(--hub-surface);
	border-radius: 4px;
	font-size: .9rem;
	color: var(--hub-muted);
}

.olk-hub__trust p { margin: 0 0 .35rem; }
.olk-hub__trust p:last-child { margin: 0; }

.olk-hub-admin-note {
	padding: .75rem 1rem;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
}

@media (prefers-reduced-motion: no-preference) {
	html:has(.olk-hub) { scroll-behavior: smooth; }
}
