/* ==========================================================================
   Building Invisible Heroes - additions to theme.json.
   Client style rules: white / #F5F7FA sections only, navy headlines & buttons,
   gold #C9A24A only for small lines, icons and button hover. No shadows, no gradients.
   ========================================================================== */

:root { --bih-radius: 12px; }

html { scroll-padding-top: 130px; }

/* Root-level blocks and full-width page sections sit flush. */
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull + .alignfull,
.wp-block-post-content > .wp-block-block,
.wp-block-post-content > .wp-block-block + .alignfull { margin-block-start: 0; }
/* Ad-hoc pages made of plain blocks still get breathing room. */
.wp-block-post-content > :first-child:not(.alignfull):not(.wp-block-block) { margin-block-start: var(--wp--preset--spacing--70); }
.wp-block-post-content > :last-child:not(.alignfull):not(.wp-block-block) { margin-block-end: var(--wp--preset--spacing--70); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

h2.wp-block-heading, h3.wp-block-heading { text-wrap: balance; }

/* Keep running text to roughly 65 characters per line inside multi-column sections too. */
.wp-block-column > p,
.wp-block-column > ul,
.wp-block-column > ol { max-width: 34rem; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.bih-topbar { border-bottom: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); }
.bih-topbar p { margin: 0; }
.bih-topbar a { color: var(--wp--preset--color--navy); text-decoration: none; }
.bih-topbar a:hover { text-decoration: underline; }

.bih-lang-switch { font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; }
.bih-lang-switch span { border: 1px solid var(--wp--preset--color--navy); border-radius: 4px; padding: 0 0.3rem; font-size: 0.75rem; line-height: 1.4; }
.bih-topbar .wp-block-shortcode, .bih-topbar .bih-lang-switch { margin: 0; }

/* Landing pages: one bar with the logo, languages, phone and language switch; no menu. */
.bih-landing-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.bih-landing-header .wp-block-site-logo img { width: clamp(140px, 40vw, 180px); height: auto; }
.bih-landing-contact { color: var(--wp--preset--color--muted); }
.bih-landing-contact p, .bih-landing-contact .wp-block-shortcode, .bih-landing-contact .bih-lang-switch { margin: 0; }
.bih-landing-contact a { color: var(--wp--preset--color--navy); font-weight: 600; text-decoration: none; }
.bih-landing-contact a:hover { text-decoration: underline; }
.bih-footer-landing .bih-footer-bottom { border-top: 0; }
@media (max-width: 600px) {
	/* Phones: languages, phone number and switch fit on one line under the logo. */
	.bih-landing-contact.has-small-font-size { gap: 0.75rem !important; font-size: 0.8125rem !important; }
}
/* Headings wrap into even lines instead of leaving one word alone on the last line. */
.wp-block-heading { text-wrap: balance; }
/* Keeps a centered line in a wide section to about 65 characters. */
.bih-measure { max-width: 36rem; margin-inline: auto !important; }

/* The sticky header is solid: no gap between the top bar and the main bar for content to show through. */
.bih-header { background: var(--wp--preset--color--white); }
.bih-header > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.bih-mainbar { border-bottom: 1px solid var(--wp--preset--color--line); }
.bih-mainbar .wp-block-site-logo img { width: clamp(150px, 16vw, 200px); height: auto; }

@media (min-width: 782px) {
	header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
	.admin-bar header.wp-block-template-part { top: 32px; }
}

.bih-mainbar .wp-block-navigation .current-menu-item > a,
.bih-mainbar .wp-block-navigation .current-menu-ancestor > a { text-decoration: underline; text-decoration-color: var(--wp--preset--color--gold); text-decoration-thickness: 2px; text-underline-offset: 0.5em; }
.bih-mainbar .wp-block-navigation .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 8px;
	padding: 0.5rem 0;
	min-width: 220px !important;
}
.bih-mainbar .wp-block-navigation .wp-block-navigation__submenu-container a { padding: 0.55rem 1.1rem; }

/* Mobile-only CTA inside the menu overlay */
.bih-mainbar .wp-block-navigation .bih-nav-cta { display: none; }
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .bih-nav-cta { display: block; margin-top: 1rem; }
.bih-mainbar .is-menu-open .bih-nav-cta > a {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white) !important;
	padding: 0.85rem 1.4rem !important;
	border-radius: 8px;
}

