* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ba-red: #9a3624;
    --ba-red-dark: #7d2c1d;
    --ba-dark: #111827;
    --ba-text: #1f2937;
    --ba-muted: #6b7280;
    --ba-border: #e5e7eb;
    --ba-soft-border: rgba(229, 231, 235, 0.8);
    --ba-surface: #f3f4f6;
    --ba-soft: #f9fafb;
    --ba-yellow: #eab308;
    --ba-yellow-border: #ca8a04;
    --ba-orange: #fb923c;
    --ba-orange-border: #c2410c;
    --ba-green: #0f766e;
    --ba-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #fafafa;
    color: var(--ba-text);
}

body.lightbox-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-topbar {
    position: relative;
    z-index: 1100;
    background: var(--ba-dark);
    color: rgba(255, 255, 255, 0.92);
}

.site-topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.site-topbar a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s;
}

.site-topbar a:hover {
    color: #ffffff;
}

.site-topbar-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-header {
    position: relative;
    z-index: 1100;
    background: #ffffff;
    border-bottom: 1px solid var(--ba-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-logo img {
    height: 46px;
    width: auto;
    display: block;
}

.site-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-header-eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ba-muted);
}

.site-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ba-dark);
}

.site-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header-link,
.site-header-button,
.page-intro-button,
.contact-button,
.contact-link,
.show-all-btn,
.contact-clear,
.filter-tab,
.mobile-toggle {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.site-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--ba-border);
    color: var(--ba-text);
    background: white;
    font-size: 14px;
    font-weight: 600;
}

.site-header-button,
.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 8px;
    background: var(--ba-red);
    color: white;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.page-intro-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 8px;
    background: white;
    color: var(--ba-red);
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.site-header-link:hover,
.contact-link:hover,
.contact-clear:hover,
.show-all-btn:hover,
.filter-tab:hover {
    border-color: var(--ba-red);
    color: var(--ba-red);
}

.site-header-button:hover,
.contact-button:hover,
.mobile-toggle:hover {
    background: var(--ba-red-dark);
}

.page-intro-button:hover {
    background: #f3f4f6;
}

.page {
    padding: 24px;
}

.page-intro {
    max-width: 1400px;
    margin: 0 auto 18px;
    padding: 26px 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    border-radius: 12px;
    background: var(--ba-red);
    color: white;
}

.page-intro-copy {
    max-width: 760px;
}

.page-intro-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.page-intro-title {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    margin-bottom: 10px;
}

