body{margin: 0;font-family: 'Montserrat', sans-serif; background-color: #ccc;min-width: 320px;}
img{max-width: 100%; height: auto; }
.header {
    text-align: center;
    width: 100%;
    background-color: #fff;
}
a{text-decoration: none; 
    color: inherit;      
}
.pv{width: auto !important;}
/* Header navigation - stick to top when scrolling */
.header-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: #fff;
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

.header-nav .nav-logo {
  display: none;
  height: 0;
  width: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.header-nav.fixed {
  position: fixed !important;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 70%;
  height: 80px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  border-radius: 10px;
}

.header-nav.fixed .nav-logo {
  display: block;
  height: 40px;
  transform-origin: center center;
  animation: trumpetAppear 0.5s 0.8s both ease-out;
}

@keyframes trumpetAppear {
  from { transform: rotate(0deg); }
  to { transform: rotate(37deg); }
}

@keyframes trumpetToZero {
  from { transform: rotate(37deg); }
  to { transform: rotate(0deg); }
}

.header-nav ul {
  margin: 0;
  padding: 6px 18px;
  list-style: none;
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
}

.header-nav.fixed ul {
  padding: 5px 18px;
  gap: 1px;
}

.header-nav li { display: inline-block; }
.header-nav a {
  color: #222;
  text-decoration: none;
  padding: 8px 12px;
  font-weight: 500;
  display: inline-block;
  position: relative;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
.header-nav a:hover {
  background: rgba(23, 62, 44, 0.1);
  border-bottom-color: transparent;
}

.header-nav.fixed a {
  padding: 8px 12px;
  border-radius: 6px;
}

.header-nav.fixed a:hover {
  background: rgba(23, 62, 44, 0.1);
  border-bottom-color: transparent;
}

/* Hide the 'Úvod' menu item in the compact fixed header (logo links home) */
.header-nav.fixed ul li.nav-home { display: none; }

@media (max-width: 600px) {
  .header-nav ul {
  gap: 12px;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  }
  .header-nav a { font-size: 0.95rem; }
  .header-nav.fixed .nav-logo { height: 40px; margin-right: 12px; }
}

.header-nav-placeholder {
  display: none;
  width: 100%;
  height: 0px;
}

.header-nav-placeholder.fixed-active {
  display: block;
  height: 80px;
}
.logo{max-width: 150px;}
h1 {
    font-size: 1.5em;
    margin-top: 0px;
    
}
.wrapper {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper--units {
  position: relative;
  z-index: 3;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

.map_wrapper {
    max-width: 2560px;
    position: relative;
    margin-bottom: -7px;
}
.map_wrapper svg{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}
/* Mobile: scale map to 50vh and allow horizontal swipe while keeping svg/image aligned */
@media (max-width: 768px) {
  .wrapper--units { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .map_wrapper {
    position: relative;
    height: 50vh; /* target half the viewport */
    /* SVG intrinsic aspect ratio: 2400 / 850 = 2.8235294118 */
    width: calc(2.8235294118 * 50vh);
    min-width: 100%;
    margin-bottom: 0;
    flex: 0 0 auto;
    display: inline-block;
    margin-left: 0;
  }

  .map_wrapper img,
  .map_wrapper svg {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* (removed map-hidden approach - positioning handled by inline script) */

  .map_wrapper img { z-index: 1; }
  .map_wrapper svg { z-index: 2; }

  /* No page-specific pan animation */

  /* reduce surrounding gaps so the map fills the swipe area */
  .wrapper--units { padding-left: 0; padding-right: 0; align-items: flex-start; }
}

/* Mobile hint shown over the map to prompt horizontal swipe; hides on interaction */
.map-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: 1200;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.28s ease, transform 0.28s ease;
  white-space: nowrap;
}
.map-hint.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}
.unit  {
    fill:none; 
    stroke-width: 2px;
    cursor: pointer;
    pointer-events: all;
}
.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    width: 200px;
    padding: 12px 15px;
    border-radius: 4px;
  pointer-events: none;
    opacity: 0.95;
    transition: opacity 0.3s ease;
    display: none;
    line-height: 1.6;
    z-index: 1000;
}

.tooltip a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.tooltip a:hover {
    color: #66BB6A;
    text-decoration: underline;
}
.unit--available:hover{
    animation: highlightUnit 0.5s infinite;
    filter: brightness(1.4) saturate(1.2);
    transition: filter 0.2s ease;
}

.unit--reserved:hover{
    animation: highlightUnitReserved 0.5s infinite;
    filter: brightness(1.4) saturate(1.2);
    transition: filter 0.2s ease;
}

.unit--unavailable:hover{
    animation: highlightUnitUnavailable 0.5s infinite;
    filter: brightness(1.8) saturate(1.2);
    transition: filter 0.2s ease;
}

.units-legend {
  display: block;
  position: absolute;
  width: fit-content;
  margin: 20px auto 40px;
  padding: 14px 18px;
  background: #ececec;
  border-radius: 6px;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.units-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #2b2b2b;
}

.units-legend__dot {
  width: 14px;
  height: 14px;
  border-radius: 25%;
  display: inline-block;
}

.units-legend__dot--available { background: rgb(132, 179, 96); }
.units-legend__dot--reserved { background: rgb(204, 124, 0); }
.units-legend__dot--unavailable { background: rgb(211, 47, 47); }

@keyframes highlightUnit {
    0% { stroke: rgba(37, 143, 51, 0.4); }
    50% { stroke: rgba(79, 204, 95, 0.4); }
    100% { stroke: rgba(37, 143, 51, 0.4); }
}

@keyframes highlightUnitReserved {
    0% { stroke: rgba(204, 124, 0, 0.4); }
    50% { stroke: rgba(255, 165, 50, 0.4); }
    100% { stroke: rgba(204, 124, 0, 0.4); }
}

@keyframes highlightUnitUnavailable {
    0% { stroke: rgba(211, 47, 47, 0.4); }
    50% { stroke: rgba(255, 82, 82, 0.4); }
    100% { stroke: rgba(211, 47, 47, 0.4); }
}

/*---------------------------------*/

.hero-slider {
  position: relative;
  width: 100%;
  height: 80vh;                /* nebo 700px / 90vh – uprav podle potřeby */
  min-height: 500px;           /* zabrání příliš malé výšce na malých obrazovkách */
  max-height: 800px;           /* max výška, aby to na 4K monitoru nevypadalo divně */
  overflow: hidden;
}
#gallery .hero-slider{
  max-height: 1500px;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* nejdůležitější – zachová poměr a ořízne okraje */
  object-position: center;     /* nebo center bottom, pokud je důležitý spodní okraj (zahrada) */
}

/* Subtle camera movement (Ken Burns) variants for slides */
:root {
  --slide-zoom: 1.12;    /* stronger zoom so panning never exposes image edge */
  --slide-min-zoom: 1.02; /* minimum zoom to keep edges hidden */
  --slide-interval: 8s;  /* will be synced from JS to match slide interval */
  --slide-translate: 8%;  /* larger horizontal movement */
  --slide-translate-start: 4%; /* smaller offset at animation start to avoid seams */
}

/* Base image settings */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  will-change: transform;
  transform: none;
}

/* Animations (only run on the active slide) */
.slide.active img { animation-duration: var(--slide-interval); animation-timing-function: ease-in-out; animation-fill-mode: both; animation-iteration-count: 1; }

@keyframes zoomIn {
  from { transform: scale(var(--slide-min-zoom)) translateX(0); }
  to   { transform: scale(var(--slide-zoom)) translateX(0); }
}

@keyframes zoomOut {
  from { transform: scale(var(--slide-zoom)) translateX(0); }
  to   { transform: scale(var(--slide-min-zoom)) translateX(0); }
}

@keyframes panLeftToRight {
  /* keep image slightly zoomed during the whole pan so edges are hidden;
     start a bit more to the right to avoid exposing image edge at animation start */
  from { transform: scale(var(--slide-zoom)) translateX(calc(-1 * var(--slide-translate-start))); }
  to   { transform: scale(var(--slide-zoom)) translateX(var(--slide-translate)); }
}

@keyframes panRightToLeftZoomOut {
  /* start moved a bit to the left (smaller positive translate) to avoid seam */
  from { transform: scale(var(--slide-zoom)) translateX(var(--slide-translate-start)); }
  /* end at minimum zoom and mirrored offset */
  to   { transform: scale(var(--slide-min-zoom)) translateX(calc(-1 * var(--slide-translate-start))); }
}

/* Per-slide assignments (1-based ordering as in your HTML) */
.slide:nth-child(1).active img { animation-name: zoomIn; }
.slide:nth-child(2).active img { animation-name: zoomOut; }
.slide:nth-child(3).active img { animation-name: panLeftToRight; }      
/* 4th: leave as it is — zoom out + slide right->left */
.slide:nth-child(4).active img { animation-name: panRightToLeftZoomOut; }
.slide:nth-child(5).active img { animation-name: zoomIn; }
.slide:nth-child(6).active img { animation-name: zoomOut; }
.slide:nth-child(7).active img { animation-name: zoomIn; }

/* Unit gallery: override with only zoom-in and zoom-out, extend animation to cover transition */
.unit--gallery .slide:nth-child(odd).active img { animation-name: zoomIn !important; animation-duration: 10s !important; }
.unit--gallery .slide:nth-child(even).active img { animation-name: zoomOut !important; animation-duration: 10s !important; }

.slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  color: white;
  pointer-events: none;

  /* padding posouvá i obsah */
  padding-left: clamp(5rem, 18vw, 340px);
  padding-right: clamp(2rem, 8vw, 180px);

  /* gradient posunutý doprava o ~18–20 % */
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.68)   0%,
    rgba(0,0,0,0.62)  15%,
    rgba(0,0,0,0.55)  35%,     /* zde byla dříve ~20 %, teď posunuto */
    rgba(0,0,0,0.45)  50%,     /* posunuto o ~15–20 % */
    rgba(0,0,0,0.25)  70%,     /* prodloužení tmavší části */
    rgba(0,0,0,0.08)  85%,
    transparent           100%
  );
}


