/* Thermabella v8.0 – egységes apartmanfotó-galéria */
body.photo-gallery-page {
  display:flex !important;
  flex-direction:column !important;
  min-height:100dvh !important;
  height:auto !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  background:#f8f7f4;
}
body.photo-gallery-page main.photo-gallery-main {
  display:block !important;
  flex:1 0 auto !important;
  width:min(1440px, calc(100% - 48px)) !important;
  max-width:1440px !important;
  height:auto !important;
  min-height:0 !important;
  margin:0 auto !important;
  padding:16px 0 44px !important;
  overflow:visible !important;
}
body.photo-gallery-page .site-footer {
  display:block !important;
  position:relative !important;
  flex:0 0 auto !important;
  margin-top:auto !important;
  visibility:visible !important;
}
.photo-gallery-main .section-nav {
  margin:0 0 16px;
}
.photo-gallery-titlebar {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding:5px 0 14px;
  margin:0 0 20px;
  border-bottom:1px solid #dcded8;
}
.photo-gallery-titlebar .photo-kicker {
  margin:0 0 7px;
  color:#886844;
  font-family:Montserrat,Arial,sans-serif;
  letter-spacing:.11em;
  font-size:11px;
  font-weight:650;
  text-transform:uppercase;
}
.photo-gallery-titlebar h1 {
  margin:0;
  font:normal clamp(27px,2.5vw,38px)/1.12 Georgia,serif;
  color:#064f57;
}
.photo-gallery-titlebar .photo-back {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 14px;
  border:1px solid #d5dbd8;
  border-radius:9px;
  background:#fffefa;
  color:#075863;
  font:600 12px/1.4 Montserrat,Arial,sans-serif;
  text-decoration:none;
  white-space:nowrap;
}
.photo-gallery-titlebar .photo-back:hover {background:#ecf2ef}
.photo-gallery-description {
  margin:0 0 18px;
  color:#5f7777;
  font:400 12px/1.6 Montserrat,Arial,sans-serif;
}
.photo-gallery-grid {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:17px !important;
  padding:0 0 10px;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
}
.photo-tile {
  display:block;
  position:relative;
  width:100%;
  padding:0;
  margin:0;
  overflow:hidden;
  border:1px solid #e1e2da;
  border-radius:12px;
  background:#e7e9e4;
  cursor:zoom-in;
  box-shadow:0 3px 12px rgba(22,60,54,.05);
  aspect-ratio:4/3;
  transition:box-shadow .2s,border-color .2s,transform .2s;
}
.photo-tile:hover {border-color:#a6beb9;box-shadow:0 10px 25px rgba(22,60,54,.1);transform:translateY(-2px)}
.photo-tile img {display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.photo-tile:hover img {transform:scale(1.035)}
.photo-tile .photo-zoom {position:absolute;right:13px;bottom:13px;display:grid;place-items:center;width:34px;height:34px;background:#075863e8;border:1px solid #ffffff60;border-radius:50%;color:#fff;font:400 23px/1 Arial,sans-serif}
.photo-tile:focus-visible,.photo-back:focus-visible {outline:3px solid #bb925d;outline-offset:3px}
.photo-gallery-empty {
  grid-column:1/-1;
  background:#fffefa;
  color:#587474;
  padding:30px 24px;
  border:1px solid #e1e4de;
  border-radius:12px;
  font:400 13px/1.6 Montserrat,Arial,sans-serif;
}
.photo-viewer {
  position:fixed;
  inset:0;
  width:100vw;
  height:100dvh;
  max-width:none;
  max-height:none;
  padding:0;
  margin:0;
  border:0;
  background:#102e32;
  color:#fff;
  overflow:hidden;
}
.photo-viewer::backdrop {background:#102e32}
.photo-viewer .photo-viewer-top {
  display:flex;
  align-items:center;
  gap:14px;
  min-height:63px;
  padding:9px 20px;
  background:#075863;
  border-bottom:1px solid #ffffff2e;
  font:500 13px/1.4 Montserrat,Arial,sans-serif;
}
.photo-viewer .photo-viewer-top .photo-viewer-spacer {flex:1}
.photo-viewer .photo-viewer-count {color:#daebea;font-size:12px;font-variant-numeric:tabular-nums}
.photo-viewer .photo-viewer-top button,
.photo-viewer .photo-viewer-top a,
.photo-viewer .photo-viewer-navigation button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  min-height:42px;
  padding:5px 9px;
  color:#fff;
  background:#ffffff12;
  border:1px solid #ffffff40;
  border-radius:8px;
  text-decoration:none;
  cursor:pointer;
  font-size:22px;
}
.photo-viewer .photo-viewer-top a {font-size:20px}
.photo-viewer .photo-viewer-navigation {
  display:grid;
  grid-template-columns:60px minmax(0,1fr) 60px;
  align-items:center;
  gap:8px;
  height:calc(100% - 63px);
  padding:12px;
}
.photo-viewer .photo-viewer-navigation img {
  display:block;
  width:100%;
  height:100%;
  min-height:0;
  object-fit:contain;
  user-select:none;
}
.photo-viewer .photo-viewer-navigation button {justify-self:center}
.photo-viewer button:focus-visible,.photo-viewer a:focus-visible {outline:3px solid #cfb58e;outline-offset:3px}
@media(max-width:940px){
 .photo-gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:14px !important}
}
@media(max-width:620px){
 body.photo-gallery-page main.photo-gallery-main{width:calc(100% - 24px) !important;padding:12px 0 28px !important}
 .photo-gallery-titlebar{align-items:flex-start;flex-direction:column;gap:12px}
 .photo-gallery-grid{grid-template-columns:1fr !important;gap:12px !important}
 .photo-viewer .photo-viewer-top{padding:6px 10px;gap:7px}
 .photo-viewer .photo-viewer-navigation{grid-template-columns:37px minmax(0,1fr) 37px;gap:2px;padding:5px}
 .photo-viewer .photo-viewer-navigation button{min-width:36px;padding:5px 2px}
}
@media(prefers-reduced-motion:reduce){.photo-tile,.photo-tile img{transition:none}}

/* Asztali galéria: a közös portállábléc mindig a képernyő alján látható,
   a képrács saját függőleges görgetősávval működik. */
@media(min-width:1101px) and (min-height:650px) {
  body.photo-gallery-page {
    height:100dvh !important;
    max-height:100dvh !important;
    overflow:hidden !important;
  }
  body.photo-gallery-page main.photo-gallery-main {
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 0 !important;
    min-height:0 !important;
    height:auto !important;
    padding-bottom:9px !important;
    overflow:hidden !important;
  }
  .photo-gallery-main .section-nav,
  .photo-gallery-main .photo-gallery-titlebar,
  .photo-gallery-main .photo-gallery-description {
    flex:0 0 auto;
  }
  body.photo-gallery-page .photo-gallery-grid {
    flex:1 1 0 !important;
    min-height:0 !important;
    max-height:none !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    align-content:start;
    padding:2px 9px 12px 0;
    scrollbar-color:#8caeaa #e8ece8;
    scrollbar-width:thin;
  }
  body.photo-gallery-page .site-footer {
    flex:0 0 auto !important;
  }
}

/* A görgethető CSS grid sorainak tartalom szerinti magassága:
   a képkártyák ne csússzanak egymásra összenyomott konténerben. */
body.photo-gallery-page .photo-gallery-grid {
  grid-auto-rows:max-content !important;
}
body.photo-gallery-page .photo-tile {
  height:auto !important;
  min-height:0 !important;
  align-self:start;
  justify-self:stretch;
}

/* THMB-CAROUSEL-4-V1: 4 photos visible, horizontal scroll, original footer visible */
body.photo-gallery-page .photo-gallery-grid {
  --photo-carousel-gap:14px;
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  grid-template-columns:none !important;
  grid-auto-rows:unset !important;
  gap:var(--photo-carousel-gap) !important;
  align-items:flex-start !important;
  align-content:initial !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scroll-padding-inline:0;
  scroll-behavior:smooth;
  scrollbar-width:thin;
  padding:2px 2px 14px 2px !important;
}
body.photo-gallery-page .photo-gallery-grid .photo-tile {
  flex:0 0 calc((100% - 3 * var(--photo-carousel-gap)) / 4) !important;
  width:calc((100% - 3 * var(--photo-carousel-gap)) / 4) !important;
  min-width:0 !important;
  max-width:calc((100% - 3 * var(--photo-carousel-gap)) / 4) !important;
  height:auto !important;
  aspect-ratio:4/3;
  scroll-snap-align:start;
  scroll-snap-stop:normal;
  align-self:flex-start;
}
body.photo-gallery-page .photo-gallery-grid .photo-gallery-empty {
  flex:1 0 100%;
}
.photo-carousel-controls {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  flex:0 0 auto;
  gap:10px;
  padding:0 2px 10px;
  margin:-1px 0 0;
}
.photo-carousel-controls button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:35px;
  width:43px;
  border:1px solid #b8c9c5;
  background:#fffefa;
  color:#075863;
  border-radius:9px;
  font:500 25px/1 Arial,sans-serif;
  cursor:pointer;
}
.photo-carousel-controls button:hover:not(:disabled) {background:#e4f0ed}
.photo-carousel-controls button:disabled {opacity:.35;cursor:default}
.photo-carousel-controls button:focus-visible {outline:3px solid #bb925d;outline-offset:2px}
@media(max-width:980px) {
  body.photo-gallery-page .photo-gallery-grid .photo-tile {
    flex-basis:calc((100% - var(--photo-carousel-gap)) / 2) !important;
    width:calc((100% - var(--photo-carousel-gap)) / 2) !important;
    max-width:calc((100% - var(--photo-carousel-gap)) / 2) !important;
  }
}
@media(max-width:620px) {
  body.photo-gallery-page .photo-gallery-grid .photo-tile {
    flex-basis:100% !important;
    width:100% !important;
    max-width:100% !important;
  }
}
@media(prefers-reduced-motion:reduce) {
  body.photo-gallery-page .photo-gallery-grid {scroll-behavior:auto}
}