/*
 * News (Aktualności): list, single post content (images, galleries, embeds), photo lightbox.
 * Cards reuse .bs-card / .bs-thumb from events.css.
 */

.news-page {
	padding-top: 40px;
}

@media (min-width: 768px) {
	.news-page {
		padding-top: 56px;
	}
}

/* ---------- Card ---------- */

.news-card__date {
	margin-bottom: 8px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bs-accent);
}

.news-card__excerpt {
	flex: 1;
	margin: 12px 0 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: rgba(251, 221, 223, 0.62);
}

.news-card__more {
	margin-top: 18px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bs-accent);
}

/* ---------- Single post ---------- */

.news-single {
	padding-top: 24px;
}

.news-article {
	max-width: 900px;
}

.news-article__head {
	margin-bottom: 24px;
}

.news-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bs-text-subtle);
}

.news-article__cat {
	padding: 4px 10px;
	background: var(--bs-accent);
	color: var(--bs-on-accent);
}

.news-article__cat:hover {
	background: var(--bs-text);
	color: var(--bs-on-accent);
}

.news-article__title {
	font-size: clamp(32px, 4.4vw, 56px);
	letter-spacing: -0.035em;
	line-height: 1;
}

.news-article__media {
	margin-bottom: 32px;
}

/* Text of the post – anything the WordPress editor can produce */
.news-content {
	max-width: 760px;
	font-size: 17px;
	line-height: 1.7;
	color: rgba(251, 221, 223, 0.8);
}

.news-content > * + * {
	margin-top: 1.1em;
}

.news-content p {
	margin: 0;
}

.news-content h2,
.news-content h3,
.news-content h4 {
	margin-top: 1.6em;
	color: var(--bs-text);
	line-height: 1.15;
}

.news-content h2 {
	font-size: 28px;
}

.news-content h3 {
	font-size: 22px;
}

.news-content ul,
.news-content ol {
	padding-left: 22px;
}

.news-content li + li {
	margin-top: 6px;
}

.news-content li::marker {
	color: var(--bs-accent);
}

.news-content blockquote {
	margin: 1.4em 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--bs-accent);
	font-size: 19px;
	color: var(--bs-text);
}

.news-content img {
	display: block;
	max-width: 100%;
	height: auto;
}

.news-content figure {
	margin: 1.6em 0;
}

.news-content figcaption,
.news-content .wp-caption-text {
	margin-top: 8px;
	font-size: 13px;
	color: var(--bs-text-subtle);
}

.is-zoomable {
	cursor: zoom-in;
}

/* Galleries (block editor and classic [gallery]) */
.news-content .wp-block-gallery,
.news-content .gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 1.6em 0;
	padding: 0;
}

.news-content .wp-block-gallery figure,
.news-content .gallery .gallery-item {
	margin: 0;
	width: auto !important;
	max-width: none !important;
}

.news-content .wp-block-gallery img,
.news-content .gallery img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

@media (min-width: 640px) {
	.news-content .wp-block-gallery,
	.news-content .gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Embeds (YouTube, Twitch…) */
.news-content iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

.news-content .wp-block-embed__wrapper {
	position: relative;
}

.news-content .wp-block-button__link,
.news-content .wp-element-button {
	display: inline-block;
	padding: 14px 24px;
	background: var(--bs-accent);
	color: var(--bs-on-accent);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: var(--bs-track-label);
	text-decoration: none;
	text-transform: uppercase;
}

/* Previous / next post */
.news-article__nav {
	display: grid;
	gap: 12px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--bs-line);
}

.news-article__nav-link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 18px;
	background: var(--bs-surface);
	border: 1px solid var(--bs-line);
	color: var(--bs-text);
	font-family: var(--bs-font-display);
	font-weight: 800;
	line-height: 1.2;
}

.news-article__nav-link:hover {
	border-color: var(--bs-accent);
	color: var(--bs-text);
}

.news-article__nav-link span {
	font-family: var(--bs-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bs-accent);
}

.news-article__nav-link.is-next {
	text-align: right;
}

@media (min-width: 768px) {
	.news-single {
		padding-top: 40px;
	}

	.news-article__nav {
		grid-template-columns: 1fr 1fr;
	}

	.news-article__nav-link.is-next {
		grid-column: 2;
	}
}

/* ---------- Lightbox ---------- */

.lightbox {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	background: rgba(4, 8, 20, 0.95);
	border: 0;
	color: var(--bs-text);
}

.lightbox::backdrop {
	background: rgba(4, 8, 20, 0.9);
}

.lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 56px 16px;
	max-width: 100%;
	max-height: 100%;
}

.lightbox__img {
	display: block;
	max-width: min(1400px, 100%);
	max-height: calc(100dvh - 140px);
	object-fit: contain;
}

.lightbox__caption {
	margin-top: 12px;
	font-size: 14px;
	color: var(--bs-text-muted);
	text-align: center;
}

.lightbox__close,
.lightbox__arrow {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: rgba(14, 28, 65, 0.8);
	border: 1px solid var(--bs-line-strong);
	color: var(--bs-text);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.lightbox__close:hover,
.lightbox__arrow:hover {
	border-color: var(--bs-accent);
	color: var(--bs-accent);
}

.lightbox__close {
	top: 12px;
	right: 12px;
}

.lightbox__arrow {
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__arrow.is-prev {
	left: 12px;
}

.lightbox__arrow.is-next {
	right: 12px;
}

.lightbox.is-single .lightbox__arrow {
	display: none;
}

.lightbox__count {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--bs-text-muted);
}
