/* ==========================================================================
   CBS Engineers
   Foundations (colours, fonts, radius) live in Rebar Theme Options and the
   Elementor kit. Only rules those systems cannot express belong here.
   ========================================================================== */

/* Link lists (footer services, footer menu) */
.cbs-link-list,
.elementor-widget-text-editor .cbs-link-list { list-style: none; margin: 0; padding: 0; }
.cbs-link-list li,
.elementor-widget-text-editor .cbs-link-list li { list-style: none; margin: 0 0 .6em; padding: 0; }
.cbs-link-list li::before { display: none; }

.cbs-footer .cbs-footer-links a { color: var(--theme-color-alt_text); text-decoration: none; transition: color .2s ease; }
.cbs-footer .cbs-footer-links a:hover,
.cbs-footer .cbs-footer-links a:focus-visible { color: var(--theme-color-alt_title); text-decoration: underline; text-underline-offset: .2em; }
.cbs-footer .cbs-footer-links p { margin: 0 0 1em; }

/* Visible keyboard focus everywhere */
/* Rebar removes focus outlines; restore them for keyboard users (accessibility, so !important is deliberate) */
body a:focus-visible, body button:focus-visible, body input:focus-visible, body select:focus-visible, body textarea:focus-visible, body [tabindex]:focus-visible { outline: 2px solid currentColor !important; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Cards (project, service): whole card is one link */
.cbs-card { color: inherit; text-decoration: none; }
.cbs-card .cbs-card-media { overflow: hidden; background: var(--theme-color-bg_color_2); }
.cbs-card .cbs-card-media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.cbs-card .cbs-card-media--wide img { aspect-ratio: 3 / 2; }
.cbs-card:hover .cbs-card-media img { transform: scale(1.04); }
.cbs-card .cbs-card-title .elementor-heading-title { transition: text-decoration-color .2s ease; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.cbs-card:hover .cbs-card-title .elementor-heading-title,
.cbs-card:focus-visible .cbs-card-title .elementor-heading-title { text-decoration-color: currentColor; }
.cbs-card .cbs-card-more .elementor-heading-title { display: inline-flex; gap: .5em; align-items: center; }
.cbs-card .cbs-card-more .elementor-heading-title::after { content: ""; width: 28px; height: 1px; background: currentColor; transition: width .25s ease; }
.cbs-card:hover .cbs-card-more .elementor-heading-title::after { width: 44px; }

/* Taxonomy filter: square, black and white */
.cbs-page-intro + * .e-filter, .elementor-widget-taxonomy-filter .e-filter { gap: 8px; }
.elementor-widget-taxonomy-filter .e-filter-item { border: 1px solid var(--theme-color-bd_color); border-radius: 0; background: transparent; color: var(--theme-color-title); font-family: "Archivo", sans-serif; font-size: 14px; font-weight: 500; padding: 10px 18px; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.elementor-widget-taxonomy-filter .e-filter-item:hover { border-color: var(--theme-color-title); }
.elementor-widget-taxonomy-filter .e-filter-item[aria-pressed="true"] { background: var(--theme-color-title); border-color: var(--theme-color-title); color: var(--theme-color-bg_color); }
/* Project fact sheet */
.cbs-facts { margin: 0; border-top: 1px solid var(--theme-color-bd_color); }
.cbs-facts__row { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--theme-color-bd_color); }
.cbs-facts dt, .cbs-facts__label { margin: 0; font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--theme-color-meta); }
.cbs-facts dd { margin: 0; font-family: "Archivo", sans-serif; font-size: 18px; font-weight: 500; color: var(--theme-color-title); }
.cbs-facts dd a { color: inherit; }
.cbs-facts__services { margin-top: 32px; }
.cbs-facts__services p:last-child { margin: 10px 0 0; }

/* Service capabilities */
.cbs-capabilities { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 48px; }
.cbs-capabilities li { break-inside: avoid; margin: 0; padding: 16px 0; border-top: 1px solid var(--theme-color-bd_color); font-family: "Archivo", sans-serif; font-size: 18px; font-weight: 500; color: var(--theme-color-title); }
.cbs-capabilities li::before { display: none; }
@media (max-width: 767px) { .cbs-capabilities { columns: 1; } .cbs-facts__row { grid-template-columns: 1fr; gap: 4px; } }

/* Hide sections whose dynamic content is empty */
.cbs-hide-if-empty:not(:has(img, .e-gallery-item)) { display: none; }

/* Hero over imagery: flat wash for legible white type */
.cbs-hero { position: relative; }
/* Gravity Forms (Orbital theme) in the CBS system: black, square, Archivo labels */
.gform-theme--framework.gform_wrapper,
.gform_wrapper.gravity-theme {
  --gf-color-primary: #0A0A0A;
  --gf-color-primary-rgb: 10, 10, 10;
  --gf-color-primary-contrast: #FFFFFF;
  --gf-color-primary-darker: #3A3A3A;
  --gf-color-primary-lighter: #3A3A3A;
  --gf-color-in-ctrl-primary: #0A0A0A;
  --gf-ctrl-border-color: #C9C9C9;
  --gf-radius: 0;
  --gf-ctrl-radius: 0;
  --gf-ctrl-btn-radius: 0;
  --gf-ctrl-size-md: 52px;
  --gf-font-family-base: "IBM Plex Sans", sans-serif;
  --gf-ctrl-font-size: 16px;
  --gf-ctrl-label-font-family-primary: "Archivo", sans-serif;
  --gf-ctrl-label-font-size-primary: 14px;
  --gf-ctrl-label-font-weight-primary: 600;
  --gf-ctrl-btn-font-family: "Archivo", sans-serif;
  --gf-ctrl-btn-font-size: 15px;
  --gf-ctrl-btn-font-weight: 500;
  --gf-ctrl-btn-padding-x: 36px;
}
.gform_wrapper .gform_footer .gform_button,
.gform_wrapper input[type="submit"] { border-radius: 0; background: #0A0A0A; color: #FFFFFF; transition: background-color .2s ease; }
.gform_wrapper .gform_footer .gform_button:hover,
.gform_wrapper input[type="submit"]:hover { background: #3A3A3A; }
.gform_wrapper .gfield_required { color: var(--theme-color-meta); }

/* Credential badges */
.cbs-badge { border-left: 1px solid var(--theme-color-bd_color); padding-left: 20px; }

/* Footer social icon alignment */
.cbs-footer .elementor-social-icons-wrapper { justify-content: flex-start; text-align: left; }
.cbs-capabilities--single { columns: 1; }
.cbs-capabilities--small li { font-size: 16px; padding: 13px 0; }

/* Sector cards */
.cbs-sectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 32px; }
.cbs-sector-card__body { padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.cbs-sector-card__title { margin: 0; font-size: 28px; line-height: 1.15; }
.cbs-sector-card__text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--theme-color-text); }
.cbs-sector-card__more { font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--theme-color-title); }
.cbs-sector-card:hover .cbs-sector-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
@media (max-width: 1279px) { .cbs-sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .cbs-sectors { grid-template-columns: 1fr; gap: 48px; } .cbs-sector-card__title { font-size: 22px; } }
/* Footer brand device: outline of the cbs mark (master path data, stroke only, opacity baked into the SVG),
   oversized and bleeding off the right and bottom edges, in the spirit of the logo guidelines cover.
   Applied as a second background so it never collides with Elementor's ::before overlay. */
