/* Oprawa obrazów – Piotr Iwiński
   Na komputerze układ odwzorowuje dotychczasową stronę (980 px, dwie kolumny),
   na wąskich ekranach treść układa się w jednej kolumnie. */

:root {
	--text: #000;
	--muted-border: #808080;
	--thumb-border: #ddd;
	--thumb-bg: #f0f0f0;
	--notice: #b00000;
	--notice-bg: #fdf1f1;
	--notice-border: #e9b9b9;
	--ink: #1d1d1d;
	--ink-muted: #595959;
	--line: #e3e3e3;
	--icon-bg: #f1f1f1;
	--focus: #1a5fb4;
	color-scheme: light;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
	font: 14px Arial, Helvetica, sans-serif;
	color: var(--text);
	background: #fff;
}

img {
	max-width: 100%;
}

/* ---------- Dostępność ---------- */

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 16px;
	background: #000;
	color: #fff;
	font-weight: bold;
	text-decoration: underline;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

a:focus-visible,
button:focus-visible,
[tabindex="-1"]:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

main:focus,
#kontakt:focus {
	outline: none;
}

/* ---------- Układ ---------- */

#container {
	display: grid;
	grid-template-columns: minmax(0, 590fr) minmax(0, 390fr);
	grid-template-areas:
		"header header"
		"notice notice"
		"main   aside";
	align-items: start;
	width: min(980px, calc(100% - 32px));
	margin: 0 auto 10px;
	padding: 0 0 10px;
	border-bottom: 2px solid var(--muted-border);
}

.site-header {
	grid-area: header;
	padding-bottom: 7px;
	text-align: center;
}

.logo {
	display: block;
	width: 980px;
	height: auto;
	margin: 0 auto;
}

main {
	grid-area: main;
	min-width: 0;
}

#column {
	grid-area: aside;
	margin: 0 0 0 10px;
	padding: 0 0 0 10px;
	border-left: 2px solid var(--muted-border);
}

.quick-actions {
	display: none;
}

/* ---------- Typografia ---------- */

p {
	margin: 0 0 10px;
}

h1 {
	margin: 0;
	padding: 0 0 10px;
	font-size: 24px;
}

h2 {
	margin: 0;
	padding: 10px 0;
	font-size: 18px;
}

h3,
.lead {
	margin: 0;
	padding: 5px 0;
	font-style: italic;
	font-weight: bold;
	font-size: 16px;
}

#column h2 {
	padding: 0 0 10px;
	font-size: 24px;
}

.list {
	margin: 10px 0 10px 20px;
	padding: 0;
	list-style: disc outside;
}

address {
	font-style: normal;
}

/* Komunikat o przerwie – pod logo, na całą szerokość. */
.notice {
	grid-area: notice;
	margin: 0 0 14px;
	padding: 9px 14px;
	border: 1px solid var(--notice-border);
	border-left: 4px solid var(--notice);
	border-radius: 4px;
	background: var(--notice-bg);
	color: var(--notice);
	font-size: 15px;
	line-height: 1.4;
}

.notice p {
	margin: 0;
}

.clear {
	clear: right;
}

/* ---------- Kontakt ---------- */

.contact-links {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.contact-item {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 26px;
	padding: 1px 0;
	color: var(--ink);
	text-decoration: none;
}

.contact-icon {
	flex: none;
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.contact-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.contact-value {
	font-weight: bold;
	overflow-wrap: anywhere;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 3px;
	transition: text-decoration-color 0.15s;
}

.contact-item:hover .contact-value,
.contact-item:focus-visible .contact-value {
	text-decoration-color: currentColor;
}

/* ---------- Miniatury zdjęć ---------- */

.gallery {
	float: right;
	margin: 0;
	padding: 10px 2px 10px 10px;
	list-style: none;
}

.gallery-tight {
	padding-top: 0;
	padding-bottom: 0;
}

.gallery li,
.gallery img {
	box-sizing: content-box;
}

.gallery li {
	position: relative;
	float: left;
	width: 90px;
	height: 135px;
	margin: 0;
	padding: 0 8px 0 0;
}

.gallery a {
	display: block;
	width: 90px;
	height: 135px;
}

.gallery img {
	position: absolute;
	top: 0;
	left: 0;
	width: 90px;
	height: 135px;
	max-width: none;
	padding: 0;
	border: 1px solid var(--thumb-border);
	background: var(--thumb-bg);
	object-fit: cover;
}

/* Powiększenie po najechaniu myszą lub przejściu klawiszem Tab – jak na dotychczasowej stronie. */
@media (hover: hover) and (min-width: 761px) {
	.gallery img {
		transition-property: top, left, width, height, margin, padding;
		transition-duration: 0.4s;
	}

	.gallery li:hover,
	.gallery li:focus-within {
		z-index: 10;
	}

	.gallery a:hover img,
	.gallery a:focus-visible img {
		top: 50%;
		left: 50%;
		width: 283px;
		height: 424px;
		margin: -212px 0 0 -142px;
		padding: 5px;
		transition-duration: 0.2s;
	}

	.gallery a:focus-visible {
		outline: none;
	}

	.gallery a:focus-visible img {
		outline: 3px solid var(--focus);
	}
}

/* ---------- Panorama 360° ---------- */

.vr {
	margin: 0 0 3px;
}

#vrview {
	clear: right;
	min-height: 200px;
	background: var(--thumb-bg);
}

#vrview iframe {
	display: block;
	width: 100%;
}