.slide-content > * {
  pointer-events: auto;            /* text a tlačítko zůstanou klikací */
}

.slide-content h1 {
  font-size: clamp(2.2rem, 6.5vw, 2rem);
  margin: 0 0 1.2rem;
  max-width: 55vw;                 /* zabrání přetečení při dlouhém textu */
  text-shadow: 0 3px 14px rgba(0,0,0,0.9);
}

/* Contact form error messages */
.contact-error{color:#b00020;font-size:0.95rem;margin-top:0.25rem;min-height:1.1em}
.contact-error[aria-live]{opacity:1;transition:opacity .12s ease}

.slide-content p {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  max-width: 50vw;
  margin: 0 0 2.5rem;
}



.top-buttons {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.top-buttons .btn {
  background: transparent;
  color: #173e2c;
  border: 2px solid #173e2c;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
}

.top-buttons .btn:hover {
  background: #173e2c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
  .top-buttons {
    flex-direction: column;
  }
  
  .top-buttons .btn {
    
    text-align: center;
  }
}

/*.btn:hover {
  background: #1b5e20;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}*/

/* Šipky – viditelné jen na větších obrazovkách */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  font-size: 3rem;
  padding: 15px 22px;
  cursor: pointer;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.3s;
  border-radius: 10%;
}

.prev:hover, .next:hover { opacity: 1; }
.prev { left: 2vw; }
.next { right: 2vw; }

@media (max-width: 1024px) {
  .prev, .next { font-size: 2.2rem; padding: 5px 18px; }
}

/* Tečky */
.dots {
  position: absolute;
  bottom: 2vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: none;
}

.dot {
  width: 24px;
  height: 4px;
  background: rgba(255,255,255,0.6);
  border-radius: 10%;
  display: inline-block;
  margin: 0 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: white;
  transform: scale(1.4);
}

/* Unit gallery fullscreen lightbox */
.unit--gallery .slide img { cursor: zoom-in; }

body.gallery-lightbox-active { overflow: hidden; }

.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.gallery-lightbox.open { display: flex; }

.gallery-lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
}

