/* Grid basics */
.pb-grid{display:grid;gap:0}
.pb-col-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.pb-col-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.pb-col-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:768px){.pb-grid{grid-template-columns:1fr}}

/* Items */
.pb-item{position:relative;overflow:hidden;background:#000}
.pb-thumb{display:block;position:relative}
.pb-thumb img{width:100%;height:auto;display:block;transition:transform .35s ease}

/* Overlay */
.pb-overlay{
  position:absolute;inset:0;
  background:rgb(0 0 0 / 57%);
  opacity:0;
  display:flex;align-items:center;justify-content:center;
  transition:opacity .25s ease;
  text-align:center;padding:0
}
.pb-item:hover .pb-overlay{opacity:1}
.pb-item:hover .pb-thumb img{transform:scale(1.04)}

/* Centered stack: play button + title */
.pb-overlay-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}

/* Play button */
.pb-play{
  width:64px;height:64px;border-radius:9999px;
  background:rgb(255 255 255 / 0%);
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  display:flex;align-items:center;justify-content:center;
  transition:transform .2s ease, background .2s ease;
  border:2px solid #fff;
}
 


/* Title visible and centered */
.pb-title{
  color:#fff;
  font-weight:700;
  font-size:16px;
  line-height:1.2;
  padding:4px 10px;
  
  border-radius:6px;
}

/* Inline shortcode nav */
.pb-inline-nav{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-top:16px}
.pb-inline-nav-btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 14px;border-radius:8px;background:#111;color:#fff;text-decoration:none;
  font-size:14px;line-height:1;font-weight:600;box-shadow:0 2px 8px rgba(0,0,0,.15);
  transition:background .2s ease, transform .2s ease
}
.pb-inline-nav-btn:hover{background:#000;transform:translateY(-1px)}

/* Load More */
.pb-loadmore-wrap{display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:16px;gap:8px}
.pb-loadmore-btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 16px;border-radius:8px;background:#111;color:#fff;border:0;cursor:pointer;
  font-size:14px;font-weight:600;box-shadow:0 2px 8px rgba(0,0,0,.15);
  transition:background .2s ease, transform .2s ease
}
.pb-loadmore-btn:hover{background:#000;transform:translateY(-1px)}
.pb-loadmore-btn.is-loading{opacity:.65;pointer-events:none}
.pb-loadmore-status{font-size:13px;color:#555;min-height:18px}

/* Ensure videos never exceed the viewport width and are centered */
.pb-video {
  width: 100%;
  max-width: 100vw;   /* hard cap at viewport width */
  margin-left: auto;
  margin-right: auto;
}

/* Self-hosted videos: fluid, never overflow */
.pb-video video {
  display: block;
  width: 100%;
  max-width: 100%;    /* prevent intrinsic width overflow */
  height: auto;
  max-height: 90vh;   /* also cap height on short screens */
  background: #000;
  object-fit: contain; /* switch to cover if you prefer */
}

/* If using ratio wrapper for embeds, also cap to viewport width */
.pb-video .pb-ratio {
  position: relative;
  width: 100%;
  max-width: 100vw;   /* cap wrapper at viewport width */
  background: #000;
  max-height: 90vh;
  overflow: hidden;
}

/* Common aspect ratios for embeds (optional) */
.pb-video .pb-ratio.pb-16x9 { padding-top: 56.25%; }
.pb-video .pb-ratio.pb-4x3  { padding-top: 75%; }
.pb-video .pb-ratio.pb-1x1  { padding-top: 100%; }
.pb-video .pb-ratio.pb-9x16 { padding-top: 177.78%; }

/* Fill the ratio box without overflow */
.pb-video .pb-ratio > iframe,
.pb-video .pb-ratio > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Safety: make any direct iframe responsive by width */
.pb-video iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}