/*
 * Smart Slider 3 (Free) layout fixes for the sportsfest theme.
 *
 * Background: the site moved from Smart Slider 3 Pro to Free. Free has no
 * "Full page" responsive mode, so slider 13 (homepage hero) falls back to
 * "Auto" and renders as a fixed 2:1 box instead of filling its container.
 * The plugin's own sizing (inline styles set by its JS) is left untouched;
 * these rules only stretch the slider's wrapper chain to the hero container.
 *
 * Every selector is scoped to the hero <nav> so no other slider is affected.
 * Specificity (1 id, 2 classes, 1 element) beats the plugin's per-slider
 * inline rules (div#n2-ss-13 .n2-ss-slider-3 = 1 id, 1 class, 1 element),
 * so no !important is needed.
 *
 * Loaded from functions.php after the plugin's stylesheet.
 */

/* Front page: slider 13 sits inside #video-viewport, which is absolutely
   positioned and 100% of the nav height. Stretch the slider to fill it. */
.masthead nav #video-viewport .n2-section-smartslider,
.masthead nav #video-viewport .n2-ss-align,
.masthead nav #video-viewport .n2-padding,
.masthead nav #video-viewport .n2-ss-slider,
.masthead nav #video-viewport .n2-ss-slider-1,
.masthead nav #video-viewport .n2-ss-slider-2,
.masthead nav #video-viewport .n2-ss-slider-3 {
	height: 100%;
}

/* /homepage-new (hp-nav.php): slider 13 is a direct child of the nav and sits
   in normal flow. Pro "Full page" mode gave it the viewport height; mirror
   that with a min-height so the background image covers a full screen. */
.masthead nav > .n2-section-smartslider .n2-ss-slider,
.masthead nav > .n2-section-smartslider .n2-ss-slider-1,
.masthead nav > .n2-section-smartslider .n2-ss-slider-2,
.masthead nav > .n2-section-smartslider .n2-ss-slider-3 {
	min-height: 100vh;
}

/* ------------------------------------------------------------------------
 * Sponsor logo slideshow (inc/sponsor-logo-wall.php + js/sponsor-logo-slider.js).
 * Replaces the Pro-only Carousel slider 3 in the footer: a strip of logos,
 * --sf-per per slide, all the same height, stepping one group at a time.
 * Pane capped at 1200px with 30px side spacing like the Pro slider.
 * ---------------------------------------------------------------------- */
.footer-slider .sf-logo-slider {
	--sf-per: 3;
	--sf-gap: 10px;
	--sf-logo-height: 80px;
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	/* Top padding gives space under the "Our Sponsors" heading, bottom
	   padding keeps the logos off the footer band that follows. */
	padding: 20px 30px 50px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
}
.footer-slider .sf-logo-slider__viewport {
	flex: 1 1 auto;
	overflow: hidden;
	min-width: 0;
}
.footer-slider .sf-logo-slider__track {
	display: flex;
	align-items: center;
	will-change: transform;
	transform: translate3d(0, 0, 0);
}
.footer-slider .sf-logo-slider__item {
	flex: 0 0 calc(100% / var(--sf-per));
	max-width: calc(100% / var(--sf-per));
	height: var(--sf-logo-height);
	box-sizing: border-box;
	padding: 0 calc(var(--sf-gap) / 2);
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	text-decoration: none;
}
.footer-slider .sf-logo-slider__item img {
	display: block;
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}
/* The theme pulls .footer-slider up 75px at 992px+ (footer.footer .footer-slider),
   sized for the old 300px-tall Pro pane. The strip is only 80px tall, so that
   pull-up drags it over the "Our Sponsors" heading. Cancel it here; the
   selector is one class more specific than the theme rule so no !important. */
footer.footer .sponsor-footer .footer-slider {
	margin-top: 0;
}

/* Fewer logos than a full slide: just centre them, no arrows. */
.footer-slider .sf-logo-slider--static .sf-logo-slider__track { justify-content: center; }
.footer-slider .sf-logo-slider--static .sf-logo-slider__arrow { display: none; }

