.elementor-widget-sj_ad_slot {
  margin: 0 auto;
  text-align: center;
}
.sidenav-sticky--sm {
  position: sticky;
  top: 178px;
  align-self: flex-start;
}

/* Fix Gutenberg gallery columns */
.wp-block-gallery.is-layout-flex {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
}

.elementor-widget:not(:last-child){
  margin-block-end: 8px;
}

/* Ensure child images share space (2 columns) */
.wp-block-gallery.is-layout-flex > figure {
  flex: 1 1 calc(50% - 1rem) !important;
  margin: 0 !important;
}

/* Image Caption */
.wp-block-image figure {
  position: relative;
  margin-bottom: 2rem;
}

.wp-block-image figcaption{
  position: absolute;
  bottom: 0;
  right: 10px;
  background: #fff;
  padding: 0 10px 7px;
  font-size: 12px;
}

figure.wp-block-gallery.has-nested-images figcaption.wp-element-caption {
  position: absolute;
  bottom: 1rem;
  right: 10px;
  background: #fff;
  padding: 0 5px 7px;
  color: #000;
  text-shadow: none;
  width: auto;
  left: auto;
  font-size: 12px;
  z-index: 1;
}

.wp-block-image.size-large {
  position: relative;
}

/* Featured Thumbnails */
.hero-posts img{
  object-fit: cover;
  aspect-ratio: 16 / 8.9;
  max-height:250px;
  overflow-y: hidden;
  display:flex;
}

body.category-video .elementor-post__thumbnail img,
body.tag .elementor-post__thumbnail img,
body.category-featured-videos .elementor-post__thumbnail img,
body.category-skate-jawn-full-lengths .elementor-post__thumbnail img,
body.search-results .elementor-post__thumbnail img {
  object-fit: cover;
  object-position: center;
  aspect-ratio: 16 / 8.9;
}

/* Mobile styles */
@media (max-width: 800px) {
  .home-primary-column img{
    width:100%;
    max-width:100%;
  }
  .mobile-bg{
    background-image: none !important;
  }
  .wp-block-image figcaption,
  figure.wp-block-gallery.has-nested-images figcaption.wp-element-caption {
    font-size:10px;
  }
  figure.wp-block-gallery.has-nested-images figcaption.wp-element-caption{
    padding:0px 7px 7px;
  }
  .wp-block-image figcaption{
    bottom: 1.5rem;
    right: 1rem;
  }
}

@media (max-width: 480px){
  header .elementor-widget-wrap.elementor-element-populated {
    align-items: start !important;
  }
  header nav {
    padding: 0 !important;
  }
  .elementor-nav-menu--dropdown.elementor-nav-menu__container{
    top:65px !important;
  }
  header .logo-container div:first-child {
    padding: 0 !important;
  }
  .skate-header_ad {
    padding: 0 10px;
    padding-top: 60px;
  }
  .sj-search-bar {
    position: absolute;
    left: 0;
    top: 60px;
    width: calc(100vw - 20px);
  }
  .sj-search-bar div:first-of-type{
    padding: 0!important;
  }
}
