/*
Theme Name: Blue Mahi
Description: Custom theme for Blue Mahi Real Estate — home, areas, agents, and vendor pages, with standard WordPress blog functionality underneath.
Author: Black River Digital Co.
Version: 1.0
Text Domain: blue-mahi
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  --bm-blue: #14A2DC;
  --bm-blue-dark: #0E7BAA;
  --bm-navy: #10263B;
  --bm-navy-light: #1B3A57;
  --bm-cream: #F7F6F2;
  --bm-white: #FFFFFF;
  --bm-ink: #16232E;
  --bm-ink-dim: #5B6B76;
  --bm-line: rgba(16, 38, 59, 0.10);
  --bm-radius: 14px;
  --bm-font-display: 'Fraunces', 'Georgia', serif;
  --bm-font-body: 'Inter', -apple-system, sans-serif;
  --bm-font-nav: 'Barlow Condensed', 'Inter', -apple-system, sans-serif;
}

/* ==========================================================================
   BASE
   ========================================================================== */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--bm-font-body);
  color: var(--bm-ink);
  background: var(--bm-cream);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--bm-font-display);
  color: var(--bm-navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
.bm-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}
.bm-eyebrow {
  font-family: var(--bm-font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bm-blue-dark);
}
.bm-btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.bm-btn-primary { background: var(--bm-blue); color: var(--bm-white); }
.bm-btn-primary:hover { background: var(--bm-blue-dark); }
.bm-btn-outline { border: 1.5px solid var(--bm-navy); color: var(--bm-navy); }
.bm-btn-outline:hover { background: var(--bm-navy); color: var(--bm-white); }
.bm-btn-text { color: var(--bm-blue-dark); font-weight: 600; }
.bm-btn-text:hover { color: var(--bm-navy); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.bm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bm-line);
}
.bm-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  max-width: 1200px;
  margin: 0 auto;
}
.bm-logo img { height: 68px; width: auto; }
.bm-nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-family: var(--bm-font-nav);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bm-nav-links a:hover { color: var(--bm-blue-dark); }
.bm-nav-cta { background: var(--bm-navy); color: var(--bm-white) !important; padding: 11px 24px; border-radius: 999px; font-weight: 700; }
.bm-nav-cta:hover { background: var(--bm-blue-dark); }
.bm-menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; }
.bm-desktop-only { display: inline-block; }
.bm-mobile-only { display: none; }

@media (max-width: 880px) {
  .bm-nav-links { position: fixed; top: 92px; left: 0; right: 0; background: var(--bm-white); flex-direction: column; align-items: flex-start; gap: 0; border-bottom: 1px solid var(--bm-line); transform: translateY(-150%); transition: transform 0.25s ease; padding: 8px 0; }
  .bm-nav-links.open { transform: translateY(0); }
  .bm-nav-links a { padding: 16px 28px; width: 100%; border-bottom: 1px solid var(--bm-line); }
  .bm-menu-toggle { display: block; }
  .bm-desktop-only { display: none; }
  .bm-mobile-only { display: inline-block; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.bm-hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--bm-white);
  overflow: hidden;
}
.bm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,38,59,0.15) 0%, rgba(16,38,59,0.55) 100%);
  z-index: 1;
}
.bm-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.bm-hero-content { position: relative; z-index: 2; max-width: 640px; }
.bm-hero h1 { color: var(--bm-white); font-size: clamp(2.4rem, 5.5vw, 4rem); }
.bm-hero p { font-size: 1.15rem; max-width: 46ch; margin-bottom: 30px; opacity: 0.95; }
.bm-hero .bm-btn-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.bm-hero .bm-btn-text { color: var(--bm-white); }

/* When a background video is active, shrink the overlay copy into a small
   caption pinned to the bottom-left so the video stays the focus. */
.bm-hero-has-video {
  min-height: 88vh;
  align-items: flex-end;
}
.bm-hero-has-video::before {
  background: linear-gradient(0deg, rgba(16,38,59,0.75) 0%, rgba(16,38,59,0) 45%);
}
.bm-hero-has-video .bm-wrap { width: 100%; padding-bottom: 44px; }
.bm-hero-has-video .bm-hero-content { max-width: 420px; }
.bm-hero-has-video .bm-eyebrow { font-size: 0.7rem; }
.bm-hero-has-video h1 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 6px; }
.bm-hero-has-video p { font-size: 0.9rem; margin-bottom: 16px; max-width: 40ch; }
.bm-hero-has-video .bm-btn { padding: 10px 22px; font-size: 0.85rem; }

@media (max-width: 640px) {
  .bm-hero-has-video { min-height: 72vh; }
}

/* ==========================================================================
   ABOUT (logo + intro, under hero)
   ========================================================================== */
