/* HDS Social Prime 0.03.52 | Galeria editorial 1-9, isolada do conteúdo regular. */
.hds-sp-gallery { width:100%; max-width:100%; margin:1.5rem 0; clear:both; }
.hds-sp-gallery__grid { display:grid; gap:5px; grid-auto-flow:row dense; width:100%; grid-auto-rows:clamp(112px, 17vw, 240px); }
.hds-sp-gallery .hds-sp-gallery__tile { min-width:0; min-height:0; margin:0!important; padding:0!important; overflow:hidden; border-radius:3px; background:#eee; }
.hds-sp-gallery .hds-sp-gallery__open { display:block; width:100%; height:100%; padding:0!important; margin:0!important; border:0!important; border-radius:inherit; background:transparent!important; cursor:zoom-in; overflow:hidden; box-shadow:none!important; }
.hds-sp-gallery .hds-sp-gallery__image { display:block; width:100%; height:100%; margin:0!important; border:0; padding:0!important; max-width:none; object-fit:cover; object-position:center; transition:transform .2s ease; }
.hds-sp-gallery__open:hover .hds-sp-gallery__image { transform:scale(1.018); }
.hds-sp-gallery__open:focus-visible { outline:3px solid #bf9835!important; outline-offset:-4px; }
/* Todas as variantes usam a quantidade efetiva de itens, sem lacunas. */
.hds-sp-gallery--n1 .hds-sp-gallery__grid { grid-template-columns:1fr; grid-auto-rows:auto; }
.hds-sp-gallery--n1 .hds-sp-gallery__tile { aspect-ratio:auto; max-height:700px; }
.hds-sp-gallery--n1 .hds-sp-gallery__open { height:auto; }
.hds-sp-gallery--n1 .hds-sp-gallery__image { height:auto; max-height:700px; object-fit:contain; }
.hds-sp-gallery--n2 .hds-sp-gallery__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.hds-sp-gallery--n3 .hds-sp-gallery__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.hds-sp-gallery--n3 .hds-sp-gallery__tile:first-child { grid-row:span 2; }
.hds-sp-gallery--n4 .hds-sp-gallery__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.hds-sp-gallery--n5 .hds-sp-gallery__grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.hds-sp-gallery--n5 .hds-sp-gallery__tile:nth-child(-n+2) { grid-column:span 3; }
.hds-sp-gallery--n5 .hds-sp-gallery__tile:nth-child(n+3) { grid-column:span 2; }
.hds-sp-gallery--n6 .hds-sp-gallery__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.hds-sp-gallery--n7 .hds-sp-gallery__grid { grid-template-columns:repeat(12,minmax(0,1fr)); }
.hds-sp-gallery--n7 .hds-sp-gallery__tile:nth-child(-n+3) { grid-column:span 4; }
.hds-sp-gallery--n7 .hds-sp-gallery__tile:nth-child(n+4) { grid-column:span 3; }
.hds-sp-gallery--n8 .hds-sp-gallery__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.hds-sp-gallery--n9 .hds-sp-gallery__grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:680px) {
 .hds-sp-gallery__grid { gap:4px; grid-auto-rows:clamp(100px, 36vw, 220px); }
 .hds-sp-gallery--n5 .hds-sp-gallery__grid,
 .hds-sp-gallery--n6 .hds-sp-gallery__grid,
 .hds-sp-gallery--n7 .hds-sp-gallery__grid,
 .hds-sp-gallery--n8 .hds-sp-gallery__grid,
 .hds-sp-gallery--n9 .hds-sp-gallery__grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .hds-sp-gallery--n5 .hds-sp-gallery__tile,
 .hds-sp-gallery--n7 .hds-sp-gallery__tile { grid-column:auto!important; }
 .hds-sp-gallery--n5 .hds-sp-gallery__tile:first-child,
 .hds-sp-gallery--n7 .hds-sp-gallery__tile:first-child,
 .hds-sp-gallery--n9 .hds-sp-gallery__tile:first-child { grid-column:span 2!important; }
 .hds-sp-gallery--n3 .hds-sp-gallery__tile:first-child { grid-row:span 2; }
}
@media(max-width:360px) { .hds-sp-gallery__grid { grid-auto-rows:125px; } }
@media(prefers-reduced-motion:reduce) { .hds-sp-gallery__image { transition:none; } }
/* Modal único por página, construído sob demanda, sem criar overlay nos artigos sem galeria. */
.hds-sp-gallery-lightbox { max-width:none!important; max-height:none!important; width:100vw!important; height:100dvh!important; margin:0!important; padding:0!important; border:0!important; background:rgba(8,10,14,.97)!important; color:#fff!important; overflow:hidden; }
.hds-sp-gallery-lightbox::backdrop { background:rgba(8,10,14,.94); }
.hds-sp-gallery-lightbox__container { display:flex; flex-direction:column; width:100%; height:100%; }
.hds-sp-gallery-lightbox__bar { height:60px; flex-shrink:0; display:flex; align-items:center; justify-content:space-between; padding:0 18px; }
.hds-sp-gallery-lightbox__close, .hds-sp-gallery-lightbox__nav { border:0!important; box-shadow:none!important; color:#fff!important; background:rgba(255,255,255,.12)!important; border-radius:50%!important; width:42px; height:42px; font:400 25px/1 sans-serif; cursor:pointer; display:grid; place-items:center; padding:0!important; }
.hds-sp-gallery-lightbox__close:hover, .hds-sp-gallery-lightbox__nav:hover { background:rgba(255,255,255,.22)!important; }
.hds-sp-gallery-lightbox__close:focus-visible, .hds-sp-gallery-lightbox__nav:focus-visible { outline:2px solid #bf9835!important; outline-offset:3px; }
.hds-sp-gallery-lightbox__counter { font:500 13px/1.4 system-ui,sans-serif; color:#ddd; }
.hds-sp-gallery-lightbox__stage { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; padding:4px 12px; gap:10px; }
.hds-sp-gallery-lightbox__media { flex:1; min-width:0; min-height:0; height:100%; display:flex; align-items:center; justify-content:center; }
.hds-sp-gallery-lightbox__media img { display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; }
.hds-sp-gallery-lightbox__caption { min-height:50px; flex-shrink:0; text-align:center; max-width:900px; margin:0 auto; padding:10px 18px 20px; font:400 14px/1.5 system-ui,sans-serif; color:#ddd; }
@media(max-width:560px) { .hds-sp-gallery-lightbox__stage { gap:4px; padding:3px; }.hds-sp-gallery-lightbox__nav{width:34px;height:34px;font-size:21px;} .hds-sp-gallery-lightbox__bar{padding:0 12px;height:54px;} }

/* Legenda editorial única, abaixo da grade. Não interfere nas legendas individuais do lightbox. */
.hds-sp-gallery .hds-sp-gallery__caption { display:block; margin:9px 0 0; padding:0 2px; color:#000!important; font-size:.875rem;line-height:1.5;font-weight:400; text-align:center; overflow-wrap:anywhere; }

/* 0.03.55: estilo editorial da legenda geral, coerente com o corpo do artigo. */
body .hds-sp-gallery > figcaption.hds-sp-gallery__caption,
body .entry-content .hds-sp-gallery > figcaption.hds-sp-gallery__caption,
body .hds-sp-gallery .hds-sp-gallery__caption {
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  opacity:1!important;
  filter:none!important;
}

/* HDS 0.03.56: mobile editorial gallery, one full-width photo per row (1 x N).
   Keep the original proportions; desktop compositions remain unchanged. */
@media (max-width:680px) {
  .hds-sp-gallery .hds-sp-gallery__grid {
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;
    grid-auto-flow:row!important;
    gap:5px;
  }
  .hds-sp-gallery .hds-sp-gallery__grid > .hds-sp-gallery__tile {
    grid-column:1 / -1!important;
    grid-row:auto!important;
    width:100%;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
  }
  .hds-sp-gallery .hds-sp-gallery__open { height:auto!important; }
  .hds-sp-gallery .hds-sp-gallery__image {
    display:block;
    width:100%;
    height:auto!important;
    max-height:none!important;
    object-fit:contain;
  }
}

/* 0.03.60 | Zoom dentro do lightbox: a imagem não navega para seu URL. */
.hds-sp-gallery-lightbox__bar { gap:12px; }
.hds-sp-gallery-lightbox__tools { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.hds-sp-gallery-lightbox__tool { box-sizing:border-box; display:grid; place-items:center; width:36px; height:36px; flex:0 0 36px; border:0!important; border-radius:50%!important; padding:0!important; color:#fff!important; background:rgba(255,255,255,.12)!important; font:400 22px/1 system-ui,sans-serif; cursor:pointer; box-shadow:none!important; }
.hds-sp-gallery-lightbox__tool:hover:not(:disabled) { background:rgba(255,255,255,.23)!important; }
.hds-sp-gallery-lightbox__tool:focus-visible { outline:2px solid #bf9835!important; outline-offset:3px; }
.hds-sp-gallery-lightbox__tool:disabled { opacity:.35; cursor:default; }
.hds-sp-gallery-lightbox__level { display:block; min-width:52px; text-align:center; color:#eee; font:500 12px/1.4 system-ui,sans-serif; font-variant-numeric:tabular-nums; }
.hds-sp-gallery-lightbox__media { position:relative; overflow:hidden; touch-action:none; cursor:zoom-in; user-select:none; -webkit-user-select:none; overscroll-behavior:contain; }
.hds-sp-gallery-lightbox__media--zoomed { cursor:grab; }
.hds-sp-gallery-lightbox__media--zoomed:active { cursor:grabbing; }
.hds-sp-gallery-lightbox__media img { flex:0 1 auto; transform-origin:center center; will-change:transform; user-select:none; -webkit-user-drag:none; -webkit-user-select:none; touch-action:none; }
.entry-content img.hds-sp-image-zoomable { cursor:zoom-in; }
.entry-content img.hds-sp-image-zoomable:focus-visible { outline:3px solid #bf9835; outline-offset:3px; }
@media(max-width:560px) {
 .hds-sp-gallery-lightbox__tools { gap:4px; }
 .hds-sp-gallery-lightbox__tool { width:30px; height:30px; flex-basis:30px; font-size:20px; }
 .hds-sp-gallery-lightbox__close { width:34px; height:34px; }
 .hds-sp-gallery-lightbox__level { min-width:43px; font-size:11px; }
 .hds-sp-gallery-lightbox__bar { gap:4px; }
}

.hds-sp-gallery-lightbox__nav[hidden], .hds-sp-gallery-lightbox__caption[hidden] { display:none!important; }
