/* ===== Sākumlapas mozaīka: 6 vietas, 1 un 4 — augstās (4 — arka) ===== */
.jl-gal { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, clamp(200px, 19vw, 250px)); grid-template-areas: "a b c d" "a e f d"; gap: 14px; }
.jl-gal__tile { position: relative; display: block; border-radius: 28px; overflow: hidden; background: #DDE9C4; }
.jl-gal__tile:nth-child(1) { grid-area: a; }
.jl-gal__tile:nth-child(2) { grid-area: b; }
.jl-gal__tile:nth-child(3) { grid-area: c; }
.jl-gal__tile:nth-child(4) { grid-area: d; border-radius: 999px 999px 28px 28px; }
.jl-gal__tile:nth-child(5) { grid-area: e; }
.jl-gal__tile:nth-child(6) { grid-area: f; }
.jl-gal__tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.jl-gal__tile:hover img { transform: scale(1.04); }
.jl-gal__tile .img-slot { height: 100%; }
.jl-gal__cap { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 400 11px 'JetBrains Mono', monospace; letter-spacing: .04em; color: #1C4D1B; background: rgba(255,255,255,.88); padding: 4px 10px; border-radius: 8px; pointer-events: none; }
.jl-gal__admin { margin: 14px 0 0; font-size: 14px; color: #5B6A55; }
.jl-gal__admin a { color: #1C4D1B; font-weight: 600; }

/* Telefonā / šaurā ekrānā — josla, ko pavelk ar pirkstu */
@media (max-width: 899px) {
  .jl-gal { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); padding: 0 clamp(16px, 4vw, 48px) 4px; scroll-padding: 0 clamp(16px, 4vw, 48px); }
  .jl-gal::-webkit-scrollbar { display: none; }
  .jl-gal__tile { flex: 0 0 min(78vw, 420px); height: min(58vw, 315px); scroll-snap-align: start; border-radius: 22px; }
  .jl-gal__tile:nth-child(1), .jl-gal__tile:nth-child(4) { flex-basis: min(42vw, 230px); }
  .jl-gal__tile:nth-child(4) { border-radius: 999px 999px 22px 22px; }
}

/* ===== /galerija ===== */
.jl-gallery__head { margin-bottom: 26px; }
.jl-gallery__head h1 { font: 500 clamp(36px, 5vw, 60px)/1 'Alegreya', serif; color: #1C4D1B; margin: 6px 0 10px; }
.jl-gallery__head p { color: #3E4D3A; max-width: 640px; margin: 0; }
.jl-gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.jl-gallery__grid a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #DDE9C4; }
.jl-gallery__grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.jl-gallery__grid a:hover img { transform: scale(1.04); }
.jl-gallery__empty { color: #5B6A55; padding: 40px 0; }
@media (max-width: 520px) { .jl-gallery__grid { grid-template-columns: 1fr 1fr; gap: 8px; } .jl-gallery__grid a { border-radius: 12px; } }

/* PhotoSwipe paraksts */
.pswp__jl-caption { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(90vw, 720px); text-align: center; color: #fff; font: 500 15px/1.4 'Onest', sans-serif; background: rgba(0,0,0,.45); padding: 8px 16px; border-radius: 12px; }
.pswp__jl-caption[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .jl-gal__tile img, .jl-gallery__grid img { transition: none; } }
