@charset "UTF-8";

/* Samostatný modul fotogalérie. Používa iba existujúce farebné a typografické premenné. */
html { scrollbar-gutter: stable; }
.site-nav > .gallery-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(145, 74, 52, .36);
  border-radius: 999px;
  background: rgba(184, 92, 59, .085);
  color: var(--terracotta-text);
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  transition: color var(--motion-fast, 160ms) ease, background-color var(--motion-normal, 260ms) ease, border-color var(--motion-fast, 160ms) ease, box-shadow var(--motion-normal, 260ms) var(--ease-out, ease-out);
}
.gallery-nav-icon { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.site-nav > .gallery-nav-button:hover,
.site-nav > .gallery-nav-button:focus-visible,
.site-nav > .gallery-nav-button[aria-expanded="true"] { border-color: var(--forest); background: var(--forest); color: var(--paper); box-shadow: 0 4px 12px rgba(38, 59, 50, .10); }
html.is-gallery-open { overflow: hidden; }

.gallery-dialog, .gallery-viewer {
  position: fixed;
  inset: 0;
  max-width: none;
  max-height: 92vh;
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overscroll-behavior: contain;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 100px rgba(20, 29, 24, .28);
}
.gallery-dialog::backdrop, .gallery-viewer::backdrop {
  background: rgba(20, 29, 24, .68);
  backdrop-filter: blur(5px);
}
.gallery-dialog { width: min(1240px, calc(100% - 48px)); overflow: auto; }
.gallery-dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 29px 36px 25px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.gallery-dialog-header .eyebrow { margin-bottom: 8px; }
.gallery-dialog-header h2 { margin: 0; font-size: clamp(38px, 4.5vw, 55px); line-height: 1.1; }
.gallery-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-highlight);
  color: var(--forest);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transition: color var(--motion-fast, 160ms) ease, background-color var(--motion-fast, 160ms) ease, border-color var(--motion-fast, 160ms) ease, transform var(--motion-fast, 160ms) var(--ease-out, ease-out);
}
.gallery-close:hover, .gallery-close:focus-visible { border-color: var(--terracotta); background: var(--terracotta); color: white; }
.gallery-dialog-body { padding: 25px 36px 33px; }
.gallery-intro { margin-bottom: 30px; color: var(--muted); font-size: 14px; }
.gallery-album + .gallery-album { margin-top: 38px; padding-top: 32px; border-top: 1px solid var(--line); }
.gallery-album-heading { margin-bottom: 22px; }
.gallery-album-heading h3 { max-width: 760px; margin-bottom: 10px; font-family: var(--font-display); font-size: clamp(26px, 3vw, 35px); line-height: 1.2; }
.gallery-album-meta { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; color: var(--blue-text); font-size: 11px; }
.gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 17px; }
.gallery-card { min-width: 0; margin: 0; }
.gallery-photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: var(--paper-soft);
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
  transition: box-shadow var(--motion-normal, 260ms) var(--ease-out, ease-out), transform var(--motion-normal, 260ms) var(--ease-out, ease-out);
}
.gallery-photo > img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; }
.gallery-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(251,250,246,.94); color: var(--forest); font-size: 19px; transition: color var(--motion-fast, 160ms) ease, background-color var(--motion-fast, 160ms) ease; }
.gallery-photo:hover .gallery-zoom, .gallery-photo:focus-visible .gallery-zoom { background: var(--forest); color: var(--paper); }
.gallery-card figcaption { margin-top: 12px; font-size: 12px; line-height: 1.6; }

