html {
  scroll-behavior: auto;
}
.h2-popup {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 40px;
  line-height: 120%;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-align: center;
  color: var(--white);
}
.h2-popup .span-popup {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 64px;
  line-height: 120%;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-align: center;
  color: var(--prime);
}
.h3-popup {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 28px;
  text-transform: uppercase;
  color: var(--white);
}
.p-popup {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 160%;
  text-align: center;
  color: var(--white-700);
}
.popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  backdrop-filter: blur(33.043479919433594px);
  box-shadow: 11px 5px 29px 0 rgba(243, 168, 206, 0.15);
  background: rgba(0, 0, 0, 0.25);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;

  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  -webkit-overflow-scrolling: auto !important;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: rgba(0, 0, 0, 0.9);
  max-width: 1196px;
  width: 100%;
  position: relative;
  transform: scale(0.8) translateY(50px);
  transition: all 0.3s ease;
  overflow-y: hidden;
  overflow-x: hidden;
  overscroll-behavior: contain;
  height: 570px;
}

.popup-overlay.active .popup-content {
  transform: scale(1) translateY(0);
}

/* Кнопка закрытия popup */
.popup-close {
  position: absolute;
  top: 28px;
  right: 29px;
  background: none;
  border: none;
  color: var(--white, #ffffff);
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.popup-close:hover {
  background: rgba(245, 177, 181, 0.2);
  color: var(--prime, #f5b1b5);
}


.popup-content .form-home-wrapper {
  display: flex;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 50px);
  padding: 13px clamp(25px, 3vw, 49px) 13px clamp(4px, 3vw, 7px);
  background: transparent; 
  box-shadow: none;
  backdrop-filter: none; 
  height: 100%;
}

/* Дополнительные стили для мобильных устройств */
@media (max-width: 768px) {
  .popup-overlay {
    padding: 0 10px;
    height: 100dvh; 
  }

  .popup-content {
    max-height: 95vh;
    max-height: 95dvh;
  }

  .popup-content .form-home-wrapper {
    flex-direction: column;
    gap: 0;
    padding: 20px;
  }

  .popup-close {
    top: 10px;
    right: 15px;
    font-size: 20px;
    width: 25px;
    height: 25px;
  }
}

/* Стили для iOS Safari */
@supports (-webkit-touch-callout: none) {
  .popup-overlay {
    height: 100vh !important;
    height: -webkit-fill-available !important;
  }
}


@keyframes popupFadeIn {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

@keyframes popupFadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}


.popup-content .form-home-wrapper-left {
  max-width: 491px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 44px) clamp(25px, 5vw, 61px);
  background-image: url("../img/form-title-background.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  height: 100%;
}


.popup-content .form-home-wrapper-right {
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  gap: 47px;
  max-width: 595px;
  width: 100%;
  height: 100%;
}
.popup-content .form-home-wrapper-right h3 {
  text-transform: uppercase;
  font-size: clamp(18px, 2.5vw, 28px);
}
.popup-content .contact-form {
  max-width: 595px;
  width: 100%;
  display: grid;
  gap: 45px;
}

.popup-content .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 39px;
}

.popup-content .form-row.full-width {
  grid-template-columns: 1fr;
}

.popup-content .form-group {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #8d8d8d;
}

.popup-content .form-group label {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: clamp(10px, 1.2vw, 14px);
  line-height: 143%;
  color: var(--white);
  margin-bottom: 7px;
}

.popup-content .form-group input,
.popup-content .form-group select,
.popup-content .form-group textarea {
  border: none;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  line-height: 143%;
  color: var(--white);
  padding: 0 0 10px 0;
  background: transparent;
  transition: all 0.3s ease;
}
.popup-content .form-group textarea {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 143%;
  color: var(--white);
  padding: 0;
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 35px;
  max-height: 250px;
  overflow-y: auto;
}
.popup-content .form-group input:focus,
.popup-content .form-group select:focus,
.popup-content .form-group textarea {
  border: none;
  outline: none;
  background: transparent;
}

.popup-content .custom-dropdown-popup {
  position: relative;
  width: 100%;
}

.popup-content .dropdown-selected-popup {
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
}
.popup-content .dropdown-selected-popup span {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  line-height: 143%;
  color: var(--white);
}
.popup-content .dropdown-arrow {
  display: flex;
  width: 8px;
  height: 5px;
}
.popup-content .dropdown-arrow svg {
  margin-left: auto;
  transition: transform 0.3s ease;
}
.popup-content .dropdown-selected-popup.active .dropdown-arrow {
  margin-right: 15px;
}
.popup-content .dropdown-selected-popup.active .dropdown-arrow svg {
  transform: rotate(180deg);
}
.popup-content .dropdown-selected-popup.active {
  background: rgba(0, 0, 0, 0.9);
}
.popup-content .dropdown-options-popup {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(33.043479919433594px);
  box-shadow: 11px 5px 29px 0 rgba(243, 168, 206, 0.15);
  margin-top: 0px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.popup-content .dropdown-options-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.popup-content .dropdown-option-popup {
  padding: 0 0 0 4px;
  margin-bottom: 20px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  line-height: 120%;
  text-transform: capitalize;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.dropdown-option-popup:nth-child(1) {
    border-bottom: 1px solid #8d8d8d;
    padding-bottom: 2px;
}
.popup-content .dropdown-option-popup:hover {
  color: var(--prime);
}

.popup-content .dropdown-option-popup.selected {
  color: var(--white);
}

.popup-content .form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(5px, 1vw, 10px);
}

.popup-content .checkbox-group {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
}

.popup-content .checkbox-group input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.popup-content .checkbox-group label {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: clamp(8px, 1vw, 12px);
  line-height: 2.13;
  color: var(--white-700);
  user-select: none;
  cursor: pointer;
}
/* Базовые стили для custom-checkbox в popup */
.popup-content .custom-checkbox {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid #8d8d8d;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Галочка - базовое состояние (скрыта) */
.popup-content .custom-checkbox::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid var(--prime);
  border-width: 0 2px 2px 0;
  border-radius: 1px;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}



.popup-content .custom-checkbox.checked::after {
  transform: rotate(45deg) scale(1) !important;
 /* border-color: var(--prime) !important; */
}

/* Отключаем стили, которые завязаны на input:checked */
.popup-content .checkbox-group input[type="checkbox"]:checked + .custom-checkbox {
  background: transparent !important;
  border-color: #8d8d8d !important;
}

.popup-content .checkbox-group input[type="checkbox"]:checked + .custom-checkbox::after {
  transform: rotate(45deg) scale(0) !important;
}

/* Фокус состояние */
.popup-content .checkbox-group input[type="checkbox"]:focus + .custom-checkbox {
  box-shadow: 0 0 0 3px rgba(245, 177, 181, 0.3);
  outline: none;
}


/* ========== СТИЛИ ОШИБОК ДЛЯ CF7 ========== */

/* Подсветка ошибок для всех полей в popup */
.popup-content .cf7-error-field {
  background-color: rgba(255, 0, 0, 0.1) !important;
  transition: background-color 0.3s ease;
}

/* Для dropdown ошибок */
.popup-content .dropdown-selected-popup.cf7-error-field {
  background-color: rgba(255, 0, 0, 0.1) !important;
}

/* CF7 поля ввода в popup */
.popup-content .cf7-input,
.popup-content .cf7-textarea {
  border: none;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  line-height: 143%;
  color: var(--white);
  padding: 0 0 10px 0;
  background: transparent;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.popup-content .cf7-textarea {
  resize: none;
  min-height: 35px !important;
  max-height: 250px !important;
  overflow-y: hidden;
  padding: 0;
}

.popup-content .cf7-input:focus,
.popup-content .cf7-textarea:focus {
  border: none;
  outline: none;
  background: transparent;
}

/* Скрытые поля */
.popup-content .cf7-hidden {
  display: none !important;
}

.popup-content .cf7-checkbox {
  opacity: 0 !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* Кнопка отправки */
.popup-content .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Скрываем сообщения CF7 */
.popup-content .wpcf7-response-output {
  display: none !important;
}

.popup-content .wpcf7-spinner {
  display: none !important;
}

.popup-content .wpcf7-not-valid-tip {
  display: none !important;
}
.popup-content .submit-btn {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: clamp(10px, 1.3vw, 14px);
  text-transform: uppercase;
  text-align: center;
  color: var(--black-800);
  padding: clamp(10px, 1.8vw, 21px) clamp(10px, 1.6vw, 20px);
  max-width: 251px;
  width: 100%;
  background-color: var(--prime);
  border: 1px solid var(--prime);
  border-radius: 1000px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.popup-content .submit-btn:hover {
  background-color: rgba(245, 177, 181, 0.6);
}
.popup-content .submit-btn:active {
  background-color: rgba(245, 177, 181, 0.4);
}
@media (max-width: 1110px) {
  .popup-content .submit-btn {
    max-width: 200px;
  }
}

@media (max-width: 900px) {
  .popup-content .form-row {
    grid-template-columns: 1fr;
  }
  .popup-content .custom-dropdown {
    padding-bottom: 10px;
  }
  .popup-content .dropdown-options {
    margin-top: -10px;
  }
  .popup-content .form-footer {
    flex-direction: column;
    margin-top: 0;
    gap: 15px;
    align-items: flex-start;
  }

  .popup-content .submit-btn {
    width: 100%;
  }
}

@media (max-width: 769px) {
  #form-home-section {
    padding: 0;
  }
  .popup-content .form-home-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    backdrop-filter: blur(33.043479919433594px);
    box-shadow: 11px 5px 29px 0 rgba(243, 168, 206, 0.15);
    background: rgba(0, 0, 0, 0.5);
  }
  .popup-content .form-home-wrapper-left {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(15px, 3vw, 25px) clamp(30px, 5vw, 49px);
    background-image: url("../img/form-title-background.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }
  .popup-content .form-home-wrapper-left-img {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 6.35px solid var(--white);
    border-radius: 100%;
    max-width: 129px;
    width: 100%;
    max-height: 129px;
    height: 100%;
    margin-bottom: 32px;
  }
  .popup-content .form-home-wrapper-left-img img {
    max-width: 100%;
    object-fit: cover;
    height: auto;
  }
  .popup-content .form-home-wrapper-left h4 {
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 1px;
  }
  .popup-content .form-home-wrapper-left span {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: clamp(20px, 14vw, 50px);
    line-height: 120%;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    text-align: center;
    color: var(--prime);
    margin-bottom: 8px;
  }
  .popup-content .form-home-wrapper-left p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(10px, 4.5vw, 16px);
    line-height: 127%;
    text-align: center;
    color: var(--white-700);
    max-width: 292px;
  }
  .popup-content .form-home-wrapper-right {
    display: flex;
    flex-direction: column;
    padding: clamp(20px, 13vw, 48px) clamp(18px, 10vw, 40px);
    gap: 28px;
  }
  .popup-content .form-home-wrapper-right h3 {
    font-size: clamp(14px, 5.3vw, 20px);
    white-space: nowrap;
  }
  .popup-content .contact-form {
    max-width: 100%;
    width: 100%;
    display: grid;
    gap: 45px;
  }

  .popup-content .form-group {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #8d8d8d;
  }

  .popup-content .form-group label {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: clamp(10px, 1.2vw, 14px);
    line-height: 143%;
    color: var(--white);
    margin-bottom: 5px;
  }

  .popup-content .form-group input,
  .popup-content .form-group select,
  .popup-content .form-group textarea {
    border: none;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 143%;
    color: var(--white);
    padding: 0 0 10px 0;
    background: transparent;
    transition: all 0.3s ease;
  }
  .popup-content .form-group textarea {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 143%;
    color: var(--white);
    padding: 0;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 25px;
    max-height: 250px;
    overflow-y: auto;
  }
  .popup-content .form-group input:focus,
  .popup-content .form-group select:focus,
  .popup-content .form-group textarea {
    border: none;
    outline: none;
    background: transparent;
  }

  .popup-content .custom-dropdown {
    position: relative;
    width: 100%;
  }

  .popup-content .dropdown-selected {
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 20px;
  }
  .popup-content .dropdown-selected span {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 143%;
    color: var(--white);
  }
  .popup-content .dropdown-arrow {
    display: flex;
    width: 8px;
    height: 5px;
  }
  .popup-content .dropdown-arrow svg {
    margin-left: auto;
    transition: transform 0.3s ease;
  }
  .popup-content .dropdown-selected.active .dropdown-arrow {
    margin-right: 15px;
  }
  .popup-content .dropdown-selected.active .dropdown-arrow svg {
    transform: rotate(180deg);
  }
  .popup-content .dropdown-selected.active {
    background: rgba(0, 0, 0, 0.9);
  }
  .popup-content .dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(33.043479919433594px);
    box-shadow: 11px 5px 29px 0 rgba(243, 168, 206, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  .popup-content .dropdown-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .popup-content .dropdown-option {
    padding: 0 0 0 4px;
    margin-bottom: 20px;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 120%;
    text-transform: capitalize;
    color: var(--white);
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .popup-content .dropdown-option:hover {
    color: var(--prime);
  }

  .popup-content .dropdown-option.selected {
    color: var(--white);
  }

  .popup-content .form-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 28px;
  }

  .popup-content .checkbox-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
  }

  .popup-content .checkbox-group input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
  }

  .popup-content .checkbox-group label {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(8px, 3.5vw, 12px);
    line-height: 2.13;
    color: var(--white-700);
    user-select: none;
    cursor: pointer;
  }
  .popup-content .custom-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    border: 1px solid #8d8d8d;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
  }

  /* Птичка (галочка) */
  .popup-content .custom-checkbox::after {
    content: "";
    position: absolute;
    top: 15%;
    left: 35%;
    width: 8px;
    height: 12px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    border-radius: 1px;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
  }
.popup-content .custom-checkbox.checked::after {
    transform: rotate(45deg) scale(1) !important;
    border-color: var(--white) !important;
  }
  .popup-content .submit-btn {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: clamp(10px, 4vw, 14px);
    text-transform: uppercase;
    text-align: center;
    color: var(--black-800);
    padding: clamp(10px, 5vw, 19px) clamp(10px, 5vw, 19px);
    max-width: 100%;
    width: 100%;
    background: var(--prime);
    border: 1px solid var(--prime);
    border-radius: 1000px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
  }
}
@media (max-width: 900px) {
  .popup-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    height: 100%;
  }
  /* Стили скроллбара внутри popup */
  .popup-content::-webkit-scrollbar {
    width: 6px;
  }

  .popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
  }

  .popup-content::-webkit-scrollbar-thumb {
    background: var(--prime, rgba(245, 177, 181, 0.6));
    border-radius: 3px;
  }

  .popup-content::-webkit-scrollbar-thumb:hover {
    background: var(--prime, rgba(245, 177, 181, 0.8));
  }
  .popup-close {
    top: 15px;
    right: 5px;
  }
}

/*-----------------------*/

.popup-success {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(7, 17, 21, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 11000;
  padding: 20px;
  cursor: pointer;

  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  -webkit-overflow-scrolling: auto !important;
}

.popup-success.active {
  display: flex;
}

.popup-success-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  backdrop-filter: blur(33.043479919433594px);
  box-shadow: 11px 5px 29px 0 rgba(243, 168, 206, 0.15);
  background: rgba(0, 0, 0, 0.5);
  padding: 34px 30px;
  max-width: 428px;
  width: 100%;
  max-height: 175px;
  height: 100%;
}

.popup-success-content span {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 28px;
  text-transform: uppercase;
  text-align: center;
  color: var(--white);
}

.popup-success-content p {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 160%;
  text-align: center;
  color: var(--white-700);
}


/* Кнопка закрытия popup */
.popup-close-success {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: var(--white, #ffffff);
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.popup-close-success:hover {
  background: rgba(245, 177, 181, 0.2);
  color: var(--prime, #f5b1b5);
}