/*
 * GlassWest pilot - page-scoped styling (loads ONLY on /glasswest-pilot/).
 *
 * Non-destructive: enqueued by a guarded is_page('glasswest-pilot') hook, so
 * nothing here affects the site home or any approved reference page. Revertable
 * on its own, like the Fluent mapping layer. Cache-busted by filemtime().
 *
 * Almost all visual design is native Divi 5 (Design Variables + presets +
 * aspect ratio + flexbox) in the page blocks. This file only does what a block
 * cannot, plus the polish hooks from Tony's revision 1: borderless
 * white-on-amber / white-on-blue CTAs, equal-width trust metrics, borderless
 * equal-height service tiles with explicit row rhythm, navy audience heading with breathing room,
 * baseline-aligned audience CTAs, a clean cohesive review block (no fabricated
 * data), a compact estimate form with inline radios, and footer spacing.
 */

/* 1. GlassWest palette re-point (locked to Glass-West-logo-new-V2.png #0D32B4).
 *    Loads only on this page, so it overrides the BYS green tokens here alone. */
body {
	--client-primary:   #0D32B4; /* logo royal blue */
	--client-secondary: #0A1A4A; /* dark navy */
	--client-accent:    #F2A93B; /* amber CTA accent */
	--client-text:      #1A2233;
	--client-muted:     #5B6472;
	--client-bg:        #ffffff;
	--client-error:     #b3261e;
}

/* 2. Isolate the pilot: hide the global sandbox chrome on this page only. */
#main-header,
#top-header,
.et-l--footer {
	display: none !important;
}

/* 3. Sticky in-page GlassWest header. */
.gw-header.et_pb_section {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 1px 0 rgba(10, 26, 74, 0.10);
}

/* 4. CTAs (revision 1): every CTA is borderless with a consistent solid fill and
 *    a white label - no border, and never a dark/black label on amber. The hook
 *    class lands on the button module; cover both the wrapper and the anchor. */
