/* Körfolyosó Galéria – WebGL folyosó + előugró ablak */
.kf-root {
	--kf-wall: #e9e1d3;
	--kf-accent: #a8842c;
	position: fixed;
	left: 0; right: 0; bottom: 0;
	top: var(--wp-admin--admin-bar--height, 0px);
	overflow: hidden;
	background: #0d0c0b;
	color: #f2ede4;
	font-family: Georgia, "Times New Roman", serif;
	-webkit-user-select: none;
	user-select: none;
}
.kf-viewport { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.kf-viewport.is-hover { cursor: pointer; }
.kf-viewport.is-drag { cursor: grabbing; }
.kf-canvas { display: block; position: absolute; left: 0; top: 0; }
.kf-world { display: none; }
.kf-vignette {
	position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0,0,0,.5) 100%);
}

/* Fejléc */
.kf-header {
	position: absolute; left: 0; right: 0; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: 20px;
	padding: 18px 26px;
	background: linear-gradient(rgba(10,9,8,.6), rgba(10,9,8,0));
	pointer-events: none;
}
.kf-header > * { pointer-events: auto; }
.kf-brand { color: #f7f1e6; text-decoration: none; font-size: 22px; letter-spacing: .04em; display: flex; align-items: center; gap: 12px; }
.kf-brand img { max-height: 44px; width: auto; }
.kf-brand small { display: block; font: 12px/1.3 system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.kf-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; font: 14px/1 system-ui, sans-serif; letter-spacing: .06em; }
.kf-menu a { color: #efe8db; text-decoration: none; opacity: .85; }
.kf-menu a:hover { opacity: 1; text-decoration: underline; }
.kf-menu ul { display: none; }

/* Súgó és vezérlők */
.kf-hint {
	position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 15;
	margin: 0; padding: 9px 18px; border-radius: 30px;
	background: rgba(15,13,11,.6); color: #f1ebe0;
	font: 14px/1.3 system-ui, sans-serif; letter-spacing: .03em; white-space: nowrap;
	transition: opacity .8s ease; pointer-events: none;
}
.kf-hint.is-hidden { opacity: 0; }
.kf-controls { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 15; display: flex; gap: 10px; }
.kf-btn {
	appearance: none; border: 0; cursor: pointer;
	width: 48px; height: 48px; border-radius: 50%;
	background: rgba(250,247,240,.92); color: #231f1b;
	font: 20px/1 system-ui, sans-serif;
	display: inline-flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 16px rgba(0,0,0,.35);
	transition: background .2s, transform .2s;
}
.kf-btn:hover { background: #fff; transform: translateY(-2px); }
.kf-btn:focus-visible { outline: 3px solid var(--kf-accent); outline-offset: 2px; }
.kf-ctrl-play::before { content: "❚❚"; font-size: 14px; letter-spacing: -1px; }
.kf-ctrl-play.is-paused::before { content: "▶"; font-size: 16px; margin-left: 3px; }

/* Előugró ablak: középen a festmény, alatta a szöveg */
.kf-backdrop {
	position: absolute; inset: 0; z-index: 30;
	background: rgba(8,7,6,.78);
	-webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
	opacity: 0; visibility: hidden;
	transition: opacity .35s ease, visibility 0s linear .35s;
}
.kf-info {
	position: absolute; z-index: 31; left: 50%; top: 50%;
	width: min(980px, calc(100% - 32px));
	max-height: calc(100% - 40px);
	overflow: auto;
	overscroll-behavior: contain;
	overflow-anchor: none;
	border-radius: 14px;
	background: #f7f3eb; color: #231f1b;
	box-shadow: 0 30px 80px rgba(0,0,0,.6);
	opacity: 0; visibility: hidden;
	transform: translate(-50%, -48%) scale(.98);
	transition: opacity .35s ease, transform .4s cubic-bezier(.2,.7,.2,1), visibility 0s linear .4s;
	-webkit-user-select: text; user-select: text;
}
.kf-root.is-open .kf-backdrop { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.kf-root.is-open .kf-info { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition: opacity .35s ease, transform .4s cubic-bezier(.2,.7,.2,1); }
.kf-root.is-open .kf-hint, .kf-root.is-open .kf-controls { opacity: 0; pointer-events: none; }

.kf-info-art {
	margin: 0; padding: 34px 34px 10px;
	display: flex; justify-content: center;
	background: radial-gradient(ellipse at 50% 30%, #fffaf0, #efe8da 75%);
	border-radius: 14px 14px 0 0;
}
.kf-info-art img {
	display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto;
	border: 14px solid #f4f0e7;
	outline: 14px solid #b8913f;
	box-shadow: 0 0 0 16px #7a5a1c, 0 22px 40px rgba(0,0,0,.45);
	margin: 16px 16px 26px;
}
.kf-root.kf-frame-black .kf-info-art img { outline-color: #2b2b2b; box-shadow: 0 0 0 16px #111, 0 22px 40px rgba(0,0,0,.45); }
.kf-root.kf-frame-wood .kf-info-art img { outline-color: #6f4827; box-shadow: 0 0 0 16px #4c2f17, 0 22px 40px rgba(0,0,0,.45); }
.kf-root.kf-frame-white .kf-info-art img { outline-color: #f6f6f6; box-shadow: 0 0 0 16px #d8d8d8, 0 22px 40px rgba(0,0,0,.45); }
.kf-root.kf-frame-silver .kf-info-art img { outline-color: #d9dbde; box-shadow: 0 0 0 16px #8a8d93, 0 22px 40px rgba(0,0,0,.45); }

.kf-info-text { padding: 20px 34px 26px; }
.kf-info-head { display: flex; align-items: flex-start; gap: 14px; }
.kf-info-head > div { flex: 1; min-width: 0; }
.kf-info-meta { margin: 0 0 4px; font: 12px/1.4 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a7f72; }
.kf-info-title { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 700; }
.kf-close {
	position: sticky; top: 12px; float: right; z-index: 2;
	margin: 12px 12px -52px 0;
	width: 40px; height: 40px; font-size: 22px;
}
.kf-info-body { margin-top: 14px; font-size: 17px; line-height: 1.65; max-width: 68ch; }
.kf-info-body[hidden] { display: none; }
.kf-info-body img { max-width: 100%; height: auto; }
.kf-info-body figure { margin: 1em 0; }
.kf-info-body figcaption { font-size: 15px; color: #5b524a; }
.kf-info-body a { color: #7a5c14; }
.kf-info-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.1); font: 14px/1 system-ui, sans-serif; }
.kf-info-foot .kf-btn { width: auto; height: 38px; padding: 0 16px; border-radius: 20px; font-size: 14px; background: #ece6da; box-shadow: none; }
.kf-info-link { color: #7a5c14; }

/* Ha nincs WebGL: egyszerű képrács */
.kf-grid { position: absolute; inset: 0; overflow: auto; padding: 90px 24px 40px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-content: start; touch-action: auto; }
.kf-grid-item { appearance: none; border: 0; background: #f4f0e7; padding: 14px; cursor: pointer; text-align: left; color: #231f1b; font: 15px/1.3 Georgia, serif; box-shadow: 0 0 0 10px #b8913f, 0 12px 26px rgba(0,0,0,.5); margin: 10px; }
.kf-grid-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 10px; }
.kf-root.is-fallback .kf-controls, .kf-root.is-fallback .kf-hint { display: none; }

.kf-empty-msg {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 15;
	width: min(520px, 88%); margin: 0; padding: 26px 30px; text-align: center;
	background: #faf7f0; color: #2a2622; font-size: 20px; line-height: 1.4; border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.kf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 700px) {
	.kf-header { padding: 12px 14px; }
	.kf-brand { font-size: 18px; }
	.kf-menu { display: none; }
	.kf-hint { white-space: normal; text-align: center; width: max-content; max-width: 86%; }
	.kf-info { width: 100%; max-height: 100%; height: 100%; border-radius: 0; top: 0; transform: translate(-50%, 4%); }
	.kf-root.is-open .kf-info { transform: translate(-50%, 0); }
	.kf-info-art { padding: 50px 14px 4px; border-radius: 0; }
	.kf-info-art img { max-height: 55vh; border-width: 8px; outline-width: 8px; box-shadow: 0 0 0 10px #7a5a1c, 0 14px 26px rgba(0,0,0,.4); margin: 12px 12px 20px; }
	.kf-info-text { padding: 16px 18px 24px; }
	.kf-info-title { font-size: 24px; }
	.kf-info-body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.kf-info, .kf-backdrop { transition-duration: .01s !important; }
}
