/* iNSTALL SOUND Pro — homepage refinement v6
   Focus: tighter AV / SYSTEMS lockup and accessible QR lightbox. */

/* Keep the subtitle aligned under SOUND Pro, but close the gap between AV and СИСТЕМЫ. */
#slider .isp-hero-subtitle {
  display: inline-flex !important;
  justify-content: flex-start !important;
  align-items: baseline !important;
  gap: .24em !important;
  width: max-content !important;
  max-width: calc(100% - (var(--isp-hero-title-size) * 3.95)) !important;
}
#slider .isp-hero-subtitle__accent,
#slider .isp-hero-subtitle__rest {
  flex: 0 0 auto;
}

/* QR cards are deliberately obvious, keyboard-accessible tap targets. */
#advantages-blocks-4 .s-advantages-blocks-type-4__item {
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
#advantages-blocks-4 .s-advantages-blocks-type-4__item:focus-visible {
  outline: 3px solid #62baff;
  outline-offset: 5px;
  border-radius: 14px;
}
#advantages-blocks-4 .s-advantages-blocks-type-4__image img {
  cursor: zoom-in;
}

/* Full-screen QR viewer: the selected code is isolated from the other two. */
.isp-qr-lightbox[hidden] { display: none !important; }
.isp-qr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(3, 9, 17, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.isp-qr-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.isp-qr-lightbox__dialog {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min( min(88vw, 520px), 88vh );
  max-height: 90vh;
  padding: 22px 20px 18px;
  border: 1px solid rgba(115, 185, 255, .5);
  border-radius: 20px;
  background: #f7faff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55), 0 0 28px rgba(50, 136, 237, .18);
  transform: translateY(10px) scale(.985);
  transition: transform .2s ease;
}
.isp-qr-lightbox.is-open .isp-qr-lightbox__dialog {
  transform: translateY(0) scale(1);
}
.isp-qr-lightbox__image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.isp-qr-lightbox__caption {
  margin: 0;
  color: #172536;
  font: 600 14px/1.4 Arial, sans-serif;
  text-align: center;
}
.isp-qr-lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #172536;
  font: 400 27px/1 Arial, sans-serif;
  cursor: pointer;
}
.isp-qr-lightbox__close:hover,
.isp-qr-lightbox__close:focus-visible {
  background: #3288ed;
  outline: 2px solid #3288ed;
  outline-offset: 2px;
}
body.isp-qr-lightbox-open { overflow: hidden; }
@media (max-width: 639px) {
  .isp-qr-lightbox { padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); }
  .isp-qr-lightbox__dialog {
    width: min(92vw, 500px);
    max-height: 88vh;
    padding: 16px 14px 14px;
    border-radius: 16px;
  }
  .isp-qr-lightbox__image { max-height: 76vh; }
  .isp-qr-lightbox__caption { font-size: 13px; padding: 0 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .isp-qr-lightbox,
  .isp-qr-lightbox__dialog { transition: none; }
}
