:root {
    --navy: #0b2545;
    --navy-soft: #13315c;
    --accent: #f5c400;
    --bg: #f4f6f9;
    --surface: #fff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --green: #047857;
    --green-bg: #d1fae5;
    --amber: #92400e;
    --amber-bg: #fef3c7;
    --red: #9f1239;
    --red-bg: #ffe4e6;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--navy-soft); }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--navy); color: #fff; border-bottom: 4px solid var(--accent); }
.site-header .container {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px 24px; padding-top: 18px; padding-bottom: 18px;
}
.brand {
    color: #fff; text-decoration: none; font-weight: 800;
    font-size: 20px; letter-spacing: .08em; line-height: 1.2;
    display: inline-flex; align-items: center; gap: 4px;
}
/* The icon's navy disc blends into the header; offset its edge so the building aligns with the content. */
.brand img { width: 44px; height: 44px; flex: none; margin-left: -8px; }
.brand-text span { color: var(--accent); }
.contact { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.contact a { color: #dbe4f0; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.contact a:hover { color: #fff; }
.contact svg { width: 16px; height: 16px; flex: none; opacity: .8; }

.hero { padding: 32px 0 8px; }
.hero h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; color: var(--navy); }
.hero p { margin: 0; color: var(--muted); }

main { flex: 1; padding-bottom: 48px; }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Filters */
.filters { padding: 20px; margin: 24px 0; }
.filters-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.field select, .field input {
    width: 100%; height: 42px; padding: 0 12px; font: inherit; color: var(--text);
    background: #fff; border: 1px solid #d1d5db; border-radius: 8px; transition: border-color .15s, box-shadow .15s;
}
.field select {
    appearance: none; padding-right: 36px; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E") no-repeat right 10px center / 18px;
}
.field select:focus, .field input:focus { outline: none; border-color: var(--navy-soft); box-shadow: 0 0 0 3px rgba(19, 49, 92, .15); }
.range { display: flex; align-items: center; gap: 8px; }
.range span { color: var(--muted); }
.filters-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 22px;
    font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid transparent;
    text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-soft); }
.btn-ghost { background: #fff; color: var(--text); border-color: #d1d5db; }
.btn-ghost:hover { border-color: var(--muted); }

/* Summary */
.summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.summary p { margin: 0; color: var(--muted); }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge-vacant { background: var(--green-bg); color: var(--green); }
.badge-vacant-until { background: var(--amber-bg); color: var(--amber); }
.badge-rented { background: var(--red-bg); color: var(--red); }

/* Listing table */
.listing { overflow: hidden; }
.listing table { width: 100%; border-collapse: collapse; }
.listing th {
    text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
    letter-spacing: .04em; padding: 14px 16px; background: #f9fafb; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.listing td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.listing tbody tr:last-child td { border-bottom: 0; }
.listing tbody tr:hover { background: #f9fafb; }
.listing .num { text-align: right; }
.project-name { font-weight: 600; color: var(--navy); }
.project-type { display: block; font-size: 13px; color: var(--muted); }
.price { font-weight: 700; color: var(--navy); white-space: nowrap; }
.price small { font-weight: 400; color: var(--muted); }
.images-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px;
    background: var(--accent); color: var(--navy); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.images-link:hover { background: #e0b300; }
.images-link svg { width: 16px; height: 16px; }
.no-images { color: var(--muted); font-size: 13px; white-space: nowrap; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* Mobile: each row becomes a card */
@media (max-width: 900px) {
    .listing { background: none; box-shadow: none; overflow: visible; }
    .listing thead { display: none; }
    .listing table, .listing tbody, .listing tr, .listing td { display: block; }
    .listing tbody { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .listing tbody tr { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
    .listing tbody tr:hover { background: var(--surface); }
    .listing td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; text-align: right; }
    .listing td.num { text-align: right; }
    .listing td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; }
    .listing td.cell-project { display: block; text-align: left; padding: 0 0 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
    .listing td.cell-project::before, .listing td.cell-images::before { content: none; }
    .listing td.cell-images { padding-top: 12px; }
    .listing td.cell-images .images-link { width: 100%; justify-content: center; padding: 10px; }
    .listing td.empty { display: block; text-align: center; }
    .listing td.empty::before { content: none; }
}

@media (max-width: 560px) {
    .brand { font-size: 17px; }
    .brand img { width: 36px; height: 36px; margin-left: -7px; }
    .hero h1 { font-size: 23px; }
    .filters { padding: 16px; }
    .filters-grid { grid-template-columns: 1fr 1fr; }
    .field-wide { grid-column: 1 / -1; }
    .filters-actions .btn { flex: 1; }
}

/* Gallery */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--navy); }
.gallery { columns: 240px; column-gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.gallery li { break-inside: avoid; margin: 0 0 14px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e5e7eb; }
.gallery img { display: block; width: 100%; height: auto; cursor: zoom-in; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery-empty { color: var(--muted); }

/* Footer */
.site-footer { background: var(--navy); color: #9fb0c8; font-size: 13px; }
.site-footer .container { padding-top: 18px; padding-bottom: 18px; }

/* Photo modal (featherlight) */
.featherlight { background: rgba(8, 15, 30, .9); }
.featherlight .featherlight-content { background: transparent; padding: 0; border: 0; overflow: visible; max-height: 90vh; }
.featherlight .featherlight-image { border-radius: 8px; max-width: 92vw !important; max-height: 88vh !important; width: auto !important; height: auto !important; }
.featherlight .featherlight-close-icon {
    position: fixed; top: 16px; right: 16px; width: 40px; height: 40px; line-height: 40px;
    border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 18px;
}
.featherlight .featherlight-close-icon:hover { background: rgba(255, 255, 255, .3); }
.featherlight .featherlight-next, .featherlight .featherlight-previous { position: fixed; top: 0; bottom: 0; width: 15%; background: transparent; }
.featherlight .featherlight-next { left: auto; right: 0; }
.featherlight .featherlight-previous { left: 0; right: auto; }
.featherlight .featherlight-next span, .featherlight .featherlight-previous span {
    display: block; left: 50%; right: auto; width: 48px; height: 48px; margin: -24px 0 0 -24px;
    border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; text-shadow: none;
    font-size: 18px; line-height: 48px;
}
.featherlight .featherlight-next:hover span, .featherlight .featherlight-previous:hover span { background: rgba(255, 255, 255, .3); }
