/* ==========================================================================
   Komponenty wspólne (używane na wielu stronach)
   1. Separatory i nagłówki sekcji  2. Chipsy  3. Kafelki social
   4. Panel streamu i kropka statusu  5. Ramka autora  6. Karta wpisu
   7. Przyciski dodatkowe
   ========================================================================== */

/* 1. Separatory i nagłówki sekcji */

.band {
	padding-bottom: 56px;
}

@media (min-width: 1100px) {
	.band {
		padding-bottom: 72px;
	}
}

.section-rule {
	height: 2px;
	margin: 0;
	border: 0;
	background: linear-gradient(90deg, transparent, var(--teal), var(--purple), transparent);
}

.section-rule--reverse {
	background: linear-gradient(90deg, transparent, var(--purple), var(--teal), transparent);
}

.band__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 24px;
}

.band__title {
	margin: 32px 0 20px;
	font-size: 22px;
}

.band__head {
	margin: 32px 0 20px;
}

.band__head .band__title {
	margin: 0;
}

.band__note {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	color: var(--text-3);
}

@media (min-width: 768px) {
	.band__title {
		margin-top: 40px;
		font-size: 26px;
	}

	.band__head {
		margin: 40px 0 24px;
	}
}

/* 2. Chipsy (tagi, udostępnianie, filtry) */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--tap);
	min-height: var(--tap);
	padding: 10px 14px;
	border: 1px solid var(--line-strong);
	background: none;
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.chip:hover {
	border-color: var(--teal);
	color: var(--teal);
}

.chip.is-active,
.chip[aria-current="page"] {
	border-color: var(--text);
	background: var(--text);
	color: var(--bg);
	font-weight: 700;
}

/* 3. Kafelki social */

.social-tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

@media (min-width: 768px) {
	.social-tiles {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px;
	}
}

.tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	min-height: var(--tap);
	padding: 16px;
	border: 2px solid var(--tile-color, var(--line));
	background: var(--surface-2);
	color: var(--text);
	text-decoration: none;
}

@media (min-width: 768px) {
	.tile {
		padding: 22px;
		gap: 6px;
	}
}

.tile__name {
	font-family: var(--font-display);
	font-size: 15px;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--tile-text);
}

.tile__handle {
	overflow-wrap: anywhere;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-2);
}

.tile__count {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 700;
	color: var(--text);
}

.tile__cta {
	margin-top: auto;
	padding-top: 8px;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--tile-text);
}

@media (min-width: 768px) {
	.tile__name {
		font-size: 18px;
	}

	.tile__handle {
		font-size: 13px;
	}

	.tile__cta {
		padding-top: 10px;
		font-size: 12px;
	}
}

.tile:hover {
	background: #191919;
}

.tile--youtube {
	--tile-color: var(--yt);
	--tile-text: var(--yt-text);
	box-shadow: 0 0 16px rgba(255, 0, 51, 0.4), inset 0 0 14px rgba(255, 0, 51, 0.12);
}

.tile--twitch {
	--tile-color: var(--tw);
	--tile-text: var(--tw-text);
	box-shadow: 0 0 16px rgba(145, 70, 255, 0.5), inset 0 0 14px rgba(145, 70, 255, 0.15);
}

.tile--instagram {
	--tile-text: #f0508a;
	border-image: var(--ig-gradient) 1;
	box-shadow: -5px -5px 14px -4px rgba(253, 29, 29, 0.45), 5px 5px 14px -4px rgba(131, 58, 180, 0.55);
}