.bm-about { background: var(--bm-white); padding: 90px 0; border-bottom: 1px solid var(--bm-line); }
.bm-about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
.bm-about-logo { display: flex; justify-content: center; }
.bm-about-logo img { width: 100%; max-width: 340px; height: auto; }
.bm-about-content h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 10px; }
.bm-about-content p { color: var(--bm-ink-dim); margin-top: 16px; font-size: 1.05rem; max-width: 62ch; }

@media (max-width: 880px) {
  .bm-about { padding: 60px 0; }
  .bm-about-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .bm-about-logo img { max-width: 220px; margin: 0 auto; }
  .bm-about-content p { margin-left: auto; margin-right: auto; }
}

/* ==========================================================================
   SECTIONS (generic)
   ========================================================================== */
.bm-section { padding: 100px 0; }
.bm-section-alt { background: var(--bm-white); }
.bm-section-head { max-width: 640px; margin-bottom: 48px; }
.bm-section-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 10px; }
.bm-section-head p { color: var(--bm-ink-dim); margin-top: 14px; max-width: 60ch; }

/* ==========================================================================
   AGENT CARDS
   ========================================================================== */
.bm-agent-scroller-wrap { position: relative; }
.bm-agent-grid {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.bm-agent-grid::-webkit-scrollbar { display: none; }
.bm-agent-card {
  text-align: left;
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: start;
}
.bm-agent-card img {
  width: 100%; height: auto; border-radius: var(--bm-radius); aspect-ratio: 4/5; object-fit: cover; margin-bottom: 18px;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}
/* Desktop: reveal color on mouse hover */
.bm-agent-card:hover img { filter: grayscale(0%); }
/* Touch devices: reveal color on first tap (see main.js), second tap navigates to the agent's page */
.bm-agent-card.bm-active img { filter: grayscale(0%); }
.bm-agent-card h3 { font-size: 1.3rem; margin-bottom: 2px; }
.bm-agent-card .bm-agent-title { color: var(--bm-blue-dark); font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; }
.bm-agent-card p { color: var(--bm-ink-dim); font-size: 0.92rem; }
.bm-agent-card .bm-agent-contact { margin-top: 10px; font-size: 0.9rem; }

.bm-agent-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--bm-line);
  background: var(--bm-white);
  color: var(--bm-navy);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(16,38,59,0.12);
  z-index: 3;
  transition: background 0.2s ease;
}
.bm-agent-arrow:hover { background: var(--bm-cream); }
.bm-agent-arrow-prev { left: -22px; }
.bm-agent-arrow-next { right: -22px; }

@media (max-width: 880px) {
  .bm-agent-card { width: 220px; }
  .bm-agent-arrow { display: none; }
}

/* ==========================================================================
   VALUATION / FUNNEL FORM
   ========================================================================== */
