/* gallery.css - the public trip gallery /gallery/<slug>/ ("אתם צילמתם"; [גלריה-אישור] David 15/11/2026). Inside the mirrored
   live-site layout; self-contained (site.css is not loaded on mirrored pages). */
.cg-wrap { --g-navy:#0b1f3a; --g-blue:#1c69d4; --g-ink:#1d2433; --g-muted:#5b6472; --g-line:#dde3ec; max-width:935px; color:var(--g-ink); }
.cg-head { text-align:center; margin:8px 0 28px; }
.cg-head h1 { font-size:clamp(1.8rem, 4vw, 2.6rem); font-weight:800; margin:0 0 6px; color:var(--g-navy); }
.cg-head .cg-sub { color:var(--g-muted); font-size:1.05rem; }
.cg-muted { color:var(--g-muted); text-align:center; padding:48px 0; }
/* V-1 (28/11/2026, David): an Instagram-like grid - three square thumbnails per row on EVERY screen, phones included; the photo
   fills its square (object-fit:cover), the full picture is in the lightbox. A video thumbnail = its poster + a play badge. */
.cg-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:4px; }
.cg-grid a { position:relative; display:block; aspect-ratio:1 / 1; overflow:hidden; background:#eef1f5; }
.cg-grid img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.cg-grid a:hover img, .cg-grid a:focus-visible img { transform:scale(1.03); }
.cg-grid a:focus-visible { outline:3px solid var(--g-blue); outline-offset:-3px; z-index:1; }
.cg-play { position:absolute; top:6px; inset-inline-end:6px; display:flex; align-items:center; gap:4px; padding:3px 7px; border-radius:999px;
  background:rgba(0,0,0,.55); color:#fff; font-size:12px; line-height:1; pointer-events:none; direction:ltr; }
.cg-play b { font-weight:600; font-variant-numeric:tabular-nums; }
/* CR-1 (28/11/2026): the photographer credit - a subtle line at the bottom of each tile (one line, ellipsis), RTL */
.cg-by { position:absolute; inset-inline:0; bottom:0; padding:16px 6px 4px; background:linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.58));
  color:#fff; font-size:11px; line-height:1.35; font-weight:500; text-shadow:0 1px 2px rgba(0,0,0,.6); white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; direction:rtl; text-align:start; pointer-events:none; }
.cg-box .cg-fig { margin:0; display:flex; flex-direction:column; align-items:center; gap:10px; max-width:94vw; }
.cg-box .cg-cap { color:#f1f4f9; background:rgba(0,0,0,.55); border-radius:999px; font-size:14px; line-height:1.4; text-align:center;
  direction:rtl; max-width:min(94vw, 560px); padding:4px 14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (min-width:736px) { .cg-grid { gap:8px; } .cg-grid a { border-radius:4px; } .cg-play { top:8px; inset-inline-end:8px; font-size:13px; }
  .cg-by { font-size:12.5px; padding:22px 9px 6px; } .cg-box .cg-cap { font-size:15px; } }
@supports not (aspect-ratio:1 / 1) { .cg-grid a { height:0; padding-bottom:100%; } .cg-grid img { position:absolute; inset:0; } }
.cg-note { color:var(--g-muted); font-size:.9rem; text-align:center; margin-top:24px; }
.cg-box { position:fixed; inset:0; z-index:100000; background:rgba(5,10,20,.94); display:flex; align-items:center; justify-content:center; }
.cg-box[hidden] { display:none; }
.cg-box img, .cg-box video { max-width:94vw; max-height:88vh; border-radius:6px; }
.cg-box .cg-fig img, .cg-box .cg-fig video { max-height:calc(88vh - 34px); }
.cg-box video { background:#000; width:auto; }
.cg-box [hidden] { display:none; }
.cg-box button { position:absolute; background:rgba(255,255,255,.12); color:#fff; border:0; border-radius:999px; width:48px; height:48px; font-size:26px; line-height:48px; cursor:pointer; }
.cg-box button:focus-visible { outline:3px solid #81c4ff; }
.cg-box .cg-x { top:16px; left:16px; }
.cg-box .cg-prev { right:16px; top:50%; transform:translateY(-50%); }
.cg-box .cg-next { left:16px; top:50%; transform:translateY(-50%); }
