/* Layout alignment fixes — loaded after style.css */

/* Dynamic header offset (updated by main.js) */
:root {
  --header-offset: 120px;
}

@media (max-width: 991.98px) {
  :root {
    --header-offset: 76px;
  }
}

/* Prevent horizontal scroll from fixed header / wide content */
html {
  overflow-x: clip;
}

main {
  display: block;
  width: 100%;
  min-height: 50vh;
}

.row > [class*="col-"] {
  min-width: 0;
}

/* Header / navbar alignment */
.site-header {
  width: 100%;
}

.header-navbar .navbar-brand {
  margin-right: 1rem;
  flex-shrink: 0;
}

/* Footer & contact logos */
.footer-brand-img {
  max-width: 320px;
  height: 96px;
  width: auto;
  object-fit: contain;
}

.contact-brand-logo {
  max-width: 280px;
  height: 80px;
  width: auto;
  object-fit: contain;
}

/* Header logo */
.header-navbar .brand-logo-img {
  max-width: 300px;
  height: 72px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.header-navbar {
  padding: 0.75rem 0;
}

@media (max-width: 575.98px) {
  .header-navbar .brand-logo-img {
    height: 56px;
    max-width: 240px;
  }

  .footer-brand-img {
    height: 80px;
    max-width: 260px;
  }
}

@media (min-width: 992px) {
  .header-navbar .navbar-collapse {
    flex-basis: auto;
    justify-content: flex-end;
  }

  .header-navbar .navbar-nav {
    align-items: center;
    gap: 0.15rem;
  }
}

/* Hero layout */
.home-hero-v2 .container {
  position: relative;
  z-index: 1;
}

.home-hero-v2 .row {
  align-items: center;
}

@media (min-width: 992px) {
  .home-hero-v2 .hero-content-col {
    padding-right: 2rem;
  }

  .home-hero-v2 .hero-visual-col {
    padding-left: 1rem;
  }
}

@media (max-width: 991.98px) {
  .home-hero-v2 .hero-visual-col {
    order: -1;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem 2.5rem;
}

.hero-stat {
  flex: 0 0 auto;
  min-width: 5rem;
}

/* Button links — always render as buttons */
a.btn-submit,
a.btn-outline-navy,
a.btn-gold,
a.btn-gold-lg,
a.btn-navy,
a.nav-cta,
button.btn-submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  white-space: nowrap;
  vertical-align: middle;
}

/* Contact page — inner stack without breaking Bootstrap columns */
.contact-page .contact-col-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.contact-page .contact-form-wrap {
  width: 100%;
}

.contact-brand-card {
  overflow: hidden;
}

.contact-brand-logo {
  margin: 0 auto;
  display: block;
}

/* Inner pages */
.page-banner .container {
  position: relative;
  z-index: 2;
}

.section-head {
  margin-left: auto;
  margin-right: auto;
}

/* Process + CTA alignment */
.process-row {
  align-items: stretch;
}

.cta-v2-inner {
  align-items: center;
}

/* Service cards equal height in row */
.section-light .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.section-light .row > [class*="col-"] > .svc-card {
  flex: 1 1 auto;
  width: 100%;
}

@media (max-width: 575.98px) {
  .hero-stats {
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
  }

  .hero-stat {
    min-width: 0;
    flex: 1 1 30%;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-submit,
  .hero-actions .btn-outline-navy {
    width: 100%;
    justify-content: center;
  }
}