.bm-funnel {
  background: var(--bm-navy);
  color: var(--bm-white);
  border-radius: 24px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.bm-funnel h2 { color: var(--bm-white); }
.bm-funnel p { color: rgba(255,255,255,0.75); }
.bm-funnel form { display: flex; flex-direction: column; gap: 14px; }
.bm-funnel label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.7); margin-bottom: 4px; display: block; }
.bm-funnel input {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--bm-white);
  font-family: var(--bm-font-body);
  font-size: 1rem;
}
.bm-funnel input::placeholder { color: rgba(255,255,255,0.4); }
.bm-funnel input:focus { outline: 2px solid var(--bm-blue); }
.bm-funnel .bm-trust-line { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
.bm-form-status { font-size: 0.9rem; min-height: 1.2em; }
.bm-form-status.success { color: #8FCB9B; }
.bm-form-status.error { color: #E08585; }
@media (max-width: 900px) { .bm-funnel { grid-template-columns: 1fr; padding: 40px 28px; } }

/* ==========================================================================
   TRUST / STATS STRIP
   ========================================================================== */
.bm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.bm-stat-num { font-family: var(--bm-font-display); font-size: 3.2rem; color: var(--bm-blue-dark); font-weight: 600; letter-spacing: -0.01em; }
.bm-stat-label { color: var(--bm-ink-dim); font-size: 0.92rem; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 780px) { .bm-stats { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   AREA / VENDOR CARDS
   ========================================================================== */
.bm-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.bm-card {
  background: var(--bm-white);
  border-radius: var(--bm-radius);
  overflow: hidden;
  border: 1px solid var(--bm-line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bm-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(16,38,59,0.10); }
.bm-card img { height: 200px; width: 100%; object-fit: cover; }
.bm-card-body { padding: 24px; }
.bm-card-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.bm-card-body p { color: var(--bm-ink-dim); font-size: 0.92rem; margin-bottom: 14px; }

.bm-vendor-category { margin-bottom: 48px; }
.bm-vendor-category h3 { font-size: 1.4rem; border-bottom: 2px solid var(--bm-blue); padding-bottom: 10px; margin-bottom: 24px; }
.bm-vendor-item { display: flex; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--bm-line); }
.bm-vendor-item img { width: 60px; height: 60px; object-fit: contain; flex-shrink: 0; }
.bm-vendor-item h4 { margin-bottom: 2px; font-size: 1.05rem; }
.bm-vendor-item p { color: var(--bm-ink-dim); font-size: 0.88rem; margin: 0; }

/* ==========================================================================
   PROPERTY CARDS (Featured Properties / Recently Sold)
   ========================================================================== */
.bm-property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.bm-property-card {
  background: var(--bm-white);
  border-radius: var(--bm-radius);
  overflow: hidden;
  border: 1px solid var(--bm-line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bm-property-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(16,38,59,0.12); }
.bm-property-photo { position: relative; }
.bm-property-photo img { height: 230px; width: 100%; object-fit: cover; }
.bm-property-badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--bm-navy); color: var(--bm-white);
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 6px 14px; border-radius: 999px;
}
.bm-property-badge.sold { background: var(--bm-blue-dark); }
.bm-property-body { padding: 22px 24px; }
.bm-property-price { font-family: var(--bm-font-display); font-size: 1.5rem; color: var(--bm-navy); font-weight: 600; margin-bottom: 4px; }
.bm-property-address { color: var(--bm-ink-dim); font-size: 0.95rem; margin-bottom: 12px; }
.bm-property-specs { display: flex; gap: 16px; font-size: 0.85rem; color: var(--bm-ink-dim); border-top: 1px solid var(--bm-line); padding-top: 12px; }
.bm-property-specs span strong { color: var(--bm-navy); }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.bm-testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.bm-testimonial-card {
  background: var(--bm-white);
  border-radius: var(--bm-radius);
  padding: 32px;
  border: 1px solid var(--bm-line);
  position: relative;
}
.bm-testimonial-stars { color: var(--bm-blue); font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 14px; }
.bm-testimonial-quote { font-family: var(--bm-font-display); font-size: 1.15rem; color: var(--bm-navy); line-height: 1.5; margin-bottom: 20px; }
.bm-testimonial-quote::before { content: '\201C'; }
.bm-testimonial-quote::after { content: '\201D'; }
.bm-testimonial-name { font-weight: 600; color: var(--bm-navy); font-size: 0.95rem; }
.bm-testimonial-meta { color: var(--bm-ink-dim); font-size: 0.85rem; }

/* ==========================================================================
   BLOG (minimal styling — leave native WP editor experience intact)
   ========================================================================== */
.bm-blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.bm-blog-card img { width: 100%; border-radius: var(--bm-radius); height: 200px; object-fit: cover; margin-bottom: 16px; }
.bm-blog-card h3 { font-size: 1.2rem; }
.bm-blog-card .bm-blog-excerpt { color: var(--bm-ink-dim); font-size: 0.92rem; }
.single-post .bm-wrap { max-width: 760px; }
.single-post article { padding: 60px 0; }
.single-post h1 { font-size: 2.4rem; }
.single-post .entry-content { font-size: 1.08rem; line-height: 1.75; }
.single-post .entry-content p { margin-bottom: 1.4em; }
.single-post .entry-content img { border-radius: var(--bm-radius); margin: 1.5em 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.bm-footer { background: var(--bm-navy); color: rgba(255,255,255,0.8); padding: 64px 0 32px; }
.bm-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.bm-footer h4 { color: var(--bm-white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.bm-footer a:hover { color: var(--bm-blue); }
.bm-footer-tagline { color: rgba(255,255,255,0.6); margin-top: 12px; font-size: 0.92rem; }
.bm-footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: rgba(255,255,255,0.55); }
.bm-footer-bottom img { height: 28px; }
@media (max-width: 780px) { .bm-footer-grid { grid-template-columns: 1fr; } }

::selection { background: var(--bm-blue); color: var(--bm-white); }
:focus-visible { outline: 2px solid var(--bm-blue); outline-offset: 2px; }


/* ==========================================================================
   "OUR LIVEWELL" nav label that swaps to "Our Listings" on hover
   ========================================================================== */
.bm-swap { display: inline-grid; overflow: hidden; vertical-align: bottom; }
.bm-swap > span { grid-area: 1 / 1; text-align: center; white-space: nowrap; transition: opacity 0.25s ease, transform 0.25s ease; }
.bm-swap-b { opacity: 0; transform: translateY(60%); color: var(--bm-blue-dark); }
a:hover > .bm-swap .bm-swap-a { opacity: 0; transform: translateY(-60%); }
a:hover > .bm-swap .bm-swap-b { opacity: 1; transform: none; }

/* ==========================================================================
   LISTINGS (Our Livewell) + CHARTER PAGES
   ========================================================================== */
.bm-page-sub { color: var(--bm-ink-dim); margin-top: 14px; max-width: 60ch; }
.bm-subhead { font-size: 1.5rem; margin: 64px 0 24px; padding-bottom: 10px; border-bottom: 2px solid var(--bm-blue); }
.bm-empty-state {
  background: var(--bm-white);
  border: 1px solid var(--bm-line);
  border-radius: var(--bm-radius);
  padding: 48px 32px;
  text-align: center;
  color: var(--bm-ink-dim);
}
.bm-empty-state h3 { margin-bottom: 8px; }
.bm-empty-state .bm-btn { margin-top: 16px; }
.bm-charter-card .bm-property-body h3 { font-size: 1.3rem; margin-bottom: 4px; }
.bm-charter-captain { color: var(--bm-blue-dark); font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; }
.bm-charter-desc { color: var(--bm-ink-dim); font-size: 0.92rem; margin: 0 0 14px; }
.bm-charter-rate { font-family: var(--bm-font-display); color: var(--bm-navy); font-weight: 600; margin-bottom: 10px; }
.bm-charter-cta { display: inline-block; margin-top: 12px; }


/* ==========================================================================
   JOIN THE RUN (agent recruiting page)
   ========================================================================== */
.bm-join-hero { min-height: 560px; }
.bm-join-hero .bm-hero-content { max-width: 720px; }
.bm-join-hero h1 { font-size: clamp(3rem, 8vw, 5.5rem); letter-spacing: -0.01em; }

.bm-join-story { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.bm-join-story h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 10px; }
.bm-join-story-body { color: var(--bm-ink-dim); font-size: 1.05rem; }
.bm-join-story-body p { margin: 0 0 1.1em; }
.bm-join-story-body strong { color: var(--bm-navy); }

.bm-join-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.bm-join-benefit {
  background: var(--bm-cream);
  border: 1px solid var(--bm-line);
  border-radius: var(--bm-radius);
  padding: 30px 28px;
}
.bm-join-benefit-num {
  font-family: var(--bm-font-nav);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--bm-blue-dark);
  margin-bottom: 12px;
}
.bm-join-benefit h3 { font-size: 1.2rem; margin-bottom: 8px; }
.bm-join-benefit p { color: var(--bm-ink-dim); font-size: 0.95rem; margin: 0; }

.bm-join-apply {
  background: var(--bm-navy);
  color: var(--bm-white);
  border-radius: 24px;
  padding: 64px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.bm-join-apply h2 { color: var(--bm-white); font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 10px; }
.bm-join-apply p { color: rgba(255,255,255,0.75); }
.bm-join-apply .bm-eyebrow { color: var(--bm-blue); }
.bm-join-apply form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bm-join-apply .bm-field-full { grid-column: 1 / -1; }
.bm-join-apply label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.7); margin-bottom: 5px; display: block; }
.bm-join-apply input[type="text"],
.bm-join-apply input[type="email"],
.bm-join-apply input[type="tel"],
.bm-join-apply input[type="url"],
.bm-join-apply select,
.bm-join-apply textarea {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--bm-white);
  font-family: var(--bm-font-body);
  font-size: 1rem;
}
.bm-join-apply select option { color: var(--bm-ink); }
.bm-join-apply textarea { resize: vertical; min-height: 110px; }
.bm-join-apply input:focus,
.bm-join-apply select:focus,
.bm-join-apply textarea:focus { outline: 2px solid var(--bm-blue); }
.bm-join-apply .bm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bm-join-apply .bm-trust-line { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin: 0; }

.bm-join-close { text-align: center; padding: 90px 0; }
.bm-join-close h2 { font-size: clamp(2.2rem, 6vw, 4rem); text-transform: uppercase; letter-spacing: 0.02em; font-family: var(--bm-font-nav); font-weight: 700; }
.bm-join-close p { color: var(--bm-ink-dim); max-width: 48ch; margin: 0 auto 28px; }

@media (max-width: 900px) {
  .bm-join-story { grid-template-columns: 1fr; gap: 28px; }
  .bm-join-apply { grid-template-columns: 1fr; padding: 40px 24px; gap: 32px; }
  .bm-join-apply form { grid-template-columns: 1fr; }
}


/* Agents page (/agents): show everyone in a wrapping grid instead of the homepage scroller */
.bm-agent-grid.bm-agent-grid-stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  overflow: visible;
  margin: 0;
  padding: 0;
}
.bm-agent-grid.bm-agent-grid-stack .bm-agent-card { width: auto; }
