/* =========================================================
   BASE
========================================================= */

html {
	background: #0750b5;
}

body.gallery-bg {
	margin: 0;

	min-height: 100vh;

	color: #fff;

	background:
		linear-gradient(180deg, rgba(7, 71, 149, 0.82), rgba(0, 108, 250, 0.82)),
		url("/img/bg_sponsor.webp") center top / cover no-repeat;

	background-color: #0750b5;
}

/* =========================================================
   HERO
========================================================= */

.gallery-hero {
	display: flex;
	flex-direction: column;

	align-items: center;
	justify-content: center;

	width: min(100%, 1200px);

	margin: 0 auto;

	padding: clamp(34px, 6vw, 80px) 24px 30px;

	text-align: center;
}

/* =========================================================
   NAV
========================================================= */

.gallery-nav-buttons {
	display: flex;

	align-items: center;
	justify-content: center;

	flex-wrap: wrap;

	gap: 10px;

	margin-bottom: 28px;
}

.gallery-nav-buttons .btn {
	min-height: 42px;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0 17px;

	border-radius: 8px;

	font-size: 12px;
	font-weight: 800;
}

/* =========================================================
   TITLE
========================================================= */

.gallery-title {
	max-width: 1050px;

	margin: 0;

	padding: 0;

	color: #fff;

	font-size: clamp(36px, 6vw, 72px);

	font-weight: 900;

	line-height: 0.98;

	letter-spacing: -0.035em;

	text-wrap: balance;
}

/* =========================================================
   DESCRIPTION
========================================================= */

.gallery-description {
	max-width: 850px;

	margin-top: 22px;

	color: rgba(255, 255, 255, 0.84);

	font-size: 17px;

	line-height: 1.65;

	text-wrap: pretty;
}

/* =========================================================
   META
========================================================= */

.gallery-meta {
	display: flex;

	align-items: center;
	justify-content: center;

	flex-wrap: wrap;

	gap: 9px;

	margin-top: 17px;

	color: rgb(255 255 255 / 91%);

	font-size: 16px;

	font-weight: 700;

	letter-spacing: 0.02em;
}

.gallery-meta__dot {
	display: block;

	width: 4px;
	height: 4px;

	border-radius: 50%;

	background: #fff101;
}

/* =========================================================
   CONTENT
========================================================= */

.gallery-content {
	padding: 15px 0 80px;
}

.gallery-content .container {
	width: min(calc(100% - 40px), 1500px);

	max-width: none;

	margin: 0 auto;

	padding: 0;
}

/* =========================================================
   GRID
========================================================= */

.gallery {
	display: grid;

	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));

	gap: 14px;

	padding: 0;
}

/* =========================================================
   ITEM
========================================================= */

.rks-gallery-item {
	position: relative;

	display: block;

	aspect-ratio: 1 / 1;

	overflow: hidden;

	border-radius: 10px;

	background: rgba(0, 24, 65, 0.28);

	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);

	isolation: isolate;

	cursor: zoom-in;
}

/* =========================================================
   IMAGE
========================================================= */

.rks-gallery-item img {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;

	border-radius: inherit;

	transition:
		transform 0.28s ease,
		filter 0.28s ease;
}

/* =========================================================
   HOVER
========================================================= */

@media (hover: hover) {
	.rks-gallery-item::after {
		content: "";

		position: absolute;

		inset: 0;

		z-index: 1;

		background: linear-gradient(180deg, transparent 55%, rgba(1, 29, 71, 0.28));

		opacity: 0;

		transition: opacity 0.25s ease;

		pointer-events: none;
	}

	.rks-gallery-item:hover img {
		transform: scale(1.025);

		filter: brightness(0.92);
	}

	.rks-gallery-item:hover::after {
		opacity: 1;
	}
}

/* =========================================================
   FOCUS
========================================================= */

.rks-gallery-item:focus-visible {
	outline: 3px solid #fff101;

	outline-offset: 3px;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
	.gallery-hero {
		padding: 42px 20px 24px;
	}

	.gallery-description {
		font-size: 16px;
	}

	.gallery-content .container {
		width: calc(100% - 28px);
	}

	.gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));

		gap: 9px;
	}

	.rks-gallery-item {
		border-radius: 8px;

		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.13);
	}
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {
	body.gallery-bg {
		/*
		|--------------------------------------------------------------------------
		| Bez fixed pseudo-backgroundu.
		| Stabilniejsze przewijanie na telefonach.
		|--------------------------------------------------------------------------
		*/

		background:
			linear-gradient(180deg, rgba(7, 71, 149, 0.86), rgba(0, 108, 250, 0.86)),
			url("/img/bg_sponsor.webp") center top / auto 900px no-repeat;

		background-color: #0750b5;
	}

	.gallery-hero {
		padding: 30px 16px 22px;
	}

	.gallery-nav-buttons {
		width: 100%;

		margin-bottom: 23px;

		gap: 8px;
	}

	.gallery-nav-buttons .btn {
		flex: 1;

		min-width: 0;

		padding: 0 10px;

		font-size: 10px;
	}

	.gallery-title {
		font-size: clamp(32px, 10vw, 46px);

		line-height: 1;
	}

	.gallery-description {
		margin-top: 16px;

		font-size: 14px;

		line-height: 1.55;
	}

	.gallery-meta {
		margin-top: 14px;

		font-size: 10px;
	}

	.gallery-content {
		padding: 8px 0 50px;
	}

	.gallery-content .container {
		width: calc(100% - 16px);
	}

	/*
	|--------------------------------------------------------------------------
	| NA TELEFONIE 2 ZDJĘCIA W RZĘDZIE
	|--------------------------------------------------------------------------
	*/

	.gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));

		gap: 6px;
	}

	.rks-gallery-item {
		border-radius: 6px;

		box-shadow: none;
	}

	.rks-gallery-item img {
		transition: none;
	}
}

/* =========================================================
   BARDZO MAŁE TELEFONY
========================================================= */

@media (max-width: 360px) {
	.gallery-content .container {
		width: calc(100% - 12px);
	}

	.gallery {
		gap: 5px;
	}
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
	.rks-gallery-item img {
		transition: none;
	}
}
