/* Push slider text block underneath the photo container */
.imageslider-text-block, 
.imageslider-caption,
.imageslider-description {
    position: relative !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    background: transparent !important; /* Removes overlay backgrounds */
    color: #333333 !important; /* Changes text color so it remains visible on your page */
    padding: 10px 0 !important;
    display: block !important;
}

/* Universal force to left-justify all captions, block subtext, and make font smaller */
.wp-block-image figcaption, 
.wp-element-caption, 
.wp-block-gallery .wp-element-caption, 
figcaption, 
[class*="caption"], 
[class*="description"] { 
    text-align: left !important; 
    justify-content: flex-start !important;
    font-size: 13px !important; /* Adjust this number to make it smaller or larger */
}

/* Remove extra space below the Ultimate Blocks image slider (blog posts only) */
body.single-post .wp-block-ub-image-slider {
	margin-bottom: 0 !important;
}
body.single-post .wp-block-ub-image-slider .slick-slide,
body.single-post .wp-block-ub-image-slider .slick-list,
body.single-post .wp-block-ub-image-slider .slick-track {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}
/* Catch-all for the caption element, in case it has its own bottom spacing */
body.single-post .wp-block-ub-image-slider figcaption,
body.single-post .wp-block-ub-image-slider .ub_image-slider-caption,
body.single-post .wp-block-ub-image-slider [class*="caption"] {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}
/* Tighten up on mobile specifically, since that's where the gap is worst */
@media (max-width: 782px) {
	body.single-post .wp-block-ub-image-slider {
		margin-bottom: 0 !important;
	}
}

/* ===== Event page photo header (e.g. 35th Anniversary page) ===== */
/* White title overlaid directly on the photo, centered, no gray box */
@media (max-width: 782px) {
  .photo_header {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
    overflow: visible !important;
  }
  .photo_header img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }
  .photo_header .overlay {
    display: none !important;
  }
  .photo_header .page-title {
    position: absolute !important;
    top: auto !important;
    bottom: 16px !important;
    left: 28px !important;
    right: 28px !important;
    width: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.4rem !important;
    line-height: 1.25 !important;
    color: #ffffff !important;
    text-align: center !important;
    background: none !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.85), 0 0 12px rgba(0,0,0,0.5) !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* ===== Homepage slider (Swiper) ===== */
/* Move arrows below the title/caption text, shrink them, and tighten title-to-caption gap */
@media (max-width: 782px) {
  .swiper-button-prev,
  .swiper-button-next {
    top: auto !important;
    bottom: 10px !important;
    transform: none !important;
    width: 24px !important;
    height: 24px !important;
  }
  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 16px !important;
  }

  .mobiletitle {
    margin-bottom: 4px !important;
    padding-bottom: 0 !important;
  }
  .caption {
    padding-top: 4px !important;
    margin-top: 0 !important;
  }
}