/* ---------- Powiększone zdjęcie ---------- */

.lightbox {
	max-width: 92vw;
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: #fff;
	overflow: visible;
}

.lightbox::backdrop {
	background: rgba(0, 0, 0, 0.8);
}

.lightbox img {
	display: block;
	width: auto;
	height: auto;
	max-width: 92vw;
	max-height: 92vh;
	border: 5px solid #fff;
}

.lightbox form {
	position: absolute;
	top: -8px;
	right: -8px;
}

.lightbox-close {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #000;
	color: #fff;
	font: bold 28px/1 Arial, Helvetica, sans-serif;
	cursor: pointer;
}

/* ---------- Telefon: jedna kolumna ---------- */

@media (max-width: 760px) {
	body {
		font-size: 16px;
		line-height: 1.5;
	}

	#container {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"header"
			"notice"
			"actions"
			"main"
			"aside";
		width: auto;
		margin: 0 16px 16px;
		padding-bottom: 16px;
	}

	.site-header {
		height: auto;
		padding: 12px 0 16px;
	}

	.logo {
		width: 100%;
	}

	.quick-actions {
		grid-area: actions;
		display: flex;
		gap: 12px;
		margin: 0 0 20px;
	}

	.button {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 48px;
		padding: 8px 12px;
		border: 2px solid #333;
		border-radius: 6px;
		background: #333;
		color: #fff;
		font-weight: bold;
		text-align: center;
		text-decoration: none;
	}

	.button-secondary {
		background: #fff;
		color: #333;
	}

	h1 {
		font-size: 24px;
		line-height: 1.25;
	}

	h2,
	#column h2 {
		padding: 16px 0 8px;
		font-size: 22px;
		line-height: 1.25;
	}

	h3,
	.lead {
		padding: 4px 0 8px;
		font-size: 18px;
		line-height: 1.35;
	}

	p {
		margin-bottom: 16px;
	}

	.list {
		margin: 8px 0 16px 24px;
	}

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

	/* Zdjęcia w siatce dwóch kafelków zamiast miniatur opływanych tekstem. */
	.gallery,
	.gallery-tight {
		float: none;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		padding: 4px 0 16px;
	}

	.gallery li,
	.gallery a {
		float: none;
		width: auto;
		height: auto;
		padding: 0;
	}

	.gallery img {
		position: static;
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 2 / 3;
	}

	.vr {
		margin: 0 0 16px;
	}

	#vrview {
		min-height: 240px;
	}

	#column {
		margin: 24px 0 0;
		padding: 8px 0 0;
		border-left: 0;
		border-top: 2px solid var(--muted-border);
	}

	.notice {
		margin: 0 0 16px;
		padding: 12px 14px;
		font-size: 16px;
	}

	/* Kontakt jako lista „kafelków” z ikoną, opisem i strzałką – wygodna do dotknięcia. */
	.contact-links {
		margin: 4px 0 20px;
		border: 1px solid var(--line);
		border-radius: 10px;
		overflow: hidden;
	}

	.contact-links li + li {
		border-top: 1px solid var(--line);
	}

	.contact-item {
		gap: 14px;
		min-height: 64px;
		padding: 10px 14px;
		-webkit-tap-highlight-color: transparent;
	}

	.contact-item:active {
		background: #f6f6f6;
	}

	.contact-item::after {
		content: "";
		flex: none;
		width: 8px;
		height: 8px;
		margin-left: auto;
		border-top: 2px solid #8a8a8a;
		border-right: 2px solid #8a8a8a;
		transform: rotate(45deg);
	}

	.contact-icon {
		box-sizing: content-box;
		width: 20px;
		height: 20px;
		padding: 10px;
		border-radius: 50%;
		background: var(--icon-bg);
	}

	.contact-text {
		display: flex;
		flex-direction: column;
		min-width: 0;
		line-height: 1.3;
	}

	.contact-label {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
		color: var(--ink-muted);
		font-size: 14px;
	}

	.contact-value {
		font-size: 17px;
		font-weight: bold;
	}

	.contact-item:hover .contact-value {
		text-decoration-color: transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
