/* ============================================================
   Collibre — Artykuł (single post). Mockup „Collibre Artykul standalone".
   progress bar · hero · layout 12-kol (TOC sticky + treść prose) · share · polecane · autor · powiązane.
   ============================================================ */
.tech-article { --tech-article-max: 80rem; }

/* Pasek postępu czytania */
.tech-article__progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--tech-ink); z-index: 60; width: 0; transition: width 0.1s linear; }

/* Kontenery */
.tech-article__head-wrap,
.tech-article__body,
.tech-article__related-inner { max-width: var(--tech-article-max, 80rem); margin-inline: auto; padding-inline: 1.5rem; }
/* related jest poza .tech-article → zmienna nie istnieje, stąd fallback + lokalna definicja */
.tech-article__related-inner { --tech-article-max: 80rem; }
/* standard breadcrumbs: 2rem / 3rem@1024 od navbara */
.tech-article__head-wrap { padding-top: 2rem; }
@media (min-width: 1024px) { .tech-article__head-wrap { padding-top: 3rem; } }
.tech-article__head-wrap .tech-breadcrumbs { max-width: none; padding: 0 0 1.5rem; margin: 0; }

/* Hero */
.tech-article__hero { max-width: 48rem; }
.tech-article__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; font-size: var(--tech-fs-xs); }
.tech-article__cat { display: inline-block; padding: 0.25rem 0.75rem; border-radius: var(--tech-radius-pill); border: 1px solid var(--tech-border); background: var(--tech-mist); color: var(--tech-ink); font-weight: var(--tech-fw-semibold); }
.tech-article__date, .tech-article__read { color: var(--tech-slate); }
.tech-article__title { margin: 1rem 0 0; font-size: clamp(1.875rem, 4.5vw, 3rem); font-weight: var(--tech-fw-extrabold); letter-spacing: var(--tech-tracking-tight); line-height: 1.08; color: var(--tech-ink); }
.tech-article__lead { margin: 1.25rem 0 0; color: var(--tech-slate); font-size: var(--tech-fs-lg); line-height: var(--tech-lh-normal, 1.7); }
.tech-article__byline { margin-top: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.tech-article__byline-name { font-weight: var(--tech-fw-semibold); color: var(--tech-ink); font-size: var(--tech-fs-sm); }
.tech-article__byline-role { color: var(--tech-slate); font-size: var(--tech-fs-sm); }

/* Avatar (inicjały / obraz) */
.tech-article__avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tech-mist); border: 1px solid var(--tech-border); font-weight: var(--tech-fw-bold); color: var(--tech-ink); flex: 0 0 auto; overflow: hidden; }
.tech-article__avatar-img { width: 100%; height: 100%; object-fit: cover; }

/* Zdjęcie główne */
.tech-article__cover { margin-top: 2rem; aspect-ratio: 21 / 9; border-radius: var(--tech-radius-lg); overflow: hidden; background: var(--tech-mist); }
.tech-article__cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tech-article__cover--ph { display: flex; align-items: center; justify-content: center; color: var(--tech-slate); font-weight: var(--tech-fw-bold); letter-spacing: 0.1em; text-transform: uppercase; }

/* Layout 12-kol */
.tech-article__body { padding-block: 2.5rem 3.5rem; display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .tech-article__body { grid-template-columns: 3fr 9fr; gap: 3.5rem; padding-block: 3.5rem; } }

