/* ==========================================================================
   Helping Heroes – Surface Solutions
   Enqueue only on the "Helping Heroes" page template, e.g.:

   add_action( 'wp_enqueue_scripts', function () {
       if ( is_page_template( 'page-helping-heroes.php' ) ) {
           wp_enqueue_style( 'helping-heroes', get_theme_file_uri( 'helping-heroes.css' ), array(), '1.0' );
       }
   } );
   ========================================================================== */

.hh {
	--hh-orange: #e8610c;
	--hh-orange-dark: #d1540a;
	--hh-bg: #0a0a0a;
	--hh-panel: #111111;
	--hh-field: #0b0b0b;
	--hh-line: #4a3527;
	--hh-border: #6a6a6a;
	--hh-text: #e6e6e6;
	--hh-muted: #a8a8a8;
	--hh-white: #ffffff;

	background: var(--hh-bg);
	color: var(--hh-text);
	font-size: 15px;
	line-height: 1.5;
	overflow: hidden;
}

/* Resets use :where() so they have zero specificity and never beat component classes */
:where(.hh), :where(.hh *), :where(.hh *::before), :where(.hh *::after) { box-sizing: border-box; }

:where(.hh) img { display: block; max-width: 100%; height: auto; }
:where(.hh) ul,
:where(.hh) ol { list-style: none; margin: 0; padding: 0; }
:where(.hh) h1,
:where(.hh) h2,
:where(.hh) h3,
:where(.hh) p { margin: 0; }

.hh-container {
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: 32px;
}

/* ---------- Shared pieces ---------- */

.hh-heading {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
	color: var(--hh-orange);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .01em;
	line-height: 1.1;
	text-transform: uppercase;
}
.hh-heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--hh-orange);
	opacity: .85;
}
.hh-heading--card { font-size: 26px; }
.hh-heading--card::before {
	content: "";
	width: 10px;
	height: 2px;
	background: var(--hh-orange);
}

.hh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 14px 36px;
	background: var(--hh-orange-dark);
	color: var(--hh-white);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color .2s ease;
}
.hh-btn:hover,
.hh-btn:focus-visible { background: var(--hh-orange); color: var(--hh-white); }
.hh-btn:focus-visible,
.hh a:focus-visible { outline: 2px solid var(--hh-white); outline-offset: 3px; }

/* CSS chevron used on buttons */
.hh-btn--chevron::after,
.hh .gform_button::after {
	content: "";
	width: 10px;
	height: 10px;
	border-top: 3px solid currentColor;
	border-right: 3px solid currentColor;
	transform: rotate(45deg);
	margin-left: 2px;
}

