/* Penzión Jarka – obsah: daily menu, galleries, old column shortcodes, photo viewer. */

.pjo-menu {
	--pjo-ink: var(--wp--preset--color--contrast, #1f1e1c);
	--pjo-muted: var(--wp--preset--color--accent-4, #57534e);
	--pjo-line: var(--wp--preset--color--accent-5, #e3dfd8);
	--pjo-accent: var(--wp--preset--color--accent-1, #7b2230);
	color: var(--pjo-ink);
}

.pjo-menu__head {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	justify-content: space-between;
	align-items: baseline;
	padding-bottom: 1rem;
	border-bottom: 2px solid var(--pjo-ink);
}

.pjo-menu__title {
	margin: 0;
}

.pjo-menu__date {
	margin: 0;
	font-weight: 700;
	color: var(--pjo-accent);
}

.pjo-menu__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pjo-menu__item {
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr) auto;
	gap: 0.25rem 1.25rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--pjo-line);
}

.pjo-menu__item:last-child {
	border-bottom: 0;
}

.pjo-menu__label {
	font-weight: 700;
	color: var(--pjo-muted);
}

.pjo-menu__allergens {
	color: var(--pjo-muted);
	font-size: 0.875em;
	white-space: nowrap;
}

.pjo-menu__price {
	font-weight: 700;
	color: var(--pjo-accent);
	white-space: nowrap;
	text-align: right;
}

.pjo-menu__notes {
	margin-top: 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--pjo-line);
	color: var(--pjo-muted);
	font-size: 0.9375rem;
}

.pjo-menu__notes p {
	margin: 0 0 0.5rem;
}

.pjo-menu__week {
	margin-top: 1.25rem;
	border-top: 1px solid var(--pjo-line);
	padding-top: 1rem;
}

.pjo-menu__week summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--pjo-accent);
	padding: 0.5rem 0;
	min-height: 44px;
	box-sizing: border-box;
}

.pjo-menu__day {
	margin-top: 1rem;
}

.pjo-menu__day-title {
	margin: 1rem 0 0;
	font-size: 1.125rem;
}

.pjo-menu__day.is-today .pjo-menu__day-title::after {
	content: " · dnes";
	color: var(--pjo-accent);
}

.pjo-menu__raw {
	padding-top: 1rem;
	white-space: pre-line;
}

@media (max-width: 600px) {
	.pjo-menu__item {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.pjo-menu__label {
		grid-column: 1 / -1;
	}
}

/* Galleries */

.pjo-galleries {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 1rem;
}

.pjo-gallery-card {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--accent-6, #dad4ca);
	color: #fff;
	text-decoration: none;
}

.pjo-gallery-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.pjo-gallery-card:hover .pjo-gallery-card__img,
.pjo-gallery-card:focus-visible .pjo-gallery-card__img {
	transform: scale(1.04);
}

.pjo-gallery-card__text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.25rem 1rem;
	padding: 2.5rem 1rem 0.875rem;
	background: linear-gradient(to top, rgba(20, 18, 16, 0.85), rgba(20, 18, 16, 0));
}

.pjo-gallery-card__title {
	font-weight: 700;
	font-size: 1.0625rem;
}

.pjo-gallery-card__count {
	font-size: 0.875rem;
	opacity: 0.9;
}

.pjo-photos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: 0.75rem;
}

.pjo-photos__item {
	display: block;
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 3 / 2;
	background: var(--wp--preset--color--accent-6, #dad4ca);
}

.pjo-photos__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Old theme column shortcodes ([one_third] ...) */

.pjo-col {
	float: left;
	box-sizing: border-box;
	margin-right: 4%;
}

.pjo-col--1-2 { width: 48%; }
.pjo-col--1-3 { width: 30.66%; }
.pjo-col--2-3 { width: 65.33%; }
.pjo-col--1-4 { width: 22%; }
.pjo-col--3-4 { width: 74%; }
.pjo-col--last { margin-right: 0; }

.pjo-col-clear {
	clear: both;
}

@media (max-width: 700px) {
	.pjo-col {
		float: none;
		width: auto;
		margin-right: 0;
	}
}

/* Photo viewer */

.pjo-lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(15, 14, 12, 0.94);
	color: #fff;
}

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

.pjo-lightbox__figure {
	margin: 0;
	max-width: calc(100vw - 8rem);
	text-align: center;
}

.pjo-lightbox__figure img {
	max-width: 100%;
	max-height: calc(100vh - 6rem);
	object-fit: contain;
}

.pjo-lightbox__figure figcaption {
	margin-top: 0.5rem;
	font-size: 0.9375rem;
	opacity: 0.85;
}

.pjo-lightbox button {
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.pjo-lightbox button:hover,
.pjo-lightbox button:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

.pjo-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
}

.pjo-lightbox__prev,
.pjo-lightbox__next {
	flex: none;
	margin: 0 0.75rem;
}

@media (max-width: 600px) {
	.pjo-lightbox__figure {
		max-width: 100vw;
	}

	.pjo-lightbox__prev,
	.pjo-lightbox__next {
		position: absolute;
		bottom: 1rem;
	}

	.pjo-lightbox__prev {
		left: 1rem;
	}

	.pjo-lightbox__next {
		right: 1rem;
	}
}
