/* NextHair gallery presentation. Native images remain the pointer target. */
.article-gallery { position:relative; outline-offset:5px; scroll-margin-top:100px; }
.gallery-navigation { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:62px; margin:0 0 24px; padding:10px; border:1px solid #ece7dc; border-radius:8px; background:#fbfaf7; }
.gallery-navigation[hidden], .article-gallery [hidden] { display:none!important; }
.gallery-navigation button { display:flex; align-items:center; gap:5px; min-height:42px; padding:0 14px; border:1px solid transparent; border-radius:999px; background:none; color:#475467; font:900 13px 'Lato',sans-serif; cursor:pointer; }
.gallery-navigation button:hover { border-color:#e2d8c4; background:#fff; color:#142929; }
.gallery-navigation .gallery-next { min-width:132px; justify-content:center; background:#142929; color:#fff; box-shadow:0 10px 22px #14292929; }
.gallery-navigation .gallery-next:hover { background:#203f3f; border-color:#142929; color:#fff; }
.gallery-navigation [data-gallery-count] { display:inline-flex; align-items:center; justify-content:center; min-width:68px; min-height:34px; border-radius:999px; background:#fff; color:#142929; font:900 13px 'Lato',sans-serif; }
.gallery-navigation:last-of-type { margin-top:24px; margin-bottom:32px; }
.gallery-figure { position:relative; margin:0; text-align:center; touch-action:pan-y pinch-zoom; }
.gallery-zoom { display:block; width:100%; padding:0; border:0; border-radius:8px; background:#f5f1e8; cursor:zoom-in; overflow:hidden; }
.gallery-zoom>img { display:block; width:100%; height:auto; max-height:760px; object-fit:contain; margin:0 auto; border-radius:0; }
.gallery-figure .pin-save-btn, .gallery-figure .detail-slide-story-link { z-index:2; }
.gallery-figure figcaption { position:relative; margin-top:10px; font:400 13px 'Lato',sans-serif; }
.article-gallery .content-report-link { display:block; width:max-content; margin:8px 12px 0 auto; border:0; padding:4px 0; background:none; color:#536363; font:700 12px 'Lato',sans-serif; text-decoration:underline; cursor:pointer; }
.article-gallery .content-report-link:hover { color:#9b251c; }
body[data-theme="dark"] .article-gallery .content-report-link { color:#c5d1d1; }
body[data-theme="dark"] .article-gallery .content-report-link:hover { color:#ffb4ad; }
.gallery-description { margin-top:25px; font-size:17px; line-height:1.8; text-align:left; }
.gallery-description h2 { font-family:'Playfair Display',serif; }
.article-gallery article { margin-bottom:25px; }
.gallery-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.gallery-load-feedback { position:absolute; top:66px; left:50%; transform:translateX(-50%); z-index:3; display:flex; align-items:center; justify-content:center; gap:8px; width:max-content; max-width:calc(100% - 24px); margin:0; padding:3px 10px; border-radius:6px; background:#fff; color:#142929; box-shadow:0 2px 8px #14292915; font:400 12px/1.4 'Lato',sans-serif; text-align:center; }
.gallery-load-feedback [data-gallery-retry] { flex-shrink:0; border:1px solid #536363; border-radius:5px; padding:3px 8px; background:#fff; color:#142929; font:700 12px 'Lato',sans-serif; cursor:pointer; }
.is-loading .gallery-navigation [data-gallery-count]::before { content:''; width:10px; height:10px; margin-right:5px; border:2px solid #d5e1e1; border-top-color:#142929; border-radius:50%; animation:gallery-loading .8s linear infinite; }
@keyframes gallery-loading { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .is-loading .gallery-navigation [data-gallery-count]::before { animation:none; } }
.article-gallery button:focus-visible, .article-gallery a:focus-visible, [data-article-select]:focus-visible { outline:3px solid #5d78ff; outline-offset:3px; }
/* Reset native dialog size/margins explicitly: global resets must not place it at top-left. */
.gallery-lightbox { position:fixed; inset:0; margin:0; width:100vw; height:100vh; height:100dvh; max-width:none; max-height:none; box-sizing:border-box; padding:34px 80px; border:0; background:rgba(8,18,18,.76); color:#fff; overflow:hidden; }
.gallery-lightbox[open] { display:grid; place-items:center; }
.gallery-lightbox::backdrop { background:transparent; backdrop-filter:blur(12px); }
.gallery-lightbox figure { display:grid; justify-items:center; gap:12px; min-width:0; max-width:min(100%,980px); max-height:100%; margin:0; }
.gallery-lightbox img { display:block; width:auto; height:auto; max-width:100%; max-height:78vh; max-height:78dvh; object-fit:contain; border-radius:8px; background:#f5f1e8; box-shadow:0 26px 70px #0006; }
.gallery-lightbox figcaption { max-width:720px; margin:0; color:#ffffffd1; font:400 13px/1.45 'Lato',sans-serif; text-align:center; overflow-wrap:anywhere; }
.gallery-lightbox > button { position:absolute; z-index:2; width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; padding:0; border:1px solid #ffffff2e; border-radius:50%; background:#ffffff1f; color:#fff; font-size:26px; cursor:pointer; backdrop-filter:blur(10px); }
.gallery-lightbox > button:hover { background:#ffffff38; }
.gallery-lightbox .gallery-load-feedback { top:24px; max-width:calc(100% - 140px); }
.gallery-lightbox [data-gallery-close] { top:24px; right:24px; }
.gallery-lightbox [data-gallery-step] { top:50%; transform:translateY(-50%); }
.gallery-lightbox [data-gallery-step="-1"] { left:24px; }
.gallery-lightbox [data-gallery-step="1"] { right:24px; }
body:has(.gallery-lightbox[open]) { overflow:hidden; }
.gallery-report { position:fixed; inset:0; margin:auto; width:min(560px,92vw); max-height:90vh; box-sizing:border-box; border:0; border-radius:14px; padding:28px; background:var(--bg-color,#fff); color:inherit; }
.gallery-report::backdrop { background:#000b; }
.gallery-report label { display:block; margin:14px 0; font-size:16px; }
.gallery-report input:not([type=checkbox]), .gallery-report textarea { display:block; width:100%; padding:10px; font:inherit; border:1px solid #bbb; border-radius:5px; }
.gallery-report textarea { min-height:100px; }
.gallery-report button { cursor:pointer; padding:10px; font:inherit; }
.gallery-honeypot { position:absolute; left:-10000px; }
[data-article-select] { background:none; border:0; padding:0; font:inherit; color:inherit; text-align:inherit; cursor:pointer; }
[data-article-select] img { display:block; }
.article-gallery:not(.is-enhanced) article+article { margin-top:45px; }
body[data-theme="dark"] .gallery-navigation { background:#203333; border-color:#3b4a45; }
body[data-theme="dark"] .gallery-previous { color:#fff; }
@media(max-width:600px) {
 .gallery-navigation { gap:4px; padding:8px; }
 .gallery-navigation button { padding:0 10px; font-size:12px; }
 .gallery-navigation .gallery-next { min-width:110px; }
 .gallery-navigation [data-gallery-count] { min-width:48px; }
 .gallery-description { font-size:16px; }
 .gallery-lightbox { padding:64px 12px 76px; }
 .gallery-lightbox img { max-height:calc(100dvh - 210px); }
 .gallery-lightbox [data-gallery-close] { top:12px; right:12px; }
 .gallery-lightbox [data-gallery-step] { top:auto; bottom:16px; transform:none; }
 .gallery-lightbox [data-gallery-step="-1"] { left:calc(50% - 56px); }
 .gallery-lightbox [data-gallery-step="1"] { right:calc(50% - 56px); }
}
/* Keep off-screen slides from loading before the controller starts. Without JS,
   every server-rendered photo and description remains visible. */
html.editorial-js .article-gallery:not(.is-enhanced) > [data-gallery-slide] ~ [data-gallery-slide] { display: none; }
