/* ============================================================
   PAGE — building-detail.html
   Figma: node 100:1932 (Frame 6), 1920 px wide
   Layout mirrors apartment-detail.html's gallery/section/sidebar
   patterns, simplified: no stats bar, no amenities checklist, no
   application/contact forms — just description + map/address card.
   ============================================================ */

/* ============================================================
   HEADING
   ============================================================ */
.bld-header {
  text-align: center;
  padding-top: var(--space-xl);
  padding-inline: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.bld-header .section-heading {
  margin-bottom: var(--space-md);
}

/* ============================================================
   PHOTO GALLERY — same pattern as apartment-detail's gallery
   1 large photo (col 1, spans 2 rows) + 2×2 thumbs (cols 2-3)
   ============================================================ */
.bld-gallery {
  padding: 0 var(--space-lg);
}

.bld-gallery__inner {
  max-width: var(--container-inner);
  margin-inline: auto;
}

.bld-gallery__grid {
  display: grid;
  grid-template-columns: 730fr 350fr 350fr;
  gap: var(--space-md);
}

.bld-gallery__main {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 100%;
  aspect-ratio: 730 / 620;
  overflow: hidden;
}

.bld-gallery__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bld-gallery__thumb {
  aspect-ratio: 350 / 298;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.bld-gallery__thumb .bld-gallery__img {
  position: absolute;
  inset: 0;
}

.bld-gallery__thumb--last {
  overflow: hidden;
}

.bld-gallery__show-all {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 16px;
  background-color: var(--color-white);
  border: 1px solid var(--color-bg-light);
  font-size: var(--text-footer);
  font-weight: 700;
  color: var(--color-text-gray);
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bld-gallery__show-all:hover {
  background-color: var(--color-bg-light);
  text-decoration: none;
}

/* ============================================================
   BODY — 2-column layout: main + sidebar
   ============================================================ */
.bld-body {
  padding: var(--space-lg) var(--space-lg) var(--space-2xl);
}

.bld-body__inner {
  max-width: var(--container-inner);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 424px;
  gap: var(--space-md);
  align-items: start;
}

/* ============================================================
   DESCRIPTION
   ============================================================ */
.bld-description {
  max-width: 880px;
  font-size: var(--text-nav);       /* 24px */
  font-weight: 400;
  color: var(--color-text-dark);
  line-height: 1.6;
}

.bld-description + .bld-description {
  margin-top: var(--space-sm);
}

.bld-description p + p {
  margin-top: var(--space-sm);
}

/* ============================================================
   SECTIONS — Video Tour / Building's Features / Neighborhood
   ============================================================ */
.bld-section {
  max-width: 880px;
  margin-top: var(--space-2xl);
}

.bld-section--last {
  margin-bottom: var(--space-xl);
}

.bld-section__head {
  margin-bottom: var(--space-lg);
}

.bld-section__head .section-heading {
  text-align: center;
  font-size: var(--text-sub);       /* 36px */
  font-weight: 300;
  text-transform: uppercase;
}

.bld-section__divider {
  width: 160px;
  margin-top: var(--space-sm);
}

.bld-video-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ============================================================
   BUILDING FEATURES — icon + label list
   ============================================================ */
.bld-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md) var(--space-lg);
}

.bld-features__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-bg-light);
  font-size: var(--text-nav);       /* 24px */
  font-weight: 400;
  color: var(--color-text-dark);
}

.bld-features__item:nth-child(-n+2) {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-bg-light);
}

.bld-feature-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}

/* ============================================================
   NEIGHBORHOOD
   ============================================================ */
.bld-neighborhood {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.bld-neighborhood p {
  font-size: var(--text-nav);       /* 24px */
  font-weight: 400;
  color: var(--color-text-dark);
  line-height: 1.6;
}

.bld-neighborhood__transit-label {
  font-weight: 700;
  margin-top: var(--space-md);
}

/* ============================================================
   SIDEBAR — map + building address card
   ============================================================ */
.bld-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
  background-color: var(--color-footer-bg);
  padding: var(--space-sm);
}

.bld-map-wrap {
  position: relative;
  width: 100%;
  border: 1px solid var(--color-bg-light);
  border-radius: 4px;
  overflow: hidden;
}

.bld-map-img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 390 / 299;
}

.bld-map-pin {
  position: absolute;
  left: 47%;
  top: 33%;
  transform: translateX(-50%);
  width: 17px;
  height: auto;
  pointer-events: none;
}

.bld-sidebar__info {
  padding-top: var(--space-md);
  text-align: left;
}

.bld-sidebar__address {
  font-size: var(--text-footer);
  font-weight: 400;
  color: var(--color-text-med);
  line-height: 1.4;
}

.bld-sidebar__email {
  display: inline-block;
  margin-top: 4px;
  font-size: var(--text-footer);
  color: var(--color-text-med);
}

.bld-sidebar__email:hover {
  color: var(--color-red);
  text-decoration: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ≤1024px — sidebar drops below main content */
@media (max-width: 1024px) {
  .bld-body__inner {
    grid-template-columns: 1fr;
  }

  .bld-sidebar {
    position: static;
  }

  .bld-map-wrap {
    width: 100%;
  }

  .bld-gallery__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .bld-gallery__main {
    grid-column: 1 / -1;
    grid-row: 1;
    aspect-ratio: 16 / 9;
  }

  .bld-gallery__thumb {
    grid-row: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ≤768px */
@media (max-width: 768px) {
  .bld-header {
    padding-top: var(--space-lg);
    padding-inline: var(--space-md);
    margin-bottom: var(--space-lg);
  }

  .bld-gallery {
    padding: 0 var(--space-md);
  }

  .bld-gallery__grid {
    grid-template-columns: 1fr;
    position: relative;
  }

  .bld-gallery__main {
    grid-column: 1;
    aspect-ratio: 4 / 3;
  }

  /* Mobile: show only the main photo, overlay the Show All Photos
     button from the last thumb (same pattern as apartment-detail) */
  .bld-gallery__thumb {
    display: none;
  }

  .bld-gallery__thumb--last {
    display: block;
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    pointer-events: none;
  }

  .bld-gallery__thumb--last .bld-gallery__img {
    display: none;
  }

  .bld-gallery__show-all {
    pointer-events: auto;
    bottom: var(--space-md);
    right: var(--space-md);
    padding: 11px 14px;
    gap: 5px;
    font-size: 16px;
  }

  .bld-gallery__show-all svg {
    width: 14px;
    height: 14px;
  }

  .bld-body {
    padding: var(--space-md) var(--space-md) var(--space-xl);
  }

  .bld-features {
    grid-template-columns: 1fr;
  }

  .bld-features__item:nth-child(-n+2) {
    padding-top: 0;
    border-top: none;
  }

  .bld-features__item:first-child {
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-bg-light);
  }

  .bld-section {
    margin-top: var(--space-xl);
  }
}

/* ≤375px */
@media (max-width: 375px) {
  .bld-header {
    padding-inline: var(--space-sm);
  }

  .bld-gallery {
    padding: 0 var(--space-sm);
  }

  .bld-gallery__show-all {
    bottom: var(--space-sm);
    right: var(--space-sm);
    padding: 9px 12px;
    gap: 4px;
    font-size: 14px;
  }

  .bld-gallery__show-all svg {
    width: 12px;
    height: 12px;
  }

  .bld-body {
    padding: var(--space-md) var(--space-sm) var(--space-xl);
  }
}
