/* ---- Design tokens: every colour used by this theme is defined here ---- */
:root {
	--cuc-red: #d72927;
	--cuc-red-dark: #a81f1d;
	--cuc-red-tint: #fff4f4;
	--cuc-white: #fff;
	--cuc-ink: #000;           /* headings */
	--cuc-text: #434343;       /* body and menu text (merges #333/#363636/#2a2a2a/#181818) */
	--cuc-muted: #777;
	--cuc-grey-100: #f2f2f2;   /* header, cards, buttons (merges #eee/#f7f7f7) */
	--cuc-grey-200: #e1e1e1;   /* mobile menu panel */
	--cuc-grey-300: #d7d7d7;   /* borders, submenu (merges #ddd/#ccc) */
	--cuc-grey-400: #bfbfbf;   /* menu separators */
	--cuc-shadow: rgba(0, 0, 0, .25);
	--cuc-card-shadow: 0 2px 10px rgba(67, 67, 67, .16);  /* soft grey, derived from --cuc-text */
	--cuc-card-border: 1px solid var(--cuc-grey-300);
	/* Vertical rhythm */
	--cuc-gap-banner: 40px;   /* banner image to page title */
	--cuc-gap-title: 32px;    /* page title to content */
	--cuc-gap-section: 48px;  /* end of one section to the next heading */
	--cuc-gap-heading: 20px;  /* section heading to its content */
	--cuc-radius: 4px;
	--cuc-card-radius: 6px;
}
/*
Theme Name: Canadian Utility Construction (Astra Child)
Template: astra
Description: Astra child theme carrying the CUC look and feel, the Services post type and the home page hero.
Version: 2.0.39
Text Domain: astra-cuc
*/

body,
button,
input,
select,
textarea {
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	color: var(--cuc-text);
}

a,
.ast-header-break-point .main-header-menu a:hover {
	color: var(--cuc-red);
}

a:hover,
a:focus {
	color: var(--cuc-red-dark);
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Roboto Condensed', 'Roboto', Helvetica, Arial, sans-serif;
	font-weight: 700;
	color: var(--cuc-ink);
}

/* Header: red top bar over a light grey band */
.site-header,
.main-header-bar {
	background: var(--cuc-grey);
}
.site-header {
	border-top: 7px solid var(--cuc-red);
	border-bottom: 0;
}
.main-header-bar {
	border-bottom: 0;
}
.site-logo-img img {
	max-width: 300px;
	height: auto;
}
.main-header-menu a,
.ast-header-break-point .main-header-menu a {
	color: var(--cuc-text);
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: .02em;
}
.main-header-menu .current-menu-item > a,
.main-header-menu a:hover,
.main-header-menu .menu-item:hover > a {
	color: var(--cuc-red);
}
.main-header-menu .sub-menu {
	border-top: 2px solid var(--cuc-red);
}

/* Home hero */
.cuc-hero {
	position: relative;
	width: 100%;
	height: 340px;
	overflow: hidden;
	background: var(--cuc-grey-300);
}
.cuc-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1s ease;
}
.cuc-hero__slide.is-active {
	opacity: 1;
}
.cuc-hero__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
@media (max-width: 768px) {
	.cuc-hero { height: 200px; }
}

.cuc-warning {
	border-left: 4px solid var(--cuc-red);
	background: var(--cuc-red-tint);
	padding: 1em 1.25em;
}

.cuc-continue-link {
	display: inline-block;
	margin-top: 1.5em;
	font-size: 1.15em;
}

/* Footer */
.site-footer,
.ast-small-footer {
	background: var(--cuc-white);
	color: var(--cuc-text);
	font-size: 13px;
}
.site-footer .ast-small-footer {
	border-top: 1px solid var(--cuc-text);
}

/* Page intro copy (authored as <h4>) reads as body text, as in the original design */
.entry-content h4 {
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	font-weight: 400;
	font-size: 1.35rem;
	line-height: 1.35;
	color: var(--cuc-text);
	max-width: 46em;
}
.main-header-menu > .menu-item > a {
	white-space: nowrap;
	font-size: 14px;
}
.ast-builder-menu-1 .main-header-menu .menu-item > .menu-link { padding-left: .9em; padding-right: .9em; }

.site-branding .site-title, .ast-site-title-wrap, .site-branding .site-description { display: none; }

/* Locations, leadership, project tiles */
.cuc-location-grid,
.cuc-tiles,
.cuc-members {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin-bottom: 2em;
}
.cuc-member img { width: 100%; height: auto; }
.cuc-member h5 { font-weight: 400; color: var(--cuc-muted); }
.cuc-tile { border: 1px solid var(--cuc-grey-300); padding: 16px; text-align: center; }
.cuc-tile__logo { height: 120px; display: flex; align-items: center; justify-content: center; }
.cuc-tile__logo img { max-height: 100%; width: auto; }
.cuc-btn {
	display: inline-block;
	padding: .4em 1em;
	background: var(--cuc-grey-100);
	color: var(--cuc-text);
	text-decoration: none;
}
.cuc-btn:hover { background: var(--cuc-red); color: var(--cuc-white); }
.cuc-address, .cuc-location-contact { margin-bottom: .5em; }
.cuc-location-contact span { display: block; }

