/* ─── Building SEO Pages — matches kaza.rs design system ───── */
/* Uses same patterns as city.css: city-page-wrapper, city-card, city-pill, city-stats-bar */

/* ── Hero (reuses city-hero pattern) ────────────────────────── */
.bldg-hero {
    text-align: center;
    padding: 48px 20px 32px;
    border-radius: 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
}
.bldg-hero-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}
.bldg-hero-subtitle {
    font-size: 15px;
    color: #6b6b6b;
    margin: 0;
    font-weight: 400;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.bldg-breadcrumb {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
}
.bldg-breadcrumb a {
    color: #6b6b6b;
    text-decoration: none;
}
.bldg-breadcrumb a:hover {
    color: #1a1a1a;
    text-decoration: underline;
}
.bldg-bc-sep {
    margin: 0 8px;
    color: #ccc;
}

/* ── Stats bar (reuses city-stats-bar) ──────────────────────── */
.bldg-metrics {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}
.bldg-metric {
    text-align: center;
    padding: 12px 8px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}
.bldg-metric-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
.bldg-metric-label {
    display: block;
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

/* ── Context text ───────────────────────────────────────────── */
.bldg-context {
    font-size: 15px;
    line-height: 1.7;
    color: #6b6b6b;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8e8e8;
}
.bldg-context p { margin: 0 0 12px 0; }
.bldg-context p:last-child { margin-bottom: 0; }
.bldg-context b { color: #1a1a1a; font-weight: 600; }
.bldg-context-text {
    font-size: 15px;
    line-height: 1.7;
    color: #6b6b6b;
    margin-bottom: 24px;
}

/* ── Sections ───────────────────────────────────────────────── */
.bldg-section {
    margin-bottom: 48px;
}
.bldg-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    padding: 0;
}
.bldg-section-other {
    padding-top: 32px;
    border-top: 1px solid #e8e8e8;
}

/* ── Street cards (city page — reuses city-card pattern) ───── */
.bldg-street-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.bldg-street-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    padding: 20px;
    transition: box-shadow .2s ease, transform .15s ease;
}
.bldg-street-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.bldg-street-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.bldg-street-card-meta {
    font-size: 13px;
    color: #6b6b6b;
}

/* ── Building cards (street page) ───────────────────────────── */
.bldg-building-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.bldg-building-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    padding: 20px;
    transition: box-shadow .2s ease, transform .15s ease;
}
.bldg-building-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.bldg-building-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.bldg-building-num {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}
.bldg-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.bldg-tag-apt { background: #e6f0ff; color: #1a56db; }
.bldg-tag-house { background: #e6f9e6; color: #5f9a03; }

.bldg-building-card-body { flex: 1; }
.bldg-building-detail {
    font-size: 13px;
    color: #6b6b6b;
    line-height: 1.7;
}
.bldg-building-card-foot {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.bldg-hipoteka-note {
    font-size: 12px;
    color: #d97706;
    font-weight: 600;
}

/* ── Building detail — info grid ────────────────────────────── */
.bldg-details-grid {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.bldg-detail-item { min-width: 160px; }
.bldg-detail-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.bldg-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.bldg-detail-sub {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    margin-left: 4px;
}

/* ── Apartment table ────────────────────────────────────────── */
.bldg-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}
.bldg-table {
    width: 100%;
    border-collapse: collapse;
}
.bldg-table th {
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
    background: #f8f9fa;
}
.bldg-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f3f3;
    font-size: 14px;
    color: #333;
}
.bldg-table tbody tr:last-child td {
    border-bottom: none;
}
.bldg-table tbody tr:hover {
    background: #fafafa;
}
.bldg-col-num {
    text-align: right;
}

/* ── Apartment table — grouped sections (Airbnb-style) ──────── */
/* Section header row: full-width, gray, uppercase, count on the right */
.bldg-apt-group-row td {
    background: #f7f7f7;
    padding: 10px 16px;
    border-top: 1px solid #ebebeb;
    border-bottom: 1px solid #ebebeb;
    font-size: 12px;
    font-weight: 600;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.bldg-apt-group-row-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.bldg-apt-group-row:hover td {
    background: #f7f7f7;  /* don't apply row hover to group header */
}
.bldg-apt-group:first-child .bldg-apt-group-row td {
    border-top: none;  /* first group sits flush against thead */
}
.bldg-apt-group-title { letter-spacing: 0.6px; }
.bldg-apt-group-count {
    font-weight: 500;
    color: #9b9b9b;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 11px;
    letter-spacing: 0;
}

/* Subtle per-group cell tinting — keeps groups visually distinct */
.bldg-apt-group-apartment  td { background: #ffffff; }
.bldg-apt-group-commercial td { background: #fbfaff; }
.bldg-apt-group-garage     td { background: #fafafa; }
.bldg-apt-group-other      td { background: #fafdfb; }

/* Hover stays subtle but uniform per group */
.bldg-apt-group-apartment  tr:hover:not(.bldg-apt-group-row) td { background: #fafafa; }
.bldg-apt-group-commercial tr:hover:not(.bldg-apt-group-row) td { background: #f5f3fa; }
.bldg-apt-group-garage     tr:hover:not(.bldg-apt-group-row) td { background: #f3f3f3; }
.bldg-apt-group-other      tr:hover:not(.bldg-apt-group-row) td { background: #f3f7f4; }

/* Group-row override always wins — keep it gray on hover */
.bldg-apt-group-apartment  .bldg-apt-group-row td,
.bldg-apt-group-commercial .bldg-apt-group-row td,
.bldg-apt-group-garage     .bldg-apt-group-row td,
.bldg-apt-group-other      .bldg-apt-group-row td { background: #f7f7f7; }

/* Type pill in the Vrsta column — small, colored, matches POI accent palette */
.bldg-apt-type-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.4;
    white-space: nowrap;
}
.bldg-apt-type-apartment  { background: #eef4ff; color: #2563eb; }
.bldg-apt-type-commercial { background: #f3eefe; color: #7c3aed; }
.bldg-apt-type-garage     { background: #f0f0f0; color: #555;   }
.bldg-apt-type-other      { background: #ecf6f0; color: #15803d; }

/* Section borders between groups — single seam, not double */
.bldg-apt-group + .bldg-apt-group .bldg-apt-group-row td {
    border-top: 1px solid #ebebeb;
}
.bldg-apt-group tbody tr:last-child td {
    border-bottom: 1px solid #f3f3f3;
}
.bldg-apt-group:last-child tr:last-child td {
    border-bottom: none;
}

/* Encumbrance badges */
.bldg-enc-icons { display: flex; gap: 4px; }
.bldg-enc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.bldg-enc-hip { background: #dc2626; }
.bldg-enc-usu { background: #d97706; }
.bldg-enc-zab { background: #7c3aed; }

.bldg-legend {
    font-size: 13px;
    color: #999;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.bldg-legend .bldg-enc-badge {
    width: 18px; height: 18px;
    font-size: 10px;
    margin-right: 3px;
}

/* ── Nearby chips (reuses city-pill pattern) ─────────────────── */
.bldg-nearby-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.bldg-nearby-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #1a1a1a;
    background: #f0f0f0;
    border: 2px solid transparent;
    transition: all .15s ease;
}
.bldg-nearby-chip:hover {
    background: #e4e4e4;
    text-decoration: none;
    color: #1a1a1a;
}
.bldg-chip-meta {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* ── Other streets (pills) ──────────────────────────────────── */
.bldg-other-streets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.bldg-other-street-link {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    background: transparent;
    border: 2px solid #e8e8e8;
    transition: all .15s ease;
}
.bldg-other-street-link:hover {
    border-color: #333;
    color: #333;
    text-decoration: none;
}

/* ── Map (Google Maps Embed iframe) ──────────────────────────── */
.bldg-map-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.bldg-map-btn {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #e8e8e8;
    transition: all .15s ease;
}
.bldg-map-btn:hover { border-color: #1a1a1a; }
.bldg-map-btn-active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}
.bldg-map-frame {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: #f0f0f0;
}
.bldg-map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
@media (max-width: 600px) {
    .bldg-map-frame { height: 320px; }
}

/* ── Nearby POI cards ────────────────────────────────────────── */
.bldg-poi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.bldg-poi-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 20px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.bldg-poi-card:hover {
    border-color: #d4d4d4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Card head: icon + tiny category label */
.bldg-poi-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.bldg-poi-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bldg-poi-icon svg { display: block; }
.bldg-poi-title {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero: walking time */
.bldg-poi-walk-time {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.4px;
    line-height: 1.1;
    margin-bottom: 4px;
}

/* Name of closest item */
.bldg-poi-name {
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 8px;
    /* Allow up to 2 lines, then ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bldg-poi-name-fallback { color: #6b6b6b; font-style: italic; }

/* Count context line */
.bldg-poi-count-context {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    margin-top: auto;  /* sticks to bottom of card */
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* Category accent colors — soft tinted icon backgrounds */
.bldg-poi-transport  .bldg-poi-icon { background: #e8f0fe; color: #1a73e8; }
.bldg-poi-education  .bldg-poi-icon { background: #fef3e2; color: #d97706; }
.bldg-poi-health     .bldg-poi-icon { background: #fee2e2; color: #dc2626; }
.bldg-poi-shopping   .bldg-poi-icon { background: #f3e8ff; color: #7c3aed; }
.bldg-poi-food       .bldg-poi-icon { background: #d1fae5; color: #059669; }
.bldg-poi-recreation .bldg-poi-icon { background: #dcfce7; color: #16a34a; }

/* ── Active listings cards ───────────────────────────────────── */
.bldg-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.bldg-listing-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .15s ease;
}
.bldg-listing-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.bldg-listing-img {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    background-size: cover;
    background-position: center;
    background-color: #eee;
}
.bldg-listing-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.bldg-listing-badge-sale { background: rgba(252, 56, 74, 0.9); }
.bldg-listing-badge-rent { background: rgba(0, 136, 255, 0.9); }
.bldg-listing-info { padding: 12px 14px 14px; }
.bldg-listing-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}
.bldg-listing-permonth { font-size: 13px; font-weight: 400; color: #6b6b6b; }
.bldg-listing-meta { font-size: 13px; color: #6b6b6b; margin-top: 4px; }

/* ── Source note ─────────────────────────────────────────────── */
.bldg-source-note {
    font-size: 12px;
    color: #ccc;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

/* ── Responsive (matches city.css breakpoints) ──────────────── */
@media (max-width: 900px) {
    .bldg-street-cards { grid-template-columns: repeat(2, 1fr); }
    .bldg-building-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .bldg-hero { padding: 32px 16px 24px; }
    .bldg-hero-title { font-size: 26px; }
    .bldg-street-cards { grid-template-columns: 1fr; }
    .bldg-building-grid { grid-template-columns: 1fr; }
    .bldg-metrics { grid-template-columns: repeat(2, 1fr); }
    .bldg-details-grid { gap: 20px; }
}
@media (max-width: 480px) {
    .bldg-metrics { grid-template-columns: 1fr; }
}
