*{
    user-select: none;
}

.toTopBtn{
    box-shadow: 0 4px 20px rgba(48, 146, 252, 0.3);
}

.btn_primary span::before {
    inset: 0;
    width: auto;
    height: auto;
    aspect-ratio: unset;
    background: hsla(0, 0%, 100%, 0.2);
    transform: none !important;
    transition: none;
}

.contact-form__inner{
    position: relative;
}

.contact-form__inner .wpcf7-spinner{
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    border-radius: 1.2rem;
    background-color: rgba(255, 255, 255, 0.15);
    opacity: 1;
    margin: 0;
    z-index: 50;
}

.contact-form__inner .wpcf7-spinner::before{
    position: absolute;
    inset: 0;
    margin: auto;
    width: 5.6rem;
    height: 5.6rem;
    background-color: transparent;
    background: conic-gradient(from 0deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent 68%, black 69%);
    mask: radial-gradient(farthest-side, transparent 68%, black 69%);
    border-radius: 50%;
    transform-origin: center;
    animation-duration: 800ms;
}

.contact-form__submit.btn.btn_secondary{
    @media (max-width: 767px){
        width: 100%;
        min-height: 0px;
    }
}

.wpcf7-form-control{
    width: 100%;
}

.contact-form__form{
    p{
        margin-block: 0;
    }
}

.contact-form__submit.btn.btn_secondary{
    background-color: #183d6e;
    overflow: hidden;
    transition: background-color .3s ease;
    text-transform: uppercase;
    font-size: 1.6rem;
    min-height: 10rem;
    min-width: 32rem;
    &:hover{
        background-color: #0f2a4b;
    }
}

.contact-form__field--select{
    position: relative;
}

.contact-form__select-native{
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.contact-form__select{
    position: relative;
    z-index: 5;
}

.contact-form__select-trigger{
    position: relative;
    width: 100%;
    min-height: max(5.8rem, min(7vw, 8.8rem));
    padding: 0 max(5.4rem, min(5vw, 6.4rem)) 0 max(1.6rem, min(2.2vw, 2.6rem));
    border: 1px solid hsla(0, 0%, 100%, .2);
    border-radius: 1.2rem;
    background: hsla(0, 0%, 100%, .07);
    color: var(--color-light);
    text-align: left;
    font-size: var(--pSize);
    line-height: 1.2;
}

.contact-form__select-trigger::after{
    content: "";
    position: absolute;
    top: 50%;
    right: 2.4rem;
    width: 1.8rem;
    height: 1.8rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23fff' stroke-width='2' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transform: translateY(-50%);
    transition: transform .2s ease;
}

.contact-form__select.is-open .contact-form__select-trigger::after{
    transform: translateY(-50%) rotate(180deg);
}

.contact-form__select-trigger.is-placeholder{
    color: hsla(0, 0%, 100%, .9);
}

.contact-form__select-dropdown{
    position: absolute;
    top: calc(100% + .8rem);
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    overflow: hidden;
    border: 1px solid hsla(0, 0%, 100%, .2);
    border-radius: 1.2rem;
    background: #2d6fc2;
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .16);
}

.contact-form__select.is-open .contact-form__select-dropdown{
    display: block;
}

.contact-form__select-options{
    margin: 0;
    padding: .8rem 0;
    list-style: none;
}

.contact-form__select-option{
    width: 100%;
    padding: 1.6rem max(1.6rem, min(2.2vw, 2.6rem));
    color: var(--color-light);
    text-align: left;
    font-size: var(--pSize);
    line-height: 1.2;
    transition: background-color .2s ease;
}

.contact-form__select-option:hover,
.contact-form__select-option.is-selected{
    background-color: #1f63bb;
}

/* CF7 file upload: 3-slot system, one active slot at a time */
.contact-form__upload {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    padding-right: 6.4rem;
    &>p{
            position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    }
}

.contact-form__upload::before,
.contact-form__upload::after {
    position: relative;
    z-index: 1;
    display: block;
    pointer-events: none;
}

.contact-form__upload::before {
    line-height: 1.2;
    font-size: var(--pSize);
}

.contact-form__upload::after {
    content: "PDF, PPTX, DOC";
    line-height: 1.2;
    font-size: var(--pSizeSmaller);
    opacity: .5;
}

