/*
Theme Name: Newspack Nelson Child
Description: Child theme based on Newspack Nelson with custom header CTA
Author: Site Admin
Template: newspack-theme
Version: 1.0.2
Text Domain: newspack-nelson-child
*/

/* Header CTA Button */
.header-cta-demo {
	display: inline-flex;
	align-items: center;
	margin-left: auto;
	padding: 8px 20px;
	background-color: var(--newspack-theme-color-primary, #36f);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	white-space: nowrap;
}

.header-cta-demo:hover,
.header-cta-demo:focus {
	background-color: var(--newspack-theme-color-primary-variation, #2240d5);
	color: #fff;
	text-decoration: none;
}

.header-cta-demo.welcome-cta {
	background-color: transparent;
	color: var(--newspack-theme-color-primary, #36f);
	border: 1px solid var(--newspack-theme-color-primary, #36f);
}

.header-cta-demo.welcome-cta:hover,
.header-cta-demo.welcome-cta:focus {
	background-color: var(--newspack-theme-color-primary, #36f);
	color: #fff;
}

/* ============================================
   Homepage Hero Sales Banner
   ============================================ */

/* Collapse empty bottom header bar when no menu is assigned */
.h-dh .bottom-header-contain.desktop-only:not(:has(.main-menu)) {
	display: none !important;
}

/*
 * Newspack uses a header padding-bottom + content negative margin-top pattern
 * to make content overlap the header. When our banner sits between them,
 * it creates a gap above and overlap below. Neutralize both on the front page.
 */
.newspack-front-page:not(.h-stk) .site-header {
	padding-bottom: 0 !important;
}

body.newspack-front-page:not(.h-stk) .site-content {
	margin-top: 0 !important;
}

/* Hidden by default; JS adds .is-visible after cookie check to prevent flash */
.site-hero-banner {
	display: none;
	background: linear-gradient(135deg, var(--newspack-theme-color-primary, #36f) 0%, var(--newspack-theme-color-primary-variation, #2240d5) 100%);
	color: #fff;
	position: relative;
	z-index: 2;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

.site-hero-banner.is-visible {
	display: block;
}

.site-hero-banner.is-dismissing {
	display: block;
	max-height: 0;
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.site-hero-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 32px;
	text-align: center;
	position: relative;
}

.site-hero-banner__close {
	position: absolute;
	top: 8px;
	right: 8px;
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.5);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	padding: 0;
}

.site-hero-banner__close:hover,
.site-hero-banner__close:focus {
	background-color: rgba(255, 255, 255, 0.2);
	border-color: #fff;
	outline: none;
}

.site-hero-banner__heading {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 800;
	margin: 0 0 10px;
	color: #fff;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.site-hero-banner__text {
	font-size: clamp(1rem, 2vw, 1.25rem);
	max-width: 680px;
	margin: 0 auto 20px;
	line-height: 1.6;
	opacity: 0.92;
}

.site-hero-banner__cta {
	display: inline-block;
	padding: 10px 28px;
	background-color: #fff;
	color: var(--newspack-theme-color-primary, #36f);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	border-radius: 4px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-hero-banner__cta:hover,
.site-hero-banner__cta:focus {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	color: var(--newspack-theme-color-primary, #36f);
	text-decoration: none;
}

@media (max-width: 600px) {
	.site-hero-banner__inner {
		padding: 24px 16px;
	}
	.site-hero-banner__cta {
		display: block;
		text-align: center;
	}
}
