/* Berthelson Marine — nautical theme */
:root {
  --bm-navy: #0a1f33;
  --bm-navy-deep: #071521;
  --bm-navy-mid: #14324c;
  --bm-teal: #1c7a73;
  --bm-teal-bright: #2a9d8f;
  --bm-brass: #c4a35a;
  --bm-foam: #f4f7f8;
  --bm-paper: #ffffff;
  --bm-ink: #1b2833;
  --bm-muted: #4d5d6b;
  --bm-line: rgba(10, 31, 51, 0.12);
  --bm-serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --bm-sans: "Outfit", "Segoe UI", system-ui, sans-serif;
  --bm-max: 1120px;
}

body.berthelson-marine {
  font-family: var(--bm-sans);
  color: var(--bm-ink);
  background: var(--bm-paper);
  font-size: 18px;
  line-height: 1.6;
}

body.berthelson-marine h1,
body.berthelson-marine h2,
body.berthelson-marine h3 {
  font-family: var(--bm-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bm-navy);
  line-height: 1.15;
}

/* Hide leftover Astra / template chrome */
body.berthelson-marine .entry-header,
body.berthelson-marine.home .entry-header,
body.berthelson-marine .ast-header-button-1,
body.berthelson-marine .ast-builder-social-element,
body.berthelson-marine .site-footer,
body.berthelson-marine #colophon,
body.berthelson-marine .ast-footer-copyright,
body.berthelson-marine .footer-adv,
body.berthelson-marine .ast-small-footer {
  display: none !important;
}

/* Stretch the content area so our full-width sections can breathe */
body.berthelson-marine #content,
body.berthelson-marine #primary,
body.berthelson-marine .site-content,
body.berthelson-marine .ast-container,
body.berthelson-marine .entry-content {
  max-width: none !important;
  width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

body.berthelson-marine #content {
  margin-bottom: 0 !important;
}

body.berthelson-marine .entry-content > * {
  margin-left: 0;
  margin-right: 0;
}

/* Header */
body.berthelson-marine .site-header,
body.berthelson-marine .ast-primary-header-bar,
body.berthelson-marine .ast-mobile-header-wrap,
body.berthelson-marine header.site-header {
  background: var(--bm-paper) !important;
  border-bottom: 1px solid var(--bm-line);
  box-shadow: none !important;
}

body.berthelson-marine .custom-logo-link img,
body.berthelson-marine .custom-logo {
  max-height: 56px !important;
  width: auto !important;
  height: 56px !important;
}

body.berthelson-marine .main-header-menu a,
body.berthelson-marine .ast-header-menu a,
body.berthelson-marine .main-navigation a {
  font-family: var(--bm-sans);
  font-weight: 500;
  font-size: 15px !important;
  letter-spacing: 0.02em;
  color: var(--bm-navy) !important;
  text-transform: none;
}

body.berthelson-marine .main-header-menu a:hover,
body.berthelson-marine .main-navigation a:hover {
  color: var(--bm-teal) !important;
}

body.berthelson-marine .menu-item-consult > a,
body.berthelson-marine .menu-item-consult > .menu-link {
  background: var(--bm-navy) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 0.55em 1.15em !important;
  margin-left: 0.4em;
}

body.berthelson-marine .menu-item-consult > a:hover,
body.berthelson-marine .menu-item-consult > .menu-link:hover {
  background: var(--bm-teal) !important;
  color: #fff !important;
}

/* Layout helpers inside page content */
.bm-wrap {
  width: min(var(--bm-max), calc(100% - 3rem));
  margin: 0 auto;
}

.bm-hero {
  position: relative;
  min-height: min(78vh, 42rem);
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-color: var(--bm-navy-deep);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.bm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 21, 33, 0.25) 0%, rgba(7, 21, 33, 0.55) 45%, rgba(7, 21, 33, 0.88) 100%),
    linear-gradient(90deg, rgba(7, 21, 33, 0.45) 0%, rgba(7, 21, 33, 0.05) 60%);
  z-index: 0;
}

.bm-hero .bm-wrap {
  position: relative;
  z-index: 1;
  padding: 6rem 0 4.5rem;
}

.bm-kicker {
  display: inline-block;
  font-family: var(--bm-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bm-brass);
  margin: 0 0 1rem;
}

body.berthelson-marine .bm-hero h1,
.bm-hero h1 {
  color: #fff !important;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  max-width: 16ch;
  margin: 0 0 1rem;
}

.bm-lede,
.bm-hero .bm-lede {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 2rem;
}

.bm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bm-sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none !important;
  border-radius: 999px;
  padding: 0.9em 1.4em;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bm-btn-primary {
  background: var(--bm-teal);
  color: #fff !important;
}