.tile--instagram .tile__name {
	align-self: flex-start;
	background: linear-gradient(90deg, #fcaf45, #fd1d1d, #e1306c, #c13584);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.tile--tiktok {
	--tile-text: var(--tt-cyan);
	border-image: linear-gradient(135deg, var(--tt-cyan), var(--tt-red)) 1;
	box-shadow: -5px -5px 14px -4px rgba(37, 244, 238, 0.5), 5px 5px 14px -4px rgba(254, 44, 85, 0.55);
}

.tile--tiktok .tile__name {
	color: #fff;
	text-shadow: -2px -1px 0 var(--tt-cyan), 2px 1px 0 var(--tt-red);
}

@media (min-width: 768px) {
	.tile--youtube {
		box-shadow: 0 0 22px rgba(255, 0, 51, 0.45), inset 0 0 14px rgba(255, 0, 51, 0.12);
	}

	.tile--twitch {
		box-shadow: 0 0 22px rgba(145, 70, 255, 0.55), inset 0 0 14px rgba(145, 70, 255, 0.15);
	}

	.tile--instagram {
		box-shadow: -8px -8px 22px -6px rgba(253, 29, 29, 0.45), 8px 8px 22px -6px rgba(131, 58, 180, 0.55);
	}

	.tile--tiktok {
		box-shadow: -8px -8px 22px -6px rgba(37, 244, 238, 0.5), 8px 8px 22px -6px rgba(254, 44, 85, 0.55);
	}
}

/* 4. Panel streamu i kropka statusu */

.status-dot {
	display: inline-block;
	flex-shrink: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--offline-dot);
}

.status-dot--live {
	background: var(--live);
	box-shadow: 0 0 6px rgba(255, 61, 26, 0.8);
	animation: live-pulse 1.2s infinite;
}

@keyframes live-pulse {
	0%,
	100% {
		opacity: 1;
		box-shadow: 0 0 6px rgba(255, 61, 26, 0.8);
	}

	50% {
		opacity: 0.35;
		box-shadow: 0 0 18px rgba(255, 61, 26, 1);
	}
}

.stream-card {
	padding: 22px 24px;
	border: 2px solid var(--line);
	background: var(--surface-2);
}

.stream-card--live {
	border-color: rgba(255, 61, 26, 0.6);
	background: #140a08;
}

.stream-card__status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--offline-text);
}

.stream-card--live .stream-card__status {
	color: var(--live-text);
}

.stream-card__title {
	margin: 10px 0 0;
	font-size: 16px;
	line-height: 1.5;
}

.stream-card__meta {
	margin: 8px 0 0;
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	color: var(--text-3);
}

.stream-card--live .stream-card__meta {
	margin-top: 4px;
	color: var(--text-2);
}

.stream-card .btn {
	display: flex;
	margin-top: 16px;
}

/* 5. Ramka autora */

.avatar {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--teal), var(--purple));
	color: var(--bg);
	font-family: var(--font-display);
	font-size: 22px;
	line-height: 1;
}

.author-box {
	padding: 24px;
	border: 2px solid var(--line);
	background: var(--surface-2);
}

.author-box__head {
	display: flex;
	align-items: center;
	gap: 14px;
}

.author-box__name {
	margin: 0;
	font-family: var(--font-display);
	font-size: 18px;
	text-transform: uppercase;
}

.author-box__role {
	margin: 2px 0 0;
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	color: var(--text-3);
}

.author-box__bio {
	margin: 16px 0 0;
	color: var(--text-2);
}

/* 6. Karta wpisu */

.post-card {
	border: 2px solid var(--line);
	background: var(--surface-2);
}

.post-card:hover,
.post-card:focus-within {
	border-color: var(--teal);
}

.post-card__link {
	display: flex;
	height: 100%;
	color: var(--text);
	text-decoration: none;
}

.post-card__thumb {
	flex-shrink: 0;
	background: var(--bg);
	background-image: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(168, 85, 247, 0.18));
	overflow: hidden;
}

.post-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__meta {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	color: var(--teal);
}

.post-card__title {
	margin: 8px 0 0;
	font-size: 17px;
	line-height: 1.15;
}

/* Wariant „compact”: miniatura z lewej */
.post-card--compact .post-card__thumb {
	width: 112px;
	min-height: 96px;
}

.post-card--compact .post-card__body {
	align-self: center;
	min-width: 0;
	padding: 14px 16px;
}

@media (min-width: 768px) {
	.post-card--compact .post-card__thumb {
		width: 220px;
		min-height: 150px;
	}

	.post-card--compact .post-card__body {
		padding: 22px;
	}

	.post-card__title {
		font-size: 20px;
	}
}

/* 7. Przyciski dodatkowe */

.btn--live {
	background: var(--live);
	color: var(--bg);
}

.btn--live:hover {
	box-shadow: 0 0 22px rgba(255, 61, 26, 0.6);
}

/* 8. Elementy wspólne: etykieta sekcji, gradient w tekście, pole formularza */

.eyebrow {
	margin: 0 0 16px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--teal);
}

