/* ==========================================================================
   Veterans promo banner (JT, 2026-11-02): the strip directly under the header on every page.
   Loaded only while the banner shows (inc/veterans-banner.php). Not sticky: it scrolls away with the
   page while the header stays pinned. Narrow screens: stacked, about 56px tall. Wide screens: one line.
   ========================================================================== */

/* Montserrat ExtraBold Italic, self-hosted like the main Montserrat file (latin subset, Google Fonts, OFL). */
@font-face {
	font-family: "Montserrat";
	src: url("../fonts/montserrat-latin-800-italic.woff2") format("woff2");
	font-weight: 800;
	font-style: italic;
	font-display: swap;
}

.vet-banner {
	--h: 56px;                         /* banner height */
	--art-w: 96px;                     /* soldier image width */
	--slant: calc(var(--h) * 0.64);    /* how far the slash leans across the banner (matches the mockup) */
	position: relative;
	display: block;
	color: var(--zen-white);
	text-decoration: none;
	background: linear-gradient(90deg, var(--zen-midnight) 0%, #0B3A86 38%, var(--zen-deep-blue) 62%, #082B66 100%);
	font-family: var(--font);
	font-weight: 800;
	font-style: italic;
	line-height: 1;
	clip-path: inset(0 0 -24px 0); /* the top line's glow must not tint the header's bottom border; the bottom glow may spill */
}
a.vet-banner:hover { color: var(--zen-white); }

/* Thin glowing blue lines top and bottom */
.vet-banner::before,
.vet-banner::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	z-index: 2;
	height: 2px;
	background: var(--zen-blue);
	box-shadow: 0 0 8px 1px rgba(30, 144, 255, 0.85);
}
.vet-banner::before { top: 0; }
.vet-banner::after { bottom: 0; }

.vet-banner__inner {
	position: relative;
	display: flex;
	align-items: center;
	height: var(--h);
	max-width: 1920px;
	margin-inline: auto;
	padding-right: 10px;
	overflow: hidden;
}

/* Soldier and flag, cut off along the slash */
.vet-banner__art {
	flex: none;
	align-self: stretch;
	width: var(--art-w);
	clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
.vet-banner__art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 62% 50%; /* keeps the saluting soldier in frame when the image is cropped narrower */
}

/* The electric-green slash along the image's cut edge. The glow sits on this wrapper because
   the clipped stripe inside it can't carry its own shadow. */
.vet-banner__slash {
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(var(--art-w) - var(--slant) - 3px);
	width: calc(var(--slant) + 8px);
	filter: drop-shadow(0 0 5px rgba(126, 211, 33, 0.8));
	pointer-events: none;
}
.vet-banner__slash::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--zen-green);
	clip-path: polygon(calc(100% - 6px) 0, 100% 0, 6px 100%, 0 100%);
}

/* The words and the arrow are one group, centered in the space right of the image (on phones it fills it) */
.vet-banner__text {
	flex: 0 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	margin-left: auto;
	padding-left: 6px;
	white-space: nowrap;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.vet-banner__label {
	font-size: 0.8rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--zen-cyan);
	text-shadow: 0 0 10px rgba(30, 144, 255, 0.9), 0 0 2px rgba(30, 144, 255, 0.6);
}
/* Main line: one line at every phone width, never cut off. It scales with the screen width and stops
   growing at 19px. Measured: the line is 16.5 times its font size wide; the image, padding and arrow
   take 140px, plus 10px spare for the italic overhang and the underline. 360px wide → about 12.7px. */
.vet-banner__line { font-size: min(19px, calc((100vw - 150px) / 16.5)); letter-spacing: -0.01em; }
.vet-banner__wide { display: none; }

/* Brushed electric-green underline under "Over Money" */
.vet-banner__ul { position: relative; display: inline-block; }
.vet-banner__ul::after {
	content: "";
	position: absolute;
	left: -2%;
	right: -4%;
	bottom: -0.3em;
	height: 0.28em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8.5C40 5.5 90 4 150 4.2c18 .1 34 .9 48 2.3-14 .6-30 1.3-47 1.7-24 .6-60 1.6-96 2.6-20 .5-38 .4-53-.3z' fill='%237ED321'/%3E%3Cpath d='M30 10.6c40-1.3 90-2.4 140-2.6' stroke='%237ED321' stroke-width='.8' fill='none' opacity='.6'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	filter: drop-shadow(0 0 3px rgba(126, 211, 33, 0.7));
}

.vet-banner__arrow {
	flex: none;
	width: 26px;
	height: 20px;
	margin: 0 auto 0 8px;
	color: var(--zen-green);
	filter: drop-shadow(0 0 4px rgba(126, 211, 33, 0.75));
	transition: transform 0.2s ease;
}
a.vet-banner:hover .vet-banner__arrow,
a.vet-banner:focus-visible .vet-banner__arrow { transform: translateX(4px); }
a.vet-banner:focus-visible { outline: 2px solid var(--zen-cyan); outline-offset: -4px; }

/* /veterans/: plain banner, no link or arrow; the words are centered on their own */
.vet-banner--plain .vet-banner__text { margin-right: auto; }

/* Wide screens: one line, "VETERANS: No Vet Gets Left Behind Over Money", like the desktop mockup */
@media (min-width: 900px) {
	.vet-banner { --h: 72px; --art-w: clamp(200px, 19vw, 300px); }
	.vet-banner__inner { padding-right: 0; }
	.vet-banner__text {
		flex-direction: row;
		align-items: baseline;
		gap: 0.55em;
		padding-inline: 12px;
		/* Measured: label + line are 25.7 times the font size wide; image, arrow and padding are under 150px. */
		font-size: min(2rem, calc((100vw - var(--art-w) - 150px) / 27));
	}
	.vet-banner__label,
	.vet-banner__line { font-size: 1em; }
	.vet-banner__label { letter-spacing: 0.01em; }
	.vet-banner__wide { display: inline; }
	.vet-banner__arrow { width: 40px; height: 30px; margin-left: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.vet-banner__arrow { transition: none; }
	a.vet-banner:hover .vet-banner__arrow { transform: none; }
}