/* Colour + layout polish */
body,
.ast-separate-container { background-color: var(--cuc-white); }
.main-header-menu .current-menu-item > a,
.main-header-menu .current-menu-ancestor > a,
.main-header-menu a:hover { color: var(--cuc-red) !important; }
button, .button, input[type="submit"], .wpcf7-submit, .ast-button {
	background-color: var(--cuc-red);
	border-color: var(--cuc-red);
	color: var(--cuc-white);
}
button:hover, input[type="submit"]:hover, .wpcf7-submit:hover { background-color: var(--cuc-red-dark); border-color: var(--cuc-red-dark); }
.post-thumb-img-content img,
.ast-single-post-featured-section img { width: 100%; max-height: 340px; object-fit: cover; }
.wpcf7 form label { display: block; }
.wpcf7 form p { margin-bottom: 1em; }

/* Type scale matched to the legacy theme (18px body, 15px menu, large headings) */
body { font-size: 18px; line-height: 1.5; }
.entry-content p, .entry-content li { color: var(--cuc-text); font-size: 18px; margin-bottom: 16px; }
.main-header-menu > .menu-item > a { font-size: 15px; }
h1, .entry-title { font-size: 52px; line-height: 1.1; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
.entry-content h4 { font-size: 24px; }
@media (max-width: 768px) {
	body, .entry-content p, .entry-content li { font-size: 16px; }
	h1, .entry-title { font-size: 36px; }
	h2 { font-size: 28px; }
	h3 { font-size: 22px; }
}

/* Page copy authored as h5/h6 reads as body text, like the legacy theme */
.entry-content h5,
.entry-content h6 {
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.5;
	color: var(--cuc-text);
}
.entry-content .cuc-member h4,
.entry-content .cuc-location h4,
.entry-content .cuc-tile h4 {
	font-family: 'Roboto Condensed', 'Roboto', sans-serif;
	font-weight: 700;
	font-size: 22px;
	color: var(--cuc-ink);
	max-width: none;
}
.entry-content .cuc-member h5 { color: var(--cuc-muted); }

/* CTA widget */
.cuc-cta { border: 1px solid var(--cuc-grey-300); padding: 24px; margin-bottom: 24px; }
.cuc-cta .widget-title { font-family: 'Roboto Condensed', sans-serif; font-size: 24px; margin-bottom: 8px; }
.cuc-cta__btn { display: inline-block; padding: .6em 1.4em; background: var(--cuc-red); color: var(--cuc-white); text-decoration: none; font-weight: 700; }
.cuc-cta__btn:hover { background: var(--cuc-red-dark); color: var(--cuc-white); }

/* Gallery carousel + testimonial (sidebar) */
.cuc-gallery__track { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cuc-grey-100); }
.cuc-gallery__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.cuc-gallery__slide.is-active { opacity: 1; }
.cuc-gallery__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cuc-gallery__nav { display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.cuc-gallery__nav button { background: var(--cuc-red); color: var(--cuc-white); border: 0; width: 40px; height: 32px; font-size: 14px; cursor: pointer; padding: 0; }
.cuc-gallery__nav button:hover { background: var(--cuc-red-dark); }
.widget-testimonial blockquote { border-left: 4px solid var(--cuc-red); margin: 0 0 .5em; padding-left: 1em; font-size: 22px; }
.widget-testimonial cite { font-style: normal; color: var(--cuc-muted); }

/* Two-column page layout (Careers) */
.cuc-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 1.5em; }
@media (max-width: 768px) { .cuc-two-col { grid-template-columns: 1fr; gap: 24px; } }

.cuc-banner { margin-bottom: 1.5em; }
.cuc-banner img { width: 100%; max-height: 340px; object-fit: cover; display: block; }

/* Contact page: narrow form column + locations */
.cuc-contact { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 56px; }
.cuc-contact__form .wpcf7-form-control-wrap input,
.cuc-contact__form textarea { width: 100%; }
.cuc-contact__form textarea { height: 140px; }
.cuc-contact .cuc-location-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 768px) { .cuc-contact { grid-template-columns: 1fr; gap: 24px; } .cuc-contact .cuc-location-grid { grid-template-columns: 1fr; } }

/* News: title + excerpt only (no category/date/author line), as in the legacy theme */
.ast-blog-single-element.ast-taxonomy-container, .ast-blog-meta-container .entry-meta, .entry-header .entry-meta { display: none; }
.blog .entry-title,
.archive .entry-title,
.search .entry-title { font-size: 26px; line-height: 1.25; }
.blog .entry-title a,
.archive .entry-title a { color: var(--cuc-red); }

