/* Bejegyzések beágyazott képei: bélyegképek + galéria-nézet (public/js/lightbox.js). */

/* Bélyegképek: az egymás utáni képek egy rácsba kerülnek (public/js/lightbox.js állítja az oszlopszámot és az arányt).
   A WP galéria-CSS-e ID-szintű szelektort használ (:not(#individual-image)), ezért itt kell az !important. */
body.single .entry-content .lb-group { display: grid; grid-template-columns: repeat(var(--lb-cols, 2), minmax(0, var(--lb-max, 220px))); gap: 12px; justify-content: start; margin: 22px 0; }
body.single .entry-content .lb-group > figure.lb-thumb { position: relative; display: flex; flex-direction: column; min-width: 0; width: auto !important; max-width: none !important; margin: 0 !important; flex: none !important; }
body.single .entry-content .lb-group img.lb-img { display: block; width: 100% !important; max-width: 100% !important; height: auto !important; aspect-ratio: var(--lb-ratio, 1); flex: none !important; object-fit: cover; border-radius: 10px; cursor: zoom-in; box-shadow: 0 4px 14px rgba(23, 34, 29, .12); transition: transform .18s ease, box-shadow .18s ease; }
body.single .entry-content .lb-group img.lb-img:hover,
body.single .entry-content .lb-group img.lb-img:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 34, 29, .22); }
body.single .entry-content .lb-group img.lb-img:focus-visible { outline: 3px solid #8cbb2e; outline-offset: 2px; }
body.single .entry-content .lb-group figcaption { margin-top: 6px; color: #59685f; font-size: 13px; line-height: 1.5; text-align: left; }
body.single .entry-content .wp-lightbox-container > button { display: none; }

/* Galéria-nézet */
[data-lightbox-root] .lb-img { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100000; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: minmax(0, 1fr) auto auto; align-items: center; background: rgba(10, 16, 13, .97); color: #fff; }
.lb[hidden] { display: none; }
.lb-open { overflow: hidden; }
.lb-stage { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; min-height: 0; margin: 0; padding: 24px 0 8px; box-sizing: border-box; }
.lb-image { display: block; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: 6px; background: #111; transition: opacity .15s ease; }
.lb-image.is-loading { opacity: .35; }
.lb-caption { max-width: 820px; color: #dfe7e1; font-size: 15px; line-height: 1.5; text-align: center; }
.lb-caption[hidden] { display: none; }
.lb button { font: inherit; cursor: pointer; }
.lb-close { position: absolute; top: 14px; right: 18px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; line-height: 1; }
.lb-nav { grid-row: 1; width: 48px; height: 48px; margin: 0 auto; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 34px; line-height: 1; }
.lb-prev { grid-column: 1; } .lb-next { grid-column: 3; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .26); }
.lb button:focus-visible { outline: 3px solid #8cbb2e; outline-offset: 2px; }
.lb-counter { grid-column: 1 / -1; grid-row: 2; padding: 4px 0; color: #b8c6bd; font-size: 14px; text-align: center; }
.lb-strip { grid-column: 1 / -1; grid-row: 3; display: flex; gap: 8px; max-width: 100%; padding: 8px 16px 16px; overflow-x: auto; box-sizing: border-box; justify-content: center; }
.lb-strip[hidden] { display: none; }
.lb-strip-item { flex: 0 0 auto; width: 64px; height: 48px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 6px; background: #222; opacity: .6; }
.lb-strip-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-strip-item.is-active, .lb-strip-item:hover { border-color: #8cbb2e; opacity: 1; }

@media (max-width: 680px) {
  .lb { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .lb-nav { width: 38px; height: 38px; font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-image, body.single .entry-content figure.lb-thumb img.lb-img { transition: none; }
}
