/* Galeria — landing i albumy (podstrony) */

.eureka-galeria-filter .btn.rounded-pill {
	font-weight: 600;
}

.eureka-gallery-album-card {
	height: 100%;
}

.eureka-gallery-album-card__link {
	display: flex;
	flex-direction: column;
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	color: #fff;
	background: #fff;
}

.eureka-gallery-album-card__link:hover,
.eureka-gallery-album-card__link:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.18);
	color: #fff;
}

.eureka-gallery-album-card__cover {
	position: relative;
	aspect-ratio: 4 / 3;
	width: 100%;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}

.eureka-gallery-album-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1rem 1.15rem;
}

/* Pastylka — data (lewy górny róg) */
.eureka-gallery-album-card__date {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: #fff;
	color: #1e293b;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
	border-radius: 999px;
	padding: 0.45rem 0.75rem;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
	white-space: nowrap;
}

.eureka-gallery-album-card__date .bi {
	/* poprzednio: #e91e8c */
	color: var(--eureka-red);
	font-size: 0.8rem;
	flex-shrink: 0;
}

/* Pastylka — liczba zdjęć (prawy górny róg) */
.eureka-gallery-album-card__count {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	width: auto;
	height: auto;
	min-width: 2.5rem;
	justify-content: center;
	background: rgba(15, 23, 42, 0.82);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	border-radius: 999px;
	padding: 0.45rem 0.7rem;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	white-space: nowrap;
}

.eureka-gallery-album-card__count .bi {
	font-size: 0.9rem;
	opacity: 0.95;
}

