/* glivRESEARCH article template — v1.1.17 */

.glivresearch-article {
	--gr-accent: #0d3276;
	--gr-heading: #1e293b;
	--gr-text: #333;
	--gr-muted: #64748b;
	--gr-border: #e2e8f0;
	--gr-border-strong: #cbd5e1;
	--gr-bg: #fff;
	--gr-surface: #f8fafc;
	--gr-surface-hover: #f1f5f9;
	--gr-radius: 8px;
	--gr-gap: 1.5rem;
	--gr-max-width: 75rem;
	--gr-font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
	--gr-panel-bg: #af34af0d;
	--gr-keywords-bg: #d4d5ff61;

	max-width: var(--gr-max-width);
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
	color: var(--gr-text);
	font-family: var(--gr-font);
	line-height: 1.5;
	box-sizing: border-box;
}

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

/* Reset domyślnych ramek motywu / przeglądarki na sekcjach artykułu */
.glivresearch-article > section,
.glivresearch-article > details,
.glivresearch-article .glivresearch-article__main > section {
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.glivresearch-article details {
	border: none;
}

.glivresearch-article section.glivresearch-article__panel,
.glivresearch-article details.glivresearch-article__panel {
	margin: var(--gr-gap) 0;
	padding: 1.25rem;
	background-color: var(--gr-panel-bg);
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.glivresearch-article__series {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--gr-accent);
}

.glivresearch-article__series-link {
	color: inherit;
	text-decoration: none;
}

.glivresearch-article__series-link:hover,
.glivresearch-article__series-link:focus-visible {
	text-decoration: underline;
}

.glivresearch-article__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.25;
	font-weight: 700;
	color: var(--gr-heading);
}

.glivresearch-article__dates,
.glivresearch-article__meta-line {
	margin: 0.25rem 0;
	font-size: 0.9rem;
	color: var(--gr-muted);
}

.glivresearch-article__date + .glivresearch-article__date::before {
	content: " · ";
}

.glivresearch-article__hero {
	margin: 1.25rem 0 0;
	border-radius: var(--gr-radius);
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.glivresearch-article__hero-img {
	display: block;
	width: 100%;
	height: auto;
}

.glivresearch-article section.glivresearch-article__keywords {
	margin: var(--gr-gap) 0;
	padding: 1.25rem;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--gr-muted);
	background-color: var(--gr-keywords-bg);
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.glivresearch-article__keywords-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--gr-accent);
}

.glivresearch-article__abstract-title,
.glivresearch-article__toc-title,
.glivresearch-article__section-title {
	margin: 0 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--gr-heading);
}

.glivresearch-article__abstract .glivresearch-article__prose h2 {
	display: none;
}

/* Zwijane bloki: TOC, FAQ */
.glivresearch-article details.glivresearch-article__disclosure > .glivresearch-article__disclosure-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	cursor: pointer;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--gr-heading);
	user-select: none;
}

.glivresearch-article details.glivresearch-article__disclosure > .glivresearch-article__disclosure-summary::-webkit-details-marker {
	display: none;
}

.glivresearch-article details.glivresearch-article__disclosure > .glivresearch-article__disclosure-summary::after {
	content: "▾";
	flex-shrink: 0;
	font-size: 1.35rem;
	line-height: 1;
	color: var(--gr-muted);
	transition: transform 0.2s ease;
}

.glivresearch-article details.glivresearch-article__disclosure[open] > .glivresearch-article__disclosure-summary {
	margin-bottom: 0.75rem;
}

.glivresearch-article details.glivresearch-article__disclosure[open] > .glivresearch-article__disclosure-summary::after {
	transform: rotate(180deg);
}

.glivresearch-article__toc-nav {
	margin: 0;
}

.glivresearch-article__toc-list {
	margin: 0;
	padding-left: 1.25rem;
}

.glivresearch-article__toc-list a {
	color: var(--gr-accent);
	text-decoration: none;
}

.glivresearch-article__toc-list a:hover {
	text-decoration: underline;
}

.glivresearch-article__main {
	margin: 0;
}

.glivresearch-article__content-section .glivresearch-article__prose > h2:first-child {
	margin-top: 0;
}

.glivresearch-article__prose :first-child {
	margin-top: 0;
}

.glivresearch-article__prose :last-child {
	margin-bottom: 0;
}

.glivresearch-article__prose h2 {
	margin: 0 0 1rem;
	font-size: clamp(1.125rem, 2.5vw, 1.375rem);
	font-weight: 600;
	line-height: 1.35;
	color: var(--gr-heading);
}