@media (min-width: 768px) {
	.eyebrow {
		margin-bottom: 20px;
		font-size: 13px;
	}
}

.text-gradient {
	background: var(--brand-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.field {
	width: 100%;
	min-height: var(--tap);
	padding: 12px 16px;
	border: 2px solid var(--line);
	border-radius: 0;
	background: var(--surface-2);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
}

.field::placeholder {
	color: var(--text-3);
	opacity: 1;
}

.field:focus {
	border-color: var(--teal);
}

.chip[aria-current="true"] {
	border-color: var(--text);
	background: var(--text);
	color: var(--bg);
	font-weight: 700;
}

/* 9. Karta wpisu: wariant „grid” (lista wpisów) */

.post-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

@media (min-width: 768px) {
	.post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

@media (min-width: 1100px) {
	.post-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.post-card--grid .post-card__link {
	flex-direction: column;
}

.post-card--grid .post-card__thumb {
	width: 100%;
	aspect-ratio: 16 / 10;
}

.post-card--grid .post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px;
}

.post-card--grid .post-card__meta {
	font-size: 12px;
}

.post-card--grid .post-card__title {
	margin: 10px 0 8px;
	font-size: 20px;
	overflow-wrap: break-word;
}

.post-card__excerpt {
	margin: 0;
	color: var(--text-2);
	font-size: 16px;
	line-height: 1.55;
}

.post-card__reading {
	margin: auto 0 0;
	padding-top: 16px;
	font-family: var(--font-mono);
	font-size: 12px;
	text-transform: uppercase;
	color: var(--text-3);
}

@media (min-width: 768px) {
	.post-card--grid .post-card__body {
		padding: 24px;
	}

	.post-card--grid .post-card__title {
		font-size: 21px;
	}
}

.link-back {
	color: var(--teal);
	text-decoration: none;
	border-bottom: 1px solid var(--teal);
}

/* 10. Paginacja (bez JS) */

.pagination {
	margin-top: 40px;
}

.js .pagination {
	display: none;
}

.pagination__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--tap);
	min-height: var(--tap);
	padding: 8px 14px;
	border: 1px solid var(--line-strong);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 12px;
	text-decoration: none;
	text-transform: uppercase;
}

.pagination a.page-numbers:hover {
	border-color: var(--teal);
	color: var(--teal);
}

.pagination .page-numbers.current {
	border-color: var(--text);
	background: var(--text);
	color: var(--bg);
	font-weight: 700;
}

/* 11. Układ przycisków w hero i przyciski platform (używane na wielu stronach) */

.hero__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hero__actions .btn {
	min-height: 52px;
	padding: 14px 28px;
	font-size: 14px;
}

.hero__actions .btn--primary {
	padding-block: 16px;
}

.btn--twitch {
	border-color: var(--tw);
	box-shadow: 0 0 18px rgba(145, 70, 255, 0.4);
}

.btn--twitch:hover {
	box-shadow: 0 0 26px rgba(145, 70, 255, 0.7);
}

.btn--discord {
	min-height: 52px;
	padding: 16px 30px;
	background: var(--dc);
	color: #fff;
	box-shadow: 0 0 24px rgba(88, 101, 242, 0.6);
	font-size: 14px;
}

.btn--discord:hover {
	background: #6b77f5;
}

@media (min-width: 768px) {
	.hero__actions {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 14px;
	}

	.hero__actions .btn {
		font-size: 13px;
	}
}

/* 12. Osadzenia (placeholder zgody i iframe), używane na stronie głównej i we wpisach */

.embed {
	position: relative;
	aspect-ratio: 16 / 9;
	min-height: 220px;
	background: var(--bg);
	border: 1px solid rgba(255, 61, 26, 0.5);
}

.embed__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 3px 8px;
	background: var(--live);
	color: var(--bg);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
}

.embed__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 40px 16px 16px;
	text-align: center;
}

.embed__text {
	max-width: 360px;
	margin: 0;
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--text-2);
}

html:not(.js) .embed__placeholder .btn {
	display: none;
}

.embed__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.embed--post {
	margin: 32px 0;
	border: 2px solid var(--line);
}

.embed__fallback {
	color: var(--teal);
	font-family: var(--font-mono);
	font-size: 12px;
}

.js .embed__fallback {
	display: none;
}
