/* LDC — Reference public carousel + drawer
   v2026-08-08-prelaunch-frontend-r2 */

.ldc-ref-page {
  max-width: 100%;
  overflow-x: clip;
}

/* ── Carousel section ─────────────────────────────────────────── */
.ldc-ref-carousel {
  position: relative;
  background: var(--ldc-bg-cream, #F8EEF0);
  color: var(--ldc-text, #2E0C13);
  padding: clamp(48px, 7vh, 96px) 0 clamp(64px, 9vh, 120px);
  max-width: 100%;
  overflow-x: clip;
}

.ldc-ref-carousel__empty {
  max-width: 42ch;
  margin: 0 auto;
  text-align: center;
  font-family: var(--ldc-font, 'Nunito Sans', sans-serif);
  font-weight: 300;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.7;
  color: var(--ldc-body, #561A27);
}

.ldc-ref-carousel__viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.ldc-ref-carousel__track {
  position: relative;
  width: 100%;
}

.ldc-ref-slide {
  display: none;
  width: 100%;
  max-width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
  min-height: clamp(420px, 62vh, 640px);
}

.ldc-ref-slide.is-active {
  display: flex;
}

.ldc-ref-slide__media {
  position: relative;
  flex: 0 1 48%;
  min-width: 0;
  background: var(--ldc-bordeaux-100, #EBC9CF);
  overflow: hidden;
}

.ldc-ref-slide__img,
.ldc-ref-slide__video-wrap {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(320px, 52vh, 560px);
  object-fit: cover;
}

.ldc-ref-slide__video-wrap {
  position: relative;
}

.ldc-ref-slide__video-wrap .ldc-ref-slide__img {
  min-height: inherit;
}

.ldc-ref-slide__img--ph {
  background:
    linear-gradient(145deg, var(--ldc-bordeaux-100, #EBC9CF) 0%, var(--ldc-bordeaux-200, #CC8C98) 100%);
}

/* Video play — center of thumb; same data-ref-gallery → openGallery as before */
.ldc-ref-slide__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  background: rgba(46, 12, 19, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.28s ease, border-color 0.28s ease, transform 0.28s ease;
}

.ldc-ref-slide__play:hover {
  background: var(--ldc-bordeaux-900, #2E0C13);
  border-color: rgba(255, 255, 255, 0.85);
}

.ldc-ref-slide__play:focus-visible {
  outline: 2px solid var(--ldc-bordeaux-50, #FFF9FA);
  outline-offset: 3px;
}

.ldc-ref-slide__play-ico {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

/* Listing gallery CTA — bottom overlay; opens Fancybox, not drawer */
.ldc-ref-slide__gallery-cta {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 3vh, 24px);
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  background: rgba(46, 12, 19, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--ldc-font, 'Nunito Sans', sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background 0.28s ease, border-color 0.28s ease;
}

.ldc-ref-slide__gallery-cta:hover {
  background: rgba(46, 12, 19, 0.88);
  border-color: rgba(255, 255, 255, 0.9);
}

.ldc-ref-slide__gallery-cta:focus-visible {
  outline: 2px solid var(--ldc-bordeaux-50, #FFF9FA);
  outline-offset: 3px;
}

.ldc-ref-slide__gallery-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 14px;
  box-sizing: border-box;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  position: relative;
  opacity: 0.95;
}

.ldc-ref-slide__gallery-ico::before,
.ldc-ref-slide__gallery-ico::after {
  content: "";
  position: absolute;
  background: currentColor;
  opacity: 0.9;
}

.ldc-ref-slide__gallery-ico::before {
  left: 2px;
  right: 2px;
  top: 3px;
  height: 1.5px;
}

.ldc-ref-slide__gallery-ico::after {
  left: 2px;
  width: 5px;
  height: 5px;
  top: 6px;
  box-shadow: 6px 0 0 currentColor;
}

.ldc-ref-slide__gallery-label {
  white-space: normal;
}

.ldc-ref-slide__panel {
  flex: 0 1 32%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(8px, 1.5vw, 24px) 0;
}

.ldc-ref-slide__title {
  font-family: var(--ldc-font-display, 'Nunito Sans', sans-serif);
  font-weight: 400;
  font-size: clamp(28px, 2.8vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.014em;
  color: var(--ldc-text, #2E0C13);
  margin: 0 0 20px;
}

.ldc-ref-slide__text {
  font-family: var(--ldc-font, 'Nunito Sans', sans-serif);
  font-weight: 300;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.7;
  color: var(--ldc-body, #561A27);
  margin: 0 0 28px;
  white-space: pre-line;
  max-width: 38ch;
}

.ldc-ref-slide__cta {
  align-self: flex-start;
}

.ldc-ref-slide__next {
  flex: 0 1 18%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.ldc-ref-slide__next:focus-visible {
  outline: 2px solid var(--ldc-bordeaux-600, #7D2E3E);
  outline-offset: 4px;
}

.ldc-ref-slide__next-media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--ldc-bordeaux-100, #EBC9CF);
}

.ldc-ref-slide__next-media img,
.ldc-ref-slide__next-ph {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(.16, 1, .3, 1);
}

.ldc-ref-slide__next:hover .ldc-ref-slide__next-media img {
  transform: scale(1.04);
}

.ldc-ref-slide__next-ph {
  background:
    linear-gradient(160deg, var(--ldc-bordeaux-100, #EBC9CF), var(--ldc-bordeaux-200, #CC8C98));
}

.ldc-ref-slide__next-label {
  font-family: var(--ldc-font-display, 'Nunito Sans', sans-serif);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ldc-bordeaux-800, #561A27);
}

/* Nav */
.ldc-ref-carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: clamp(28px, 4vh, 48px);
  padding: 0 24px;
}

.ldc-ref-carousel__arrow {
  width: 48px;
  height: 48px;
  border: 1px solid var(--ldc-bordeaux-200, #CC8C98);
  background: transparent;
  color: var(--ldc-bordeaux-900, #2E0C13);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.ldc-ref-carousel__arrow:hover {
  background: var(--ldc-bordeaux-900, #2E0C13);
  border-color: var(--ldc-bordeaux-900, #2E0C13);
  color: var(--ldc-bordeaux-50, #FFF9FA);
}

.ldc-ref-carousel__arrow:focus-visible {
  outline: 2px solid var(--ldc-bordeaux-600, #7D2E3E);
  outline-offset: 3px;
}

.ldc-ref-carousel__counter {
  margin: 0;
  min-width: 4.5em;
  text-align: center;
  font-family: var(--ldc-font, 'Nunito Sans', sans-serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ldc-bordeaux-600, #7D2E3E);
}

/* ── Drawer ─────────────────────────────────────────────────────
   Always in DOM. Closed = transform off-screen + visibility/pointer-events.
   Open = .is-open only (same lifecycle as .ldc-lux-svc-drawer). */
.ldc-ref-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-svc-drawer, 10000);
  pointer-events: none;
  visibility: hidden;
}

.ldc-ref-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.ldc-ref-drawer__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(46, 12, 19, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(.16, 1, .3, 1);
  z-index: var(--z-svc-backdrop, 9990);
}

.ldc-ref-drawer.is-open .ldc-ref-drawer__backdrop {
  opacity: 1;
}

.ldc-ref-drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: min(1280px, 92vw);
  max-width: 100vw;
  background: var(--ldc-bg, #F8EEF0);
  color: var(--ldc-text, #2E0C13);
  box-shadow: -32px 0 80px rgba(46, 12, 19, 0.28);
  transform: translate3d(100%, 0, 0);
  transition:
    transform 0.62s cubic-bezier(.86, 0, .07, 1),
    visibility 0s linear 0.62s;
  visibility: hidden;
  overflow: hidden;
  z-index: calc(var(--z-svc-drawer, 10000) + 1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ldc-ref-drawer.is-open .ldc-ref-drawer__panel {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  transition:
    transform 0.62s cubic-bezier(.86, 0, .07, 1),
    visibility 0s linear 0s;
}

.ldc-ref-drawer__close {
  position: absolute;
  top: 20px;
  right: clamp(16px, 2.5vw, 28px);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(46, 12, 19, 0.15);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ldc-text, #2E0C13);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.ldc-ref-drawer__close:hover {
  background: var(--ldc-bordeaux-900, #2E0C13);
  border-color: var(--ldc-bordeaux-900, #2E0C13);
  color: var(--ldc-bordeaux-50, #FFF9FA);
}

.ldc-ref-drawer__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-rows: 1fr;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

/* Detail drawer: jedna statická fotka (bez thumbs / videa) */
.ldc-ref-drawer__hero {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--ldc-bordeaux-900, #2E0C13);
}

.ldc-ref-drawer__hero img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  background: #1a070c;
}

.ldc-ref-drawer__hero-ph {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, var(--ldc-bordeaux-800, #561A27) 0%, var(--ldc-bordeaux-900, #2E0C13) 100%);
}

/* Hero gallery CTA — overlay above photo, not a primary site CTA */
.ldc-ref-drawer__gallery-cta {
  position: absolute;
  left: 50%;
  bottom: clamp(16px, 3.5vh, 28px);
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  background: rgba(46, 12, 19, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--ldc-font, 'Nunito Sans', sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background 0.28s ease, border-color 0.28s ease;
}

.ldc-ref-drawer__gallery-cta:hover {
  background: rgba(46, 12, 19, 0.88);
  border-color: rgba(255, 255, 255, 0.9);
}

.ldc-ref-drawer__gallery-cta:focus-visible {
  outline: 2px solid var(--ldc-bordeaux-50, #FFF9FA);
  outline-offset: 3px;
}

.ldc-ref-drawer__gallery-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 14px;
  box-sizing: border-box;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  position: relative;
  opacity: 0.95;
}

.ldc-ref-drawer__gallery-ico::before,
.ldc-ref-drawer__gallery-ico::after {
  content: "";
  position: absolute;
  background: currentColor;
  opacity: 0.9;
}

.ldc-ref-drawer__gallery-ico::before {
  left: 2px;
  right: 2px;
  top: 3px;
  height: 1.5px;
}

.ldc-ref-drawer__gallery-ico::after {
  left: 2px;
  width: 5px;
  height: 5px;
  top: 6px;
  box-shadow: 6px 0 0 currentColor;
}

.ldc-ref-drawer__gallery-label {
  white-space: normal;
}

.ldc-ref-drawer__copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: clamp(72px, 8vh, 110px) clamp(28px, 3.5vw, 56px) clamp(40px, 5vh, 64px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
}

.ldc-ref-drawer__eyebrow {
  /* Typography + left divider from shared `.ldc-lux-eyebrow` (services pattern). */
  min-height: 1em;
}

.ldc-ref-drawer__title {
  font-family: var(--ldc-font-display, 'Nunito Sans', sans-serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.014em;
  color: var(--ldc-text, #2E0C13);
  margin: 0 0 28px;
}

.ldc-ref-drawer__services-wrap {
  margin-top: 0;
}
.ldc-ref-drawer__services-title {
  margin: 0 0 12px;
  font-family: var(--ldc-font-display, var(--ldc-font));
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 500;
  color: var(--ldc-ink, #2a1518);
}
.ldc-ref-drawer__services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ldc-ref-drawer__services li {
  padding: 16px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ldc-body, #561A27);
  border-bottom: 1px solid var(--ldc-bordeaux-100, #EBC9CF);
}

.ldc-ref-drawer__services li:first-child {
  border-top: 1px solid var(--ldc-bordeaux-100, #EBC9CF);
}

html.ldc-ref-drawer-open,
body.ldc-ref-drawer-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 980px) {
  .ldc-ref-slide.is-active {
    flex-direction: column;
    min-height: 0;
    gap: 24px;
  }

  .ldc-ref-slide__media,
  .ldc-ref-slide__panel {
    flex: 1 1 auto;
    width: 100%;
  }

  .ldc-ref-slide__img,
  .ldc-ref-slide__video-wrap {
    min-height: clamp(240px, 42vh, 420px);
    aspect-ratio: 16 / 10;
  }

  .ldc-ref-slide__next {
    display: none;
  }

  .ldc-ref-drawer__panel {
    width: 100vw;
  }

  .ldc-ref-drawer__layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 38vh) 1fr;
    overflow-y: auto;
  }

  .ldc-ref-drawer__hero {
    min-height: clamp(220px, 38vh, 360px);
  }

  .ldc-ref-drawer__copy {
    padding: clamp(28px, 5vh, 48px) clamp(20px, 5vw, 32px) clamp(32px, 5vh, 48px);
    overflow: visible;
  }

  .ldc-ref-drawer__gallery-cta {
    bottom: 14px;
    padding: 9px 14px;
    font-size: 12px;
    gap: 8px;
  }

  .ldc-ref-slide__gallery-cta {
    bottom: 12px;
    padding: 9px 14px;
    font-size: 12px;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .ldc-ref-slide {
    max-width: 100%;
    padding: 0 16px;
  }

  .ldc-ref-carousel__nav {
    gap: 18px;
  }

  .ldc-ref-carousel__arrow {
    width: 44px;
    height: 44px;
  }

  .ldc-ref-drawer__gallery-cta {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform: none;
    bottom: 12px;
  }

  .ldc-ref-slide__gallery-cta {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform: none;
    bottom: 12px;
  }

  .ldc-ref-slide__play {
    width: 64px;
    height: 64px;
  }
}

/*
 * Fancybox 4 default z-index (~1050) is below Reference drawer (~10000).
 * Keep gallery above drawer while drawer stays open underneath.
 */
.fancybox__container {
  z-index: 11050 !important;
}

@media (prefers-reduced-motion: reduce) {
  .ldc-ref-drawer__panel,
  .ldc-ref-drawer__backdrop,
  .ldc-ref-slide__next-media img,
  .ldc-ref-slide__play,
  .ldc-ref-carousel__arrow,
  .ldc-ref-drawer__gallery-cta,
  .ldc-ref-slide__gallery-cta {
    transition: none;
  }

  .ldc-ref-drawer__panel {
    transform: none;
    opacity: 0;
  }

  .ldc-ref-drawer.is-open .ldc-ref-drawer__panel {
    opacity: 1;
  }
}
