/* ==========================================================================
   KSWX Hero Section
   Install: driftor-pro-child/css/kswx-hero.css  (replace the existing file)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tunables - match these to the Driftor theme.
   Inspect .container in devtools and read its computed max-width and
   padding-left, then set these to the same values.
   -------------------------------------------------------------------------- */
:root {
	--kswx-container-width: 1170px; /* Driftor .container max-width */
	--kswx-container-gutter: 15px;  /* Driftor .container left/right padding */
	--kswx-hero-bg: none;           /* override per-instance from kswx-hero.php */
}

/* --------------------------------------------------------------------------
   Theme integration
   Section 1's container is shared by the hero and the About block.
   Strip the container's width cap + padding so the hero is edge-to-edge,
   then re-apply that framing to every NON-hero child so the About block
   looks exactly as it did before.
   -------------------------------------------------------------------------- */

/* Full-width the ancestors that hold the hero */
.container:has(> .section_animate > .kswx-hero) {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	overflow: visible !important;
}

.section_animate:has(> .kswx-hero) {
	padding-left: 0 !important;
	padding-right: 0 !important;
	overflow: visible !important;
}

section:has(> .container > .section_animate > .kswx-hero) {
	padding-top: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Re-frame the About block (any non-hero sibling) so it keeps the original
   centered, gutter-padded layout it had before the container was stripped */
.section_animate:has(> .kswx-hero) > :not(.kswx-hero, br, script, style) {
	box-sizing: border-box;
	max-width: var(--kswx-container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--kswx-container-gutter);
	padding-right: var(--kswx-container-gutter);
}

/* Hide the empty / broken Nivo slider above the hero (homepage only) */
.home .slider-main {
	display: none !important;
}

/* Remove the stray <br> the section editor leaves between the hero and About */
.kswx-hero + script + br,
.kswx-hero + br {
	display: none;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.kswx-hero {
	/* container is now full-width, so 100% == viewport. No vw, no overflow. */
	width: 100%;
	margin: 0;

	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	isolation: isolate;
	text-align: center;
	background-color: #1a2030;
	background-image: var(--kswx-hero-bg);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Gradient overlay -------------------------------------------------------- */
.kswx-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to bottom,
		rgba(20, 26, 42, 0.82) 0%,
		rgba(20, 26, 42, 0.60) 45%,
		rgba(20, 26, 42, 0.92) 100%
	);
}

/* Content ----------------------------------------------------------------- */
.kswx-hero__inner {
	position: relative;
	z-index: 3;
	max-width: 64rem;
	margin: 0 auto;
	padding: 6rem 1.5rem;
	animation: kswx-hero-in 0.9s ease-out both;
}

@keyframes kswx-hero-in {
	from { opacity: 0; transform: translateY(24px); }
	to   { opacity: 1; transform: none; }
}

.kswx-hero__eyebrow {
	display: inline-block;
	margin-bottom: 1.5rem;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: hsl(42, 80%, 62%);
}

.kswx-hero__title {
	margin: 0 0 1.5rem;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-weight: 800;
	line-height: 1.05;
	color: #fff;
	font-size: clamp(3rem, 8vw, 6.5rem);
}

.kswx-hero__title span {
	color: hsl(42, 80%, 55%);
}

.kswx-hero__text {
	max-width: 42rem;
	margin: 0 auto 2.5rem;
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	font-weight: 300;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.62);
}

/* Buttons ----------------------------------------------------------------- */
.kswx-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.kswx-btn {
	display: inline-block;
	padding: 0.9rem 2rem;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	border-radius: 0.5rem;
	border: 1px solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.kswx-btn--accent {
	background: hsl(42, 80%, 55%);
	color: #15192a;
}

.kswx-btn--accent:hover,
.kswx-btn--accent:focus {
	background: hsl(42, 80%, 49%);
	color: #15192a;
}

.kswx-btn--ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.kswx-btn--ghost:hover,
.kswx-btn--ghost:focus {
	border-color: hsl(42, 80%, 55%);
	color: hsl(42, 80%, 55%);
}

/* Decorative glyph -------------------------------------------------------- */
.kswx-hero__glyph {
	position: absolute;
	right: 16%;
	bottom: 25%;
	z-index: 2;
	opacity: 0.25;
	pointer-events: none;
}

/* Scroll chevron ---------------------------------------------------------- */
.kswx-hero__scroll {
	position: absolute;
	left: 50%;
	bottom: 2rem;
	z-index: 3;
	color: rgba(255, 255, 255, 0.4);
	transform: translateX(-50%);
	animation: kswx-bounce 2s ease-in-out infinite;
}

.kswx-hero__scroll:hover {
	color: hsl(42, 80%, 55%);
}

@keyframes kswx-bounce {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50%      { transform: translateX(-50%) translateY(8px); }
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
	.kswx-hero__glyph { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.kswx-hero__inner,
	.kswx-hero__scroll { animation: none; }
}
/* ==========================================================================
   Mobile responsiveness (added)
   ========================================================================== */

/* Tablet */
@media (max-width: 960px) {
	.kswx-hero__inner {
		padding: 5rem 1.25rem;
	}
	.kswx-hero__text {
		margin-bottom: 2rem;
	}
}

/* Phones */
@media (max-width: 640px) {
	.kswx-hero {
		min-height: 92vh;
		min-height: 92svh;
	}
	.kswx-hero__inner {
		padding: 4.5rem 1rem;
	}
	.kswx-hero__eyebrow {
		font-size: 0.72rem;
		letter-spacing: 0.25em;
		margin-bottom: 1rem;
	}
	.kswx-hero__title {
		font-size: clamp(2.25rem, 11vw, 3.5rem);
		margin-bottom: 1rem;
	}
	.kswx-hero__text {
		font-size: 0.95rem;
		line-height: 1.6;
		margin-bottom: 1.75rem;
	}
	.kswx-hero__actions {
		flex-direction: column;
		gap: 0.75rem;
		width: 100%;
		max-width: 320px;
		margin: 0 auto;
	}
	.kswx-btn {
		display: block;
		width: 100%;
		padding: 0.85rem 1.25rem;
		text-align: center;
	}
	.kswx-hero__scroll {
		bottom: 1.25rem;
	}
	.kswx-hero__scroll svg {
		width: 20px;
		height: 20px;
	}
}

/* Very small / short screens */
@media (max-width: 380px) {
	.kswx-hero__title {
		font-size: clamp(2rem, 12vw, 2.75rem);
	}
	.kswx-hero__inner {
		padding: 4rem 0.75rem;
	}
}

@media (max-height: 600px) and (orientation: landscape) {
	.kswx-hero {
		min-height: auto;
	}
	.kswx-hero__inner {
		padding: 5rem 1.25rem 4rem;
	}
}

/* Gap below hero before next section */
#home.kswx-hero {
	margin-bottom: 80px;
}

@media (max-width: 640px) {
	#home.kswx-hero {
		margin-bottom: 48px;
	}
}
