/* ========================================================================
   region-photos-page.css
   Scoped: only city.alpin.work/photos/ pages
   ======================================================================== */

.region-photos-page .aw-section{ padding-top: 18px; }

/* Two-col stability */
.region-photos-page .aw-two-col{
  align-items: start;
  gap: 16px;
}
.region-photos-page .aw-two-col__main{ min-width: 0; }
.region-photos-page .aw-two-col__sidebar{ position: sticky; top: 14px; }
@media (max-width: 980px){
  .region-photos-page .aw-two-col__sidebar{ position: static; top: auto; }
}

/* Unified card look */
.region-photos-page .region-card{
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  background: #fff;
}
.region-photos-page .aw-card__body{ padding: 18px; }

/* Force light */
.region-photos-page .aw-card,
.region-photos-page .aw-card--light,
.region-photos-page .region-card{
  background:#fff !important;
  color:#0f172a !important;
}
.region-photos-page .aw-card::before,
.region-photos-page .aw-card::after,
.region-photos-page .aw-card--light::before,
.region-photos-page .aw-card--light::after{
  content:none !important;
}

/* Titles + text */
.region-photos-page .aw-section-title,
.region-photos-page h1,
.region-photos-page h2{
  color:#0f172a !important;
}
.region-photos-page .aw-section-subtitle,
.region-photos-page .region-empty-text{
  color: rgba(15, 23, 42, 0.78) !important;
}

/* HERO */
.region-photos-page .region-photos-hero{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
}
@media (max-width: 820px){
  .region-photos-page .region-photos-hero{ flex-direction: column; }
}
.region-photos-page .region-photos-hero__actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.region-photos-page .aw-btn{ border-radius: 12px; }

/* Meta row */
.region-photos-page .region-photos-meta{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
}
.region-photos-page .region-photos-meta__left{
  display:flex;
  align-items:center;
  gap: 10px;
  color: rgba(15, 23, 42, 0.82);
}
.region-photos-page .region-photos-meta__left i{ opacity: .9; }
.region-photos-page .region-photos-meta__right{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.region-photos-page .region-photos-dot{
  opacity:.55;
  padding: 0 2px;
}

/* Photos grid */
.region-photos-page .region-photos-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 980px){
  .region-photos-page .region-photos-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px){
  .region-photos-page .region-photos-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px){
  .region-photos-page .region-photos-grid{ grid-template-columns: 1fr; }
}

/* Photo card (button) */
.region-photos-page .region-photo-card{
  appearance: none;
  width: 100%;
  text-align: left;
  padding: 0;
  cursor: pointer;

  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
}
.region-photos-page .region-photo-card:focus{
  outline: 2px solid rgba(0, 196, 204, 0.55);
  outline-offset: 2px;
}

.region-photos-page .region-photo-card__media{
  display:block;
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.02);
}
.region-photos-page .region-photo-card__media img{
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display:block;
  transform: scale(1);
  transition: transform .18s ease;
}
.region-photos-page .region-photo-card:hover .region-photo-card__media img{
  transform: scale(1.03);
}

.region-photos-page .region-photo-card__meta{
  display:block;
  padding: 10px 12px 12px;
}
.region-photos-page .region-photo-card__title{
  display:block;
  font-weight: 800;
  font-size: 14px;
  color:#0f172a;
  line-height: 1.2;
}
.region-photos-page .region-photo-card__sub{
  display:block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.72);
}

/* Pager */
.region-photos-page .region-photos-pager{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Sidebar list */
.region-photos-page .region-photos-sidebar-list{
  display:grid;
  gap: 8px;
}
.region-photos-page .region-photos-sidebar-item{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;

  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(15, 23, 42, 0.02);
  color: rgba(15, 23, 42, 0.92);
}
.region-photos-page .region-photos-sidebar-item:hover{
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.10);
}
.region-photos-page .region-photos-sidebar-count{
  opacity: .75;
  white-space: nowrap;
}

/* ========================================================================
   LIGHTBOX (no libs)
   ======================================================================== */

.region-lock-scroll{
  overflow: hidden !important;
}

/* Lightbox shell */
.region-photos-page .region-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.region-photos-page .region-lightbox.is-open{
  display: block;
}

/* Backdrop is clickable */
.region-photos-page .region-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .62); /* ✅ менше "глухого" чорного */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/*
  ✅ ВАЖЛИВО:
  panel накриває весь екран і перехоплює кліки => бекдроп не закриває.
  Робимо panel "прозорим" для кліків, а figure/controls — клікабельними.
*/
.region-photos-page .region-lightbox__panel{
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 16px;

  pointer-events: none; /* ✅ кліки проходять до backdrop */
}

.region-photos-page .region-lightbox__figure,
.region-photos-page .region-lightbox__close,
.region-photos-page .region-lightbox__nav{
  pointer-events: auto; /* ✅ кнопки/фото працюють */
}

/* Figure */
.region-photos-page .region-lightbox__figure{
  margin: 0;
  width: min(1100px, 100%);
  border-radius: 18px;
  overflow: hidden;

  background: rgba(2, 6, 23, .55);          /* ✅ м'якший фон "за фото" */
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

/* Image */
.region-photos-page .region-lightbox__img{
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  display:block;
  background: transparent; /* ✅ не малюємо чорний прямокутник */
}

/* Caption */
.region-photos-page .region-lightbox__caption{
  padding: 12px 14px 14px;
  color: rgba(255,255,255,.90);
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.region-photos-page .region-lightbox__title{
  font-weight: 800;
  font-size: 14px;
  color: rgba(255,255,255,.95);
}
.region-photos-page .region-lightbox__sub{
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

/* Controls */
.region-photos-page .region-lightbox__close{
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  z-index: 2;
}
.region-photos-page .region-lightbox__close:hover{
  background: rgba(0,0,0,.50);
}

.region-photos-page .region-lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  z-index: 2;
}
.region-photos-page .region-lightbox__nav:hover{
  background: rgba(0,0,0,.50);
}
.region-photos-page .region-lightbox__prev{ left: 18px; }
.region-photos-page .region-lightbox__next{ right: 18px; }

@media (max-width: 520px){
  .region-photos-page .region-lightbox__panel{ padding: 10px; }
  .region-photos-page .region-lightbox__prev{ left: 10px; }
  .region-photos-page .region-lightbox__next{ right: 10px; }
  .region-photos-page .region-lightbox__close{ top: 10px; right: 10px; }
  .region-photos-page .region-lightbox__img{ max-height: 70vh; }
}
