/* MC Install — galéria (10. 10. 2026)
   Rovnaké dlaždice 3:4 (41 z 50 fotiek je na výšku 3:4 → bez orezu),
   fotky na šírku celé na rozmazanom pozadí samých seba. Lightbox s pásom náhľadov. */

/* ─── Filtre ─────────────────────────────────────────────────────────────── */
.g-filtre {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.g-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
  transition: color .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.g-chip:hover { color: #e2e8f0; border-color: rgba(52, 211, 153, 0.35); }
.g-chip:focus-visible { outline: 2px solid #34d399; outline-offset: 2px; }
.g-chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  box-shadow: 0 8px 24px -10px rgba(16, 185, 129, 0.6);
}
.g-chip .g-pocet {
  min-width: 1.45rem;
  padding: 0.2rem 0.4rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  background: rgba(255, 255, 255, 0.07);
}
.g-chip.is-active .g-pocet { background: rgba(255, 255, 255, 0.22); }

/* mobil: jeden riadok, posúvanie prstom, jemne stratené okraje */
@media (max-width: 767px) {
  .g-filtre-obal {
    margin: 0 -1rem;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1.5rem), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1.5rem), transparent 100%);
  }
  .g-filtre {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.25rem 1rem 0.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .g-filtre::-webkit-scrollbar { display: none; }
}

/* ─── Mriežka ────────────────────────────────────────────────────────────── */
.g-mriezka {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}
@media (min-width: 640px)  { .g-mriezka { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.875rem; } }
@media (min-width: 1024px) { .g-mriezka { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }

.g-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 3 / 4;
  border-radius: 1.125rem;
  overflow: hidden;
  isolation: isolate;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: zoom-in;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), box-shadow .45s ease, border-color .45s ease;
}
.g-tile[hidden] { display: none; }
.g-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.16, 1, .3, 1);
}
/* fotka na šírku: celá, na rozmazanom pozadí samej seba */
.g-tile.g-sirka img { object-fit: contain; }
.g-tile.g-sirka::before {
  content: "";
  position: absolute;
  inset: -2rem;
  z-index: -1;
  background: var(--g-bg) center / cover no-repeat;
  filter: blur(22px) brightness(.45) saturate(1.15);
}

.g-popis {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.75rem 1rem 0.9rem;
  text-align: left;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  background: linear-gradient(to top, rgba(2, 6, 23, .9) 0%, rgba(2, 6, 23, .55) 45%, rgba(2, 6, 23, 0) 100%);
  opacity: 0;
  transform: translateY(.5rem);
  transition: opacity .35s ease, transform .45s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.g-lupa {
  position: absolute;
  top: .75rem; right: .75rem;
  width: 2.25rem; height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  color: #fff;
  font-size: 1.05rem;
  background: rgba(2, 6, 23, .55);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .15);
  opacity: 0;
  transform: scale(.85);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .g-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(52, 211, 153, .45);
    box-shadow: 0 22px 44px -18px rgba(16, 185, 129, .45), 0 0 0 1px rgba(52, 211, 153, .25);
  }
  .g-tile:hover img { transform: scale(1.05); }
  .g-tile:hover .g-popis,
  .g-tile:focus-visible .g-popis { opacity: 1; transform: none; }
  .g-tile:hover .g-lupa { opacity: 1; transform: none; }
}
/* dotyk: popis stále, menší */
@media (hover: none) {
  .g-popis { opacity: 1; transform: none; font-size: .75rem; padding: 2rem .65rem .6rem; }
  .g-lupa { display: none; }
}
.g-tile:focus-visible { outline: 2px solid #34d399; outline-offset: 3px; }

/* nové dlaždice (filter / Zobraziť ďalšie) vplávajú */
.g-tile.g-novy { animation: gDnu .55s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--g-i, 0) * 35ms); }
@keyframes gDnu { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ─── Zobraziť ďalšie ────────────────────────────────────────────────────── */
.g-viac-obal { display: flex; justify-content: center; margin-top: 2.5rem; }
.g-viac-obal[hidden] { display: none; }
.g-viac {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: .95rem;
  color: #6ee7b7;
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(52, 211, 153, .3);
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.g-viac:hover { background: rgba(16, 185, 129, .16); border-color: rgba(52, 211, 153, .55); transform: translateY(-2px); }
.g-viac:focus-visible { outline: 2px solid #34d399; outline-offset: 3px; }
.g-viac .g-pocet { color: #94a3b8; font-weight: 600; }

/* ─── Lightbox ───────────────────────────────────────────────────────────── */
html.g-zamok, html.g-zamok body { overflow: hidden; }
.g-lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  background: rgba(2, 6, 23, .96);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .25s ease;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.g-lb[hidden] { display: none; }
.g-lb.is-open { opacity: 1; }
.g-lb-hore {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem .5rem 1.25rem;
  color: #cbd5e1;
}
.g-lb-pocitadlo { font-size: .85rem; font-weight: 600; letter-spacing: .04em; color: #94a3b8; }
.g-lb-pocitadlo b { color: #fff; }
.g-lb-btn {
  display: grid;
  place-items: center;
  width: 2.9rem; height: 2.9rem;
  border-radius: 9999px;
  color: #fff;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.g-lb-btn:hover { background: rgba(16, 185, 129, .25); border-color: rgba(52, 211, 153, .5); }
.g-lb-btn:focus-visible { outline: 2px solid #34d399; outline-offset: 2px; }
.g-lb-scena {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4.75rem;
  touch-action: pan-y;
}
.g-lb-foto {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: .75rem;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity .2s ease;
}
.g-lb-foto.is-loading { opacity: .85; }
.g-lb-scena .g-lb-btn { position: absolute; top: 50%; transform: translateY(-50%); }
.g-lb-pred { left: 1rem; }
.g-lb-dalej { right: 1rem; }
.g-lb-dole { padding: .9rem 1rem 1rem; text-align: center; }
.g-lb-nazov { color: #fff; font-weight: 600; font-size: 1rem; line-height: 1.35; }
.g-lb-kategoria { color: #34d399; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .2rem; }
.g-lb-pas {
  display: flex;
  gap: .5rem;
  justify-content: safe center;
  overflow-x: auto;
  padding: .9rem .25rem .25rem;
  scrollbar-width: none;
}
.g-lb-pas::-webkit-scrollbar { display: none; }
.g-lb-mini {
  flex: 0 0 auto;
  width: 3.25rem; height: 4.3rem;
  padding: 0;
  border-radius: .5rem;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: .45;
  cursor: pointer;
  background: #0f172a;
  transition: opacity .2s ease, border-color .2s ease;
}
.g-lb-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-lb-mini:hover { opacity: .8; }
.g-lb-mini.is-active { opacity: 1; border-color: #34d399; }

@media (max-width: 767px) {
  .g-lb-scena { padding: 0 .5rem; }
  .g-lb-scena .g-lb-btn { width: 2.5rem; height: 2.5rem; font-size: 1.2rem; background: rgba(2, 6, 23, .55); }
  .g-lb-pred { left: .75rem; }
  .g-lb-dalej { right: .75rem; }
  .g-lb-pas { display: none; }
  .g-lb-nazov { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .g-tile, .g-tile img, .g-popis, .g-lb, .g-lb-foto { transition: none; }
  .g-tile.g-novy { animation: none; }
}