.gallery-viewer { width: min(1120px, calc(100% - 40px)); overflow: hidden; border-color: rgba(255,255,255,.18); background: #1f2e26; color: var(--paper); }
.gallery-viewer::backdrop { background: rgba(20, 29, 24, .30); }
.gallery-viewer-close { position: absolute; z-index: 2; top: 12px; right: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.gallery-viewer-stage { position: relative; padding: 12px 64px 0; }
.gallery-viewer-stage > img { width: 100%; height: calc(92vh - 116px); height: calc(92dvh - 116px); max-height: 760px; min-height: 100px; object-fit: contain; }
.gallery-viewer-stage > .gallery-viewer-incoming { position: absolute; top: 12px; left: 64px; width: calc(100% - 128px); background: #1f2e26; }
.gallery-viewer-arrow { position: absolute; z-index: 1; top: 50%; display: grid; width: 44px; height: 44px; place-items: center; padding: 0; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(31,46,38,.82); color: var(--paper); cursor: pointer; font-size: 25px; line-height: 1; transition: background-color var(--motion-fast, 160ms) ease, border-color var(--motion-fast, 160ms) ease; }
.gallery-viewer-arrow:hover, .gallery-viewer-arrow:focus-visible { border-color: var(--terracotta); background: var(--terracotta); }
.gallery-viewer-arrow:disabled { visibility: hidden; }
.gallery-viewer-previous { left: 10px; }
.gallery-viewer-next { right: 10px; }
.gallery-viewer-footer { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 24px 18px; font-size: 13px; line-height: 1.5; }
.gallery-viewer-count { flex: 0 0 auto; color: #c2cfc5; font-size: 12px; font-variant-numeric: tabular-nums; }

/* Pohybuje sa karta, nikdy samotný záber. Fotografie zostávajú celé a bez orezania. */
@media (prefers-reduced-motion: no-preference) {
  .gallery-dialog[open]:not(.is-closing) .gallery-card {
    animation: gallery-card-enter var(--motion-slow, 500ms) var(--ease-out, ease-out) both;
    animation-delay: var(--gallery-enter-delay, 0ms);
  }
  .gallery-close:active { transform: scale(.96); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .gallery-photo:hover, .gallery-photo:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(38, 59, 50, .16); }
  .gallery-photo:active { transform: translateY(-1px); }
}
@keyframes gallery-card-enter {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Zachová miesto pre nový odkaz aj pri užšej desktopovej hlavičke. */
@media (min-width: 1181px) and (max-width: 1559px) {
  .site-nav .nav-cta { display: none; }
}
@media (max-width: 1180px) {
  .site-nav > .gallery-nav-button { grid-column: 1 / -1; min-height: 46px; padding: 10px 14px; white-space: normal; }
}
@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .gallery-dialog { width: calc(100% - 20px); max-height: 94vh; max-height: 94dvh; border-radius: 18px; }
  .gallery-dialog-header { gap: 15px; padding: 22px 20px 19px; }
  .gallery-dialog-header .eyebrow { font-size: 8px; }
  .gallery-dialog-header h2 { font-size: 37px; }
  .gallery-dialog-body { padding: 21px 20px 26px; }
  .gallery-intro { margin-bottom: 25px; font-size: 12px; }
  .gallery-album-heading h3 { font-size: 27px; }
  .gallery-album-meta { font-size: 10px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .gallery-card figcaption { margin-top: 9px; font-size: 11px; }
  .gallery-photo { border-radius: 11px; }
  .gallery-zoom { right: 7px; bottom: 7px; width: 28px; height: 28px; font-size: 17px; }
  .gallery-viewer { width: calc(100% - 16px); border-radius: 16px; }
  .gallery-viewer-stage { padding: 56px 8px 0; }
  .gallery-viewer-stage > img { height: calc(92vh - 164px); height: calc(92dvh - 164px); }
  .gallery-viewer-stage > .gallery-viewer-incoming { top: 56px; left: 8px; width: calc(100% - 16px); }
  .gallery-viewer-arrow { top: calc(50% + 28px); background: rgba(31,46,38,.9); }
  .gallery-viewer-previous { left: 9px; }
  .gallery-viewer-next { right: 9px; }
  .gallery-viewer-footer { gap: 12px; padding: 15px 16px 18px; font-size: 12px; }
}
@media (max-width: 359px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .site-nav > .gallery-nav-button { padding-inline: 10px; font-size: 11px; }
}