.eureka-gallery-album-card__title {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 0;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* Biały pasek miniaturek (jak w mockupie) */
.eureka-gallery-album-card__previews {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 0.85rem;
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.eureka-gallery-album-card__thumb {
	width: 3.1rem;
	height: 3.1rem;
	border-radius: 0.65rem;
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
	border: 2px solid #fff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.eureka-gallery-album-card__thumb--ph {
	border-color: transparent;
	box-shadow: none;
}

.eureka-gallery-album-card__thumb--ph-1 {
	background: linear-gradient(135deg, #fbcfe8, #f472b6);
}

.eureka-gallery-album-card__thumb--ph-2 {
	background: linear-gradient(135deg, #a5f3fc, #22d3ee);
}

.eureka-gallery-album-card__thumb--ph-3 {
	background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
}

.eureka-gallery-album-card__more {
	margin-left: auto;
	font-size: 0.82rem;
	font-weight: 700;
	color: #64748b;
	background: #f1f5f9;
	border-radius: 0.55rem;
	padding: 0.35rem 0.55rem;
	line-height: 1;
}

/* Treść albumu — galeria Gutenberg (has-nested-images) i shortcode [gallery] */
.eureka-galeria-album-content .wp-block-gallery.has-nested-images,
.eureka-galeria-album-content .wp-block-gallery:not(.has-nested-images),
.eureka-galeria-album-content .gallery {
	--eureka-gallery-gap: 1rem;
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: var(--eureka-gallery-gap);
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eureka-galeria-album-content .wp-block-gallery.has-nested-images {
	flex-wrap: unset;
	align-items: stretch;
}

.eureka-galeria-album-content .wp-block-gallery .wp-block-image,
.eureka-galeria-album-content .wp-block-gallery .blocks-gallery-item,
.eureka-galeria-album-content .gallery .gallery-item {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}

.eureka-galeria-album-content .wp-block-gallery figure.wp-block-image {
	display: flex;
	flex-direction: column;
}

.eureka-galeria-album-content .wp-block-gallery .wp-block-image > a,
.eureka-galeria-album-content .wp-block-gallery .blocks-gallery-item a {
	display: block;
	border-radius: 0.75rem;
	overflow: hidden;
}

.eureka-galeria-album-content .wp-block-gallery .wp-block-image img,
.eureka-galeria-album-content .wp-block-gallery .blocks-gallery-item img,
.eureka-galeria-album-content .gallery-item img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0.75rem;
}

.eureka-galeria-album-content .wp-block-gallery.is-cropped .wp-block-image > a,
.eureka-galeria-album-content .wp-block-gallery.is-cropped .blocks-gallery-item a {
	aspect-ratio: 4 / 3;
}

.eureka-galeria-album-content .wp-block-gallery.is-cropped .wp-block-image img,
.eureka-galeria-album-content .wp-block-gallery.is-cropped .blocks-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.eureka-galeria-album-content .wp-block-gallery .wp-block-image a[href] {
	cursor: zoom-in;
}

@media (min-width: 992px) {
	.eureka-galeria-album-content .wp-block-gallery.has-nested-images,
	.eureka-galeria-album-content .wp-block-gallery:not(.has-nested-images),
	.eureka-galeria-album-content .gallery {
		--eureka-gallery-gap: 1.25rem;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	.eureka-galeria-filter {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		gap: 0.5rem;
		padding-bottom: 0.25rem;
		margin-bottom: 1rem;
	}

	.eureka-galeria-filter .btn {
		flex-shrink: 0;
	}

	.eureka-gallery-album-card__date,
	.eureka-gallery-album-card__count {
		font-size: 0.62rem;
		padding: 0.35rem 0.55rem;
	}

	.eureka-gallery-album-card__thumb {
		width: 2.5rem;
		height: 2.5rem;
	}
}

/* Lightbox albumu — native <dialog> */
.eureka-gallery-lightbox {
	position: fixed;
	inset: 0;
	width: min(96vw, 1200px);
	max-width: 96vw;
	max-height: 96vh;
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	overflow: visible;
}

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

.eureka-gallery-lightbox::backdrop {
	background: rgb(15 23 42 / 0.88);
}

.eureka-gallery-lightbox__inner {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	width: min(96vw, 1200px);
	padding: 3rem 0.5rem 0.5rem;
}

.eureka-gallery-lightbox__figure {
	margin: 0;
	min-width: 0;
	width: 100%;
}

.eureka-gallery-lightbox__img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: min(84vh, 900px);
	margin: 0 auto;
	border-radius: 0.75rem;
	object-fit: contain;
	background: rgb(15 23 42 / 0.35);
}

.eureka-gallery-lightbox__caption {
	margin-top: 0.75rem;
	text-align: center;
	font-size: 0.9rem;
	line-height: 1.45;
	color: rgb(255 255 255 / 0.92);
}

.eureka-gallery-lightbox__counter {
	position: absolute;
	top: 0.25rem;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	color: rgb(255 255 255 / 0.85);
}

.eureka-gallery-lightbox__close,
.eureka-gallery-lightbox__prev,
.eureka-gallery-lightbox__next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgb(255 255 255 / 0.14);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.eureka-gallery-lightbox__close:hover,
.eureka-gallery-lightbox__prev:hover,
.eureka-gallery-lightbox__next:hover,
.eureka-gallery-lightbox__close:focus-visible,
.eureka-gallery-lightbox__prev:focus-visible,
.eureka-gallery-lightbox__next:focus-visible {
	background: rgb(255 255 255 / 0.24);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.eureka-gallery-lightbox__close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	font-size: 1.75rem;
}

@media (max-width: 767.98px) {
	.eureka-gallery-lightbox__inner {
		grid-template-columns: 1fr;
		justify-items: center;
		padding-top: 2.75rem;
	}

	.eureka-gallery-lightbox__prev,
	.eureka-gallery-lightbox__next {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
	}

	.eureka-gallery-lightbox__prev {
		left: 0.25rem;
	}

	.eureka-gallery-lightbox__next {
		right: 0.25rem;
	}

	.eureka-gallery-lightbox__img {
		max-width: 92vw;
		max-height: 78vh;
	}
}