.bm-btn-primary:hover {
  background: var(--bm-teal-bright);
  color: #fff !important;
}

.bm-btn-ghost {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55);
}

.bm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bm-btn-navy {
  background: var(--bm-navy);
  color: #fff !important;
}

.bm-btn-navy:hover {
  background: var(--bm-teal);
  color: #fff !important;
}

.bm-section {
  padding: 5rem 0;
}

.bm-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 0.75rem;
}

.bm-section .bm-intro {
  color: var(--bm-muted);
  max-width: 40rem;
  margin: 0 0 2.5rem;
}

.bm-section-navy {
  background: var(--bm-navy);
  color: #fff;
}

.bm-section-navy h2,
.bm-section-navy h3 {
  color: #fff;
}

.bm-section-navy .bm-intro,
.bm-section-navy p {
  color: rgba(255, 255, 255, 0.86);
}

.bm-section-foam {
  background: var(--bm-foam);
}

.bm-grid-3,
.bm-grid-2,
.bm-steps {
  display: grid;
  gap: 1.5rem;
}

.bm-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.bm-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.bm-card {
  background: var(--bm-paper);
  border: 1px solid var(--bm-line);
  border-radius: 16px;
  padding: 1.6rem 1.5rem 1.5rem;
  box-shadow: 0 1px 0 rgba(10, 31, 51, 0.04);
}

.bm-section-foam .bm-card {
  background: #fff;
}

.bm-card h3 {
  font-size: 1.45rem;
  margin: 0 0 0.6rem;
}

.bm-card p,
.bm-prose p {
  margin: 0 0 0.9rem;
  color: var(--bm-muted);
}

.bm-card p:last-child,
.bm-prose p:last-child {
  margin-bottom: 0;
}

.bm-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--bm-navy);
  color: #fff;
  font-family: var(--bm-sans);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.bm-steps {
  grid-template-columns: repeat(4, 1fr);
}

.bm-cta-band .bm-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.bm-cta-band h2 {
  margin: 0 0 0.4rem;
}

.bm-cta-band p {
  margin: 0;
  max-width: 36rem;
}

.bm-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

.bm-split figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  /* The coastline photo is portrait; cap height so the section doesn't grow a blank band. */
  aspect-ratio: 4 / 5;
  max-height: 28rem;
}

.bm-split img,
.bm-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.bm-figure {
  margin: 0 0 2rem;
  border-radius: 18px;
  overflow: hidden;
}

.bm-prose {
  max-width: 42rem;
}

.bm-prose.bm-wide {
  max-width: 46rem;
}

.bm-note {
  border-left: 3px solid var(--bm-teal);
  padding: 0.2rem 0 0.2rem 1.1rem;
  color: var(--bm-muted);
  font-style: italic;
}

/* Form */
.bm-consult-form {
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 16px;
  padding: 1.6rem;
  max-width: 36rem;
}

.bm-consult-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--bm-navy);
}

.bm-consult-form input[type="text"],
.bm-consult-form input[type="email"],
.bm-consult-form textarea {
  width: 100%;
  border: 1px solid var(--bm-line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-family: var(--bm-sans);
  font-size: 1rem;
  color: var(--bm-ink);
  background: var(--bm-foam);
  margin-bottom: 1rem;
}

.bm-consult-form input:focus,
.bm-consult-form textarea:focus {
  outline: 2px solid var(--bm-teal);
  border-color: var(--bm-teal);
  background: #fff;
}

.bm-req {
  color: var(--bm-teal);
}

.bm-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.bm-form-banner {
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 0 0 1.2rem;
}

.bm-form-success {
  background: #e6f4f2;
  color: #0d4f4a;
}

.bm-form-error {
  background: #fdecec;
  color: #7a1f1f;
}

/* Footer we inject */
.bm-site-footer {
  background: var(--bm-navy-deep);
  color: rgba(255, 255, 255, 0.8);
  padding: 2.2rem 0;
  font-size: 0.92rem;
}

.bm-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.bm-footer-brand a,
.bm-footer-nav a {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
}

.bm-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.bm-footer-nav a {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8) !important;
}

.bm-footer-nav a:hover,
.bm-footer-brand a:hover {
  color: var(--bm-teal-bright) !important;
}

.bm-footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

/* Service page stacked sections */
.bm-service + .bm-service {
  border-top: 1px solid var(--bm-line);
}

@media (max-width: 900px) {
  .bm-grid-3,
  .bm-steps,
  .bm-grid-2,
  .bm-split {
    grid-template-columns: 1fr;
  }
  .bm-hero {
    min-height: min(70vh, 36rem);
  }
  .bm-wrap {
    width: min(var(--bm-max), calc(100% - 2rem));
  }
}
