/* Lake Louisa Chateau — wedding gallery lightbox + modern card frame
   Loaded only on weddings-at-house.html. Vanilla, zero deps. */

.wed-gal-link.oalr-zoom {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #f5efe6;
  box-shadow: 0 4px 18px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: zoom-in;
  isolation: isolate;
}
.wed-gal-link.oalr-zoom img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .35s ease;
}
.wed-gal-link.oalr-zoom:hover,
.wed-gal-link.oalr-zoom:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.18), 0 3px 8px rgba(0,0,0,.10);
}
.wed-gal-link.oalr-zoom:hover img,
.wed-gal-link.oalr-zoom:focus-visible img {
  transform: scale(1.04);
}
.wed-gal-link.oalr-zoom:focus-visible {
  outline: 3px solid #c89b6a;
  outline-offset: 2px;
}
.wed-gal-link.oalr-zoom::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20,20,28,.6) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") center/20px 20px no-repeat;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.wed-gal-link.oalr-zoom:hover::after,
.wed-gal-link.oalr-zoom:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

/* 2-up mobile grid for the wedding gallery.
   Selectors deliberately anchored on .privately-gated to win specificity
   against responsive.css rules like ".privately-gated ul li { width: 100% }". */
@media (max-width: 768px) {
  .privately-gated ul.wed-gallery-ul,
  ul.wed-gallery-ul {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 8px !important;
    margin: 0 !important;
    width: 100% !important;
    text-align: left !important;
  }
  .privately-gated ul.wed-gallery-ul > li,
  ul.wed-gallery-ul > li {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }
  .privately-gated ul.wed-gallery-ul .box,
  .privately-gated ul.wed-gallery-ul .box-img,
  .privately-gated ul.wed-gallery-ul .img-box,
  ul.wed-gallery-ul .box,
  ul.wed-gallery-ul .box-img,
  ul.wed-gallery-ul .img-box {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .wed-gal-link.oalr-zoom { border-radius: 10px; }
  .wed-gal-link.oalr-zoom::after {
    top: 6px; right: 6px; width: 30px; height: 30px;
    background-size: 16px 16px;
    opacity: 1;
    transform: scale(1);
  }
}

/* Lightbox overlay */
.oalr-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  background: rgba(18,18,26,.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s ease;
}
.oalr-lb.is-open { display: flex; opacity: 1; }

.oalr-lb__stage {
  position: relative;
  max-width: 94vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oalr-lb__img {
  max-width: 94vw;
  max-height: 86vh;
  display: block;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  background: #111;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
  transition: opacity .18s ease;
}
.oalr-lb.is-loading .oalr-lb__img { opacity: .25; }
.oalr-lb__caption {
  position: absolute;
  left: 0; right: 0; bottom: -40px;
  text-align: center;
  color: #fff;
  font: 500 14px/1.4 "Open Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: .02em;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  padding: 0 16px;
}

.oalr-lb__btn {
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(20,20,28,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.oalr-lb__btn:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.45); }
.oalr-lb__btn:active { transform: scale(.93); }
.oalr-lb__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.oalr-lb__btn svg { width: 24px; height: 24px; stroke: #fff; fill: none; }
.oalr-lb__close { top: 22px; right: 22px; }
.oalr-lb__prev  { top: 50%; left: 22px;  transform: translateY(-50%); }
.oalr-lb__next  { top: 50%; right: 22px; transform: translateY(-50%); }
.oalr-lb__prev:active { transform: translateY(-50%) scale(.93); }
.oalr-lb__next:active { transform: translateY(-50%) scale(.93); }

.oalr-lb__counter {
  position: absolute;
  top: 30px; left: 30px;
  color: #fff;
  font: 500 13px/1 "Open Sans", system-ui, sans-serif;
  letter-spacing: .12em;
  opacity: .85;
}

.oalr-lb__spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.oalr-lb__spinner::after {
  content: "";
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  animation: oalrSpin 1s linear infinite;
}
.oalr-lb.is-loading .oalr-lb__spinner { display: flex; }
@keyframes oalrSpin { to { transform: rotate(360deg); } }

body.oalr-lb-open { overflow: hidden; }

@media (max-width: 720px) {
  .oalr-lb__btn { width: 48px; height: 48px; }
  .oalr-lb__btn svg { width: 22px; height: 22px; }
  .oalr-lb__close { top: 14px; right: 14px; }
  .oalr-lb__prev  { left: 10px; }
  .oalr-lb__next  { right: 10px; }
  .oalr-lb__counter { top: 18px; left: 18px; font-size: 12px; letter-spacing: .08em; }
  .oalr-lb__caption { bottom: -32px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .wed-gal-link.oalr-zoom,
  .wed-gal-link.oalr-zoom img,
  .wed-gal-link.oalr-zoom::after,
  .oalr-lb,
  .oalr-lb__btn { transition: none !important; }
  .oalr-lb__spinner::after { animation: none; }
}