/* Inline location map */
.cuc-map-toggle { border: 0; cursor: pointer; font: inherit; }
.cuc-map { margin-top: 12px; max-width: 480px; }
.cuc-map iframe { width: 100%; height: 288px; border: 0; display: block; }

/* Submenu links match the top-level menu size */
.main-header-menu .sub-menu a,
.main-header-menu .sub-menu .menu-link,
.ast-header-break-point .main-header-menu .sub-menu a { font-size: 15px; }

/* Linked headings: red, no underline (legacy) */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.entry-title a { color: var(--cuc-red); text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
.entry-title a:hover { color: var(--cuc-red-dark); text-decoration: none; }
.blog .ast-article-post .entry-title a,
.archive .ast-article-post .entry-title a { color: var(--cuc-red) !important; }

/* Project tiles (legacy .btn-grey, light-grey card, white logo area) */
.cuc-tile { background: var(--cuc-grey-100); border: 0; padding: 0 0 15px; text-align: left; box-shadow: var(--cuc-shadow) 0 1px 3px; }
.cuc-tile__logo { background: var(--cuc-white); height: 180px; padding: 0 15px; margin-bottom: 15px; }
.cuc-tile h4 { padding: 0 15px; }
.cuc-tile .cuc-btn { margin-left: 15px; background: var(--cuc-text); border: 1px solid var(--cuc-text); color: var(--cuc-grey-100); text-decoration: none; }
.cuc-tile .cuc-btn:hover, .cuc-tile .cuc-btn:focus { background: var(--cuc-text); border-color: var(--cuc-text); color: var(--cuc-grey-100); }
.cuc-page-title { margin-top: 1.5em; }
.cuc-page-title .entry-title { margin-bottom: 0; }
.cuc-page-title { text-align: left; }
.cuc-page-title .entry-title { font-size: 52px; text-align: left; }
@media (max-width: 768px) { .cuc-page-title .entry-title { font-size: 36px; } }
.cuc-page-title { display: block; } .cuc-page-title .entry-title { display: block; width: 100%; text-align: left; }
.blog .cuc-page-title, .blog .cuc-page-title .entry-title { text-align: left !important; }
.cuc-page-title .entry-title { font-size: 52px !important; }
@media (max-width: 768px) { .cuc-page-title .entry-title { font-size: 36px !important; } }

/* Home appears only in the mobile menu */
.main-header-menu .cuc-home-item { display: none; }
.ast-mobile-popup-drawer .cuc-home-item,
.ast-header-break-point .ast-mobile-header-content .cuc-home-item { display: block; }

/* Mobile menu: light grey panel, dark separators, red bar on active item (legacy look) */
.ast-mobile-popup-drawer .ast-mobile-popup-inner,
.ast-header-break-point .ast-mobile-header-content { background: var(--cuc-grey-200); }
.ast-mobile-popup-drawer .main-header-menu,
.ast-header-break-point .ast-mobile-header-content .main-header-menu { border-bottom: 1px solid var(--cuc-grey-400); }
.ast-mobile-popup-drawer .main-header-menu > .menu-item,
.ast-header-break-point .ast-mobile-header-content .main-header-menu > .menu-item { border-top: 1px solid var(--cuc-grey-400); }
.ast-mobile-popup-drawer .main-header-menu a,
.ast-header-break-point .ast-mobile-header-content .main-header-menu a {
	color: var(--cuc-text); background: transparent; font-size: 16px; text-transform: uppercase; padding: 14px 20px; border-left: 4px solid transparent;
}
.ast-mobile-popup-drawer .main-header-menu .current-menu-item > a,
.ast-mobile-popup-drawer .main-header-menu .current-menu-ancestor > a,
.ast-header-break-point .ast-mobile-header-content .main-header-menu .current-menu-item > a { color: var(--cuc-text) !important; border-left-color: var(--cuc-red); }
.ast-mobile-popup-drawer .main-header-menu .sub-menu,
.ast-header-break-point .ast-mobile-header-content .main-header-menu .sub-menu { background: var(--cuc-grey-300); border: 0; }
.ast-mobile-popup-drawer .main-header-menu .sub-menu a { font-size: 15px; padding-left: 36px; border-top: 1px solid var(--cuc-grey-400); }
/* Expand arrow */
.ast-mobile-popup-drawer .ast-menu-toggle,
.ast-header-break-point .ast-mobile-header-content .ast-menu-toggle { color: var(--cuc-text); }
.ast-mobile-popup-drawer .ast-icon.icon-arrow svg,
.ast-header-break-point .ast-mobile-header-content .ast-icon.icon-arrow svg { width: 12px; height: 12px; fill: var(--cuc-text); }

/* Off-canvas drawer overrides (Astra's own drawer rules are high-specificity) */
#ast-mobile-popup.ast-mobile-popup-drawer .ast-mobile-popup-inner { width: 240px; max-width: 80vw; background: var(--cuc-grey-200) !important; }
#ast-mobile-popup .ast-mobile-popup-header { background: var(--cuc-grey-200); }
#ast-mobile-popup .main-header-menu > .menu-item > .menu-link,
#ast-mobile-popup .main-header-menu .sub-menu .menu-link { color: var(--cuc-text) !important; background: transparent !important; text-transform: uppercase; }
#ast-mobile-popup .main-header-menu .menu-item > .menu-link { font-size: 16px; padding: 14px 40px 14px 20px; border-left: 4px solid transparent; }
#ast-mobile-popup .main-header-menu .current-menu-item > .menu-link,
#ast-mobile-popup .main-header-menu .current-menu-ancestor > .menu-link { border-left-color: var(--cuc-red); color: var(--cuc-text) !important; }
#ast-mobile-popup .main-header-menu .sub-menu .menu-link { font-size: 15px; padding-left: 36px; border-top: 1px solid var(--cuc-grey-400); }
#ast-mobile-popup .main-header-menu .sub-menu { background: var(--cuc-grey-300) !important; }
#ast-mobile-popup .main-header-menu > .menu-item { border-top: 1px solid var(--cuc-grey-400); border-bottom: 0; }
#ast-mobile-popup .main-header-menu { border-bottom: 1px solid var(--cuc-grey-400); }
#ast-mobile-popup .ast-menu-toggle { color: var(--cuc-text); }
#ast-mobile-popup .ast-menu-toggle svg,
#ast-mobile-popup .dropdown-menu-toggle svg { width: 12px; height: 12px; fill: var(--cuc-text); }
#ast-mobile-popup .sub-menu .ast-icon { display: none; }
#ast-mobile-popup .main-header-menu .menu-item,
#ast-mobile-popup .main-navigation,
#ast-mobile-popup .main-header-menu { background: transparent !important; }
#ast-mobile-popup .menu-item-has-children { position: relative; }
#ast-mobile-popup .menu-item-has-children > .ast-menu-toggle {
	display: block !important; position: absolute; right: 0; top: 0; height: 49px; width: 48px;
	background: transparent; border: 0; border-left: 1px solid var(--cuc-grey-400); cursor: pointer; padding: 0; z-index: 2;
}
#ast-mobile-popup .menu-item-has-children > .ast-menu-toggle .ast-icon { display: inline-flex !important; }
#ast-mobile-popup .menu-item-has-children > .ast-menu-toggle svg { width: 14px; height: 14px; fill: var(--cuc-text); }
#ast-mobile-popup .menu-item-has-children > a .dropdown-menu-toggle { display: none; }
#ast-mobile-popup .main-header-menu .menu-link { line-height: 1.3; }
#ast-mobile-popup .main-header-menu .sub-menu .menu-link { padding-top: 12px; padding-bottom: 12px; padding-right: 16px; }
#ast-mobile-popup .menu-item-has-children > .ast-menu-toggle { border-left: 0; width: 56px; }
#ast-mobile-popup .main-header-menu .menu-item-has-children > .menu-link { padding-right: 60px; }

