/* R-PONS: obrazová přehlídka realizací, původní firemní paleta. */
.reference-home-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.reference-home-heading h2 { margin: 0; }
.reference-home-heading .btn { gap: 14px; }
.reference-home-heading .btn svg { width: 18px; height: 18px; }
.reference-carousel { position: relative; isolation: isolate; scroll-margin-top: 100px; border-radius: 8px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.reference-carousel [hidden] { display: none !important; }
.carousel-stage { display: grid; }
.carousel-stage > .ref { grid-area: 1 / 1; width: 100%; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); min-height: 500px; margin: 0; border: 0; background: var(--paper); }
/* Invisible cards keep the stage at a stable height while remaining inert/aria-hidden. */
.reference-carousel[data-ready="true"] .carousel-stage > .ref[hidden] { display: grid !important; visibility: hidden; pointer-events: none; }
.carousel-stage .ref figure { margin: 0; overflow: hidden; min-width: 0; }
.carousel-stage .ref figure a { display: block; height: 100%; }
.carousel-stage .ref img { width: 100%; height: 100%; min-height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transform-origin: center; }
.carousel-stage .ref .body { min-width: 0; padding: clamp(26px, 3.3vw, 44px); }
.carousel-stage .ref h3 { font-size: clamp(1.35rem, 1.15rem + .75vw, 1.85rem) !important; line-height: 1.16; text-wrap: pretty; }
.carousel-stage .reference-title { color: inherit; text-decoration: none; }
.carousel-stage .reference-title:hover { color: var(--red-strong); }
.carousel-stage .gallery-link { margin: 24px 0 0; }
.carousel-stage .ref dl { grid-template-columns: auto minmax(0, 1fr); gap: 7px 14px; }
.carousel-stage .ref dd { overflow-wrap: anywhere; }
.carousel-controls { position: absolute; z-index: 5; left: 22px; bottom: 22px; display: flex; align-items: center; gap: 3px; padding: 5px; border-radius: 999px; color: #fff; background: rgba(31, 36, 40, .94); box-shadow: 0 4px 16px rgba(0, 0, 0, .15); }
.carousel-controls button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; transition: background-color .2s, color .2s; }
.carousel-controls button:hover { background: #fff; color: var(--ink); }
.carousel-controls button:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; }
.carousel-controls button svg { width: 20px; height: 20px; pointer-events: none; }
.carousel-counter { min-width: 72px; text-align: center; font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.carousel-controls .carousel-toggle { border-left: 1px solid rgba(255,255,255,.25); border-radius: 0 50% 50% 0; margin-left: 4px; }
@media (max-width: 760px) {
  .carousel-stage > .ref { min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .carousel-stage .ref figure { aspect-ratio: 4 / 3; }
  .carousel-stage .ref img { aspect-ratio: auto; }
  .carousel-stage .ref .body { padding: 28px 24px; }
  .carousel-stage .ref dl { grid-template-columns: 76px minmax(0,1fr); font-size: .92rem; }
  .carousel-controls { top: 16px; left: 16px; bottom: auto; }
  .reference-home-heading .btn { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-controls button { transition: none; }
}