html[lang="ru-RU"] .contact-form__upload::before,
body[lang="ru-RU"] .contact-form__upload::before {
    content: "Презентационный материал";
}

html[lang="en-US"] .contact-form__upload::before,
body[lang="en-US"] .contact-form__upload::before {
    content: "Presentation materials";
}

.contact-form__upload {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21.44 11.05l-8.49 8.49a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48' stroke='rgba(255,255,255,0.92)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right max(1.6rem, min(2.4vw, 2.6rem)) center;
    background-size: 2.2rem 2.2rem;
}

/* All slots inactive by default — JS adds .is-active to the current one */
.contact-form__upload .wpcf7-form-control-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.contact-form__upload .wpcf7-form-control-wrap.is-active {
    pointer-events: auto;
}

.contact-form__upload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* All 3 slots filled — lock the upload zone */
.contact-form__upload.is-full {
    cursor: default;
    pointer-events: none;
    opacity: 0.5;
}

.contact-form__upload .wpcf7-not-valid-tip {
    position: absolute;
    left: 0;
    bottom: -2.2rem;
    font-size: 1.2rem;
}

.contact-form__file-list {
    margin: 0;
}

.contact-form__file-item span {
    word-break: break-word;
}


.contact-form__field{
    .contact-form__select-options{
        padding: 0;
    }
    .contact-form__select-option{
        border: none;
        background-color: var(--color-main);
        &:hover{
            background-color: rgba(var(--color-main-rgb), .8);
        }
    }
    li:not(:last-child) .contact-form__select-option{
        border-bottom: 1px solid hsla(0, 0%, 100%, .2);
    }
}

.contact-form__form{
    br{
        display: none;
    }
}
.contact-form__field.contact-form__field--select{
    select{
        position: static;
    }
    .contact-form__select{
        position: absolute;
    top: 0;
    width: 100%;
    }
}

.contact-form__field.contact-form__field--select:has(.contact-form__select.is-open){
    position: relative;
    z-index: 20;
}

.wpcf7-form-control-wrap:has(.wpcf7-not-valid-tip) input, .contact-form__field--select:has(.wpcf7-not-valid-tip) .contact-form__select-trigger {
    border-color: red;
}

/* CF7 Response Modal */
.wpcf7-response-output {
    display: none;
}

.cf7-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.cf7-modal-backdrop.is-visible {
    display: block;
}

.wpcf7-response-output.is-modal {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1001;
    width: min(44rem, calc(100% - 4rem)) !important;
    margin: 0 !important;
    padding: 4rem 3.2rem 3.2rem !important;
    border: none !important;
    border-radius: 1.6rem !important;
    background-color: #3092fc !important;
    color: #fff !important;
    font-family: Ubuntu, Arial, sans-serif;
    font-size: var(--pSize, 1.6rem);
    line-height: 1.5;
    text-align: center;
}

form.failed .wpcf7-response-output.is-modal,
form.invalid .wpcf7-response-output.is-modal,
form.spam .wpcf7-response-output.is-modal {
    background-color: #183d6e !important;
}

.cf7-modal__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5.6rem;
    height: 5.6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.cf7-modal__close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
}

.cf7-modal__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

body.cf7-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .contact-form__select {
        display: none;
    }
    .contact-form__select-native {
        opacity: 1;
        pointer-events: auto;
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        min-height: max(5.8rem, min(7vw, 8.8rem));
        padding: 0 max(5.4rem, min(5vw, 6.4rem)) 0 max(1.6rem, min(2.2vw, 2.6rem));
        border: 1px solid #59a8fd;
        border-radius: 1.2rem;
        background-color: hsla(0, 0%, 100%, .07);
        color: var(--color-light);
        font-size: var(--pSize);
        line-height: 1.2;
        cursor: pointer;
    }
    .contact-form__field--select::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 2.4rem;
        width: 1.8rem;
        height: 1.8rem;
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23fff' stroke-width='2' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        transform: translateY(-50%);
        pointer-events: none;
    }
    .contact-form__select-native option {
        background-color: #2d6fc2;
        color: var(--color-light);
    }
    .contact-form__select-native option:checked {
        background-color: #183d6e;
        color: var(--color-light);
    }
    .contact-form__field--select:has(.wpcf7-not-valid-tip) .contact-form__select-native {
        border-color: red;
    }
}

