/* iRodopi.bg - the photos of the old «Фотопътуване» posts (owner 24.11): two columns on a wide screen, one on a phone, and the full screen view of gallery.js.
   Linked ONLY by a page with a photo grid (legacy.blade.php, `photo_gallery`) or a listing page with photos (listing.blade.php, `photo_lightbox`), so every other page keeps its stylesheet and its bytes. */
.story-body.photo-body { grid-template-columns: minmax(0, 1fr); }
.photo-body .prose { max-width: none; }
.photo-body .prose > :not(.photo-grid) { max-width: 68ch; }
.photo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 1160px; margin: 1.2em 0; }
.photo-grid > figure { margin: 0; }
.photo-grid img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--bg-2); }
@media (min-width: 760px) {
    .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
    /* one height per row: a portrait photo is cut to the frame here and shown whole in the full screen view */
    .photo-grid img { aspect-ratio: 3 / 2; object-fit: cover; }
}
.photo-grid figcaption { font-size: .85em; color: var(--muted); margin-top: 6px; }

/* the full screen view (only with gallery.js: it marks the page `has-lightbox` and builds the view) */
.has-lightbox .photo-grid img { cursor: zoom-in; transition: opacity .15s ease; }
.has-lightbox .photo-grid img:hover { opacity: .9; }
.has-lightbox .photo-grid img:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(10, 14, 12, .96); color: #f3efe6; touch-action: pan-y; }
.lb[hidden] { display: none; }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(10px, 2vw, 22px); font: 500 15px/1.3 var(--sans); }
.lb__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(8px, 6vw, 92px); }
.lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb__cap { margin: 0 auto; max-width: 70ch; padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); text-align: center; font: 400 15px/1.45 var(--sans); color: #d9d3c6; }
.lb__btn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font: 400 30px/1 var(--sans); cursor: pointer; }
.lb__btn:hover { background: rgba(255, 255, 255, .2); }
.lb__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb__nav--prev { left: clamp(6px, 1.5vw, 24px); }
.lb__nav--next { right: clamp(6px, 1.5vw, 24px); }
@media (max-width: 759px) {
    .lb__stage { padding: 0; }
    .lb__nav { top: auto; bottom: 8px; transform: none; background: rgba(0, 0, 0, .45); }
}

/* a listing page (owner 24.11): the mosaic and «Още снимки» open the same full screen view */
.has-lightbox .mosaic img, .has-lightbox .more-photos__grid img { cursor: zoom-in; transition: opacity .15s ease; }
.has-lightbox .mosaic img:hover, .has-lightbox .more-photos__grid img:hover { opacity: .9; }
.has-lightbox .mosaic img:focus-visible, .has-lightbox .more-photos__grid img:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