/* Aside: TOC + share (sticky) */
.tech-article__side { display: none; }
@media (min-width: 1024px) { .tech-article__side { display: block; } }
.tech-article__side-sticky { position: sticky; top: 7rem; }
.tech-article__side-label { font-size: var(--tech-fs-xs); font-weight: var(--tech-fw-bold); text-transform: uppercase; letter-spacing: 0.16em; color: var(--tech-slate); margin-bottom: 0.75rem; }
.tech-article__toc { display: flex; flex-direction: column; gap: 0.1rem; border-left: 2px solid var(--tech-border); }
.tech-article__toc a { padding: 0.375rem 0 0.375rem 0.875rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--tech-slate); text-decoration: none; font-size: var(--tech-fs-sm); line-height: 1.4; transition: color 0.15s ease, border-color 0.15s ease; }
.tech-article__toc a:hover { color: var(--tech-ink); }
.tech-article__toc a.is-active { color: var(--tech-ink); font-weight: var(--tech-fw-semibold); border-left-color: var(--tech-ink); }
.tech-article__share { margin-top: 2rem; }
.tech-article__share-btns { display: flex; gap: 0.5rem; }
/* Astra styluje globalnie <button> (tło/padding/min-width) → kontrujemy !important, by zrobić kółka 9×9 z mockupu. */
.tech-article__share-btn {
	display: inline-flex !important; align-items: center; justify-content: center;
	width: 2.25rem !important; height: 2.25rem !important; min-width: 0 !important; padding: 0 !important;
	border-radius: 50% !important; border: 1px solid var(--tech-border) !important;
	background: var(--tech-white) !important; color: var(--tech-ink) !important;
	cursor: pointer; transition: background 0.15s ease, color 0.15s ease; text-decoration: none !important;
}
.tech-article__share-btn:hover, .tech-article__share-btn.is-copied { background: var(--tech-ink) !important; color: var(--tech-white) !important; border-color: var(--tech-ink) !important; }

/* Treść (prose) */
.tech-article__prose { max-width: 48rem; }
.tech-article__prose > * { max-width: 48rem; }
.tech-article__prose h2 { font-size: 1.6rem; font-weight: var(--tech-fw-bold); letter-spacing: -0.01em; margin: 2.5rem 0 0.75rem; scroll-margin-top: 7rem; color: var(--tech-ink); line-height: 1.2; }
.tech-article__prose h2:first-child { margin-top: 0; }
.tech-article__prose h3 { font-size: 1.2rem; font-weight: var(--tech-fw-bold); margin: 1.75rem 0 0.5rem; color: var(--tech-ink); }
.tech-article__prose p { color: var(--tech-slate); line-height: 1.75; margin: 0 0 1.1rem; }
.tech-article__prose ul, .tech-article__prose ol { margin: 0 0 1.1rem; padding-left: 1.25rem; color: var(--tech-slate); }
.tech-article__prose ul { list-style: disc; }
.tech-article__prose ol { list-style: decimal; }
.tech-article__prose li { margin-bottom: 0.5rem; line-height: 1.7; }
.tech-article__prose strong { color: var(--tech-ink); font-weight: 600; }
.tech-article__prose a { color: var(--tech-ink); text-decoration: underline; text-underline-offset: 2px; }
.tech-article__prose img { border-radius: var(--tech-radius-lg); height: auto; margin: 1.5rem 0; }
.tech-article__prose blockquote { margin: 1.5rem 0; padding: 0.5rem 0 0.5rem 1.25rem; border-left: 3px solid var(--tech-ink); color: var(--tech-ink); font-style: italic; }
.tech-article__prose h2 + p, .tech-article__prose h3 + p { margin-top: 0; }

/* Share mobile */
.tech-article__share-mobile { display: flex; align-items: center; gap: 0.75rem; margin-top: 2rem; }
@media (min-width: 1024px) { .tech-article__share-mobile { display: none; } }
.tech-article__share-lab { font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-semibold); color: var(--tech-ink); }