/* Previous / next post links: subtle buttons in the site colours */
.post-navigation { margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--cuc-grey-300); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-navigation .nav-previous,
.post-navigation .nav-next { flex: 0 1 calc(50% - 8px); max-width: calc(50% - 8px); margin: 0; padding: 0; }
.post-navigation .nav-next { margin-left: auto; text-align: right; }
.post-navigation .nav-links a {
	display: block; height: 100%; box-sizing: border-box; padding: 12px 18px;
	background: var(--cuc-grey-100); border: 1px solid var(--cuc-grey-300); border-left: 4px solid var(--cuc-red);
	color: var(--cuc-text); text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.post-navigation .nav-next a { border-left: 1px solid var(--cuc-grey-300); border-right: 4px solid var(--cuc-red); }
.post-navigation .nav-links a:hover,
.post-navigation .nav-links a:focus { background: var(--cuc-white); border-color: var(--cuc-red); color: var(--cuc-red); }
.post-navigation .ast-post-nav { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cuc-red); }
.post-navigation .ast-post-nav svg { width: 12px; height: 12px; fill: currentColor; }
.post-navigation .nav-links a p { margin: 4px 0 0; font-size: 16px; line-height: 1.35; color: inherit; }
@media (max-width: 600px) {
	.post-navigation .nav-previous, .post-navigation .nav-next { flex-basis: 100%; max-width: 100%; }
}
.post-navigation, .post-navigation .nav-links { width: 100%; max-width: 100%; box-sizing: border-box; margin-left: 0; margin-right: 0; }
.post-navigation .nav-links { padding: 0; }
.post-navigation .nav-links::before, .post-navigation .nav-links::after,
.post-navigation .nav-previous::after, .post-navigation .nav-next::before { content: none !important; display: none !important; }
.post-navigation .nav-previous, .post-navigation .nav-next { flex: 1 1 calc(50% - 8px); max-width: calc(50% - 8px); border: 0; }
.post-navigation .nav-links a p { white-space: normal; overflow: visible; text-overflow: clip; display: block; }
.post-navigation .nav-links a { width: 100%; }
.ast-separate-container .post-navigation,
.ast-separate-container .ast-single-post .post-navigation,
.post-navigation { padding-left: var(--ast-container-default-xlg-padding, 2.5em) !important; padding-right: var(--ast-container-default-xlg-padding, 2.5em) !important; margin-left: 0 !important; margin-right: 0 !important; }
@media (max-width: 768px) { .ast-separate-container .post-navigation, .post-navigation { padding-left: var(--ast-container-default-slg-padding, 1.5em) !important; padding-right: var(--ast-container-default-slg-padding, 1.5em) !important; } }
.post-navigation .nav-links { margin: 0 !important; padding: 0 !important; }
.ast-separate-container .post-navigation, .post-navigation { padding-right: 0 !important; }