.page-intro-text {
    max-width: 640px;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

.page-intro-actions {
    min-width: 280px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-intro-note {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.76);
}

.container {
    display: flex;
    height: 78vh;
    min-height: 580px;
    max-height: 880px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--ba-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sidebar {
    width: 390px;
    background: rgba(255, 255, 255, 0.96);
    border-right: 1px solid var(--ba-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header,
.search-box,
.stats-bar {
    padding-left: 20px;
    padding-right: 20px;
}

.sidebar-header {
    padding-top: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ba-border);
}

.sidebar-header h1 {
    font-size: 22px;
    color: var(--ba-dark);
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 13px;
    color: var(--ba-muted);
    line-height: 1.5;
}

.search-box {
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ba-border);
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus,
.contact-input:focus,
.contact-textarea:focus,
.contact-select:focus {
    border-color: var(--ba-red);
    box-shadow: 0 0 0 4px rgba(154, 54, 36, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--ba-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:hover {
    background: #f9fafb;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .name {
    font-weight: 600;
    color: var(--ba-text);
    font-size: 14px;
}

.search-result-item .designation {
    font-size: 12px;
    color: var(--ba-muted);
    margin-top: 2px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 8px;
    border-bottom: 1px solid var(--ba-border);
}

.filter-tab {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--ba-border);
    background: white;
    color: var(--ba-muted);
}

.filter-tab.active {
    background: var(--ba-red);
    color: white;
    border-color: var(--ba-red);
}

.stats-bar {
    padding-top: 12px;
    padding-bottom: 12px;
    background: #f9fafb;
    border-bottom: 1px solid var(--ba-border);
    font-size: 13px;
    color: var(--ba-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.stats-bar strong {
    color: var(--ba-text);
}

.show-all-btn,
.contact-clear,
.contact-link {
    background: white;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ba-muted);
    cursor: pointer;
}

.property-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #ffffff;
}

.property-card {
    background: white;
    border: 1px solid var(--ba-border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.property-card:hover {
    border-color: rgba(154, 54, 36, 0.32);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.property-card.active {
    border-color: var(--ba-red);
    background: #fffaf7;
}

.property-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.property-card-title-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.property-card-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--ba-red);
    flex: 0 0 auto;
    margin-top: 2px;
}

.property-card-pin svg {
    width: 100%;
    height: 100%;
}

.property-card h3 {
    font-size: 16px;
    color: var(--ba-text);
    margin: 0;
}

.property-card .designation {
    font-size: 12px;
    color: var(--ba-red);
    margin-top: 3px;
}

.property-card-tags,
.popup-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.property-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.property-badge.land {
    background: #fff3c4;
    color: #8a5a00;
    border-color: rgba(202, 138, 4, 0.18);
}

.property-badge.buildings {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(153, 27, 27, 0.14);
}

.property-card-info {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--ba-muted);
}

.property-card-info span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.map-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
}

.map-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
}

#map {
    height: 100%;
    width: 100%;
}

.leaflet-popup {
    z-index: 1000 !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    padding: 14px;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.leaflet-popup-tip {
    box-shadow: none;
}

.leaflet-control-attribution {
    font-size: 9px;
    background: rgba(255,255,255,0.7) !important;
    padding: 2px 6px !important;
}

.property-popup {
    display: flex;
    flex-direction: column;
    min-width: 250px;
    max-width: 300px;
}

.property-popup h3 {
    margin: 0 0 4px 0;
    color: var(--ba-dark);
    font-size: 18px;
    font-weight: 700;
}

.property-popup .designation {
    color: var(--ba-red);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.popup-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.popup-gallery-button {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
}

.popup-gallery-image {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    background: #e5e7eb;
    transition: transform 0.2s ease;
}

.popup-gallery-button:hover .popup-gallery-image {
    transform: scale(1.03);
}

.popup-media-empty {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    color: var(--ba-muted);
    font-size: 12px;
    line-height: 1.5;
}

.property-popup .info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.info-card {
    padding: 10px 10px 9px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.info-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ba-muted);
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ba-dark);
    line-height: 1.4;
}

.property-popup .description {
    font-size: 13px;
    color: #374151;
    margin: 0 0 10px;
    padding: 10px;
    background: #fffaf7;
    border-radius: 6px;
    border: 1px solid rgba(154, 54, 36, 0.08);
    line-height: 1.6;
}

.popup-note {
    font-size: 12px;
    color: var(--ba-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.popup-cta,
.popup-cta:link,
.popup-cta:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--ba-red);
    color: white !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.popup-cta:hover {
    background: var(--ba-red-dark);
    color: white !important;
}

.property-label,
.building-marker {
    background: transparent;
    border: none;
    cursor: pointer;
}

.map-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px 3px 4px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(209, 213, 219, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.map-chip-part {
    padding: 2px 6px 2px 3px;
}

.map-chip-pin,
.map-point-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ba-red);
}

.map-chip-land .map-chip-pin {
    color: #b45309;
}

.map-chip-pin {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.map-point-pin {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    cursor: pointer;
}

.map-chip-pin svg,
.map-point-pin svg {
    width: 100%;
    height: 100%;
}

.map-chip-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--ba-dark);
    white-space: nowrap;
}

.map-chip-part .map-chip-text {
    font-size: 10px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.lightbox.open {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.78);
}

.lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100vw - 32px));
    margin: auto;
    max-height: calc(100dvh - 32px);
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.7);
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.lightbox-media {
    min-height: 320px;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: min(72vh, 820px);
    object-fit: contain;
}

.lightbox-meta {
    padding: 18px 20px 20px;
}

.lightbox-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ba-dark);
}

.lightbox-caption {
    font-size: 13px;
    color: var(--ba-muted);
    line-height: 1.5;
}

.disclaimer {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255,255,255,0.96);
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 500;
    font-size: 11px;
    color: var(--ba-muted);
    max-width: 250px;
    line-height: 1.5;
    transition: opacity 0.2s;
}

.disclaimer a {
    color: var(--ba-red);
}

.legend {
    position: absolute;
    bottom: 86px;
    right: 16px;
    background: rgba(255,255,255,0.96);
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 500;
    font-size: 12px;
    transition: opacity 0.2s;
}

.legend h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 7px 0;
}

.legend-color {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 6px;
    border: 2px solid;
}

.legend-color.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.contact-section {
    max-width: 1400px;
    margin: 18px auto 0;
}

.contact-inner {
    display: block;
}

.contact-sidecard,
.contact-content {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.contact-sidecard {
    height: 100%;
    padding: 28px 24px;
    background: var(--ba-dark);
    color: white;
    border: 1px solid var(--ba-dark);
}

.contact-sidecard-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.contact-sidecard h2 {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 12px;
}

.contact-sidecard p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
}

.contact-sidecard-points {
    list-style: none;
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.contact-sidecard-points li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.contact-sidecard-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
}

.contact-content {
    background: white;
    border: 1px solid var(--ba-border);
    width: 100%;
    padding: 28px 32px 32px;
}