/* Polecane produkty */
.tech-article__products { margin-top: 3rem; border-radius: var(--tech-radius-lg); background: var(--tech-mist); border: 1px solid var(--tech-border); padding: 1.5rem; }
@media (min-width: 640px) { .tech-article__products { padding: 2rem; } }
.tech-article__products-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.tech-article__products-title { margin: 0; font-size: var(--tech-fs-xl); font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); color: var(--tech-ink); }
.tech-article__products-all { font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-semibold); color: var(--tech-ink); text-decoration: none; white-space: nowrap; }
.tech-article__products-all:hover { opacity: 0.7; }
.tech-article__products-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .tech-article__products-grid { grid-template-columns: 1fr 1fr; } }
.tech-article__pcard { display: flex; align-items: center; gap: 1rem; border-radius: var(--tech-radius-md, 1rem); background: var(--tech-white); border: 1px solid var(--tech-border); padding: 0.75rem; text-decoration: none; transition: box-shadow 0.2s ease; }
.tech-article__pcard:hover { box-shadow: var(--tech-shadow-lg); }
.tech-article__pmedia { width: 5rem; height: 5rem; border-radius: 0.75rem; overflow: hidden; background: var(--tech-mist); flex: 0 0 auto; }
.tech-article__pimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.tech-article__pinfo { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.tech-article__pname { font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); color: var(--tech-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tech-article__pprice { color: var(--tech-ink); font-weight: var(--tech-fw-extrabold); }
.tech-article__pprice del { color: var(--tech-slate); font-weight: var(--tech-fw-semibold); margin-right: 0.35rem; }

/* Box autora */
.tech-article__author { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; border-radius: var(--tech-radius-lg); border: 1px solid var(--tech-border); padding: 1.5rem; }
@media (min-width: 640px) { .tech-article__author { flex-direction: row; padding: 2rem; } }
.tech-article__author-lab { font-size: var(--tech-fs-xs); font-weight: var(--tech-fw-bold); text-transform: uppercase; letter-spacing: 0.16em; color: var(--tech-slate); }
.tech-article__author-name { margin-top: 0.25rem; font-size: var(--tech-fs-lg); font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); color: var(--tech-ink); }
.tech-article__author-bio { margin: 0.5rem 0 0; color: var(--tech-slate); line-height: var(--tech-lh-normal, 1.7); }

/* Powiązane wpisy */
.tech-article__related { padding-block: 3.5rem; }
.tech-article__related-title { margin: 0 0 2rem; font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); color: var(--tech-ink); }
.tech-article__related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 1023px) { .tech-article__related-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (max-width: 639px)  { .tech-article__related-grid { grid-template-columns: 1fr; } }
.tech-article__rcard { display: flex; flex-direction: column; }
.tech-article__rmedia { display: block; position: relative; aspect-ratio: 16 / 11; border-radius: var(--tech-radius-lg); overflow: hidden; background: var(--tech-mist); }
.tech-article__rimg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.tech-article__rcard:hover .tech-article__rimg { transform: scale(1.03); }
.tech-article__rph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--tech-slate); font-size: var(--tech-fs-sm); background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 20px); }
.tech-article__rmeta { margin-top: 1rem; display: flex; align-items: center; gap: 0.75rem; font-size: var(--tech-fs-xs); }
.tech-article__rcat { display: inline-block; padding: 0.25rem 0.75rem; border-radius: var(--tech-radius-pill); border: 1px solid var(--tech-border); background: var(--tech-mist); color: var(--tech-ink); font-weight: var(--tech-fw-semibold); }
.tech-article__rdate { color: var(--tech-slate); }
.tech-article__rtitle { margin: 0.75rem 0 0; font-size: var(--tech-fs-lg); font-weight: var(--tech-fw-bold); letter-spacing: var(--tech-tracking-tight); line-height: var(--tech-lh-snug); }
.tech-article__rtitle a { color: var(--tech-ink); text-decoration: none; transition: opacity 0.2s ease; }
.tech-article__rcard:hover .tech-article__rtitle a { opacity: 0.7; }
.tech-article__rexcerpt { margin: 0.5rem 0 0; font-size: var(--tech-fs-sm); color: var(--tech-slate); line-height: var(--tech-lh-normal, 1.7); }
