/**
 * VSTT Hero Slider Styles
 * * @package VSTT_Hero_Slider
 */

/* ------------------------------------------------------------------------- *
 * 1. Utilities & Accessibility
 * ------------------------------------------------------------------------- */

.u-screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* ------------------------------------------------------------------------- *
 * 2. Hero Wrapper & Backgrounds
 * ------------------------------------------------------------------------- */

.gkc-hero-slider-wrapper {
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	position: relative;
	background: #333;
	color: #fff;
	min-height: 100vh;
	box-sizing: border-box;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding: 2.5rem;
	background-size: cover;
	background-position: center;
	transition: background-image .4s ease-in-out;
	justify-content: flex-end;
}

.gkc-hero-slider-wrapper[data-bg-type=dynamic] {
	background-color: #111;
}

/* Static Background Layer (Image or Video) */
.gkc-hero-bg-static {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-size: cover;
	background-position: center;
}

.gkc-hero-bg-static video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Ensure content sits above the background */
.gkc-hero-content,
.gkc-hero-slider {
	position: relative;
	z-index: 2;
}

.gkc-hero-content {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

/* Tablet/Desktop Layout */
@media (min-width: 768px) {
	.gkc-hero-slider-wrapper {
		padding: 4rem;
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}

	.gkc-hero-content {
		justify-content: flex-end;
	}
}

/* ------------------------------------------------------------------------- *
 * 3. Typography & CTA
 * ------------------------------------------------------------------------- */

.gkc-hero-h2 {
  font-size: clamp(1.1rem, 3.2vw, 1.5rem);
  line-height: 1.3;
  font-weight: 500;

  margin: 0 0 1.2rem 0;
  max-width: 28ch;

  color: #fff;

  transition: opacity 0.3s ease-in-out;
}



/* Desktop Typography Overrides */
@media (min-width: 768px) {
	.gkc-hero-h2 {
		line-height: 0.95; /* Tighter spacing for large desktop text */
	}
}

.gkc-hero-h2.gkc-fading {
	opacity: 0;
}

/* CTA Button */
.c-button.c-hero-alpha_cta {
	background: #fff;
	color: #000;
	border: 0;
	padding: 0;
	cursor: pointer;
	border-radius: 4px;
	display: inline-block;
	align-self: flex-start;
	text-decoration: none;
}

.c-button_inner {
	display: block;
	padding: .75rem 1.5rem;
}

.c-button_label {
	font-size: 1rem;
	font-weight: 600;
}

/* ------------------------------------------------------------------------- *
 * 4. Slider Component
 * ------------------------------------------------------------------------- */

.gkc-hero-slider {
	background: #fff;
	color: #000;
	border-radius: 4px;
	width: 100%;
	margin-top: 1.5rem;
	display: flex;
	overflow: hidden;
	position: relative; /* For progress bar */
}

@media (min-width: 768px) {
	.gkc-hero-slider {
		width: auto;
		min-width: 400px;
		max-width: 450px;
		flex-shrink: 0;
		margin-top: 0;
	}
}

.gkc-slider-content-wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 1.5rem;
}

.gkc-slider-container {
	position: relative;
	overflow: hidden;
	min-height: 5.5em;
	flex: 1;
}

/* Slides */
.gkc-slide {
	display: none;
	opacity: 0;
	transition: opacity .3s ease, transform .3s ease;
	transform: translateX(10px);
	position: absolute;
	inset: 0;
}

.gkc-slide.is-active {
	display: block;
	opacity: 1;
	transform: translateX(0);
	position: relative;
}

.gkc-slide-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
	color: #000;
	line-height: 1.2;
}

/* Bottom Row (Read More & Pagination) */
.gkc-slider-bottom-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: 1rem;
}

.gkc-slide-readmore-link {
	color: #000;
	text-decoration: none;
	font-weight: 500;
	font-size: 1.125rem;
}

.gkc-slide-readmore {
	display: inline-block;
	padding-bottom: 2px;
	border-bottom: 2px solid #b99831;
}

.c-card-quicknews_url:hover .gkc-slide-readmore {
	color: #b99831;
}

.gkc-slider-pagination-wrapper {
	margin: 0;
	padding: 0;
}

.gkc-slider-pagination {
	font-size: .875rem;
	font-family: monospace;
	color: #aaa;
	font-weight: 600;
}

/* ------------------------------------------------------------------------- *
 * 5. Navigation Arrows
 * ------------------------------------------------------------------------- */

.gkc-slider-nav-arrows {
	display: flex;
	flex-direction: column;
	width: 64px;
	flex-shrink: 0;
	border-left: 1px solid #eee;
}

.gkc-slider-arrow {
	flex: 1;
	background: 0 0;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
	transition: background .2s;
}

.gkc-slider-arrow:hover {
	background: #f0f0f0;
}

.gkc-slider-arrow:disabled {
	opacity: .2;
	cursor: not-allowed;
}

.gkc-slider-arrow.gkc-next {
	border-bottom: 1px solid #eee;
}

.gkc-slider-arrow svg {
	width: 24px;
	height: 24px;
}

/* ------------------------------------------------------------------------- *
 * 6. Progress Bar (Autoplay)
 * ------------------------------------------------------------------------- */

.gkc-slider-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: rgba(0, 0, 0, 0.05);
	z-index: 5;
	pointer-events: none;
}

.gkc-slider-progress-bar {
	height: 100%;
	background-color: #b99831; /* Your blue brand color */
	width: 0%;
	transform-origin: left;
}

.gkc-slider-progress-bar.is-playing {
	/* Animation duration is set by JS inline style */
	animation-name: gkc-progress;
	animation-timing-function: linear;
	animation-fill-mode: forwards;
}

@keyframes gkc-progress {
	0% { width: 0%; }
	100% { width: 100%; }
}

/* ------------------------------------------------------------------------- *
 * 7. Anti-FOUC (Flash of Unstyled Content) Loader
 * ------------------------------------------------------------------------- */

/* While loading, force all non-active slides to be hidden immediately via CSS */
.gkc-hero-slider-wrapper.gkc-is-loading .gkc-slide:not(.is-active) {
    display: none !important;
}

/* Ensure the active slide takes up space relative to the flow initially */
.gkc-hero-slider-wrapper.gkc-is-loading .gkc-slide.is-active {
    display: block !important;
    opacity: 1 !important;
    position: relative !important; /* Keeps the container height correct */
    transform: none !important;
}

/* Optional: Fade the wrapper in gently once initialized */
.gkc-hero-slider-wrapper {
    opacity: 0; 
    animation: gkcFadeIn 0.5s forwards;
}

@keyframes gkcFadeIn {
    to { opacity: 1; }
}

/* Mobile Adjustments */
@media (max-width: 767px) {
	.gkc-hero-slider-wrapper {
		padding: 1.5rem;
	}

	.gkc-slider-content-wrapper {
		padding: 1rem;
	}

	.gkc-slide-title {
		font-size: 1.25rem;
		min-height: 0;
	}

	.gkc-slider-container {
		min-height: 4em;
	}

	.gkc-slider-nav-arrows {
		width: 50px;
	}

	.gkc-slider-arrow svg {
		width: 20px;
	}
}