/* ============================================================================
   Do Parque Pousada — grid de galeria melhorado + lightbox proprio.
   Aplicado POR CIMA do CSS do Elementor (widget image-gallery / markup WP
   .gallery > figure.gallery-item > .gallery-icon > a > img).
   ========================================================================== */

/* ---------- grid ---------- */
.elementor-image-gallery .gallery{
  display:grid !important;
  gap:12px;
  margin:0 !important;
  width:100%;
}
/* o WP injeta <br style="clear:both"> entre "linhas" — em grid viram celulas vazias */
.elementor-image-gallery .gallery br{display:none !important}

.elementor-image-gallery .gallery-item{
  max-width:100% !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  float:none !important;
  display:block !important;
}
.elementor-image-gallery .gallery-icon{padding:0 !important;margin:0 !important}

.elementor-image-gallery .gallery-icon a{
  display:block;
  position:relative;
  overflow:hidden;
  border-radius:14px;
  cursor:zoom-in;
  background:#dfe6f2;
  aspect-ratio:var(--dp-gal-ratio,4/3);
  box-shadow:0 1px 2px rgba(9,20,45,.10);
  transition:box-shadow .3s ease, transform .3s ease;
}
.elementor-image-gallery .gallery-icon a:hover{
  box-shadow:0 10px 24px rgba(9,20,45,.20);
}
.elementor-image-gallery .gallery-icon img{
  width:100% !important;
  height:100% !important;
  max-width:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}
.elementor-image-gallery .gallery-icon a:hover img{transform:scale(1.06)}
/* veu sutil de baixo p/ cima no hover (mesma linguagem do azul da marca) */
.elementor-image-gallery .gallery-icon a::after{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg,transparent 60%,rgba(14,35,89,.30));
  opacity:0;transition:opacity .3s ease;
  pointer-events:none;
}
.elementor-image-gallery .gallery-icon a:hover::after{opacity:1}

/* item de galeria SEM link (sem lightbox): mesmo visual, sem cursor de zoom */
.elementor-image-gallery .gallery-icon > img{
  width:100% !important;height:100% !important;object-fit:cover;display:block;
  border-radius:14px;aspect-ratio:var(--dp-gal-ratio,4/3);
}

/* colunas declaradas pelo widget (gallery-columns-N) */
.elementor-image-gallery .gallery-columns-1{grid-template-columns:1fr}
.elementor-image-gallery .gallery-columns-2{grid-template-columns:repeat(2,1fr)}
.elementor-image-gallery .gallery-columns-3{grid-template-columns:repeat(3,1fr)}
.elementor-image-gallery .gallery-columns-4{grid-template-columns:repeat(4,1fr)}
.elementor-image-gallery .gallery-columns-5{grid-template-columns:repeat(5,1fr)}
.elementor-image-gallery .gallery-columns-6{grid-template-columns:repeat(6,1fr)}
.elementor-image-gallery .gallery-columns-7{grid-template-columns:repeat(7,1fr)}
.elementor-image-gallery .gallery-columns-8{grid-template-columns:repeat(8,1fr)}
.elementor-image-gallery .gallery-columns-9{grid-template-columns:repeat(9,1fr)}
.elementor-image-gallery .gallery-columns-10{grid-template-columns:repeat(10,1fr)}

/* mosaicos densos (5+ colunas) ficam quadrados */
.elementor-image-gallery .gallery-columns-5,
.elementor-image-gallery .gallery-columns-6,
.elementor-image-gallery .gallery-columns-7,
.elementor-image-gallery .gallery-columns-8,
.elementor-image-gallery .gallery-columns-9,
.elementor-image-gallery .gallery-columns-10{--dp-gal-ratio:1/1}

/* responsivo */
@media (max-width:1024px){
  .elementor-image-gallery .gallery-columns-5,
  .elementor-image-gallery .gallery-columns-6,
  .elementor-image-gallery .gallery-columns-7,
  .elementor-image-gallery .gallery-columns-8,
  .elementor-image-gallery .gallery-columns-9,
  .elementor-image-gallery .gallery-columns-10{grid-template-columns:repeat(4,1fr)}
}
@media (max-width:767px){
  .elementor-image-gallery .gallery{gap:8px}
  .elementor-image-gallery .gallery-columns-3,
  .elementor-image-gallery .gallery-columns-4{grid-template-columns:repeat(2,1fr)}
  .elementor-image-gallery .gallery-columns-5,
  .elementor-image-gallery .gallery-columns-6,
  .elementor-image-gallery .gallery-columns-7,
  .elementor-image-gallery .gallery-columns-8,
  .elementor-image-gallery .gallery-columns-9,
  .elementor-image-gallery .gallery-columns-10{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:480px){
  .elementor-image-gallery .gallery-columns-5,
  .elementor-image-gallery .gallery-columns-6,
  .elementor-image-gallery .gallery-columns-7,
  .elementor-image-gallery .gallery-columns-8,
  .elementor-image-gallery .gallery-columns-9,
  .elementor-image-gallery .gallery-columns-10{grid-template-columns:repeat(2,1fr)}
}

/* ---------- lightbox ---------- */
.dp-lb{
  position:fixed;inset:0;z-index:99999;
  display:none;align-items:center;justify-content:center;
  background:rgba(7,14,32,.93);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
}
.dp-lb.aberta{display:flex}
body.dp-lb-travada{overflow:hidden}

.dp-lb__img{
  max-width:min(92vw,1500px);max-height:85vh;
  border-radius:10px;box-shadow:0 20px 60px rgba(0,0,0,.55);
  opacity:0;transform:scale(.97);
  transition:opacity .22s ease, transform .22s ease;
  user-select:none;-webkit-user-drag:none;
}
.dp-lb__img.pronta{opacity:1;transform:scale(1)}

.dp-lb__legenda{
  position:fixed;left:50%;bottom:16px;transform:translateX(-50%);
  color:#fff;font:500 14px/1.4 Roboto,Arial,sans-serif;
  text-shadow:0 1px 8px rgba(0,0,0,.85);text-align:center;max-width:88vw;
  pointer-events:none;
}
.dp-lb__contador{
  position:fixed;top:18px;left:20px;
  color:rgba(255,255,255,.75);font:500 13px/1 Roboto,Arial,sans-serif;
  letter-spacing:.06em;pointer-events:none;
}
.dp-lb__btn{
  position:fixed;display:flex;align-items:center;justify-content:center;
  width:46px;height:46px;border-radius:50%;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.08);color:#fff;
  font-size:26px;line-height:1;cursor:pointer;
  transition:background .2s ease;user-select:none;
  padding:0;
}
.dp-lb__btn:hover{background:rgba(255,255,255,.24)}
.dp-lb__fechar{top:12px;right:14px;font-size:22px}
.dp-lb__ant{left:12px;top:50%;transform:translateY(-50%)}
.dp-lb__prox{right:12px;top:50%;transform:translateY(-50%)}
@media (max-width:600px){
  .dp-lb__ant,.dp-lb__prox{width:40px;height:40px;font-size:22px}
  .dp-lb__img{max-width:96vw;max-height:78vh;border-radius:8px}
}

/* spinner enquanto a imagem cheia carrega */
.dp-lb__spin{
  position:fixed;left:50%;top:50%;width:38px;height:38px;margin:-19px 0 0 -19px;
  border:3px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;
  animation:dpLbGira .8s linear infinite;display:none;pointer-events:none;
}
.dp-lb.carregando .dp-lb__spin{display:block}
@keyframes dpLbGira{to{transform:rotate(360deg)}}
