/* JB Reference – grid referencí + detail */
@font-face {
	font-family: 'JB Lobster';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(lobster-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'JB Lobster';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(lobster-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--jb-accent: #987852;
	--jb-accent-dark: #7a5f40;
	--jb-text: #262626;
	--jb-muted: #6b6b6b;
	--jb-line: #e6e1da;
}

/* ---------- Nadpis ve stylu webu (Realizace, O nás …) ---------- */
.jb-ref-head { text-align: center; margin: 10px 0 50px; }
.jb-ref-heading,
#main .jb-ref-heading {
	font-family: 'JB Lobster', 'Lobster', cursive;
	font-weight: 400;
	font-size: 44px;
	line-height: 1.15;
	color: #111;
	margin: 0 0 18px;
	letter-spacing: 0;
	text-transform: none;
}
.jb-ref-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	max-width: 663px;
	margin: 0 auto;
}
.jb-ref-divider::before,
.jb-ref-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--jb-accent);
}
.jb-ref-divider i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--jb-accent);
}

/* ---------- Grid referencí ---------- */
.jb-ref-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	margin: 0 0 40px;
}
.jb-ref-card { margin: 0; }
.jb-ref-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--jb-line);
	text-decoration: none !important;
	color: var(--jb-text);
	transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
}
.jb-ref-card__link:hover {
	border-color: transparent;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
	transform: translateY(-3px);
}
.jb-ref-card__img {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f2efeb;
}
.jb-ref-card__img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .6s ease;
}
.jb-ref-card__link:hover .jb-ref-card__img img { transform: scale(1.06); }
.jb-ref-card__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	flex: 1;
}
#main .jb-ref-card__title,
.jb-ref-card__title {
	margin: 0;
	font-family: 'Open Sans', Arial, Helvetica, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--jb-text);
	transition: color .3s ease;
}
.jb-ref-card__link:hover .jb-ref-card__title { color: var(--jb-accent); }
.jb-ref-card__arrow {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--jb-accent);
	color: var(--jb-accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .3s ease, color .3s ease;
}
.jb-ref-card__arrow svg { transition: transform .3s ease; }
.jb-ref-card__link:hover .jb-ref-card__arrow { background: var(--jb-accent); color: #fff; }
.jb-ref-card__link:hover .jb-ref-card__arrow svg { transform: translateX(2px); }
.jb-ref-empty { text-align: center; color: var(--jb-muted); }

/* ---------- Detail reference ---------- */
.jb-ref-detail { padding: 30px 0 60px; }
.jb-ref-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--jb-accent) !important;
	text-decoration: none !important;
	margin-bottom: 20px;
}
.jb-ref-back:hover { color: var(--jb-accent-dark) !important; }
.jb-ref-back svg { transition: transform .3s ease; }
.jb-ref-back:hover svg { transform: translateX(-3px); }

.jb-ref-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 50px;
}
.jb-ref-gallery__item {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f2efeb;
	cursor: zoom-in;
}
.jb-ref-gallery__item img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .5s ease, opacity .3s ease;
}
.jb-ref-gallery__item:hover img { transform: scale(1.05); opacity: .9; }

.jb-ref-popis { max-width: 900px; margin: 0 auto; }
#main .jb-ref-popis__title,
.jb-ref-popis__title {
	font-family: 'Open Sans', Arial, Helvetica, sans-serif;
	font-size: 22px;
	font-weight: 600;
	color: var(--jb-text);
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--jb-line);
}
.jb-ref-popis__text { font-size: 16px; line-height: 1.75; color: var(--jb-text); }
.jb-ref-popis__text p:last-child { margin-bottom: 0; }

/* ---------- Lightbox ---------- */
.jb-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(15, 12, 9, .94);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}
.jb-lb.is-open { opacity: 1; visibility: visible; }
.jb-lb__img {
	max-width: calc(100vw - 140px);
	max-height: calc(100vh - 100px);
	object-fit: contain;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	user-select: none;
}
.jb-lb button {
	position: absolute;
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	padding: 10px;
	line-height: 0;
	opacity: .8;
	transition: opacity .2s ease;
}
.jb-lb button:hover { opacity: 1; }
.jb-lb__close { top: 16px; right: 16px; }
.jb-lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.jb-lb__next { right: 16px; top: 50%; transform: translateY(-50%); }
.jb-lb__count {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .75);
	font-size: 14px;
}
body.jb-lb-lock { overflow: hidden; }

/* ---------- Responsivita ---------- */
@media (max-width: 1024px) {
	.jb-ref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.jb-ref-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.jb-ref-grid { grid-template-columns: 1fr; gap: 20px; }
	.jb-ref-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
	.jb-ref-heading, #main .jb-ref-heading { font-size: 34px; }
	.jb-ref-head { margin-bottom: 30px; }
	.jb-lb__img { max-width: 100vw; max-height: calc(100vh - 120px); }
	.jb-lb__prev, .jb-lb__next { top: auto; bottom: 6px; transform: none; }
}