/* Menu overlay (phones/tablets): left-aligned list, submenu as an indented group */
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem clamp(1.25rem, 6vw, 3rem) 2.5rem; }
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: flex-start !important;
	text-align: left;
}
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1.1rem; padding-top: 2.5rem; }
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.125rem; }
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important;
	border-left: 2px solid var(--wp--preset--color--gold) !important;
	border-radius: 0;
	min-width: 0 !important;
	padding: 0.25rem 0 0.25rem 1rem !important;
	margin-top: 0.6rem;
	gap: 0.8rem;
}
.bih-mainbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { padding: 0 !important; font-size: 1rem; font-weight: 500; }

.bih-header-cta .wp-block-button__link { font-size: 0.9375rem; padding: 0.65em 1.2em; white-space: nowrap; }
@media (max-width: 599px) {
	.bih-header-cta { display: none !important; }
	.bih-topbar-contact { display: none; }
}

/* Hamburger up to 1023px so the menu never wraps. */
@media (min-width: 600px) and (max-width: 1023px) {
	.bih-mainbar .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.bih-mainbar .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* --------------------------------------------------------------------------
   Page title banner (light section, small gold line under the title)
   -------------------------------------------------------------------------- */
.bih-page-banner { border-bottom: 1px solid var(--wp--preset--color--line); }
.bih-page-banner .wp-block-post-title { margin: 0; text-wrap: balance; }
.bih-page-banner .wp-block-post-title::after {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	margin: 1rem auto 0;
	background: var(--wp--preset--color--gold);
	border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Text styles
   -------------------------------------------------------------------------- */
.is-style-eyebrow {
	font-size: 0.8125rem !important;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-bottom: -0.5rem;
}
.is-style-eyebrow::before {
	content: "";
	display: inline-block;
	width: 24px;
	height: 2px;
	margin-right: 0.6rem;
	vertical-align: middle;
	background: var(--wp--preset--color--gold);
}
.has-text-align-center.is-style-eyebrow::after {
	content: "";
	display: inline-block;
	width: 24px;
	height: 2px;
	margin-left: 0.6rem;
	vertical-align: middle;
	background: var(--wp--preset--color--gold);
}

.is-style-lead { font-size: var(--wp--preset--font-size--medium) !important; line-height: 1.6; color: var(--wp--preset--color--muted); }

.is-style-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.05rem !important;
	line-height: 1;
}

ul.is-style-checklist { list-style: none; padding-left: 0; }
ul.is-style-checklist > li { position: relative; padding-left: 1.9rem; margin-bottom: 0.55rem; }
ul.is-style-checklist > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.25em;
	width: 1.15rem;
	height: 1.15rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3.5 10.5l4.2 4.2L16.5 5.8' fill='none' stroke='%23C9A24A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Legal-page blanks the client still has to fill in */
mark.bih-pending { background: transparent; color: var(--wp--preset--color--navy); font-weight: 600; border-bottom: 2px dashed var(--wp--preset--color--gold); }

/* --------------------------------------------------------------------------
   Cards, icons, images
   -------------------------------------------------------------------------- */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--bih-radius);
}
.wp-block-group.is-style-card h2,
.wp-block-group.is-style-card h3 { color: var(--wp--preset--color--navy); }
.bih-tile { border-top: 3px solid var(--wp--preset--color--gold) !important; }
.bih-card-link { margin-top: auto !important; }
.bih-card-link a { font-weight: 600; text-decoration: none; }
.bih-card-link a::after { content: " \2192"; }
.bih-card-link a:hover { text-decoration: underline; }
.bih-service-card { display: flex; flex-direction: column; height: 100%; }
.bih-book-card { display: flex; flex-direction: column; height: 100%; }
.bih-book-card h3 { font-size: var(--wp--preset--font-size--medium); line-height: 1.35; }
.bih-book-card > .wp-block-buttons { margin-top: auto !important; padding-top: 0.5rem; }
.bih-book-cover { margin-bottom: 0.5rem; }
.bih-book-cover img { border: 1px solid var(--wp--preset--color--line); border-radius: 4px; height: auto; }

.wp-block-image.bih-icon { margin-bottom: 0.25rem; }
.wp-block-image.bih-icon img { border-radius: 0; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); background: transparent; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--gold); border-color: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy); }

/* --------------------------------------------------------------------------
   Calculator
   -------------------------------------------------------------------------- */