.contact-lead {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ba-red);
    margin-bottom: 10px;
}

.contact-title {
    font-size: 28px;
    color: var(--ba-dark);
    margin-bottom: 8px;
}

.contact-text {
    font-size: 14px;
    color: var(--ba-muted);
    margin-bottom: 18px;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-grid-secondary {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
}

.contact-field-wide {
    grid-column: 1 / -1;
}

.contact-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ba-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-input,
.contact-textarea,
.contact-select {
    width: 100%;
    border: 1px solid var(--ba-border);
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 14px;
    background: white;
    color: var(--ba-text);
    outline: none;
}

.contact-input-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.contact-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1.1em + 2px), calc(100% - 15px) calc(1.1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.contact-textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

.contact-selection-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-selection-row .contact-input {
    background: #f9fafb;
}

.contact-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    font-size: 13px;
    color: var(--ba-text);
    line-height: 1.6;
}

.contact-consent input {
    margin-top: 3px;
    accent-color: var(--ba-red);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-status {
    min-height: 20px;
    font-size: 13px;
    font-weight: 600;
}

.contact-status.is-error {
    color: #b91c1c;
}

.contact-status.is-success {
    color: var(--ba-green);
}

.mobile-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--ba-red);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.mobile-toggle svg {
    transition: transform 0.2s;
}

@media (max-width: 1180px) {
    .contact-spacer {
        display: none;
    }
}

@media (max-width: 1024px) {
    .page-intro {
        flex-direction: column;
    }

    .page-intro-actions {
        min-width: 0;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .site-topbar-inner,
    .site-header-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-topbar-inner {
        justify-content: center;
        align-items: center;
        min-height: 40px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .site-header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .site-header-actions {
        width: 100%;
        margin-left: 0;
        justify-content: stretch;
    }

    .site-header-link,
    .site-header-button {
        flex: 1 1 auto;
    }

    .site-header-title {
        font-size: 16px;
    }

    .site-header-eyebrow {
        font-size: 10px;
    }

    .page {
        padding: 16px;
    }

    .page-intro {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .page-intro-title {
        font-size: 28px;
    }

    .page-intro-text {
        font-size: 15px;
    }

    .container {
        flex-direction: column;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 42vh;
        position: relative;
        z-index: 10;
    }

    .sidebar.collapsed {
        max-height: 76px;
    }

    .sidebar.collapsed .search-box,
    .sidebar.collapsed .filter-tabs,
    .sidebar.collapsed .stats-bar,
    .sidebar.collapsed .property-list {
        display: none;
    }

    .sidebar-header {
        padding: 14px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-header h1 {
        font-size: 18px;
        margin-bottom: 0;
    }

    .sidebar-header p {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .sidebar.collapsed .mobile-toggle svg {
        transform: rotate(180deg);
    }

    .search-box,
    .stats-bar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .search-box {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .filter-tabs {
        padding: 10px 12px;
        gap: 6px;
    }

    .filter-tab {
        padding: 7px 11px;
        font-size: 11px;
    }

    .stats-bar {
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 12px;
    }

    .property-list {
        padding: 10px;
        max-height: 24vh;
    }

    .property-card {
        padding: 14px;
    }

    .property-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .map-panel {
        min-height: 68vh;
        border-top: 1px solid var(--ba-border);
    }

    .map-wrapper {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    #map {
        flex: 0 0 auto;
        height: 62vh;
        min-height: 56vh;
    }

    .legend,
    .disclaimer {
        position: static;
        margin: 12px;
        max-width: none;
    }

    .legend {
        order: 2;
        padding: 12px 14px;
    }

    .disclaimer {
        order: 3;
        padding: 10px 12px;
    }

    .property-popup {
        min-width: min(240px, calc(100vw - 40px));
        max-width: min(320px, calc(100vw - 32px));
    }

    .leaflet-popup-content {
        max-height: min(68vh, 520px);
        padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .property-popup .info {
        grid-template-columns: 1fr;
    }

    .contact-section {
        margin-top: 14px;
    }

    .contact-content {
        padding: 18px;
    }

    .contact-title {
        font-size: 22px;
    }

    .contact-grid,
    .contact-grid-secondary {
        grid-template-columns: 1fr;
    }

    .contact-selection-row,
    .contact-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-button,
    .contact-link,
    .contact-clear {
        width: 100%;
    }

    .lightbox-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
    }

    .lightbox-meta {
        padding: 14px 16px 16px;
    }
}

@media (max-width: 420px) {
    .page-intro,
    .container,
    .contact-content,
    .contact-sidecard {
        border-radius: 10px;
    }

    .filter-tabs {
        gap: 4px;
    }

    .filter-tab {
        padding: 6px 10px;
    }

    .map-chip-text {
        font-size: 10px;
    }
}
