/* Brevard Coastal Homes - shared site styles */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Jost', sans-serif;
  color: #1c2b30;
  background: #f7f5ef;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

:root {
  --nav-bg: #1c1b30;
  --ink: #1c2b30;
  --ink-deep: #10242c;
  --gold: #c9a15a;
  --border-1: #cfd8da;
  --border-2: #e6e1d6;
  --border-3: #d8d2c2;
  --muted-1: #667377;
  --muted-2: #445055;
  --muted-3: #8a8f92;
  --success: #2f7a4f;
  --danger: #c0392b;
  --bg-warm: #f7f5ef;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; margin: 0; }

/* ---------- NAV ---------- */
.bch-nav-wrap { position: relative; z-index: 100; background: var(--nav-bg); }
.bch-nav-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 56px) 0;
}
.bch-logo {
  font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 600;
  color: #fff; letter-spacing: .5px;
}
.bch-nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bch-btn-outline {
  display: inline-block;
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 9px 16px; border: 1px solid rgba(255,255,255,0.5); border-radius: 3px; white-space: nowrap;
  background: transparent; cursor: pointer;
}
.bch-btn-gold {
  display: inline-block;
  color: var(--ink-deep); background: var(--gold); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; padding: 9px 16px; border-radius: 3px;
  white-space: nowrap; border: none; cursor: pointer;
}
.bch-dropdown-wrap { position: relative; }
.bch-dropdown-panel {
  position: absolute; top: 100%; right: 0; margin-top: 8px; background: #fff;
  border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,0.3); padding: 18px; width: 280px; z-index: 200;
  display: none;
}
.bch-dropdown-panel.bch-open { display: block; }
.bch-dropdown-panel.bch-left { right: auto; left: 0; }

.bch-navbar {
  display: flex; align-items: center; justify-content: center;
  padding: 14px clamp(16px, 4vw, 56px) 22px; margin-top: 20px;
  position: relative;
}
.bch-navbar-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; row-gap: 6px; }
.bch-navbar-link {
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 8px 10px; display: block; border: 1px solid transparent; cursor: pointer;
}
.bch-navbar-link.bch-active-border { border-color: rgba(255,255,255,0.4); }

.bch-mega-panel {
  display: none; background: rgba(8, 18, 22, 0.96); padding: 28px clamp(16px, 4vw, 56px) 34px;
  z-index: 200; box-shadow: 0 18px 32px rgba(0,0,0,0.28);
}
.bch-mega-panel.bch-open { display: block; }
.bch-mega-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px 24px; max-width: 1400px; margin: 0 auto; }
.bch-mega-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 24px; max-width: 1400px; margin: 0 auto; }
.bch-mega-link {
  color: #d8dee0; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}
.bch-mega-link:hover { color: #fff; }
.bch-mega-flex { display: flex; flex-wrap: wrap; gap: 20px 40px; max-width: 1400px; margin: 0 auto; align-items: center; }
@media (max-width: 900px) {
  .bch-mega-grid-5, .bch-mega-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .bch-mega-grid-5, .bch-mega-grid-4 { grid-template-columns: 1fr; }
}

.bch-form-input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border-3); border-radius: 4px;
  padding: 10px; font-size: 13px; margin-bottom: 8px; font-family: 'Jost', sans-serif;
}
.bch-form-error { font-size: 12px; color: var(--danger); margin-bottom: 8px; }
.bch-form-success { font-size: 12px; color: var(--success); margin-bottom: 10px; }
.bch-form-submit {
  display: flex; align-items: center; justify-content: center; background: var(--ink-deep);
  color: #fff; font-size: 13px; font-weight: 600; padding: 10px; border-radius: 4px; cursor: pointer;
  margin-bottom: 8px; border: none; width: 100%;
}
.bch-form-submit.bch-gold { background: var(--gold); color: var(--ink-deep); font-weight: 700; }
.bch-form-link { font-size: 12px; color: var(--muted-1); text-align: center; text-decoration: underline; cursor: pointer; }