/* Arrows: thin chevrons, 32px like the Pro arrow image, hidden on mobile. */
.footer-slider .sf-logo-slider__arrow {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	position: relative;
	opacity: 0.8;
	transition: opacity 0.3s;
}
.footer-slider .sf-logo-slider__arrow:hover,
.footer-slider .sf-logo-slider__arrow:focus-visible { opacity: 1; }
.footer-slider .sf-logo-slider__arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	border-top: 2px solid #fff;
	border-left: 2px solid #fff;
	transform: translate(-30%, -50%) rotate(-45deg);
}
.footer-slider .sf-logo-slider__arrow--next::before {
	transform: translate(-70%, -50%) rotate(135deg);
}
@media (max-width: 700px) {
	.footer-slider .sf-logo-slider {
		--sf-logo-height: 50px;
		--sf-gap: 8px;
		padding: 15px 15px 35px;
	}
	.footer-slider .sf-logo-slider__arrow { display: none; }
}

/* ------------------------------------------------------------------------
 * Video modal (js/smart-slider-video-modal.js).
 * Replaces the Pro-only lightbox for `lightbox[<video url>]` links in slides.
 * ---------------------------------------------------------------------- */
.sf-video-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.85);
	box-sizing: border-box;
}
.sf-video-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 1100px;
}
.sf-video-modal__frame {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
	background: #000;
}
.sf-video-modal__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.sf-video-modal__close {
	position: absolute;
	right: 0;
	top: -44px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
}
.sf-video-modal__close:hover,
.sf-video-modal__close:focus-visible { color: #df9f44; outline: 0; }
html.sf-video-modal-open { overflow: hidden; }

/* ------------------------------------------------------------------------
 * "Hosted By" logo row (template-parts/section-footersponsors.php).
 * Not a slider fix, but it lives here because it broke the video modal on
 * phones. The row is three links with Bootstrap .px-5 (3rem each side,
 * declared !important in vendor.min.css) around 320px images, so it can
 * never be narrower than ~1250px and forces the whole page to scroll
 * sideways on tablets and phones. Let it wrap, and on small screens shrink
 * the padding and image. The two !important flags are needed only to beat
 * Bootstrap's own !important on .px-5 and the inline max-width on the <img>.
 * ---------------------------------------------------------------------- */
.sponsor-footer .host-footer--logos {
	flex-wrap: wrap;
	row-gap: 20px;
}
@media (max-width: 991px) {
	.sponsor-footer .host-footer--logos .px-5 {
		padding-left: 1rem !important;  /* vendor.min.css: .px-5{padding-left:3rem!important} */
		padding-right: 1rem !important; /* vendor.min.css: .px-5{padding-right:3rem!important} */
	}
	.sponsor-footer .host-footer--logos .host-footer-logo {
		/* inline style on the img sets max-width:320px */
		max-width: min(320px, calc(100vw - 4rem)) !important;
		height: auto;
	}
}

/* ------------------------------------------------------------------------
 * Events page: heading band vs. slider overlap (page-events.php).
 * The theme gives .event-slider-bg a fixed 25vw height and pulls the slider
 * up over it by 20vw (24vw at 992px+). That offset assumed the Pro Showcase
 * slide's top spacing. With the Free slider the video thumbnail now lands
 * under the event quick links. Let the band grow with its text (on phones
 * the heading + links are taller than 25vw) and use a smaller pull-up that
 * leaves the links clear at each breakpoint. Selectors carry one extra
 * element so they beat the theme rules at the same class specificity.
 * ---------------------------------------------------------------------- */
section .event-slider-cont .event-slider-bg {
	height: auto;
	min-height: 25vw;
	padding-bottom: 8vw;      /* room the slider is allowed to pull into */
	box-sizing: border-box;
}
section .event-slider-cont .event-slider {
	/* The slide itself carries ~80px of internal top padding, so the pull-up
	   can exceed the band's bottom padding and still clear the links. */
	margin-top: -25vw;
}
@media (min-width: 700px) {
	section .event-slider-cont .event-slider-bg { padding-bottom: 10vw; }
	section .event-slider-cont .event-slider { margin-top: -16vw; }
}
@media (min-width: 992px) {
	section .event-slider-cont .event-slider-bg { padding-bottom: 0; }
	section .event-slider-cont .event-slider { margin-top: -18vw; }
}

/* The grey "Explore Event Details" section (#event-tabs) is pulled up 60px
   by the theme (.event-tabs-cont{margin-top:-60px}), which now swallows the
   slide's bottom padding so "Next up" touches the grey edge. Cancel it. */
section#event-tabs.event-tabs-cont {
	margin-top: 0;
}

/* Home highlights slider (slider 2): the section ends flush with the slider,
   so the CTA block below touches the last photo. Give it breathing room. */
.home-highlights .highlights-slider {
	padding-bottom: 50px;
}
@media (max-width: 700px) {
	.home-highlights .highlights-slider {
		padding-bottom: 35px;
	}
}