.cbs-footer {
  background-image: url("../images/cbs-mark-outline.svg?v=1");
  background-repeat: no-repeat;
  background-size: 78vw auto;
  background-position: right -12vw bottom -4vw;
}
@media (max-width: 1279px) { .cbs-footer { background-size: 110vw auto; background-position: right -30vw bottom -6vw; } }
@media (max-width: 767px) { .cbs-footer { background-size: 170vw auto; background-position: right -60vw bottom -8vw; } }
/* Mobile menu panel: same cbs outline device as the footer, bleeding off the bottom-right corner */
.cbs-header .trx-addons-mobile-menu-outer-container {
  background-image: url("../images/cbs-mark-outline.svg?v=1");
  background-repeat: no-repeat;
  background-size: 760px auto;
  background-position: right -300px bottom -60px;
}
@media (max-width: 767px) {
  .cbs-header .trx-addons-mobile-menu-outer-container { background-size: 190vw auto; background-position: right -78vw bottom -14vw; }
}
/* Sticky mobile header: the theme zeroes row padding when fixed, which crops the logo
   (logo can't shrink below the guide's 120px minimum width). Keep the bar tall enough. */
.cbs-header--mobile.sc_layouts_row_fixed_on { padding-top: 0 !important; padding-bottom: 0 !important; height: auto !important; }

/* Logo link is inline with vertical-align: middle, which drops the image below its column; make it block-level. */
.cbs-header .sc_layouts_logo { display: block; line-height: 0; }
.cbs-header .sc_layouts_logo img { display: block; vertical-align: top; }

/* Mobile header row (all states, pinned or not): logo left, menu toggle flush to the right gutter,
   both vertically centred. The theme's fixed state otherwise collapses the logo column. */
.cbs-header--mobile > .e-con-inner { flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; height: auto !important; min-height: 0 !important; }
.cbs-header--mobile > .e-con-inner > .e-con { width: auto !important; flex: 0 0 auto !important; justify-content: center !important; }
.cbs-header--mobile > .e-con-inner > .e-con:has(.sc_layouts_logo),
.cbs-header--mobile .sc_layouts_item:has(.sc_layouts_logo) { min-height: 62px !important; height: auto !important; flex-shrink: 0 !important; }
.cbs-header--mobile > .e-con-inner > .e-con:last-child { align-items: flex-end !important; margin-left: auto; }
.cbs-header--mobile .trx-addons-nav-slide,
.cbs-header--mobile .trx-addons-nav-slide .elementor-widget-container { margin-right: 0 !important; }
/* Logo SVG has a viewBox only (no intrinsic size); give it explicit dimensions in the shrink-to-fit mobile header. 62px tall = 123px wide (guide minimum 120px). */
.cbs-header--mobile .sc_layouts_logo img { width: 123px !important; height: 62px !important; max-height: none !important; }