/* ---------- FOOTER ---------- */
.bch-footer { background: var(--nav-bg); color: #d8dee0; padding: 56px clamp(16px, 4vw, 56px) 30px; }
.bch-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; max-width: 1400px; margin: 0 auto 30px; }
.bch-footer-col h4 { color: #fff; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; font-family: 'Jost', sans-serif; font-weight: 700; }
.bch-footer-col a, .bch-footer-col div { display: block; font-size: 13px; color: #b7c0c2; margin-bottom: 9px; }
.bch-footer-col a:hover { color: #fff; }
.bch-footer-brand { font-family: 'Playfair Display', serif; font-size: 20px; color: #fff; margin-bottom: 12px; }
.bch-footer-tagline { font-size: 13px; line-height: 1.7; color: #9fb0b5; }
.bch-footer-bottom { max-width: 1400px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; font-size: 12px; color: #8b969a; }

/* ---------- HERO ---------- */
.bch-hero { position: relative; width: 100%; min-height: 420px; overflow: hidden; }
.bch-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bch-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,35,45,0.35) 0%, rgba(15,35,45,0.15) 40%, rgba(10,25,32,0.55) 100%); }
.bch-hero-content { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; padding: 90px 16px 40px; }
.bch-hero-title { font-family: 'Playfair Display', serif; font-weight: 600; font-size: clamp(26px, 4.4vw, 42px); color: #fff; margin: 0 0 22px; text-align: center; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.bch-hero-select {
  flex: 1; min-width: 150px; background: rgba(20,35,40,0.55); border: 1px solid rgba(255,255,255,0.35);
  border-radius: 4px; padding: 0 16px; height: 48px; color: #fff; font-family: 'Jost', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; cursor: pointer;
}
.bch-hero-select option { color: #10242c; text-transform: none; }

/* ---------- CARDS / GRID ---------- */
.bch-photo-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bch-photo-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (max-width: 1100px) { .bch-photo-grid-5, .bch-photo-grid-4 { grid-template-columns: repeat(2, 1fr); } }
.bch-photo-card { position: relative; height: 240px; overflow: hidden; display: block; background: #223; }
.bch-photo-card img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
/* This photo is a tall portrait shot of the pier entrance sign; a plain center
   crop on the wide desktop card cuts the "COCOA BEACH PIER" banner off the
   top. Bias the crop upward so the full sign stays in frame at every
   breakpoint. */
.bch-photo-card img[src*="cocoa-beach-pier"] { object-position: center 18%; }
.bch-photo-card-label { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-family: 'Playfair Display', serif; font-weight: 500; font-size: 21px; color: #fff; }
.bch-photo-card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,20,0) 45%, rgba(10,14,20,0.75) 100%); }

.bch-section { padding: 48px clamp(16px, 4vw, 56px); max-width: 1600px; margin: 0 auto; }
.bch-section-title { font-size: 32px; text-align: center; margin-bottom: 40px; color: #1c2b30; }
.bch-section-title.bch-on-dark { color: #fff; }

/* ---------- LISTING GRID ---------- */
.bch-listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.bch-listing-card { background: #fff; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; }
.bch-listing-photo { position: relative; height: 190px; background: #dfe6e2; }
.bch-listing-photo img { width: 100%; height: 100%; object-fit: cover; }
.bch-fav-heart {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; border: none;
}
.bch-fav-heart.bch-active { color: var(--danger); }
.bch-listing-body { padding: 14px 16px 16px; }
.bch-listing-price { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.bch-listing-specs { font-size: 13px; color: var(--muted-2); margin-bottom: 4px; }
.bch-listing-address { font-size: 13px; color: var(--muted-3); }
.bch-listing-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--success); border: 1px solid var(--success); border-radius: 3px; padding: 2px 6px; margin-top: 8px; }

/* ---------- FILTER BAR ---------- */
.bch-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px clamp(16px, 4vw, 56px); background: #fff; border-bottom: 1px solid var(--border-2); position: sticky; top: 0; z-index: 50; }
.bch-filter-btn {
  position: relative; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border-1);
  border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.bch-filter-panel {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 6px; background: #fff; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14); padding: 14px; z-index: 60; min-width: 200px;
}
.bch-filter-panel.bch-open { display: block; }
.bch-filter-panel label { display: flex; align-items: center; gap: 8px; padding: 6px 2px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.bch-results-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(16px, 4vw, 56px) 0; max-width: 1600px; margin: 0 auto; font-size: 14px; color: var(--muted-2); }

.bch-map-placeholder { margin: 30px clamp(16px, 4vw, 56px); height: 260px; background: #e2e6df; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted-3); font-size: 14px; }

.bch-pagination { display: flex; justify-content: center; gap: 8px; padding: 30px 0 50px; }
.bch-page-btn { border: 1px solid var(--border-1); background: #fff; border-radius: 4px; padding: 8px 14px; cursor: pointer; font-size: 13px; }
.bch-page-btn.bch-current { background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }

/* ---------- MODALS ---------- */
.bch-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(10,20,24,0.55); z-index: 500; align-items: center; justify-content: center; padding: 20px; }
.bch-modal-overlay.bch-open { display: flex; }
.bch-modal-box { background: #fff; border-radius: 8px; padding: 28px; width: min(480px, 100%); max-height: 90vh; overflow-y: auto; position: relative; }
.bch-modal-close { position: absolute; top: 16px; right: 18px; cursor: pointer; font-size: 18px; color: var(--muted-2); background: none; border: none; }
.bch-modal-title { font-size: 20px; margin-bottom: 16px; }

/* ---------- BUTTONS ---------- */
.bch-btn-primary { display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; background: var(--ink-deep); color: #fff; border-radius: 4px; font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; border: none; }
.bch-btn-danger { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border: 1px solid rgba(139,38,38,0.7); border-radius: 4px; background: rgba(139,38,38,0.65); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }

/* ---------- LISTINGS PAGE (listings.html) ---------- */
.bch-listing-photo-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; }
.bch-listing-photo-placeholder span { font-size: 12px; letter-spacing: .3px; color: rgba(28,43,48,0.45); font-weight: 500; }
.bch-photo-tone-1 { background: #e3ddc9; }
.bch-photo-tone-2 { background: #cfe0dd; }
.bch-photo-tone-3 { background: #dfd6c6; }
.bch-photo-tone-4 { background: #c9dbd8; }
.bch-filter-option { padding: 9px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink); }
.bch-filter-option:hover { background: #f2efe6; }
.bch-filter-option.bch-selected { font-weight: 700; color: var(--ink-deep); }
.bch-filter-panel-scroll { max-height: 260px; overflow-y: auto; }
.bch-page-ellipsis { padding: 8px 6px; color: var(--muted-3); font-size: 13px; }

/* ---------- PROPERTY DETAIL PAGE (property.html) ---------- */
.bch-pd-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,1fr); gap: 32px; align-items: start; }
@media (max-width: 760px) {
  .bch-pd-grid { grid-template-columns: 1fr; }
  .bch-pd-agent-card { position: static !important; }
}