@media (max-width: 768px) {
    .waiting__wrapper {
        flex-direction: column;
    }
    .waiting__wrapper .section__bg {
        order: 2;
        height: auto;
        position: relative;
        width: 100%;
    }
    .waiting__wrapper .section__bg img {
        aspect-ratio: 315/209;
        border-radius: 0 0 1.2rem 1.2rem;
        object-position: bottom;
        position: static;
        max-width: unset;
    }
    .waiting__inner {
        --_innerPad: 0rem;
        --_innerDiff: 0rem;
    }
    .waiting__description {
        grid-template-columns: 1fr;
    }
}

/* ====== Cookie Consent (CookieYes) ====== */

.cky-consent-bar,
.cky-preference-center {
    background-color: #3092fc !important;
    border-color: transparent !important;
    color: #fff !important;
    font-family: Ubuntu, Arial, sans-serif;
}

.cky-consent-bar {
    border-radius: 1.2rem;
}

.cky-preference-center {
    border-radius: 1.6rem;
}

/* Titles */
.cky-title,
.cky-preference-title {
    color: #fff !important;
    font-family: Ubuntu, Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

/* Body text */
.cky-notice-des,
.cky-notice-des p,
.cky-preference-content-wrapper,
.cky-preference-content-wrapper p,
.cky-accordion-header-des,
.cky-accordion-header-des p,
.cky-empty-cookies-text {
    color: #fff !important;
    font-family: Ubuntu, Arial, sans-serif;
    font-weight: 300;
}

/* Accordion category titles */
.cky-accordion-btn {
    color: #fff !important;
    font-family: Ubuntu, Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

/* Accordion cookie table */
.cky-audit-table {
    background-color: rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

/* Accordion dividers */
.cky-accordion {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Chevron icon */
.cky-chevron-right {
    border-color: #fff !important;
}

/* Always Active label */
.cky-always-active {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Show more button */
.cky-show-desc-btn {
    color: #fff !important;
    text-decoration: underline;
}

/* Footer gradient — matches blue background */
.cky-footer-shadow {
    background: linear-gradient(rgba(48, 146, 252, 0) 0%, #3092fc 100%) !important;
}

/* Close button icon → white */
.cky-btn-close img {
    filter: brightness(0) invert(1);
}

/* All buttons */
.cky-btn {
    background-color: #183d6e !important;
    color: #fff !important;
    border-color: #183d6e !important;
    border-radius: 0.8rem;
    font-family: Ubuntu, Arial, sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.cky-btn:hover {
    background-color: #0f2a4b !important;
    border-color: #0f2a4b !important;
}

/* Hide revisit button after consent accepted */
.cky-btn-revisit-wrapper {
    display: none !important;
}

/* Custom scrollbar in preference modal */
.cky-preference-body-wrapper {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.cky-preference-body-wrapper::-webkit-scrollbar {
    width: 4px;
}

.cky-preference-body-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.cky-preference-body-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.cky-preference-body-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* ============ Privacy policy page ============ */

/* Compact hero: same look as the front-page intro, but height
   follows the title instead of filling the screen */
.intro.intro_compact {
    height: auto;
    min-height: 0;
    padding: 20rem 0 8rem;
}

@media (max-width: 767px) {
    .intro.intro_compact {
        padding: 14rem 0 5rem;
    }
}

.section_privacy {
    padding-top: max(4rem, min(7.8vw, 10rem));
    padding-bottom: max(4rem, min(7.8vw, 10rem));
    color: var(--color-text);
}

.privacy__content {
    user-select: text;
}

.privacy__content > *:first-child {
    margin-top: 0;
}

.privacy__content > *:last-child {
    margin-bottom: 0;
}

.footer__meta a{
    text-decoration: none;
}

/* ============ 404 page ============ */

/* Full-height screen, so the footer stays at the bottom without any
   flex plumbing on .layout */
.error-page {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 18rem 0 10rem;
    overflow: hidden;
    background-color: #0b0e1b;
    color: var(--color-light);
}

.error-page__bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
}

.error-page__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

/* Blue glow behind the chart + darkening towards the text side */
.error-page__bg::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        radial-gradient(60% 60% at 72% 32%, rgba(var(--color-main-rgb), 0.35), transparent 70%),
        linear-gradient(90deg, rgba(11, 14, 27, 0.94) 20%, rgba(11, 14, 27, 0.72) 100%);
}

.error-page__container {
    position: relative;
    z-index: 1;
}

.error-page__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: max(3rem, min(5vw, 8rem));
}

.error-page__label {
    display: inline-block;
    margin-bottom: 2rem;
    padding: 0.8rem 1.6rem;
    border: 1px solid rgba(var(--color-main-rgb), 0.5);
    border-radius: 100px;
    background-color: rgba(var(--color-main-rgb), 0.12);
    color: var(--color-second);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.error-page__title {
    margin: 0 0 2rem;
    font-size: var(--h2Size);
    font-weight: 700;
    line-height: 1.1;
}

.error-page__text {
    max-width: 52rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--pSize);
    font-weight: 300;
}

.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin-top: max(2.8rem, min(4.6vw, 4rem));
}

/* The theme's buttons are 10rem tall on the front page hero — too heavy here */
.error-page__btn span {
    min-width: 0;
    min-height: 0;
    padding: 1.8rem 3.4rem;
}

.error-page__nav {
    margin-top: max(3rem, min(4.6vw, 5rem));
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.error-page__nav-title {
    display: block;
    margin-bottom: 1.6rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.error-page__nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.error-page__nav-link {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    text-decoration: none;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.error-page__nav-link:hover,
.error-page__nav-link:focus-visible {
    border-color: rgba(var(--color-main-rgb), 0.7);
    background-color: rgba(var(--color-main-rgb), 0.16);
    color: var(--color-light);
}

/* --- Visual: the 404 and a chart whose last leg went missing --- */

.error-page__visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-page__code {
    background: var(--btn-graient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: max(9rem, min(15vw, 18rem));
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.02em;
    filter: drop-shadow(0 1rem 4rem rgba(var(--color-main-rgb), 0.45));
    animation: error-float 6s ease-in-out infinite;
}

.error-page__chart {
    width: 100%;
    max-width: 56rem;
    height: auto;
    margin-top: -2rem;
    /* main.css has a global svg{fill:currentColor}, and CSS beats the fill="none"
       attribute — without this the stroke-only paths get filled with white */
    fill: none;
}

.error-page__line {
    fill: none;
}

.error-page__area {
    fill: url("#errorArea");
    opacity: 0;
    animation: error-fade 1.2s ease 0.9s forwards;
}

.error-page__line {
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
    animation: error-draw 1.8s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
}

/* The dotted tail keeps its dash pattern, so it fades in instead of drawing */
.error-page__line_lost {
    stroke-dasharray: 2 18;
    stroke-dashoffset: 0;
    opacity: 0;
    animation: error-fade-tail 1s ease 1.6s forwards;
}

.error-page__dot,
.error-page__pulse {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}

.error-page__dot {
    animation: error-fade 0.4s ease 1.5s forwards;
}

.error-page__pulse {
    animation: error-pulse 2.4s ease-out 1.9s infinite;
}

@keyframes error-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes error-fade {
    to {
        opacity: 1;
    }
}

@keyframes error-fade-tail {
    to {
        opacity: 0.55;
    }
}

@keyframes error-pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }

    70% {
        opacity: 0;
        transform: scale(3.2);
    }

    100% {
        opacity: 0;
        transform: scale(3.2);
    }
}

@keyframes error-float {
    50% {
        transform: translateY(-1.2rem);
    }
}

@media (max-width: 1023px) {
    .error-page {
        padding: 14rem 0 8rem;
    }

    .error-page__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .error-page__visual {
        order: -1;
    }

    .error-page__chart {
        max-width: 44rem;
    }

    .error-page__btn {
        flex: 1 1 22rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .error-page__code,
    .error-page__area,
    .error-page__line,
    .error-page__line_lost,
    .error-page__dot,
    .error-page__pulse {
        animation: none;
        opacity: 1;
        stroke-dashoffset: 0;
    }

    .error-page__pulse {
        opacity: 0;
    }
}