/* Project tile "Read More": compact, spaced, site-red */
.cuc-tile h4 { margin-bottom: 18px; }
.cuc-tile .cuc-btn {
	display: inline-block; margin: 0 0 4px 15px; padding: 6px 14px;
	font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
	background: transparent; color: var(--cuc-red); border: 1px solid var(--cuc-red); text-decoration: none;
	transition: background .15s, color .15s;
}
.cuc-tile .cuc-btn:hover, .cuc-tile .cuc-btn:focus { background: var(--cuc-red); border-color: var(--cuc-red); color: var(--cuc-white); }

/* ===== Unified buttons and cards: one radius, one size, site red ===== */
.cuc-cta__btn,
.wpcf7-submit,
input[type="submit"].wpcf7-submit,
.awsm-application-submit-btn,
.cuc-reset,
.cuc-btn,
.cuc-tile .cuc-btn {
	display: inline-block;
	box-sizing: border-box;
	min-width: 110px;
	padding: 10px 22px !important;
	font-family: 'Roboto', Helvetica, Arial, sans-serif;
	font-size: 14px !important;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .04em;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	border: 1px solid var(--cuc-red) !important;
	border-radius: var(--cuc-radius) !important;
	background: var(--cuc-red) !important;
	color: var(--cuc-white) !important;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
.cuc-cta__btn:hover, .cuc-cta__btn:focus,
.wpcf7-submit:hover, .wpcf7-submit:focus,
.awsm-application-submit-btn:hover, .awsm-application-submit-btn:focus,
.cuc-btn:hover, .cuc-btn:focus {
	background: var(--cuc-red-dark) !important; border-color: var(--cuc-red-dark) !important; color: var(--cuc-white) !important;
}
/* Secondary actions (Reset, Map, Read More): same size and radius, outlined */
.cuc-reset,
.cuc-btn,
.cuc-tile .cuc-btn { background: transparent !important; color: var(--cuc-red) !important; margin-left: 0; }
.cuc-tile .cuc-btn { margin-left: 15px; }
.cuc-reset { margin-left: 12px; }
.cuc-reset:hover, .cuc-reset:focus,
.cuc-btn:hover, .cuc-btn:focus,
.cuc-tile .cuc-btn:hover, .cuc-tile .cuc-btn:focus { background: var(--cuc-red) !important; border-color: var(--cuc-red) !important; color: var(--cuc-white) !important; }

/* Gallery arrows, cards, tiles, widgets and prev/next links share the rounding */
.cuc-gallery__nav button { border-radius: var(--cuc-radius); }
.cuc-gallery__track { border-radius: var(--cuc-card-radius); }
.cuc-cta, .cuc-tile, .wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .wpcf7 select { border-radius: var(--cuc-radius); }
.cuc-cta, .cuc-tile { border-radius: var(--cuc-card-radius); overflow: hidden; }
.blog .ast-article-post .ast-article-inner,
.archive .ast-article-post .ast-article-inner,
.blog .ast-article-post, .archive .ast-article-post { border-radius: var(--cuc-card-radius); }
.post-navigation .nav-links a { border-radius: var(--cuc-radius); }

/* Prev/next: same rounded-corner look as buttons (thin border, no heavy side bars) */
.post-navigation .nav-links a,
.post-navigation .nav-next a { border: 1px solid var(--cuc-grey-300); border-radius: var(--cuc-radius); background: var(--cuc-grey-100); }
.post-navigation .nav-links a:hover, .post-navigation .nav-links a:focus { border-color: var(--cuc-red); background: var(--cuc-white); }

/* Prev/next: size to content so the bottom border is never clipped */
.single .post-navigation .nav-links { display: flex !important; align-items: stretch; height: auto !important; overflow: visible; }
.single .post-navigation .nav-previous, .single .post-navigation .nav-next { height: auto !important; overflow: visible; display: flex; }
.single .post-navigation .nav-links a { height: auto !important; max-width: 100% !important; line-height: 1.3 !important; padding: 12px 18px !important; display: block; box-sizing: border-box; }
.single .post-navigation .nav-links a p { display: block !important; margin: 4px 0 0 !important; line-height: 1.35 !important; }
.post-navigation { padding-bottom: 8px; }
.ast-separate-container .post-navigation, .post-navigation { padding-right: var(--ast-container-default-xlg-padding, 2.5em) !important; }
@media (max-width: 768px) { .ast-separate-container .post-navigation, .post-navigation { padding-right: var(--ast-container-default-slg-padding, 1.5em) !important; } }

/* Home page "Read More": same button style as the rest of the site */
.cuc-continue-link {
	display: inline-block; box-sizing: border-box; min-width: 110px; margin-top: 1.5em;
	padding: 10px 22px; font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: .04em;
	text-align: center; text-transform: uppercase; text-decoration: none !important;
	color: var(--cuc-white) !important; background: var(--cuc-red); border: 1px solid var(--cuc-red); border-radius: var(--cuc-radius);
	transition: background .15s, border-color .15s;
}
.cuc-continue-link:hover, .cuc-continue-link:focus { background: var(--cuc-red-dark); border-color: var(--cuc-red-dark); color: var(--cuc-white) !important; }

/* Block-editor buttons (file download, standard buttons): same style as all site buttons */
.wp-block-file .wp-block-file__button,
.wp-block-button .wp-block-button__link,
.wp-element-button {
	display: inline-block; box-sizing: border-box; min-width: 110px;
	padding: 10px 22px !important; font-size: 14px !important; font-weight: 700; line-height: 1.2; letter-spacing: .04em;
	text-align: center; text-transform: uppercase; text-decoration: none !important;
	color: var(--cuc-white) !important; background: var(--cuc-red) !important; border: 1px solid var(--cuc-red) !important;
	border-radius: var(--cuc-radius) !important; transition: background .15s, border-color .15s;
}
.wp-block-file .wp-block-file__button:hover, .wp-block-file .wp-block-file__button:focus,
.wp-block-button .wp-block-button__link:hover, .wp-block-button .wp-block-button__link:focus,
.wp-element-button:hover, .wp-element-button:focus { background: var(--cuc-red-dark) !important; border-color: var(--cuc-red-dark) !important; color: var(--cuc-white) !important; }
.wp-block-file .wp-block-file__button, .wp-block-button .wp-block-button__link, .wp-element-button { font-weight: 700 !important; font-family: "Roboto", Helvetica, Arial, sans-serif; }

/* ===== ONE button style site-wide: red outline, solid red on hover ===== */
.cuc-cta__btn,
.wpcf7-submit, input[type="submit"].wpcf7-submit,
.awsm-application-submit-btn,
.cuc-reset,
.cuc-btn, .cuc-tile .cuc-btn,
.cuc-continue-link,
.wp-block-file .wp-block-file__button,
.wp-block-button .wp-block-button__link,
.wp-element-button,
.cuc-gallery__nav button {
	background: transparent !important;
	color: var(--cuc-red) !important;
	border: 1px solid var(--cuc-red) !important;
	border-radius: var(--cuc-radius) !important;
}
.cuc-cta__btn:hover, .cuc-cta__btn:focus,
.wpcf7-submit:hover, .wpcf7-submit:focus,
input[type="submit"].wpcf7-submit:hover, input[type="submit"].wpcf7-submit:focus,
input[type="submit"].awsm-application-submit-btn:hover, input[type="submit"].awsm-application-submit-btn:focus,
.awsm-application-submit-btn:hover, .awsm-application-submit-btn:focus,
.cuc-reset:hover, .cuc-reset:focus,
.cuc-btn:hover, .cuc-btn:focus,
.cuc-tile .cuc-btn:hover, .cuc-tile .cuc-btn:focus,
.cuc-continue-link:hover, .cuc-continue-link:focus,
.wp-block-file .wp-block-file__button:hover, .wp-block-file .wp-block-file__button:focus,
.wp-block-button .wp-block-button__link:hover, .wp-block-button .wp-block-button__link:focus,
.wp-element-button:hover, .wp-element-button:focus,
.cuc-gallery__nav button:hover, .cuc-gallery__nav button:focus {
	background: var(--cuc-red) !important;
	color: var(--cuc-white) !important;
	border-color: var(--cuc-red) !important;
}

/* Editor-applied pure red (#ff0000) text uses the theme red instead */
.entry-content [style*="color: #ff0000"], .entry-content [style*="color:#ff0000"],
.entry-content [style*="color: #f00"], .entry-content [style*="color:#f00"],
.entry-content [style*="color: rgb(255, 0, 0)"], .entry-content [style*="color:rgb(255,0,0)"] { color: var(--cuc-red) !important; }


/* ---- Classes that replace styles that used to be written inline in page content ---- */
.cuc-heading-accent,
.entry-content h4.cuc-heading-accent { color: var(--cuc-red); }
.cuc-indent { padding-left: 0; text-align: left; }
.cuc-align-right { text-align: right; }
.cuc-embed-tall { height: 400px; }

/* News index title (was an inline style in PHP) */
.cuc-page-title { display: block !important; width: 100%; box-sizing: border-box; max-width: 1240px; margin: 1.5em auto 0 !important; padding: 0 calc(.54em + 10px) !important; text-align: left !important; }
.cuc-page-title .entry-title { text-align: left !important; }

/* Home intro ("lead" text): a step above the 18px body text, not a heading size */
.home .entry-content h4 { font-size: 20px; line-height: 1.5; }
@media (max-width: 768px) { .home .entry-content h4 { font-size: 18px; } }

/* Hover must out-rank the resting rule for every button type (Submit inputs have a higher-specificity resting selector) */
input[type="submit"].wpcf7-submit:hover, input[type="submit"].wpcf7-submit:focus,
button.cuc-reset:hover, button.cuc-reset:focus,
button.cuc-map-toggle:hover, button.cuc-map-toggle:focus {
	background: var(--cuc-red) !important; color: var(--cuc-white) !important; border-color: var(--cuc-red) !important;
}

/* Sub-headings are black everywhere, including linked news titles; red only on hover */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.entry-title a,
.blog .ast-article-post .entry-title a,
.archive .ast-article-post .entry-title a { color: var(--cuc-ink) !important; text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
.entry-title a:hover, .entry-title a:focus,
.blog .ast-article-post .entry-title a:hover,
.archive .ast-article-post .entry-title a:hover { color: var(--cuc-red) !important; }

/* News cards: static title + Read More button, like the project tiles */
.blog .ast-article-post .entry-title { color: var(--cuc-ink); margin-bottom: 12px; }
.blog .ast-article-post .ast-read-more-container { margin: 18px 0 0; }


/* ===== Shared card style: project tiles and news cards ===== */
.cuc-tile,
.blog .ast-article-post {
	background: var(--cuc-white) !important;
	border: var(--cuc-card-border) !important;
	border-radius: var(--cuc-card-radius) !important;
	box-shadow: var(--cuc-card-shadow) !important;
	overflow: hidden;
}
/* Same grid for both: equal-width columns, equal-height cards, gap between */
.cuc-tiles,
.blog .ast-row {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 0 0 2em !important;
}
.blog .ast-row > article { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; display: flex; }
.blog .ast-article-inner, .blog .ast-article-inner .post-content { display: flex; flex-direction: column; flex: 1; width: 100%; padding: 0 !important; margin: 0 !important; }
.blog .ast-article-inner .post-content { padding: 20px !important; }
.blog .ast-article-inner .ast-blog-featured-section:empty { display: none; }
/* Project tile */
.cuc-tile { display: flex; flex-direction: column; text-align: left; padding: 0 0 20px; }
.cuc-tile__logo { border-bottom: var(--cuc-card-border); margin-bottom: 20px; }
.cuc-tile h4 { padding: 0 20px; margin-bottom: 16px; }
.cuc-tile .cuc-btn { margin: auto 0 0 20px; align-self: flex-start; }
/* News card: title + excerpt + button pinned to the bottom, same spacing as the tile */
.blog .ast-article-post .entry-title { margin: 0 0 12px; }
.blog .ast-article-post .ast-excerpt-container { margin-bottom: 16px; }
.blog .ast-article-post .ast-excerpt-container p { margin-bottom: 0; }
.blog .ast-article-post .ast-read-more-container { margin: auto 0 0 !important; padding: 0; }
.blog .ast-article-post .ast-read-more-container .cuc-btn { align-self: flex-start; }
/* Same card-title size on project tiles and news cards */
.cuc-tile h4, .blog .ast-article-post .entry-title { font-size: 20px !important; line-height: 1.3; }


/* ===== Vertical rhythm: one spacing scale for titles, section headings and content ===== */
.cuc-banner { margin-bottom: 0; }
/* Pages that start with the banner: the page title (not Astra's padding) sets the gap below it */
body.blog #primary, body.post-type-archive-services #primary { padding-top: 0 !important; margin-top: 0 !important; }
body.blog .site-main, body.post-type-archive-services .site-main { padding-top: 0 !important; margin-top: 0 !important; }
.cuc-page-title { margin-top: var(--cuc-gap-banner) !important; margin-bottom: var(--cuc-gap-title) !important; }
body.post-type-archive-services .site-main > h1.entry-title { margin: var(--cuc-gap-banner) 0 var(--cuc-gap-title); }
/* Project Services: section headings and their card grids */
body.post-type-archive-services .site-main > h2 { margin: 0 0 var(--cuc-gap-heading); }
body.post-type-archive-services .cuc-tiles,
body.blog .ast-row { margin: 0 0 var(--cuc-gap-section) !important; }
body.post-type-archive-services .cuc-tiles:last-of-type { margin-bottom: var(--cuc-gap-title) !important; }
/* Editor content: headings get the same scale on every page */
.entry-content > * + h2 { margin-top: var(--cuc-gap-section); }
.entry-content h2 { margin-bottom: var(--cuc-gap-heading); }
.entry-content > * + h3 { margin-top: calc(var(--cuc-gap-section) * .67); }
.entry-content h3 { margin-bottom: calc(var(--cuc-gap-heading) * .8); }
.entry-content h4 { margin-bottom: calc(var(--cuc-gap-heading) * .8); }
.cuc-locations h3 { margin: 0 0 calc(var(--cuc-gap-heading) * .8); }
.cuc-location-group { margin-bottom: var(--cuc-gap-section); }

/* ===== One page-title size (larger than section headings) and aligned column tops ===== */
:root { --cuc-title-size: 44px; }
h1.entry-title,
.cuc-page-title .entry-title,
body.post-type-archive-services .site-main > h1.entry-title { font-size: var(--cuc-title-size) !important; line-height: 1.15; margin-bottom: var(--cuc-gap-title); }
@media (max-width: 768px) { :root { --cuc-title-size: 34px; } }
/* Side-by-side columns start on the same line */
.cuc-two-col > div > :first-child,
.cuc-contact > div > :first-child,
.cuc-contact__locations > h2:first-child { margin-top: 0 !important; padding-top: 0; }
.cuc-two-col__left h2, .cuc-two-col__right h2, .cuc-two-col__right .careers__listing__title { margin-top: 0 !important; }
.cuc-contact__form .wpcf7 form p:first-child, .cuc-contact__form .wpcf7-form > p:first-of-type { margin-top: 0; }
.cuc-contact__form label:first-child { display: block; margin-top: 0; }
/* Empty headings left in page content take up space; hide them */
.entry-content h1:empty, .entry-content h2:empty, .entry-content h3:empty, .entry-content h4:empty { display: none; }
.cuc-two-col__right > h2:first-child:not(.careers__listing__title) { display: none; }
.cuc-two-col__right > h2:first-child + .careers__listing__title { margin-top: 0 !important; }
.cuc-two-col__right .careers__listing__title + h2 { display: none; }
/* Links inside page copy that is authored as headings (h4-h6) stay link-red */
.entry-content h4 a, .entry-content h5 a, .entry-content h6 a { color: var(--cuc-red) !important; text-decoration: underline; }
.entry-content h4 a:hover, .entry-content h5 a:hover, .entry-content h6 a:hover { color: var(--cuc-red-dark) !important; }

/* Contact page: original 12-column proportions (form 4, gap 1, locations 7), locations stacked */
.cuc-contact { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 30px; }
.cuc-contact__form { grid-column: 1 / span 4; }
.cuc-contact__locations { grid-column: 6 / span 7; }
.cuc-contact .cuc-location-grid { grid-template-columns: 1fr; gap: 0; }
@media (max-width: 991px) {
	.cuc-contact__form { grid-column: 1 / span 5; }
	.cuc-contact__locations { grid-column: 6 / span 7; }
}
@media (max-width: 768px) {
	.cuc-contact__form, .cuc-contact__locations { grid-column: 1 / -1; }
}

/* Banner is always full-bleed, one height, on every inner page */
.cuc-banner { width: 100%; }
.cuc-banner img { width: 100%; height: 300px; max-height: none; object-fit: cover; display: block; }
@media (max-width: 768px) { .cuc-banner img { height: 180px; } }
.page .ast-single-post-featured-section, .single-services .ast-single-post-featured-section { display: none; }
.cuc-hero { height: 300px; }
@media (max-width: 768px) { .cuc-hero { height: 180px; } }
/* Same gap under the banner whether or not the page has a sidebar */
body.page:not(.home) #primary, body.page:not(.home) #secondary,
body.single-services #primary, body.single-services #secondary { margin-top: var(--cuc-gap-banner) !important; }

/* Services page: narrower text column, wider photo column */
@media (min-width: 922px) {
	body.page-id-1699.ast-right-sidebar #primary { width: 52%; }
	body.page-id-1699.ast-right-sidebar #secondary { width: 48%; }
	body.page-id-1699 .cuc-gallery__track { aspect-ratio: 4 / 3; }
}