.gallery-lightbox__close {
  position: absolute;
  top: 2vh;
  right: 2vw;
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  font-size: 2.4rem;
  line-height: 1;
  padding: 6px 16px;
  cursor: pointer;
  z-index: 1001;
  opacity: 0.8;
  transition: opacity 0.3s;
  border-radius: 10%;
}

.gallery-lightbox__close:hover { opacity: 1; }

.gallery-lightbox__prev,
.gallery-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  font-size: 3rem;
  padding: 15px 22px;
  cursor: pointer;
  z-index: 1001;
  opacity: 0.8;
  transition: opacity 0.3s;
  border-radius: 10%;
}

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover { opacity: 1; }
.gallery-lightbox__prev { left: 2vw; }
.gallery-lightbox__next { right: 2vw; }

@media (max-width: 1024px) {
  .gallery-lightbox__prev,
  .gallery-lightbox__next { font-size: 2.2rem; padding: 5px 18px; }
}

/* Mobil – méně výšky, menší text */
@media (max-width: 768px) {
  .hero-slider { height: 60vh; min-height: 450px; }
  .slide-content h1 { font-size: 25px; }
  .slide-content p  { font-size: clamp(1.1rem, 4vw, 1.4rem); }
}


/*---------------------------------*/


.main{width:80%; max-width:1800px;margin: auto;}