.glivresearch-article__prose h3 {
	margin: 1.5rem 0 0.5rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--gr-heading);
}

.glivresearch-article__prose p,
.glivresearch-article__prose li {
	font-size: 1rem;
}

.glivresearch-article__prose a {
	color: var(--gr-accent);
}

/* === Tabele (odpowiednik Elementor .table-container) === */

.glivresearch-article__table-container {
	width: 100%;
	margin: 1.25rem 0;
	background-color: var(--gr-bg);
	border-radius: var(--gr-radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	/* Szerokie tabele: poziomy slider zamiast obcinania kolumn */
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: #94a3b8 transparent;
}

.glivresearch-article__table-container::-webkit-scrollbar {
	height: 10px;
}

.glivresearch-article__table-container::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 0 0 var(--gr-radius) var(--gr-radius);
}

.glivresearch-article__table-container::-webkit-scrollbar-thumb {
	background: #94a3b8;
	border-radius: 999px;
}

.glivresearch-article__table-container::-webkit-scrollbar-thumb:hover {
	background: #64748b;
}

.glivresearch-article__table-container table {
	width: max-content;
	min-width: 100%;
	border-collapse: collapse;
	text-align: left;
	margin: 0;
}

.glivresearch-article__table-container th,
.glivresearch-article__table-container td {
	min-width: 8.5rem;
}

.glivresearch-article__table-container th {
	background-color: #e2e8f0;
	color: var(--gr-heading);
	font-weight: 600;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 1rem;
	border-bottom: 2px solid var(--gr-border-strong);
}

.glivresearch-article__table-container td {
	padding: 1rem;
	border-bottom: 1px solid var(--gr-border);
	font-size: 0.9375rem;
	vertical-align: top;
}

.glivresearch-article__table-container tbody tr:nth-child(even) {
	background-color: var(--gr-surface);
}

.glivresearch-article__table-container tbody tr:hover {
	background-color: var(--gr-surface-hover);
	transition: background-color 0.2s ease;
}

.glivresearch-article__section-title {
	margin: 2rem 0 1rem;
}

.glivresearch-article__faq .glivresearch-article__section-title {
	margin: 0 0 0.75rem;
}

.glivresearch-article__faq-list {
	margin: 0;
}

.glivresearch-article details.glivresearch-article__disclosure--nested {
	margin: 0 0 0.5rem;
	padding: 0.75rem 0 0;
	border-top: 1px solid rgba(175, 52, 175, 0.12);
	background: transparent;
}

.glivresearch-article details.glivresearch-article__disclosure--nested:first-child {
	border-top: none;
	padding-top: 0;
}

.glivresearch-article details.glivresearch-article__disclosure--nested > .glivresearch-article__disclosure-summary {
	font-size: 1rem;
	font-weight: 600;
}

.glivresearch-article details.glivresearch-article__disclosure--nested[open] > .glivresearch-article__disclosure-summary {
	margin-bottom: 0.5rem;
}

.glivresearch-article__faq-a {
	padding-bottom: 0.25rem;
}

.glivresearch-article__faq-item {
	margin: 0;
}

.glivresearch-article__faq-q {
	margin: 0;
}

.glivresearch-article section.glivresearch-article__bibliography {
	margin: var(--gr-gap) 0;
	padding: 1.25rem;
	background-color: var(--gr-keywords-bg);
	border: none;
	border-radius: 0;
	box-shadow: none;
	overflow-x: hidden;
	min-width: 0;
	max-width: 100%;
}

.glivresearch-article__bibliography .glivresearch-article__section-title {
	margin-top: 0;
}

.glivresearch-article__bib-list {
	margin: 0;
	padding-left: 1.25rem;
	font-size: 0.92rem;
	max-width: 100%;
	min-width: 0;
}