.gw-cta .et_pb_button,
.gw-cta.et_pb_button,
a.et_pb_button.gw-cta {
	border: 0 !important;
	border-width: 0 !important;
	box-shadow: none !important;
	color: #ffffff !important;
	transition: background-color .15s ease;
}
.gw-cta--accent .et_pb_button,
.gw-cta--accent.et_pb_button,
body.page-id-102 a.et_pb_button.gw-cta.gw-cta--accent {
	background-color: var(--gcid-gw-accent, #F2A93B) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}
.gw-cta--accent .et_pb_button:hover,
.gw-cta--accent.et_pb_button:hover {
	background-color: #d98f22 !important; /* amber darkened; label stays white */
	color: #ffffff !important;
}
.gw-cta--primary .et_pb_button,
.gw-cta--primary.et_pb_button {
	background-color: var(--gcid-gw-primary, #0D32B4) !important;
	color: #ffffff !important;
}
.gw-cta--primary .et_pb_button:hover,
.gw-cta--primary.et_pb_button:hover {
	background-color: var(--gcid-gw-dark, #0A1A4A) !important;
	color: #ffffff !important;
}

/* 5. Trust strip: intro sentence and metrics are separate, balanced parts.
 *    Metrics are equal-width flex cells that wrap cleanly, so desktop and mobile
 *    share one layout instead of a 5-column row that squishes on small screens. */
.gw-trust-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	width: 100%;
}
.gw-trust-metrics .gw-metric {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .2rem;
	text-align: center;
	color: #ffffff;
	line-height: 1.25;
	padding: .55rem clamp(.65rem, 2vw, 1.6rem);
	border-left: 1px solid rgba(255,255,255,.28);
}
.gw-trust-metrics .gw-metric:first-child { border-left: 0; }
.gw-trust-metrics .gw-metric strong { font-size: clamp(1rem, 1.6vw, 1.25rem); }
.gw-trust-metrics .gw-metric span { font-size: .82rem; opacity: .86; }

/* 6. Service tiles: borderless, equal-height, consistent type. The Divi row is
 *    flex so columns already stretch to equal height; give each card a white
 *    fill with a soft shadow (no border) and even internal padding, so every
 *    tile reads the same regardless of how long its copy runs. */
.gw-svc-row .et_pb_column.gw-tile {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #ffffff;
	border: 0;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(10, 26, 74, 0.10);
}
.gw-tile > .et_pb_image { margin: 0; }
.gw-tile > .et_pb_text { padding-left: 1.1rem; padding-right: 1.1rem; }
.gw-tile > .et_pb_text:first-of-type { padding-top: .9rem; }
.gw-tile > .et_pb_text:last-child { padding-bottom: 1.15rem; }
.gw-svc-intro { padding-bottom: clamp(2rem, 4vw, 3rem); }
.gw-svc-row + .gw-svc-row { margin-top: clamp(1.75rem, 3vw, 2.25rem); }

/* 7. Audience 50/50: navy heading with extra breathing room below, equal-height
 *    cards, and CTAs pinned to the card bottom so they baseline-align. The
 *    emergency/community pair reuses .gw-aud-col but carries no .gw-cta, so
 *    nothing gets pushed there. */
.gw-aud-head { padding-bottom: clamp(2rem, 4vw, 3rem); }
.gw-aud-row { align-items: stretch; }
.gw-aud-row .et_pb_column.gw-aud-col {
	display: flex;
	flex-direction: column;
	height: auto !important;
	align-self: stretch;
}
.gw-aud-col .gw-cta { margin-top: auto !important; }
.gw-aud-row:has(.gw-cta) .gw-aud-col .et_pb_text:has(p) { min-height: 135px !important; }
.gw-aud-row .gw-cta .et_pb_button,
.gw-aud-row .gw-cta.et_pb_button {
	width: 330px !important;
	max-width: 100%;
	text-align: center;
}

/* 8. Reviews: clean, cohesive Google-review block. No fabricated stars, counts,
 *    or text; the integration mount stays hidden until a real feed is wired. */
.gw-reviews {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}
.gw-reviews-mount:empty { display: none; }
.gw-reviews-cta {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	background: var(--gcid-gw-primary, #0D32B4);
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	padding: .8rem 1.6rem;
	border-radius: 8px;
	transition: background-color .15s ease;
}
.gw-reviews-cta:hover { background: var(--gcid-gw-dark, #0A1A4A); color: #ffffff; }
.gw-reviews-note {
	margin: 0;
	max-width: 52ch;
	text-align: center;
	color: var(--gcid-gw-muted, #5B6472);
	font-size: .9rem;
	line-height: 1.5;
}

/* 9. Estimate form: materially more compact, square-cornered fields, and the
 *    home/business radios laid out inline. Colours still come from the shared
 *    mapping layer + the --client-* re-point above; this only tightens metrics. */
.gw-estimate .fluentform {
	max-width: 700px;
	margin-inline: auto;
}
.gw-estimate .frm-fluent-form {
	display: block;
}
.gw-estimate .frm-fluent-form > fieldset {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: .85rem;
	width: 100%;
}
.gw-estimate .ff-el-group {
	width: 100% !important;
	max-width: none !important;
	margin-bottom: .6rem;
}
.gw-estimate .ff-el-input--label { margin-bottom: .2rem; }
.gw-estimate .ff-el-group:has([name="full_name"]) .ff-el-input--label,
.gw-estimate .gw-field-email .ff-el-input--label,
.gw-estimate .gw-field-phone .ff-el-input--label,
.gw-estimate .ff-el-group:has([name="details"]) .ff-el-input--label {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
.gw-estimate .gw-field-full,
.gw-estimate .gw-field-property,
.gw-estimate .ff_submit_btn_wrapper { grid-column: 1 / -1; }
.gw-estimate .ff-el-group:has([name="full_name"]) { grid-column: 1 / -1 !important; }
.gw-estimate .gw-field-email,
.gw-estimate .gw-field-phone,
.gw-estimate .gw-field-city,
.gw-estimate .gw-field-service { grid-column: span 1 !important; }
.gw-estimate .gw-field-name,
.gw-estimate .ff-el-group:has([name="full_name"]) { order: 1; }
.gw-estimate .gw-field-email { order: 2; }
.gw-estimate .gw-field-phone { order: 3; }
.gw-estimate .gw-field-city { order: 4; }
.gw-estimate .gw-field-service { order: 5; }
.gw-estimate .gw-field-property { order: 6; }
.gw-estimate .gw-field-details,
.gw-estimate .ff-el-group:has([name="details"]) { order: 7; }
.gw-estimate .gw-field-upload,
.gw-estimate .ff-el-group:has(input[type="file"]) { order: 8; }
.gw-estimate .ff_submit_btn_wrapper { order: 9; }
.gw-estimate .ff-el-form-control {
	padding: .45rem .65rem;
	min-height: 40px;
	border-radius: 2px;
}
.gw-estimate textarea.ff-el-form-control { min-height: 76px; }
.gw-estimate .ff-el-input--content .ff-el-form-check {
	display: inline-flex !important;
	align-items: center;
	margin-right: 1rem;
	margin-bottom: .1rem;
}
.gw-estimate .ff-btn-submit { width: 100%; min-height: 42px; }

@media (max-width: 767px) {
	.gw-trust-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gw-trust-metrics .gw-metric:nth-child(3) { border-left: 0; }
	.gw-trust-metrics .gw-metric:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.28); }
	.gw-estimate .frm-fluent-form > fieldset { grid-template-columns: 1fr; }
	.gw-estimate .ff-el-group,
	.gw-estimate .ff_submit_btn_wrapper { grid-column: 1; }
}

/* 10. Footer: a separated copyright line with breathing room, and contact
 *     details that never wrap mid phone number or mid address (the block spans
 *     carry white-space:nowrap in the generator). */
.gw-footer-bottom {
	margin-top: 1.6rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.gw-foot-contact p { word-break: keep-all; }