#lokalita p{display: block; float: left; margin-right: 5%; }
#lokalita .lokalita-map{display: block; float: right; width: 45%; margin :0;border-radius: 5%;}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 50%;
    float: left;
}

.unit--gallery {
    width: 100%;
    max-width: 1520px;
    margin: auto;
    padding: 0;
}
.unit--details {
  position: relative;
  z-index: 1;
  animation: unitDetailsSlideDown 0.7s ease-out 1;
  overflow: hidden;
}

.unit--details .dispozice, .price{font-size: 25px;display: block;}

@keyframes unitDetailsSlideDown {
  from {
    opacity: 0;
    transform: translateY(-28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quick action buttons */
.top-buttons {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.top-buttons .btn {
  background: #173e2c;
  color: white;
  border: 2px solid #173e2c;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn:hover {

  transform: scale(1.05);
  /*box-shadow: 0 4px 12px rgba(0,0,0,0.15);*/
}

@media (max-width: 768px) {
  .top-buttons {
    flex-direction: column;
  }
  
  .top-buttons .btn {
    
    text-align: center;
  }
}

.gallery-slider {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
    background: #000;
}

.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform-origin: center center;
    will-change: transform;
}

.gallery-slide.active.zoom-in img {
    animation: galleryZoomIn 12s ease-in-out forwards;
}

.gallery-slide.active.zoom-out img {
    animation: galleryZoomOut 12s ease-in-out forwards;
}

@keyframes galleryZoomIn {
    from { transform: scale(1.02); }
    to   { transform: scale(1.12); }
}

@keyframes galleryZoomOut {
    from { transform: scale(1.12); }
    to   { transform: scale(1.02); }
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    color: #000;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.gallery-arrow--prev { left: 15px; }
.gallery-arrow--next { right: 15px; }

.gallery-arrow:hover {
    background: rgba(255, 255, 255, 0.8);
}
.unit-details{
    display:flex;
    flex-direction: column;
    align-items: left;
    margin-left: 3%;;
    width: 47%;
    float: right;
}
.pudorys-img{
    display: block;
}
.pudorys{
    text-align: left;
    justify-content: left;
    margin-top: 1%;
}
.podlazi-title{
    font-size: 20px;
    font-weight: 600;
    padding-left: 5%;
    
    
}
.legenda ul{
    list-style: none;
    padding-left: 5%;
    padding-bottom: 50px;
    
}

/* Entry animation: play per-item in sequence. Uses highlightUnit as requested. */
:root{
    --unit-enter-duration: 600ms;
    --unit-highlight-duration: 1200ms;
    --unit-gap: 200ms;
}

.unit {
    opacity: 0;
    transform: translateY(8px);
    fill-opacity: 1;
  animation: unitEnter var(--unit-enter-duration) var(--delay, 0s) both cubic-bezier(.2,.8,.2,1),
             unitFillFadeOut 5s var(--delay, 0s) forwards linear;
}

.unit--available {
  animation: unitEnter var(--unit-enter-duration) var(--delay, 0s) both cubic-bezier(.2,.8,.2,1),
         unitFillFadeOut 5s var(--delay, 0s) forwards linear,
         highlightUnit var(--unit-highlight-duration) var(--delay, 0s) 1;
}

.unit--reserved {
  animation: unitEnter var(--unit-enter-duration) var(--delay, 0s) both cubic-bezier(.2,.8,.2,1),
         unitFillFadeOut 5s var(--delay, 0s) forwards linear,
         highlightUnitReserved var(--unit-highlight-duration) var(--delay, 0s) 1;
}

.unit--unavailable {
  animation: unitEnter var(--unit-enter-duration) var(--delay, 0s) both cubic-bezier(.2,.8,.2,1),
         unitFillFadeOut 5s var(--delay, 0s) forwards linear,
         highlightUnitUnavailable var(--unit-highlight-duration) var(--delay, 0s) 1;
}

@keyframes unitEnter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes unitFillFadeOut {
    from { fill-opacity: 1; }
    to   { fill-opacity: 0; }
}

/* Keep hover behavior: when hovered, stroke should pulse endlessly with status color */
.unit--available:hover{
    animation: unitEnter var(--unit-enter-duration) 0s both cubic-bezier(.2,.8,.2,1),
               highlightUnit 3s 0s infinite;
    filter: brightness(1.4) saturate(1.2);
    transition: filter 0.2s ease;
}

.unit--reserved:hover{
    animation: unitEnter var(--unit-enter-duration) 0s both cubic-bezier(.2,.8,.2,1),
               highlightUnitReserved 3s 0s infinite;
    filter: brightness(1.4) saturate(1.2);
    transition: filter 0.2s ease;
}

.unit--unavailable:hover{
    animation: unitEnter var(--unit-enter-duration) 0s both cubic-bezier(.2,.8,.2,1),
               highlightUnitUnavailable 3s  0s infinite;
    filter: brightness(1.4) saturate(1.2);
    transition: filter 0.2s ease;
}

/* Article styling */
article {
  max-width: 1400px;
  margin: 40px auto;
  padding: 60px;
  
  background: #fff;
}

article h2 {
  text-align: left;
  font-size: 2.5rem;
  margin: 0;
  margin-bottom: 10px;
  color: #121312;
  font-weight: 700;
}



/* Two-column layout: text + image */
.article-layout {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 30px;
  align-items: start;
}

.article-text p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #000;
  text-align: justify;
}

/* Sticky image on desktop */
/*.article-image {
  position: sticky;
  top: 100px;
}*/

.article-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.location-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.location-gallery img:first-child {
  grid-column: 1 / -1;
}

/* Responsive: stack vertically on tablets and mobile */
@media (max-width: 768px) {
  article {
    padding: 40px 15px;
  }
  
  article h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    padding-top: 10px;
  }
  
  .article-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .pv{margin: auto;display: block;}
  
  .article-image {
    position: static;
  }

  .tour360 {padding: 0 10px;}

  .location-gallery {
    grid-template-columns: 1fr;
  }
  
  .article-text p {
    text-align: left;
  }
}

.contact-form {
  margin-top: 20px;
  max-width: 820px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#kontakt-form, #postup{background-color: #f1f1f1;}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.contact-field label {
  font-weight: 600;
  color: #121312;
}

.contact-field input,
.contact-field textarea {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  background: #fff;
}

.contact-field textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 16px;
  line-height: 1.5;
}

.contact-consent input {
  margin-top: 4px;
}

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

#kontakt .btn,
#kontakt-form .btn {
  font-size: 0.95rem;
  padding: 10px 18px;
}

