/* Stránky nemovitostí (nemovitosti/*.html) – doplněk ke style.css */

.nm_state { display: inline-flex; align-items: center; padding: .3rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .01em; color: #fff; background: var(--teal-dark); }
.nm_state.is-live { color: var(--teal-dark); background: #fff; box-shadow: inset 0 0 0 1px rgba(44,116,124,.35); }

.nm_facts dd { overflow-wrap: anywhere; }

/* Galerie */
.nm_gal { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.nm_gal h2 { font-size: clamp(1.375rem, 1vw + 1.05rem, 1.75rem); line-height: 1.2; letter-spacing: -.025em; margin-bottom: 1rem; }
.nm_grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 720px) { .nm_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; } }
@media (min-width: 1024px) { .nm_gal { margin-inline: -4rem; } }
.nm_grid li { min-width: 0; }
.nm_th {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--tint); cursor: zoom-in;
  box-shadow: 0 0 0 0 rgba(55,138,147,0), 0 20px 40px -30px rgba(15,59,62,0);
  outline: 2px solid transparent; outline-offset: 3px;
  transition: box-shadow .3s var(--ease-glow), transform .3s var(--ease-glow), outline-color .25s var(--ease-glow);
}
.nm_th img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease-out); }
.nm_th .story_viz { right: .4rem; top: .4rem; }
@media (hover: hover) and (pointer: fine) {
  .nm_th:hover { box-shadow: 0 0 0 4px rgba(55,138,147,.16), 0 20px 40px -26px rgba(15,59,62,.55); }
  .nm_th:hover img { transform: scale(1.03); }
}
.nm_th:active { transform: scale(.985); }
.nm_th:focus-visible { box-shadow: 0 0 0 4px rgba(55,138,147,.28), 0 20px 40px -26px rgba(15,59,62,.55); }

/* Prohlížeč fotek */
.nm_lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10,16,24,.96); color: #fff; opacity: 0; transition: opacity .26s var(--ease-glow);
  overscroll-behavior: contain;
}
.nm_lb::backdrop { background: transparent; }
.nm_lb.is-on { opacity: 1; }
.nm_lb_in { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 4.25rem 1rem 6rem; }
@media (min-width: 900px) { .nm_lb_in { padding: 3.5rem 6rem 3rem; } }
.nm_lb_fig { display: grid; justify-items: center; gap: .75rem; margin: 0; max-width: 100%; max-height: 100%; }
.nm_lb_fig img {
  max-width: 100%; max-height: calc(100vh - 11rem); width: auto; height: auto; border-radius: var(--r-sm); object-fit: contain;
  opacity: 1; transform: scale(1); transition: opacity .22s var(--ease-glow), transform .3s var(--ease-glow);
}
@supports (height: 100dvh) { .nm_lb_fig img { max-height: calc(100dvh - 11rem); } }
.nm_lb:not(.is-on) .nm_lb_fig img { transform: scale(.97); }
.nm_lb_fig img.is-swap { opacity: 0; }
.nm_lb_fig figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1rem; font-size: .9375rem; font-weight: 600; text-align: center; color: #fff; }
.nm_lb_n { color: #c4dfe1; font-variant-numeric: tabular-nums; }
.nm_lb_btn {
  position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background-color: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
  outline: 2px solid transparent; outline-offset: 3px;
  transition: background-color .25s var(--ease-glow), border-color .25s var(--ease-glow), box-shadow .3s var(--ease-glow), transform .25s var(--ease-glow), outline-color .25s var(--ease-glow);
}
.nm_lb_btn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nm_lb_btn:active { transform: scale(.94); }
.nm_lb_btn:focus-visible { outline-color: #9fd6db; }
@media (hover: hover) and (pointer: fine) {
  .nm_lb_btn:hover { background-color: rgba(255,255,255,.2); border-color: rgba(255,255,255,.45); box-shadow: 0 0 0 6px rgba(255,255,255,.08); }
}
.nm_lb_btn.is-close { top: .9rem; right: .9rem; }
.nm_lb_btn.is-prev { left: calc(50% - 3.5rem); bottom: 1.25rem; }
.nm_lb_btn.is-next { right: calc(50% - 3.5rem); bottom: 1.25rem; }
@media (min-width: 900px) {
  .nm_lb_btn.is-prev { left: 1.5rem; bottom: auto; top: calc(50% - 1.5rem); }
  .nm_lb_btn.is-next { right: 1.5rem; bottom: auto; top: calc(50% - 1.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .nm_th, .nm_th img, .nm_lb_fig img, .nm_lb_btn { transition-property: opacity, box-shadow, background-color, border-color, outline-color; }
  .nm_lb:not(.is-on) .nm_lb_fig img, .nm_th:hover img { transform: none; }
}

.nm-page .cs_link .btn { max-width: 100%; white-space: normal; text-align: left; }
.nm_th.is-plan { background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 0 0 0 rgba(55,138,147,0), 0 20px 40px -30px rgba(15,59,62,0); }
.nm_th.is-plan img { object-fit: contain; padding: .5rem; background: #fff; }
@media (hover: hover) and (pointer: fine) { .nm_th.is-plan:hover { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 4px rgba(55,138,147,.16), 0 20px 40px -26px rgba(15,59,62,.55); } }
.nm_th.is-plan:focus-visible { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 4px rgba(55,138,147,.28), 0 20px 40px -26px rgba(15,59,62,.55); }
.nm-page .cs_video { margin-top: clamp(2rem, 4vw, 2.75rem); }
.nm_lb_fig img { background: transparent; }

/* Podklady v textu: půdorys, rozpis poplatků, mapa okolí, energetický štítek */
.nm_lb.is-single [data-lb-n], .nm_lb.is-single .nm_lb_btn.is-prev, .nm_lb.is-single .nm_lb_btn.is-next { display: none; }
.nm_doc { margin: 1.1rem 0 0; }
.nm_doc.is-portrait { max-width: 24rem; }
.nm_doc figcaption { margin-top: .6rem; font-size: .9375rem; line-height: 1.5; color: var(--ink-soft); }
.nm_th.is-doc img { aspect-ratio: auto; padding: 0; }
.art_body .nm_tbl { width: 100%; max-width: 34rem; border-collapse: collapse; font-size: 1rem; line-height: 1.4; }
.nm_tbl caption { padding-bottom: .65rem; text-align: left; font-weight: 600; color: var(--ink); }
.nm_tbl th, .nm_tbl td { padding: .55rem .35rem; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; color: var(--ink-soft); }
.nm_tbl thead th { padding-top: 0; font-size: .8125rem; font-weight: 700; color: var(--teal-btn); }
.nm_tbl thead th:not(:first-child), .nm_tbl td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nm_tbl tfoot th, .nm_tbl tfoot td { padding-block: .7rem; border-bottom: 0; font-weight: 700; color: var(--ink); background: var(--tint); }
.nm_tbl tfoot th { padding-left: .6rem; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.nm_tbl tfoot td:last-child { padding-right: .6rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