.glivresearch-article__bib-item {
	margin-bottom: 0.5rem;
	scroll-margin-top: 1.25rem;
	max-width: 100%;
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.glivresearch-article__bib-item a {
	color: var(--gr-accent);
	display: inline;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.glivresearch-article__bib-doi {
	display: inline;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.glivresearch-article__bib-doi::before {
	content: " ";
}

/* Cały marker [1] / [1, 2] bez łamania; &nbsp; przed grupą dokleja ostatnie słowo. */
.glivresearch-article__cite-group {
	white-space: nowrap;
}

.glivresearch-article__cite {
	color: var(--gr-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.glivresearch-article__cite:hover,
.glivresearch-article__cite:focus-visible {
	text-decoration: underline;
}

.glivresearch-article__ymyl {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 2px solid var(--gr-border);
	font-size: 0.88rem;
	color: var(--gr-muted);
}

.glivresearch-article__disclaimer {
	margin-bottom: 1rem;
}

.glivresearch-article__copyright {
	margin: 1rem 0;
}

.glivresearch-article__credits {
	margin-top: 0;
	text-align: right;
}

.glivresearch-article__credits .glivresearch-article__meta-line {
	margin: 0.35rem 0;
}

.glivresearch-article__credits .glivresearch-article__meta-line:first-child {
	margin-top: 0;
}

.glivresearch-article__credits .glivresearch-article__meta-line:last-child {
	margin-bottom: 0;
}

.glivresearch-article__ymyl-footer {
	margin-top: 2.5rem;
}

.glivresearch-article__spec-cards {
	list-style: none;
	margin: 1.25rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	text-align: left;
}

.glivresearch-article__spec-card {
	margin: 0;
	padding: 0;
}

/* Box jak specjalista__header — scoped fallback gdy specjalista.css nie jest załadowany */
.glivresearch-article__spec-card .specjalista__header--article-footer {
	--spec-accent: #0d3276;
	--spec-accent-dark: #092456;
	--spec-accent-rgb: 13, 50, 118;
	--spec-green: #0a7d6b;
	--spec-green-dark: #075e51;
	--spec-green-rgb: 10, 125, 107;
	--spec-bg: #ffffff;
	--spec-surface: #f5f8f7;
	--spec-border: #e2e8e6;
	--spec-text: #1f2a28;
	--spec-text-muted: #5c6b68;
	--spec-radius: 16px;
	--spec-gap: 1.5rem;

	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--spec-gap);
	align-items: center;
	text-align: center;
	padding: 1.5rem;
	background: var(--spec-surface);
	border: 1px solid var(--spec-border);
	border-radius: var(--spec-radius);
	color: var(--spec-text);
}

.glivresearch-article__spec-card .specjalista__header--article-footer.specjalista__header--has-location {
	--spec-location-bar-height: 2.0625rem;
	padding-top: 2.85rem;
}

.glivresearch-article__spec-card .specjalista__header--article-footer.specjalista__header--has-location::before {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	height: var(--spec-location-bar-height);
	background: var(--spec-accent);
	border: 1px solid var(--spec-accent-dark);
	border-bottom: none;
	border-radius: var(--spec-radius) var(--spec-radius) 0 0;
	z-index: 1;
	pointer-events: none;
}

.glivresearch-article__spec-card .specjalista__location-tab {
	position: absolute;
	top: -1px;
	left: -1px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: var(--spec-location-bar-height, 2.0625rem);
	max-width: calc(100% - 2rem);
	padding: 0 1.35rem;
	box-sizing: border-box;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
}

.glivresearch-article__spec-card .specjalista__location-tab + .specjalista__photo,
.glivresearch-article__spec-card .specjalista__location-tab ~ .specjalista__intro {
	position: relative;
	z-index: 1;
}

.glivresearch-article__spec-card .specjalista__photo {
	flex-shrink: 0;
	width: 140px;
	max-width: 50%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background: var(--spec-border);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.glivresearch-article__spec-card-photo-link {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
}

.glivresearch-article__spec-card .specjalista__photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

.glivresearch-article__spec-card .specjalista__intro {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	align-items: center;
	min-width: 0;
}

.glivresearch-article__spec-card .specjalista__name {
	margin: 0;
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	line-height: 1.15;
	font-weight: 700;
	color: var(--spec-text);
}

.glivresearch-article__spec-card .specjalista__name .specjalista__title {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--spec-accent);
}

.glivresearch-article__spec-card .specjalista__name-text {
	display: block;
}

.glivresearch-article__spec-card .specjalista__name-text a {
	color: inherit;
	text-decoration: none;
}

.glivresearch-article__spec-card .specjalista__name-text a:hover,
.glivresearch-article__spec-card .specjalista__name-text a:focus-visible {
	color: var(--spec-accent);
	text-decoration: underline;
}

.glivresearch-article__spec-card .specjalista__role {
	margin: 0;
	max-width: 36rem;
	font-size: 1rem;
	line-height: 1.45;
	color: var(--spec-text-muted);
	font-weight: 500;
}

.glivresearch-article__spec-card .specjalista__pwz {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--spec-text-muted);
	font-variant-numeric: tabular-nums;
}

.glivresearch-article__spec-card .specjalista__pwz-label {
	font-weight: 600;
	color: var(--spec-text);
}

.glivresearch-article__spec-card .specjalista__tags {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.glivresearch-article__spec-card .specjalista__tag {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--spec-accent);
	background: rgba(var(--spec-accent-rgb), 0.1);
	border-radius: 999px;
}

.glivresearch-article__spec-card .specjalista__tags--specjalizacja .specjalista__tag {
	color: var(--spec-accent);
	background: rgba(var(--spec-accent-rgb), 0.1);
}

.glivresearch-article__spec-card .specjalista__tags--schorzenia .specjalista__tag,
.glivresearch-article__spec-card .specjalista__tag--schorzenie {
	color: var(--spec-green-dark);
	background: rgba(var(--spec-green-rgb), 0.12);
}

@media (min-width: 640px) {
	.glivresearch-article__spec-card .specjalista__header--article-footer {
		flex-direction: row;
		text-align: left;
		align-items: center;
		padding: 1.75rem;
	}

	.glivresearch-article__spec-card .specjalista__header--article-footer.specjalista__header--has-location {
		padding-top: 3.1rem;
	}

	.glivresearch-article__spec-card .specjalista__photo {
		width: 160px;
		max-width: none;
	}

	.glivresearch-article__spec-card .specjalista__intro {
		align-items: flex-start;
	}

	.glivresearch-article__spec-card .specjalista__tags {
		justify-content: flex-start;
	}
}

@media (max-width: 480px) {
	.glivresearch-article__credits {
		text-align: left;
	}

	.glivresearch-article__spec-card .specjalista__photo {
		width: 120px;
	}
}

@media (min-width: 768px) {
	.glivresearch-article {
		padding: 2rem 1.5rem 4rem;
	}
}

@media (min-width: 1024px) {
	.glivresearch-article {
		padding: 2.5rem 2rem 4rem;
	}
}

/* Mobile: bez podwójnego guttera względem kontenera motywu */
@media (max-width: 767.98px) {
	.glivresearch-article {
		padding: 1rem 0 2.5rem;
	}

	.glivresearch-article section.glivresearch-article__panel,
	.glivresearch-article details.glivresearch-article__panel,
	.glivresearch-article section.glivresearch-article__keywords {
		padding: 1rem 0.9rem;
		margin: 1rem 0;
	}

	.glivresearch-article__title {
		padding: 0 0.75rem;
		font-size: clamp(1.35rem, 5.5vw, 1.75rem);
	}

	.glivresearch-article__series,
	.glivresearch-article__dates,
	.glivresearch-article__meta-line {
		padding-left: 0.75rem;
		padding-right: 0.75rem;
	}

	.glivresearch-article__credits {
		padding-left: 0.75rem;
		padding-right: 0.75rem;
	}
}

/* Responsywność tabel — stack z etykietami data-label (jak Elementor) */
@media screen and (max-width: 768px) {
	.glivresearch-article__table-container {
		box-shadow: none;
		background-color: transparent;
		overflow: visible;
		scrollbar-gutter: auto;
	}

	.glivresearch-article__table-container table,
	.glivresearch-article__table-container thead,
	.glivresearch-article__table-container tbody,
	.glivresearch-article__table-container th,
	.glivresearch-article__table-container td,
	.glivresearch-article__table-container tr {
		display: block !important;
		width: 100% !important;
		min-width: 0 !important;
	}

	.glivresearch-article__table-container thead tr {
		position: absolute !important;
		top: -9999px !important;
		left: -9999px !important;
	}

	.glivresearch-article__table-container tbody tr {
		background-color: var(--gr-bg) !important;
		border: 1px solid var(--gr-border) !important;
		border-radius: var(--gr-radius) !important;
		margin-bottom: 1rem !important;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
		padding: 0.5rem !important;
	}

	.glivresearch-article__table-container tbody tr:hover {
		background-color: var(--gr-bg) !important;
	}

	.glivresearch-article__table-container td {
		border: none !important;
		border-bottom: 1px solid var(--gr-surface-hover) !important;
		padding: 1rem !important;
		text-align: left !important;
		height: auto !important;
		min-height: auto !important;
		position: relative !important;
	}

	.glivresearch-article__table-container td:last-child {
		border-bottom: none !important;
	}

	.glivresearch-article__table-container td::before {
		content: attr(data-label);
		display: block !important;
		position: static !important;
		float: none !important;
		width: 100% !important;
		margin-bottom: 0.5rem !important;
		font-weight: 700 !important;
		color: var(--gr-muted) !important;
		font-size: 0.6875rem !important;
		text-transform: uppercase !important;
		letter-spacing: 0.5px !important;
		line-height: 1.2 !important;
	}
}