@media (max-width: 768px) {
  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}



.units_list h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #173e2c;
  text-align: center;
}

.units-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-radius: 8px;
}

.units-table thead {
  background: #173e2c;
  color: white;
}

.units-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.units-table tbody tr {
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.2s;
}

.units-table tbody tr:hover {
  background: #f5f5f5;
}

.units-table tbody tr:last-child {
  border-bottom: none;
}

.units-table td {
  padding: 14px 12px;
  font-size: 0.95rem;
  color: #333;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-available {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-reserved {
  background: #fff3e0;
  color: #f57c00;
}

.status-sold {
  background: #ffebee;
  color: #c62828;
}

/* Contact form server-side errors layout */
.contact-errors ul {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
}
.contact-errors li {
  margin: 6px 0;
  display: flex;
  align-items: center;
}
.contact-error-marker {
  font-size: 1.1em;
  line-height: 1;
  margin-right: 8px;
}

.price-na-dotaz {
  color: #666;
  font-style: italic;
}

.btn, .btn-detail {
  display: inline-block;
  padding: 6px 16px;
  background: #173e2c;
  color: white;
  text-decoration: none;
  border: 2px solid #173e2c;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-detail:hover {
  transform: scale(1.05);
  /*box-shadow: 0 4px 12px rgba(0,0,0,0.15);*/
}

/* Responsive table */
@media (max-width: 1024px) {
  .units-table {
    font-size: 0.85rem;
  }
  
  .units-table th,
  .units-table td {
    padding: 10px 8px;
  }
}

@media (max-width: 768px) {
  .units_list {
    padding: 0 10px;
  }
  
  .units-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .units-table thead,
  .units-table tbody,
  .units-table tr,
  .units-table td,
  .units-table th {
    display: block;
  }
  
  .units-table thead {
    display: none;
  }
  
  .units-table tbody tr {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
  }
  
  .units-table td {
    text-align: right;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 50%;
  }
  
  .units-table td:last-child {
    border-bottom: none;
  }
  
  .units-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-right: 10px;
    font-weight: 600;
    text-align: left;
  }
}

