/* KSM 1.9.0 – az adminban megadott rács arányait és sorrendjét követő galéria. */
.kg-grid{display:grid;grid-template-columns:repeat(var(--kg-cols,4),minmax(0,1fr));gap:var(--kg-gap,10px);align-items:start}
.kg-item{display:block;min-width:0;overflow:hidden;text-decoration:none!important;color:inherit;background:#f5f8fa;position:relative;border-radius:3px;outline-offset:3px;transition:box-shadow .15s}
.kg-item:hover,.kg-item:focus-visible{box-shadow:0 3px 14px #1b34452f}
.kg-thumb{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;aspect-ratio:var(--kg-ratio,4/3);width:100%;background:#e6edf1}
.kg-thumb>img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s}
.kg-item:hover .kg-thumb>img{transform:scale(1.04)}
.kg-video-placeholder{font-size:40px;color:#536e81}
.kg-play{position:absolute;display:grid;place-items:center;background:#000b;color:#fff;border-radius:100%;height:43px;width:43px;font-size:20px}
.kg-caption{display:block;padding:8px 10px;font-size:14px;font-weight:600;line-height:1.4}
.kg-home-section{margin-top:15px;margin-bottom:45px}
.kg-home-section .kg-grid{--kg-ratio:4/3;--kg-gap:8px}
.kg-gallery-page{padding-top:32px;padding-bottom:65px;min-height:220px}
.kg-gallery-more{text-align:center;margin:25px 0 14px}
.kg-gallery-more .btn{white-space:normal}
.kg-gallery-intro{margin-bottom:45px}
.kg-load-trigger{height:18px;pointer-events:none}
.kg-grid.kg-enhanced .kg-item.kg-pending{display:none}
.kg-lightbox[hidden]{display:none!important}
.kg-lightbox{position:fixed;z-index:100000;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-family:Arial,sans-serif}
.kg-overlay{position:absolute;inset:0;background:rgba(0,0,0,.94)}
.kg-stage{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:calc(100vw - 125px);max-height:calc(100vh - 34px);width:100%;min-height:120px;pointer-events:none}
.kg-display{display:flex;align-items:center;justify-content:center;max-width:100%;width:100%;height:min(77vh,900px);pointer-events:auto}
.kg-display img,.kg-display video{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.kg-display video{width:min(100%,1100px)}
.kg-display iframe{width:min(100%,1100px);height:auto;aspect-ratio:16/9;border:0}
.kg-meta{text-align:center;max-width:880px;margin-top:10px;pointer-events:auto}
.kg-meta-title{font-size:17px}.kg-meta-description{margin:6px 0;color:#d7e0e8;white-space:pre-line;font-size:13px}
.kg-count{display:block;margin-top:5px;color:#c8c8c8;font-size:12px}
.kg-close,.kg-nav{position:absolute;z-index:2;background:rgba(0,0,0,.4);border:0;color:#fff;cursor:pointer;font-size:36px;display:grid;place-items:center}
.kg-close{right:max(12px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));height:46px;width:46px;border-radius:50%;font-size:39px}
.kg-nav{top:50%;transform:translateY(-50%);height:68px;width:52px;font-size:31px}
.kg-prev{left:8px}.kg-next{right:8px}.kg-close:focus-visible,.kg-nav:focus-visible{outline:2px solid #fff}
body.kg-lightbox-open{overflow:hidden}
@media(max-width:920px){.kg-grid{grid-template-columns:repeat(var(--kg-tablet,3),minmax(0,1fr))}.kg-home-section .kg-grid{grid-template-columns:repeat(var(--kg-tablet,3),minmax(0,1fr))}}
@media(max-width:580px){.kg-grid,.kg-home-section .kg-grid{grid-template-columns:repeat(var(--kg-mobile,2),minmax(0,1fr))}.kg-stage{max-width:calc(100vw - 60px)}.kg-display{height:67vh}.kg-nav{width:30px;height:52px;font-size:24px}.kg-prev{left:0}.kg-next{right:0}.kg-close{height:38px;width:38px;font-size:30px}.kg-meta-title{font-size:14px}}


/* 1.11.0 – long gallery captions remain inside the viewport (including mobile). */
.kg-stage{height:calc(100vh - 34px);height:calc(100dvh - 34px);min-height:0;max-height:calc(100vh - 34px);max-height:calc(100dvh - 34px)}
.kg-display{flex:1 1 auto;min-height:0;height:auto;max-height:min(77vh,900px);max-height:min(77dvh,900px)}
.kg-meta{flex:0 1 auto;min-height:0;max-height:20vh;max-height:20dvh;overflow-y:auto;overflow-wrap:anywhere;padding:0 6px}
.kg-meta-description{overflow-wrap:anywhere}
.kg-close,.kg-nav{touch-action:manipulation}
@media(max-width:580px){
 .kg-stage{height:calc(100vh - 24px);height:calc(100dvh - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
 .kg-display{height:auto;max-height:67vh;max-height:67dvh}
 .kg-meta{max-height:23vh;max-height:23dvh}
 .kg-meta-description{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.kg-item,.kg-thumb>img{transition:none}.kg-item:hover .kg-thumb>img{transform:none}}
