/* Complex v2 — Sofi House modal */
:root {
  --vj-complex-v2--gold: #b69f0e;
  --vj-complex-v2--gold-mid: #d7b900;
  --vj-complex-v2--gold-dark: #85740a;
  --vj-complex-v2--theme-main-color: var(--vj-complex-v2--gold);
  --vj-complex-v2--theme-main-hover-color: var(--vj-complex-v2--gold-mid);
  --vj-complex-v2--bg: #ffffff;
  --vj-complex-v2--surface: #ffffff;
  --vj-complex-v2--text: #1a1a1a;
  --vj-complex-v2--text-soft: #5c5c5c;
  --vj-complex-v2--border: #e5e7eb;
  --vj-complex-v2--radius-xl: 18px;
  --vj-complex-v2--radius-lg: 14px;
  --vj-complex-v2--radius-md: 12px;
  --vj-complex-v2--radius-sm: 10px;
  --vj-complex-v2--shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
  --vj-complex-v2--shadow-soft: 0 2px 12px rgba(17, 24, 39, 0.06);
  --vj-complex-v2--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.vj-complex-v2 ul {
  list-style-type: none;
}

.vj-complex-v2 input {
  outline: none;
}

.swiper-complex-v2 {
  width: 100%;
}

.fancybox__content:has(.vj-complex-v2) {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  padding: 0;
  background: transparent;
}

.fancybox__slide:has(.vj-popup) {
  padding: 0;
}

.vj-complex-v2 {
  position: relative;
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--vj-complex-v2--bg);
  color: var(--vj-complex-v2--text);
  font-family: Inter, system-ui, sans-serif;
}

.fancybox__content .vj-complex-v2 {
  display: flex;
}

.vj-complex-v2__topbar {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 12px 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--vj-complex-v2--border);
}

.vj-complex-v2__topbar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vj-complex-v2--gold-dark);
}

.vj-complex-v2__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 10px 24px;
}

@media (max-width: 991px) {
  .fancybox__slide:has(.vj-popup) {
    padding: 0;
  }

  .fancybox__content:has(.vj-complex-v2) {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }

  .vj-complex-v2 {
    max-height: 100dvh;
    border-radius: 0;
  }

  .vj-complex-v2__contacts-container,
  .vj-complex-v2__contacts-container.mobile {
    padding: 14px 12px;
  }

  .vj-complex-v2__list-item {
    padding: 11px 12px;
  }
}

.vj-complex-v2-inner {
  width: 100%;
}

.vj-complex-v2__header-logo {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  aspect-ratio: 4 / 3;
  border-radius: var(--vj-complex-v2--radius-xl);
  overflow: hidden;
  box-shadow: var(--vj-complex-v2--shadow);
}

.vj-complex-v2__header-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vj-complex-v2__header {
  font-size: 1.35rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--vj-complex-v2--text);
}

.vj-complex-v2__main-text-container > .vj-complex-v2__header {
  font-size: 1.6rem;
}

.vj-complex-v2__text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  margin-top: 14px;
  color: var(--vj-complex-v2--text-soft);
}

.vj-complex-v2__info > div {
  margin-top: 28px;
}

.vj-complex-v2__list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vj-complex-v2__list br {
  display: none;
}

.vj-complex-v2__list-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--vj-complex-v2--radius-md);
  background: var(--vj-complex-v2--surface);
  border: 1px solid var(--vj-complex-v2--border);
  box-shadow: var(--vj-complex-v2--shadow-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.vj-complex-v2__list-img {
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.vj-complex-v2__contacts-container {
  display: none;
}

.vj-complex-v2__contacts-container.mobile {
  display: block;
  margin-top: 8px;
}

.vj-complex-v2__contacts-container,
.vj-complex-v2__contacts-container.mobile {
  padding: 18px;
  border-radius: var(--vj-complex-v2--radius-xl);
  background: var(--vj-complex-v2--surface);
  border: 1px solid var(--vj-complex-v2--border);
  box-shadow: var(--vj-complex-v2--shadow-soft);
}

.vj-complex-v2__contacts-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--vj-complex-v2--gold), var(--vj-complex-v2--gold-mid));
  color: #fff;
  text-transform: none;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.22s var(--vj-complex-v2--ease), box-shadow 0.22s var(--vj-complex-v2--ease), filter 0.22s ease;
  box-shadow: 0 4px 16px rgba(182, 159, 14, 0.28);
}

.vj-complex-v2__contacts-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(182, 159, 14, 0.34);
}

.vj-complex-v2__contacts-button span {
  display: block;
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
}

.vj-complex-v2__form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
}

.vj-complex-v2__form .quiz__last-screen_input > span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--vj-complex-v2--text-soft);
}

.vj-complex-v2__form .quiz__last-screen_input .input-holder {
  border-radius: var(--vj-complex-v2--radius-md);
  border: 1px solid var(--vj-complex-v2--border);
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vj-complex-v2__form .quiz__last-screen_input .input-holder:focus-within {
  border-color: var(--vj-complex-v2--gold-mid);
  box-shadow: 0 0 0 3px rgba(215, 185, 0, 0.18);
}

.vj-complex-v2__tel {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--vj-complex-v2--border);
  border-radius: var(--vj-complex-v2--radius-md);
  background: #ffffff;
  font-size: 16px;
  line-height: 1.2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vj-complex-v2__tel:focus {
  border-color: var(--vj-complex-v2--gold-mid);
  box-shadow: 0 0 0 3px rgba(215, 185, 0, 0.18);
}

.vj-complex-v2__contacts-promo {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--vj-complex-v2--text-soft);
}

