/* Bozonos - hero slider + photo lightbox (js/media.js). Replaces owl.*.css, animate.css and swipebox.css. */

/* ---------- Slider (keeps Owl's class names so style.css rules still apply) ---------- */
.owl-carousel { position: relative; width: 100%; touch-action: pan-y; }
.boz-slider .owl-wrapper-outer { position: relative; width: 100%; overflow: hidden; }
/* all slides share one grid cell, so the slider is as tall as its tallest slide (as with Owl) */
.boz-slider .owl-wrapper { position: relative; display: grid; grid-template-columns: 100%; }
.boz-slider .owl-item {
  grid-area: 1 / 1; position: relative; width: 100%; min-width: 0;
  opacity: 0; visibility: hidden; z-index: 0;
  transition: opacity .7s ease, visibility 0s linear .7s;
  -webkit-user-select: none; user-select: none;
}
.boz-slider .owl-item.active {
  opacity: 1; visibility: visible; z-index: 1;
  transition: opacity .7s ease;
}
.boz-slider .owl-item.leaving { z-index: 2; }
.boz-slider.boz-first .owl-item { transition: none; }
.boz-slider .owl-item img { -webkit-user-drag: none; }
.boz-slider .owl-controls { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.boz-slider .owl-buttons button { cursor: pointer; padding: 0; color: transparent; -webkit-appearance: none; appearance: none; }
.boz-slider .owl-buttons button:focus-visible { outline: 2px solid #c7a375; outline-offset: 2px; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .boz-slider .owl-item, .boz-slider .owl-item.active { transition: none; }
}

/* ---------- Lightbox ---------- */
html.boz-lb-open { overflow: hidden; }
.boz-lb {
  position: fixed; inset: 0; z-index: 2147483000;
  background: rgba(255, 255, 255, .96);
  -webkit-user-select: none; user-select: none;
}
.boz-lb[hidden] { display: none; }
.boz-lb-stage {
  position: absolute; inset: 56px 64px;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.boz-lb-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .12);
  opacity: 1; transition: opacity .25s ease;
  -webkit-user-drag: none;
}
.boz-lb.is-loading .boz-lb-img { opacity: 0; }
.boz-lb.is-loading .boz-lb-stage::after {
  content: ""; position: absolute; width: 36px; height: 36px; top: 50%; left: 50%; margin: -18px 0 0 -18px;
  border: 2px solid rgba(0, 0, 0, .12); border-top-color: #c7a375; border-radius: 50%;
  animation: boz-lb-spin .8s linear infinite;
}
@keyframes boz-lb-spin { to { transform: rotate(360deg); } }

.boz-lb-btn {
  position: absolute; width: 48px; height: 48px; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s ease, opacity .2s ease;
}
.boz-lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.boz-lb-btn:hover { background: rgba(0, 0, 0, .8); }
.boz-lb-btn:focus-visible { outline: 2px solid #c7a375; outline-offset: 2px; }
.boz-lb-btn[disabled] { opacity: .25; cursor: default; }
.boz-lb-btn[hidden] { display: none; }
.boz-lb-close { top: 8px; right: 8px; }
.boz-lb-prev { top: 50%; left: 8px; margin-top: -24px; }
.boz-lb-next { top: 50%; right: 8px; margin-top: -24px; }

.boz-lb-count, .boz-lb-caption {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 13px; letter-spacing: 1px; color: #444;
}
.boz-lb-count { bottom: 18px; }
.boz-lb-caption {
  top: 14px; padding: 0 64px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.boz-lb-link {
  position: absolute; bottom: 14px; right: 72px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #8a7444; text-decoration: underline;
}
.boz-lb-link:hover, .boz-lb-link:focus { color: #555; }
.boz-lb-link:focus-visible { outline: 2px solid #c7a375; outline-offset: 2px; }
.boz-lb-link[hidden] { display: none; }
.boz-lb-caption[hidden] { display: none; }

@media (max-width: 767px) {
  .boz-lb-stage { inset: 56px 0 48px; }
  .boz-lb-caption { padding: 0 60px 0 12px; text-align: left; }
  .boz-lb-link { right: auto; left: 50%; transform: translateX(-50%); bottom: 58px; }
  .boz-lb-prev, .boz-lb-next { top: auto; bottom: 6px; margin-top: 0; width: 40px; height: 40px; }
  .boz-lb-prev { left: 12px; }
  .boz-lb-next { right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .boz-lb-img { transition: none; }
}

/* ---------- Footer Instagram feed (js/instagram.js) ---------- */
.instagram { width: fit-content; display: inline-block; max-width: 270px; }
.instagram-feed::after { content: ""; display: table; clear: both; }
.instagram-feed .instagram-photo {
  position: relative; float: left; width: 86px; height: 86px; margin: 2px;
  overflow: hidden; line-height: 0; background: #eee;
}
.instagram-feed .instagram-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, opacity .3s ease;
}
.instagram-feed .instagram-photo:hover img,
.instagram-feed .instagram-photo:focus-visible img { transform: scale(1.08); opacity: .85; }
.instagram-feed .instagram-photo:focus-visible { outline: 2px solid #c7a375; outline-offset: 1px; }
.instagram-feed .instagram-photo.is-video::after { /* small play mark on video posts */
  content: ""; position: absolute; top: 6px; right: 6px;
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .6));
}
@media (prefers-reduced-motion: reduce) {
  .instagram-feed .instagram-photo img { transition: none; }
}