.footer {
	background-color: #173e2c;
	color: #e8e8e8;
	padding: 30px 0 0 0 ;
	width: 100%;
	margin-top: 100px;
	clear: both;
}

.footer-content {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0px;
  padding: 0 20px 40px;
  box-sizing: border-box;
}

.footer-column {
  min-width: 0;
}

.footer-column h3 {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 15px 0;
	color: #fff;
	letter-spacing: 1px;
}

.footer-column h4 {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 20px 0;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.footer-column p {
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 15px 0;
	color: #e8e8e8;
  overflow-wrap: anywhere;
}

.contact-item {
	display: flex;
	gap: 12px;
 	margin-bottom: 20px;
 	align-items: center;
}

.contact-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin: 0;
  display: inline-block;
  object-fit: contain;
}

.contact-item p {
	margin: 0;
	font-size: 15px;
}

.contact-item a {
	color: #e8e8e8;
	text-decoration: none;
	transition: color 0.3s ease;
}

.contact-item a:hover {
	color: #fff;
}

.social-links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.social-links a {
	color: #e8e8e8;
	text-decoration: none;
	font-size: 15px;
	transition: color 0.3s ease;
}

.social-links a:hover {
	color: #fff;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	font-size: 15px;
	color: #ccc;
	text-align: center;
}

.footer-bottom p {
	margin: 0;
}

.footer-links {
	display: flex;
	gap: 20px;
}

.footer-links a {
	color: #ccc;
	text-decoration: none;
	font-size: 15px;
	transition: color 0.3s ease;
}

.footer-links a:hover {
	color: #fff;
}

.location {
	max-width: 250px;
  width: 100%;
  height: auto;
  margin-right: 20px;
  border-radius: 10px;
  border: 2px solid #ccc;
}

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-left: 5%;
  }
}

@media (max-width: 1280px) {
  .main{width: 95%;}
  .location-gallery{grid-template-columns: 1fr;}
}

@media (max-width: 800px) {
  .logo {
    max-width: 100px;
  }

.header-nav.fixed a{padding: 2px;}
.header-nav.fixed {width: 95%;}
.header-nav.fixed ul{gap: 5px;}
.header-nav.fixed ul{padding: 0;}
}

@media (max-width: 1500px) {
  
    article{margin: 0;margin-bottom: 10px;}
    .footer{margin-top: 0;}
  }



@media (max-width: 1300px) {
  .header-nav ul{gap: 0px;}
  .units-legend__item{font-size: 13px;}
  .units-legend {padding: 10px;}
}
@media (max-width: 1100px) {
  .header-nav a {
    font-size: 12px;
  }
  .header-nav.fixed   {width: 80%;}
}
@media (max-width: 1100px) {

  .header-nav.fixed   {width: 90%;}
}

@media (max-width: 900px) {
 .dots { display: none;}
 .units-legend__item{font-size: 10px;}
 .units-legend {padding: 5px;}
 .header-nav a{padding: 5px;}
}

@media (max-width: 650px) {
    .main{width: 100%;}


  .header-nav.fixed{width: 100%; top: 0; border-radius: 0;}


	.footer-content {
		grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px 28px;
  }

  .footer-column h4 {
    margin-bottom: 14px;
  }

  .footer-column p,
  .contact-item p {
    font-size: 14px;
    line-height: 1.5;
  }

  .contact-item {
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .contact-icon {
    width: 24px;
    height: 24px;
  }

  .location {
    max-width: 320px;
    margin-right: 0;
	}

	.footer-bottom {
		flex-direction: column;
		gap: 15px;
    padding: 16px;
    font-size: 14px;
		text-align: center;
	}

	.footer-links {
		justify-content: center;
	}
}

@media (max-width: 650px) {
.header-nav a{font-size: 11px;}
.units-legend{display: none}
}

@media (max-width: 400px) {
/*.header-nav a{font-size: 10px;}*/
.header-nav.fixed ul{gap: 2px;}
.slide-content {
  /* padding posouvá i obsah */
  padding-left: clamp(1rem, 8vw, 340px);
  padding-right: clamp(2rem, 8vw, 180px);}
.slide-content h1 {max-width: 75vw;}
}
@media (max-width: 350px) {
.header-nav a{font-size: 10px;}
.header-nav.fixed ul{gap: 2px;}
}


  #scrollToTop {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: #444;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    border-radius: 0.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}
#scrollToTop.show {
  opacity: 0.8;
  visibility: visible;
}

#scrollToTop:hover {
  opacity: 1;
}

.grecaptcha-badge {
    visibility: hidden;
}
