/* Panel boczny z case study (agencja/parts/panel-case.php) — wysuwa się z prawej, na telefonie na cały ekran. */

.g2p {
	position: fixed;
	inset: 0;
	z-index: 999990;
}

.g2p[hidden] {
	display: none;
}

.g2p__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	cursor: pointer;
	transition: opacity 0.45s ease;
}

.g2p__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(980px, 64vw);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: #fff;
	box-shadow: -24px 0 60px rgba(0, 0, 0, 0.18);
	outline: none;
	transform: translateX(100%);
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.g2p.is-open .g2p__overlay {
	opacity: 1;
}

.g2p.is-open .g2p__panel {
	transform: none;
}

html.g2p-lock,
html.g2p-lock body {
	overflow: hidden;
}

/* Pasek z nazwą i X — zostaje u góry przy przewijaniu panelu. */
.g2p__bar {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 64px;
	padding: 0 12px 0 40px;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid #ececec;
}

.g2p__bar-title {
	overflow: hidden;
	color: #000;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.g2p__close {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	background: none;
	color: #000;
	cursor: pointer;
}

.g2p__close svg {
	width: 24px;
	height: 24px;
	transition: transform 0.3s ease;
}

.g2p__close:hover svg {
	transform: rotate(90deg);
}

.g2p__close:focus {
	outline: none;
}

.g2p__close:focus-visible {
	outline: 2px solid #000;
	outline-offset: -4px;
}

.g2p__body {
	padding: 44px 40px 64px;
}

/* Treść case study */
.g2p-case__eyebrow {
	margin: 0 0 14px;
	color: #8a8a8a;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.g2p-case__head h2 {
	margin: 0 0 18px;
	color: #000;
	font-size: 48px;
	font-weight: 700;
	line-height: 1.08;
}

.g2p-case__head p {
	margin: 0 0 18px;
	color: #111;
	font-size: 19px;
	line-height: 1.6;
}

.g2p-case__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 0 0 40px;
	padding: 0;
	color: #8a8a8a;
	font-size: 15px;
	list-style: none;
}

.g2p-case__live {
	margin: -24px 0 40px;
}

.g2p-case__live a,
.g2p-case__live a:visited {
	color: #000;
	font-size: 16px;
	text-decoration: underline;
}

.g2p-case__live a:hover {
	color: #000;
	text-decoration: none;
}

.g2p-case__board {
	margin: 0 0 56px;
}

/* Delikatny cień pod planszą — jak na stronach Showcase (.showcase-item__image w page-showcase.php); na ramce całej
   planszy, bo długie plansze to kilka obrazów jeden pod drugim. */
.g2p-case__image {
	box-shadow: 0 17px 42.18px 14.82px rgba(152, 152, 152, 0.09);
}

.g2p-case__caption {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
	margin-bottom: 14px;
}

.g2p-case__name {
	color: #000;
	font-size: 22px;
	font-weight: 600;
}

.g2p-case__loc {
	color: #8a8a8a;
	font-size: 15px;
}

.g2p-case__board img {
	display: block;
	width: 100%;
	height: auto;
	background: #f2f2f2;
}

.g2p-case__more {
	margin: 44px 0 0;
}

.g2p-case__btn,
.g2p-case__btn:visited {
	display: inline-flex;
	align-items: center;
	height: 54px;
	padding: 0 30px;
	border: 1px solid #000;
	color: #000;
	font-size: 16px;
	text-decoration: none;
	transition: background 0.3s ease, color 0.3s ease;
}

.g2p-case__btn:hover,
.g2p-case__btn:focus {
	background: #000;
	color: #fff;
	text-decoration: none;
}

@media (max-width: 991px) {
	.g2p__panel {
		width: min(760px, 88vw);
	}
}

@media (max-width: 767px) {
	.g2p__panel {
		width: 100%;
		box-shadow: none;
	}

	.g2p__bar {
		height: 56px;
		padding: 0 4px 0 20px;
	}

	.g2p__body {
		padding: 28px 20px 48px;
	}

	.g2p-case__head h2 {
		font-size: 34px;
	}

	.g2p-case__head p {
		font-size: 17px;
	}

	.g2p-case__tags {
		margin-bottom: 28px;
	}

	.g2p-case__btn,
	.g2p-case__btn:visited {
		justify-content: center;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.g2p__overlay,
	.g2p__panel {
		transition: none;
	}
}