/* The calculator's own layout is 720px wide; fit the frame to it. */
.bih-calculator-frame { display: block; width: 100%; max-width: 760px; margin-inline: auto; border: 0; border-radius: var(--bih-radius); background: var(--wp--preset--color--white); }
.bih-calculator-placeholder {
	border: 2px dashed var(--wp--preset--color--line);
	border-radius: var(--bih-radius);
	background: var(--wp--preset--color--white);
	padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
	text-align: center;
	color: var(--wp--preset--color--muted);
}
.bih-calculator-placeholder p { margin: 0.25rem 0; }
.bih-calculator-placeholder__title { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.25rem; color: var(--wp--preset--color--navy); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.bih-footer { border-top: 1px solid var(--wp--preset--color--line); }
.bih-footer a { color: var(--wp--preset--color--navy); text-decoration: none; }
.bih-footer a:hover { text-decoration: underline; }
.bih-footer .bih-footer-heading { font-family: var(--wp--preset--font-family--body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin-bottom: 0.25rem; }
.bih-footer .bih-footer-links p { margin: 0.35rem 0; }
.bih-footer .bih-footer-bottom { border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); }
.bih-footer .wp-block-image img { border-radius: 0; }

/* --------------------------------------------------------------------------
   Forms (Contact Form 7)
   -------------------------------------------------------------------------- */
.bih-form-card { padding: clamp(1.5rem, 3vw, 2.5rem) !important; }
.bih-form-card h3 { margin-top: 0; }
.wpcf7 form p { margin: 0 0 1rem; }
.wpcf7 label { display: block; font-weight: 600; font-size: 0.875rem; color: var(--wp--preset--color--navy); }
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: 0.35rem; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 8px;
	padding: 0.75rem 0.9rem;
}
.wpcf7 select { appearance: auto; }
.wpcf7 textarea { height: 8rem; min-height: 5rem; resize: vertical; }
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus { border-color: var(--wp--preset--color--navy); outline: 2px solid var(--wp--preset--color--gold); outline-offset: 1px; }
.wpcf7 input[type="submit"] {
	width: 100%;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 1rem;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--navy);
	border: 2px solid var(--wp--preset--color--navy);
	border-radius: 8px;
	padding: 0.95rem 1.5rem;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--gold); border-color: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy); }
.wpcf7 .wpcf7-spinner { display: block; margin: 0.75rem auto 0; }
.wpcf7 .wpcf7-not-valid-tip { color: #B42318; font-size: 0.875rem; margin-top: 0.3rem; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: 0.85rem 1rem; border-radius: 8px; font-size: 0.95rem; }
.bih-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
/* Checkbox groups (job application): a titled box with the options in tidy columns. */
.wpcf7 fieldset.bih-choices { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.wpcf7 fieldset.bih-choices legend { font-weight: 600; font-size: 0.875rem; color: var(--wp--preset--color--navy); padding: 0; margin-bottom: 0.4rem; }
.wpcf7 .bih-choices .wpcf7-checkbox { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.35rem 1rem; }
.wpcf7 .bih-choices .wpcf7-list-item { margin: 0; }
.wpcf7 .bih-choices .wpcf7-list-item label,
.wpcf7 .bih-consent label { display: flex; align-items: flex-start; gap: 0.5rem; font-weight: 400; font-size: 0.9375rem; color: var(--wp--preset--color--ink); cursor: pointer; }
.wpcf7 .bih-choices input[type="checkbox"],
.wpcf7 .bih-consent input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--wp--preset--color--navy); }
.wpcf7 .bih-consent .wpcf7-list-item { margin: 0; }
.wpcf7 .bih-consent a { color: var(--wp--preset--color--navy); }
/* Vertical YouTube Shorts: phone-width, centered (a full-width 9:16 video would be huge on a computer). */
.wp-block-embed.bih-video-short { max-width: 340px; margin-inline: auto !important; }
.wp-block-embed.bih-video-short iframe { border-radius: 12px; }
/* Testimonial videos (vertical): side by side at phone width, centered; they stack on phones. */
.bih-testimonials { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-top: var(--wp--preset--spacing--40) !important; }
.bih-testimonials > .wp-block-video { flex: 0 1 300px; margin: 0 !important; }
.bih-testimonials video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: var(--wp--preset--color--ink); }
/* Spam trap: kept out of sight and out of the way. */
.wpcf7 .bih-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 599px) { .bih-form-row { grid-template-columns: 1fr; } }

.bih-form-fallback { border: 1px dashed var(--wp--preset--color--muted); border-radius: 8px; padding: 1.25rem; background: var(--wp--preset--color--soft); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
