/* ===========================================================
   CS3 — Global Styles (cleaned) • 2025‑08‑15
   - Hero consistency (clamp + object-fit)
   - Careers form button text fix
   - Small a11y focus ring
   - Optional CS³ utility
   =========================================================== */

:root {
  --cs3-blue:  #002A5C;
  --cs3-red:   #E03131;
  --cs3-black: #000000;
  --cs3-white: #FFFFFF;

  --cs3-section-pad-desktop: 60px;
  --cs3-section-pad-mobile:  32px;
}

/* --- Mobile safety: prevent horizontal scroll from any rogue wide element --- */
html, body { max-width: 100%; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; } /* images never exceed the viewport */

html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Montserrat", Arial, sans-serif; padding-top: 72px; }
[id] { scroll-margin-top: 80px; }
a { color: inherit; }

/* Brand */
.text-cs3 { color: var(--cs3-blue) !important; }
.bg-cs3 { background: var(--cs3-blue) !important; color: #fff; }

/* Buttons */
.btn-cs3 { background: var(--cs3-red); border-color: var(--cs3-red); color: #fff; }
.btn-cs3:hover,.btn-cs3:focus { color: #fff; filter: brightness(1.05); }

/* Subtle, brand-tinted focus outline for links & buttons (a11y) */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid rgba(0,42,92,.35);
  outline-offset: 2px;
}

/* Navbar */
.navbar-brand { font-weight: 700; }
.cs3-logo { height: 42px; width: auto; display: block; }

.navbar .dropdown-menu { min-width: 14rem; border: 1px solid rgba(0,42,92, .2); border-radius: .25rem; padding: 0; }
.navbar .dropdown-menu .dropdown-item { border-bottom: 1px solid rgba(0,42,92,.15); padding-top: .6rem; padding-bottom: .6rem; }
.navbar .dropdown-menu .dropdown-item:last-child { border-bottom: none; }
.navbar .dropdown-menu .dropdown-item:hover, .navbar .dropdown-menu .dropdown-item:focus { background: var(--cs3-blue); color: #fff; }

/* =========================
   Hero (unified & consistent)
   ========================= */
.hero {
  position: relative;
  /* Between 480px and 760px tall depending on viewport */
  min-height: clamp(480px, 65vh, 760px);
  display: flex;
  align-items: center;
  color: #fff;

  /* Safety: in case background applied on .hero directly */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-content { position: relative; z-index: 1; padding-top: 2rem; padding-bottom: 2.5rem; }

/* If a page used an <img> inside .hero-img, force proper cover */
.hero-img > img,
.hero-img > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Overlay list look */
.overlay-list { list-style: disc; padding-left: 1.25rem; margin: 1rem 0 0; }
.hero .overlay-list li { font-size: 1.5rem; font-weight: 700; line-height: 1.25; margin-bottom: .4rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.list-white { color: #fff; }
.list-white li::marker { color: #fff; }

/* Ensure HERO overlay lists never show bullets (design choice) */
.hero .overlay-list { list-style: none !important; padding-left: 0 !important; margin-left: 0 !important; }

@media (max-width: 576px) {
  .hero { min-height: clamp(420px, 60vh, 680px); }
  .hero-content { padding-top: 2rem; padding-bottom: 2rem; }
}

/* Sections */
.cs3-section { padding-top: var(--cs3-section-pad-desktop); padding-bottom: var(--cs3-section-pad-desktop); }
.cs3-alt-dark { background: var(--cs3-blue); color: #fff; }
.cs3-alt-dark a { color: #fff; text-decoration: underline; }
.cs3-alt-light { background: #fff; color: #111; }

.cs3-content-narrow { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.section-title { font-weight: 700; margin-bottom: .25rem; text-align: center; }
.cs3-section-title { font-size: 2rem; line-height: 1.2; text-align: center; margin: 0 0 12px; font-weight: 700; }
.section-sub,.cs3-section-intro { color: #6c757d; margin: 0 0 28px; text-align: center; opacity: .9; }
.cs3-alt-dark .cs3-section-intro { color: rgba(255,255,255,.95); }

.cs3-section p { margin: 0 0 16px; font-size: 1rem; line-height: 1.6; text-align: left; }

/* collapse margin bleed */
.cs3-section > :first-child, .cs3-section .container > :first-child, .cs3-section .cs3-content-narrow > :first-child { margin-top: 0 !important; }
.cs3-section > :last-child, .cs3-section .container > :last-child, .cs3-section .cs3-content-narrow > :last-child { margin-bottom: 0 !important; }
.cs3-section .container > :last-child [class*="col-"], .cs3-section > :last-child [class*="col-"], .cs3-section .cs3-content-narrow > :last-child [class*="col-"] { margin-bottom: 0 !important; }

@media (max-width: 576px) { .cs3-section { padding-top: var(--cs3-section-pad-mobile); padding-bottom: var(--cs3-section-pad-mobile); } }

/* Lists */
ul,ol { margin-left: 0; padding-left: 1.25rem; }
li { text-align: left; }

.cs3-emoji-list { list-style: none; margin: 16px 0 20px; padding-left: 0; }
.cs3-emoji-list li { margin: 6px 0; font-size: 1rem; line-height: 1.6; }
.cs3-emoji-list li::first-letter { margin-right: .4em; }

/* Content bullets flush-left (custom dots) */
section .bulleted-list { list-style: none !important; padding-left: 0 !important; margin: 1em 0; }
section .bulleted-list li { position: relative; padding-left: 1.1em; margin-bottom: .5em; font-size: 1rem; line-height: 1.6; }
section .bulleted-list li::before { content: ""; position: absolute; left: 0; top: .58em; transform: translateY(-50%); width: .3125em; height: .3125em; border-radius: 999px; background: currentColor; }

/* Home service cards */
.service-card { position: relative; display: block; border-radius: .5rem; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.08); transition: transform .18s ease, box-shadow .18s ease; }
.service-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.service-card img { display: block; width: 100%; height: 220px; object-fit: cover; transition: transform .25s ease; }
.service-card:hover img { transform: scale(1.04); }
.service-title-wrap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem .75rem .75rem; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0)); text-align: center; }
.service-title { color: #fff; font-weight: 700; font-size: 1.25rem; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.service-grid { row-gap: 24px; }
.service-grid > [class*="col-"] { margin-bottom: 24px; }
@media (max-width: 576px) { .service-card img { height: 200px; } .service-title { font-size: 1.15rem; } }

/* Footer */
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer { margin-top: 0 !important; }
.footer[class*="mt-"] { margin-top: 0 !important; }

.footer-hero { position: relative; background: url("images/footer/footer.jpg") center/cover no-repeat; text-align: center; color: #000; padding-top: var(--cs3-section-pad-desktop); padding-bottom: var(--cs3-section-pad-desktop); }
.footer-hero-overlay { position: relative; max-width: 900px; margin: 0 auto; padding: 0 20px; }
.footer-hero-overlay p { margin: .25rem 0; font-size: 1.1rem; font-weight: 700; }
.footer-hero-overlay p:last-child { margin-top: .75rem; font-size: .95rem; font-weight: 700; }
@media (max-width: 576px) { .footer-hero { padding-top: var(--cs3-section-pad-mobile); padding-bottom: var(--cs3-section-pad-mobile); } .footer-hero-overlay p { font-size: 1rem; } }

/* Align edges */
.navbar { padding-left: 0 !important; padding-right: 0 !important; }
.navbar > .container { max-width: 1100px !important; padding-left: 20px !important; padding-right: 20px !important; }
.hero .container { max-width: 1100px !important; padding-left: 20px !important; padding-right: 20px !important; }
.hero .row { margin-left: 0 !important; margin-right: 0 !important; }
.hero .row > [class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; }

/* Mobile nav look */
@media (max-width: 991.98px) {
  .navbar .navbar-collapse { background: #fff; margin-top: .25rem; padding: .35rem 0 .5rem; border-top: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.06); }
  .navbar .navbar-nav .nav-item { margin: 0; }
  .navbar .nav-link { display: block; padding: .9rem 1rem !important; border-radius: 0 !important; }

  .navbar .navbar-nav > .nav-item:nth-child(odd)  { background: #fff; }
  .navbar .navbar-nav > .nav-item:nth-child(odd)  .nav-link { color: #0f1f33 !important; }
  .navbar .navbar-nav > .nav-item:nth-child(even) { background: var(--cs3-blue); }
  .navbar .navbar-nav > .nav-item:nth-child(even) .nav-link { color: #fff !important; }
  .navbar .navbar-nav > .nav-item:nth-child(even) .dropdown-toggle::after { filter: invert(1) contrast(180%); }

  .navbar .navbar-nav > .nav-item:nth-child(odd)  .nav-link:hover,
  .navbar .navbar-nav > .nav-item:nth-child(odd)  .nav-link:focus { background: #eef5ff; }
  .navbar .navbar-nav > .nav-item:nth-child(even) .nav-link:hover,
  .navbar .navbar-nav > .nav-item:nth-child(even) .nav-link:focus { background: #0a3a73; }

  .navbar .dropdown-menu { display: none; position: static; float: none; background: #fff; border: 1px solid rgba(0,0,0,.08); box-shadow: 0 8px 18px rgba(0,0,0,.08); border-radius: .5rem; padding: .35rem 0; margin: .35rem .5rem .6rem; z-index: 1001; }
  .navbar .dropdown.show > .dropdown-menu, .navbar .dropdown-menu.show { display: block; }

  .navbar .dropdown-item { color: #0f1f33; padding: .6rem 1rem; border-radius: .35rem; position: relative; z-index: 1002; }
  .navbar .dropdown-menu .dropdown-item { padding-left: 1.125rem; }
}

/* Footer enforce black */
.footer-hero { color: #000 !important; }
.footer-hero a { color: inherit !important; }

/* Mobile caret on labels */
@media (max-width: 991.98px) {
  .navbar .dropdown > .nav-link.dropdown-toggle { position: relative; padding-right: 2.75rem !important; }
  .navbar .dropdown > .nav-link.dropdown-toggle::after { content: "▾"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; line-height: 1; }
}

/* =========================
   CAREERS FORM (scoped)
   ========================= */
.apply-wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.apply-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.10); padding: 28px; }
.apply-card h3 { font-weight: 700; margin-bottom: 10px; }

.apply-intro { margin-bottom: 18px; color: #555; text-align: center; font-weight: 700; }

.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.apply-grid .full { grid-column: 1 / -1; }

.apply-field label { font-size: .95rem; font-weight: 700; margin-bottom: 6px; display: block; }
.apply-field .req { color: #E03131; margin-left: 4px; font-weight: 700; }

.apply-field input, .apply-field select, .apply-field textarea {
  width: 100%; border: 1px solid #d9d9d9; border-radius: 8px; padding: 12px 12px;
  font-size: 1rem; line-height: 1.4; outline: none;
}
.apply-field input:focus, .apply-field select:focus, .apply-field textarea:focus {
  border-color: #002A5C; box-shadow: 0 0 0 3px rgba(0,42,92,.12);
}

.apply-actions { margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.apply-btn { background: #002A5C; color: #fff; border: 0; border-radius: 8px; padding: 12px 16px; font-weight: 700; }
.apply-btn:hover { filter: brightness(1.05); }
.apply-note { font-size: .9rem; color: #6c757d; }

@media (max-width: 768px) { .apply-grid { grid-template-columns: 1fr; } }

/* Keep text readable inside the white form card even in dark sections */
.cs3-alt-dark .apply-card,
.cs3-alt-dark .apply-card * { color: #0f1f33 !important; }
.cs3-alt-dark .apply-card a { color: var(--cs3-blue) !important; }
.apply-field .req { color: #E03131 !important; }

/* Ensure the Careers submit button stays white even with the above override */
.cs3-alt-dark .apply-card .apply-btn { color:#fff !important; }

/* =========================
   CONTACT PAGE (scoped)
   ========================= */
.contact-section { background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%); }
.contact-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.contact-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 22px; }
.badge-pill { display: inline-block; padding: 8px 12px; border-radius: 999px; font-size: .9rem; font-weight: 700; background: rgba(0,42,92,.06); color: #0f1f33; border: 1px solid rgba(0,42,92,.12); }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card { background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 14px; padding: 18px; box-shadow: 0 10px 28px rgba(0,0,0,.06); display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; }
.contact-card--primary { grid-column: 1 / -1; border-color: rgba(0,42,92,.15); box-shadow: 0 16px 40px rgba(0,42,92,.10); }
.contact-card__icon { width: 56px; height: 56px; border-radius: 12px; background: rgba(0,42,92,.06); display: grid; place-items: center; }
.contact-card__icon .i { width: 28px; height: 28px; fill: #002A5C; }
.contact-card__body h3 { margin: 0 0 6px; font-weight: 700; font-size: 1.1rem; }
.contact-lead { margin: 0 0 8px; color: #0f1f33; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin: 2px 0; }
.contact-cta { display: inline-block; margin-top: 6px; font-weight: 700; border-bottom: 2px solid rgba(0,42,92,.25); }
.contact-cta:hover { filter: brightness(1.1); }

.contact-note { margin-top: 18px; font-size: .95rem; color: #495057; text-align: left; }

@media (max-width: 992px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-card--primary { grid-column: 1 / -1; }
}
@media (max-width: 576px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 48px 1fr; }
}

/* Unified primary card split layout */
.contact-card--primary .contact-card__body { width: 100%; }
.contact-card__split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.contact-card__split .contact-split-col h4 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.contact-card__split .contact-split-col--right { border-left: 1px dashed rgba(0,42,92,.2); padding-left: 20px; }

@media (max-width: 768px) {
  .contact-card__split { grid-template-columns: 1fr; }
  .contact-card__split .contact-split-col--right { border-left: 0; padding-left: 0; border-top: 1px dashed rgba(0,42,92,.2); padding-top: 16px; }
}

/* Nav & CTA emphasis */
.navbar .nav-link { font-weight: 700; }
.navbar .btn-danger { font-weight: 800; letter-spacing: .2px; }

/* Ensure unified-card titles line up at the same height */
.contact-card__split .contact-split-col h3,
.contact-card__split .contact-split-col h4 { margin-top: 0; }

/* Bold all "contact-cta" links sitewide; keep Fred's default weight */
.contact-cta { font-weight: 700; }
.contact-card--primary .contact-list a[href="mailto:fr@cs3us.com"] { font-weight: 400; }

/* =========================
   CS³ utility (optional)
   ========================= */
/* Use: <span class="cs3">CS<sup>3</sup></span> for guaranteed look */
.cs3 { white-space: nowrap; }
.cs3 sup { font-size:.6em; vertical-align: super; }