.vj-complex-v2__contacts-holder {
  margin-top: 10px;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--vj-complex-v2--border);
}

.vj-complex-v2__contacts-holder .tel {
  color: var(--vj-complex-v2--gold-dark);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.vj-complex-v2__contacts-holder .tel:hover {
  color: var(--vj-complex-v2--gold);
}

.vj-complex-v2__socials-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vj-complex-v2__socials-container a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--vj-complex-v2--border);
  transition: transform 0.2s var(--vj-complex-v2--ease), box-shadow 0.2s ease;
}

.vj-complex-v2__socials-container a:hover {
  transform: translateY(-2px);
  box-shadow: var(--vj-complex-v2--shadow-soft);
}

.vj-complex-v2__socials-container img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.vj-complex-v2__gallery {
  margin-top: 32px;
}

.swiper-complex-v2-gallery {
  width: 100%;
  margin-top: 16px;
  overflow: hidden;
}

.swiper-complex-v2-gallery .swiper-slide {
  height: auto;
  border-radius: var(--vj-complex-v2--radius-lg);
  overflow: hidden;
  box-shadow: var(--vj-complex-v2--shadow-soft);
}

.swiper-complex-v2-gallery .vj-media-cover,
.swiper-complex-v2-gallery .vj-media-cover img {
  border-radius: var(--vj-complex-v2--radius-lg);
}

.swiper-complex-v2-gallery .vj-media-cover {
  aspect-ratio: 16 / 10;
  max-height: 210px;
  overflow: hidden;
}

.swiper-complex-v2-gallery .vj-media-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  object-fit: cover;
}

.vj-complex-v2__gallery-navigation {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vj-complex-v2__gallery-pagination {
  width: max-content;
  font-size: 14px;
  font-weight: 600;
  color: var(--vj-complex-v2--text-soft);
}

.vj-complex-v2__gallery-navigation-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--vj-complex-v2--border);
  border-radius: 50%;
  background: var(--vj-complex-v2--surface);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--vj-complex-v2--ease);
  cursor: pointer;
}

.vj-complex-v2__gallery-navigation-button[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

.vj-complex-v2__gallery-navigation-button:hover {
  background: #faf6eb;
  border-color: #e8dcc0;
  transform: translateY(-1px);
}

.vj-complex-v2__gallery-navigation-button svg {
  fill: var(--vj-complex-v2--gold-dark);
}

@media (min-width: 575px) {
  .vj-complex-v2__body {
    padding: 20px 24px 32px;
  }
}

@media (min-width: 768px) {
  .vj-complex-v2__header-logo {
    aspect-ratio: 1.15;
  }
}

@media (min-width: 992px) {
  .fancybox__slide:has(.vj-popup) {
    padding: 16px;
  }

  .fancybox__content:has(.vj-complex-v2) {
    max-height: calc(100dvh - 32px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  }

  .vj-complex-v2 {
    max-height: calc(100dvh - 32px);
    border-radius: 20px;
  }

  .swiper-complex-v2-gallery .swiper-wrapper {
    align-items: stretch;
  }

  .swiper-complex-v2-gallery .vj-media-cover {
    max-height: 240px;
  }

  .vj-complex-v2__gallery-pagination {
    display: none;
  }

  .vj-complex-v2__body {
    padding: 24px 28px 32px;
  }

  .vj-complex-v2-inner {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
    gap: 28px;
    height: 100%;
    min-height: 0;
  }

  .vj-complex-v2-inner > div:nth-child(1) {
    position: sticky;
    top: 0;
    align-self: start;
  }

  .vj-complex-v2__header-logo {
    margin-bottom: 18px;
    aspect-ratio: 1.05;
  }

  .vj-complex-v2__gallery {
    display: grid;
    grid-template-areas:
      "header nav"
      "swiper swiper";
    gap: 12px 16px;
  }

  .vj-complex-v2__gallery > .vj-complex-v2__header {
    grid-area: header;
    align-self: center;
  }

  .swiper-complex-v2-gallery {
    grid-area: swiper;
  }

  .vj-complex-v2__gallery-navigation {
    margin-top: 0;
    grid-area: nav;
    justify-content: flex-end;
    gap: 10px;
  }

  .vj-complex-v2__contacts-container {
    display: block;
  }

  .vj-complex-v2__contacts-container.mobile {
    display: none;
  }

  .vj-complex-v2__contacts-holder {
    flex-direction: column;
    align-items: flex-start;
  }

  .vj-complex-v2 .quiz__last-screen_input-with-flag .input-holder > span,
  .vj-complex-v2 .quiz__last-screen_input .input-holder > span,
  .vj-complex-v2 .quiz__last-screen_input .input-holder input {
    height: 54px;
    min-height: unset;
  }

  .vj-complex-v2__main-text-container {
    padding-right: 4px;
  }
}

@media (min-width: 1100px) {
  .vj-complex-v2-inner {
    grid-template-columns: minmax(300px, 1fr) minmax(0, 2.4fr);
    gap: 36px;
  }
}

@media (min-width: 1300px) {
  .vj-complex-v2__contacts-holder {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 992px) and (max-height: 760px) {
  .vj-complex-v2__body {
    padding: 16px 20px 24px;
  }

  .vj-complex-v2__contacts-promo {
    margin-top: 12px;
  }
}