/* Icon images have solid black backgrounds – "lighten" lets the panel colour show through */
.hh-icon img { mix-blend-mode: lighten; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hh-hero {
	position: relative;
	min-height: 400px;
	display: flex;
	align-items: center;
	padding-block: 48px;
	background: #000;
	border-bottom: 1px solid var(--hh-line);
	isolation: isolate;
}
/* Photo lives on the RIGHT side only and fades into black on its left edge */
.hh-hero__bg {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(60%, 780px);
	z-index: -3;
	background-size: cover;
	background-position: 50% 60%;
	background-repeat: no-repeat;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
	mask-image: linear-gradient(to right, transparent 0, #000 30%);
}
/* Flag sits behind the logo / text and fades out toward the photo */
.hh-hero__flag {
	position: absolute;
	inset: 0 38% 0 0;
	z-index: -2;
	opacity: .5;
	-webkit-mask-image: linear-gradient(to right, #000 35%, transparent);
	mask-image: linear-gradient(to right, #000 35%, transparent);
}
.hh-hero__flag img { width: 100%; height: 100%; object-fit: cover; }
/* Only a soft fade at the bottom – the man must stay fully visible */
.hh-hero__shade {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(0deg, rgba(10,10,10,.85) 0%, rgba(10,10,10,0) 30%);
}
.hh-hero__content { max-width: 500px; }
.hh-hero__logo { margin-bottom: 18px; line-height: 0; }
.hh-hero__logo img { width: 100%; max-width: 490px; }
.hh-hero__intro {
	max-width: 400px;
	margin-bottom: 22px;
	color: var(--hh-white);
	font-size: 18px;
	line-height: 1.4;
}

/* ==========================================================================
   Main layout
   ========================================================================== */

.hh-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
	gap: 36px;
	align-items: start;
	padding-block: 28px 48px;
}

.hh-section + .hh-section { margin-top: 30px; }

.hh-prose p { margin-bottom: 12px; font-size: 14px; line-height: 1.45; }
.hh-prose p:last-child { margin-bottom: 0; }

/* Mission */
.hh-mission {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 18px;
}
.hh-mission__icon { width: 52px; flex: none; }
.hh-mission__title {
	color: var(--hh-orange);
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
}
.hh-mission__text { color: var(--hh-white); font-size: 16px; line-height: 1.35; }

/* Who qualifies */
.hh-cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}
.hh-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	padding: 14px 6px 12px;
	background: linear-gradient(180deg, #151515, #0c0c0c);
	border: 1px solid var(--hh-line);
	border-radius: 4px;
	text-align: center;
}
.hh-card .hh-icon img { width: 52px; height: 52px; object-fit: contain; }
.hh-card__label {
	color: #ead2b5;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	text-transform: uppercase;
}

/* Process */
.hh-steps { display: grid; gap: 12px; }
.hh-step { display: flex; align-items: flex-start; gap: 14px; }
.hh-step .hh-icon { flex: none; width: 52px; }
.hh-step .hh-icon img { width: 52px; height: 52px; object-fit: contain; }
.hh-step__title {
	color: var(--hh-white);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}
.hh-step__text { margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--hh-text); }

.hh-note {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
	padding: 10px 12px;
	border: 1px solid var(--hh-orange);
	border-radius: 3px;
	background: rgba(232, 97, 12, .05);
	font-size: 13px;
	line-height: 1.35;
}
.hh-note__star { color: var(--hh-orange); font-size: 18px; }
.hh-note strong { display: block; color: var(--hh-white); }

/* ==========================================================================
   Application card
   ========================================================================== */

.hh-apply {
	padding: 24px 24px 28px;
	background: var(--hh-panel);
	border: 1px solid #2c2c2c;
	border-radius: 4px;
}
.hh-apply__intro { margin: -4px 0 18px; color: var(--hh-white); font-size: 14px; }

/* ---------- Gravity Forms ---------- */

.hh .gform_wrapper { margin: 0; }
.hh .gform_wrapper.gform-theme {
	--gf-color-primary: var(--hh-orange);
	--gf-color-primary-darker: var(--hh-orange-dark);
	--gf-ctrl-bg-color: var(--hh-field);
	--gf-ctrl-border-color: var(--hh-border);
	--gf-ctrl-color: var(--hh-white);
	--gf-ctrl-radius: 2px;
	--gf-ctrl-label-color-primary: var(--hh-white);
	--gf-ctrl-label-color-secondary: var(--hh-muted);
	--gf-ctrl-desc-color: var(--hh-muted);
}

.hh .gform_wrapper .gform_fields { row-gap: 16px; }

.hh .gform_wrapper .gfield_label,
.hh .gform_wrapper legend.gfield_label {
	margin-bottom: 6px;
	color: var(--hh-white);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
}
.hh .gform_wrapper .gfield_required,
.hh .gform_wrapper .gfield_required_asterisk { color: var(--hh-orange); }

.hh .gform_wrapper .gfield_description {
	padding: 0 0 8px;
	color: var(--hh-text);
	font-size: 11.5px;
	line-height: 1.35;
}

.hh .gform_wrapper input[type="text"],
.hh .gform_wrapper input[type="tel"],
.hh .gform_wrapper input[type="email"],
.hh .gform_wrapper input[type="number"],
.hh .gform_wrapper select,
.hh .gform_wrapper textarea {
	width: 100%;
	min-height: 40px;
	padding: 9px 12px;
	background-color: var(--hh-field);
	border: 1px solid var(--hh-border);
	border-radius: 2px;
	box-shadow: none;
	color: var(--hh-white);
	font-size: 14px;
}
.hh .gform_wrapper textarea { min-height: 78px; }
.hh .gform_wrapper ::placeholder { color: #777; opacity: 1; }
.hh .gform_wrapper select { color: #9a9a9a; }
.hh .gform_wrapper select:valid,
.hh .gform_wrapper select option { color: var(--hh-white); }
.hh .gform_wrapper select option { background: #111; }

.hh .gform_wrapper input:focus,
.hh .gform_wrapper select:focus,
.hh .gform_wrapper textarea:focus {
	border-color: var(--hh-orange);
	outline: 2px solid rgba(232, 97, 12, .35);
	outline-offset: 0;
}

/* Checkbox group – two columns, filled top-to-bottom (class "hh-checks" is set on the field) */
.hh .hh-checks .gfield_checkbox {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(3, auto);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 20px;
}
.hh .hh-checks .gchoice {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}
.hh .hh-checks input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	background: var(--hh-field);
	border: 1px solid #b5b5b5;
	border-radius: 2px;
	cursor: pointer;
}
.hh .hh-checks input[type="checkbox"]:checked {
	background: var(--hh-orange);
	border-color: var(--hh-orange);
	box-shadow: inset 0 0 0 3px var(--hh-field);
}
.hh .hh-checks label {
	margin: 0;
	color: var(--hh-white);
	font-size: 13px;
	cursor: pointer;
}

/* File upload – dashed drop area */
.hh .gform_wrapper .gform_drop_area {
	position: relative;
	display: grid;
	grid-template-columns: auto auto;
	justify-content: center;
	align-items: center;
	column-gap: 18px;
	min-height: 80px;
	padding: 16px;
	background: var(--hh-field);
	border: 1px dashed #666;
	border-radius: 3px;
	text-align: left;
}
.hh .gform_wrapper .gform_drop_area::before {
	content: "";
	grid-column: 1;
	grid-row: 1 / span 2;
	width: 54px;
	height: 40px;
	background: var(--hh-upload-icon, none) center / contain no-repeat;
}
.hh .gform_wrapper .gform_drop_instructions {
	grid-column: 2;
	grid-row: 1;
	font-size: 0;           /* hide default "Drop files here or" text */
}
.hh .gform_wrapper .gform_drop_instructions::after {
	content: "Click to upload or drag and drop";
	color: var(--hh-white);
	font-size: 16px;
}
.hh .gform_wrapper .gform_drop_area::after {
	content: "JPG, PNG or HEIC (Max. 10MB each)";
	grid-column: 2;
	grid-row: 2;
	color: var(--hh-muted);
	font-size: 12px;
}
/* The "Select files" button covers the whole area so a click anywhere opens the picker */
.hh .gform_wrapper .gform_drop_area .button,
.hh .gform_wrapper .gform_button_select_files {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
}
.hh .gform_wrapper .gform_fileupload_rules { display: none; }
.hh .gform_wrapper .ginput_preview_list { margin-top: 10px; }
.hh .gform_wrapper .ginput_preview { color: var(--hh-text); font-size: 13px; }

/* Submit */
.hh .gform_wrapper .gform_footer,
.hh .gform_wrapper .gform_page_footer { margin: 22px 0 0; padding: 0; }
.hh .gform_wrapper .gform_button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	min-height: 0;
	padding: 18px 24px;
	background: var(--hh-orange-dark);
	border: 0;
	border-radius: 2px;
	color: var(--hh-white);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .2s ease;
}
.hh .gform_wrapper .gform_button:hover,
.hh .gform_wrapper .gform_button:focus-visible { background: var(--hh-orange); }

/* Validation + confirmation */
.hh .gform_wrapper .gform_validation_errors,
.hh .gform_wrapper .gfield_validation_message,
.hh .gform_wrapper .validation_message {
	background: transparent;
	border-color: #ff6b6b;
	color: #ff8a8a;
	font-size: 12.5px;
}
.hh .gform_wrapper .gfield_error input,
.hh .gform_wrapper .gfield_error select,
.hh .gform_wrapper .gfield_error textarea { border-color: #ff6b6b; }
.hh .gform_confirmation_message {
	padding: 24px 0;
	color: var(--hh-white);
	font-size: 17px;
	line-height: 1.5;
}

/* ==========================================================================
   Footer band
   ========================================================================== */

.hh-band {
	position: relative;
	background: #080808;
	border-top: 1px solid var(--hh-line);
	overflow: hidden;
}
.hh-band__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: center;
	padding-block: 22px;
}
.hh-band__brand,
.hh-band__program { padding-inline: 28px; }
.hh-band__brand { padding-left: 0; }
.hh-band__program { border-left: 1px solid #2c2c2c; border-right: 1px solid #2c2c2c; }
.hh-band__brand img,
.hh-band__program img { max-width: 260px; margin-inline: auto; }
.hh-band__contact { padding-left: 28px; }
.hh-band__title {
	margin-bottom: 8px;
	color: var(--hh-orange);
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
}
.hh-contact { display: grid; gap: 8px; }
.hh-contact a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--hh-white);
	font-size: 16px;
	text-decoration: none;
}
.hh-contact a:hover { color: var(--hh-orange); }
.hh-contact__icon { flex: none; width: 20px; }
.hh-contact__icon img { width: 20px; height: 20px; object-fit: contain; }

.hh-band__flag {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 32%;
	z-index: 0;
	opacity: .85;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
	mask-image: linear-gradient(to right, transparent, #000 45%);
}
.hh-band__flag img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }

/* Tagline strip */
.hh-strip {
	position: relative;
	background: #161616;
	border-top: 1px solid var(--hh-line);
	padding: 12px 20px;
	text-align: center;
	overflow: hidden;
}
.hh-strip::before,
.hh-strip::after {
	content: "\2605  \2605  \2605  \2605  \2605";
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #4d4d4d;
	font-size: 22px;
	letter-spacing: .6em;
	white-space: nowrap;
}
.hh-strip::before { left: 24px; }
.hh-strip::after { right: 24px; }
.hh-strip__list {
	position: relative;
	z-index: 1;
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 14px;
	color: var(--hh-orange);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.hh-strip__list li + li::before {
	content: "\2605";
	margin-right: 14px;
	color: var(--hh-orange);
	font-size: 18px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.hh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hh-strip__list { font-size: 18px; }
	.hh-strip::before,
	.hh-strip::after { display: none; }
}

@media (max-width: 900px) {
	.hh-main { grid-template-columns: 1fr; }
	.hh-hero { min-height: 0; padding-block: 36px 40px; }
	.hh-hero__bg {
		width: 100%;
		opacity: .55;
		background-position: 75% center;
		-webkit-mask-image: none;
		mask-image: none;
	}
	.hh-hero__shade {
		background: linear-gradient(0deg, rgba(0,0,0,.92) 10%, rgba(0,0,0,.5) 100%);
	}
	.hh-hero__flag { inset: 0; opacity: .3; }
	.hh-band__inner { grid-template-columns: 1fr; gap: 20px; text-align: center; }
	.hh-band__brand,
	.hh-band__program,
	.hh-band__contact { padding: 0; border: 0; }
	.hh-contact { justify-content: center; }
	.hh-band__flag { width: 100%; opacity: .25; -webkit-mask-image: none; mask-image: none; }
}

@media (max-width: 560px) {
	.hh-container { padding-inline: 18px; }
	.hh-apply { padding: 18px 16px 22px; }
	.hh-heading { font-size: 19px; }
	.hh-heading--card { font-size: 22px; }
	.hh-hero__intro { font-size: 16px; }
	.hh-btn { width: 100%; font-size: 18px; padding-inline: 20px; }
	.hh .hh-checks .gfield_checkbox { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: 1fr; }
	.hh .gform_wrapper .gform_button { font-size: 18px; }
	.hh-strip__list { flex-direction: column; gap: 6px; font-size: 16px; }
	.hh-strip__list li + li::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hh * { transition: none !important; }
}

/* ==========================================================================
   Theme overrides – beats the site-wide Gravity Forms rule
   (.gform_wrapper.gravity-theme .gform_fields input … { padding:15px !important; radius:24px; bg:#F1F1F1 })
   Keep this block LAST in the file.
   ========================================================================== */

/* Text inputs, selects, textarea */
.hh .gform_wrapper.gravity-theme .gform_fields .gfield input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.hh .gform_wrapper.gravity-theme .gform_fields .gfield select,
.hh .gform_wrapper.gravity-theme .gform_fields .gfield textarea {
	background-color: var(--hh-field) !important;
	border: 1px solid var(--hh-border) !important;
	border-radius: 2px !important;
	padding: 9px 12px !important;
	min-height: 40px;
	height: auto;
	color: var(--hh-white) !important;
	font-size: 14px !important;
	line-height: 1.3;
	vertical-align: middle;
}
.hh .gform_wrapper.gravity-theme .gform_fields .gfield textarea {
	min-height: 78px;
	padding: 10px 12px !important;
}
.hh .gform_wrapper.gravity-theme .gform_fields .gfield select {
	color: #9a9a9a !important;           /* placeholder state */
	padding-right: 32px !important;
}
.hh .gform_wrapper.gravity-theme .gform_fields .gfield select:valid { color: var(--hh-white) !important; }
.hh .gform_wrapper.gravity-theme .gform_fields .gfield select option { background: #111; color: var(--hh-white); }
.hh .gform_wrapper.gravity-theme .gform_fields .gfield ::placeholder { color: #777 !important; opacity: 1; }

.hh .gform_wrapper.gravity-theme .gform_fields .gfield input:focus:not([type="checkbox"]):not([type="radio"]),
.hh .gform_wrapper.gravity-theme .gform_fields .gfield select:focus,
.hh .gform_wrapper.gravity-theme .gform_fields .gfield textarea:focus {
	border-color: var(--hh-orange) !important;
	outline: 2px solid rgba(232, 97, 12, .35);
	outline-offset: 0;
}

/* Checkboxes – undo the big padded pill */
.hh .gform_wrapper.gravity-theme .gform_fields .hh-checks input[type="checkbox"] {
	width: 16px !important;
	height: 16px !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background-color: var(--hh-field) !important;
	border: 1px solid #b5b5b5 !important;
	border-radius: 2px !important;
	flex: none;
}
.hh .gform_wrapper.gravity-theme .gform_fields .hh-checks input[type="checkbox"]:checked {
	background-color: var(--hh-orange) !important;
	border-color: var(--hh-orange) !important;
	box-shadow: inset 0 0 0 3px var(--hh-field);
}
.hh .gform_wrapper.gravity-theme .gform_fields .hh-checks .gchoice label {
	margin: 0;
	max-width: none;
	color: var(--hh-white);
	font-size: 13px !important;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.3;
	text-transform: none;
}

/* Labels + descriptions – same size across every field */
.hh .gform_wrapper.gravity-theme .gform_fields .gfield .gfield_label,
.hh .gform_wrapper.gravity-theme .gform_fields .gfield legend.gfield_label {
	margin: 0 0 6px;
	color: var(--hh-white);
	font-size: 12px !important;
	font-weight: 600;
	letter-spacing: .03em;
	line-height: 1.3;
	text-transform: uppercase;
}
.hh .gform_wrapper.gravity-theme .gform_fields .gfield .gfield_description {
	padding: 0 0 8px;
	font-size: 11.5px !important;
	line-height: 1.35;
}
.hh .gform_wrapper.gravity-theme .gform_fields .gfield .gfield_required { color: var(--hh-orange); }

/* Tighter vertical rhythm */
.hh .gform_wrapper.gravity-theme .gform_fields { row-gap: 16px; }
.hh .gform_wrapper.gravity-theme .gfield { margin: 0; padding: 0; }

/* Submit button */
.hh .gform_wrapper.gravity-theme .gform_footer button.gform_button,
.hh .gform_wrapper.gravity-theme .gform_footer .gform_button {
	width: 100%;
	padding: 18px 24px !important;
	border-radius: 2px !important;
	background: var(--hh-orange-dark) !important;
	border: 0 !important;
	color: var(--hh-white) !important;
	font-size: 22px !important;
}
.hh .gform_wrapper.gravity-theme .gform_footer .gform_button:hover { background: var(--hh-orange) !important; }