.contacts-container {
    position: relative;
    min-height: 100vh;
    margin: 0;
    color: var(--primary-text);
    background: none !important;
    display: flex;
    justify-content: center;
    align-items: stretch; 
    width: 100%;
    overflow: hidden;
    padding: 80px 0 0;
}

/* затемнене тло */
.contacts-container::before {
    content: "";
    position: fixed; /* фіксуємо до вікна, не до контенту */
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: url('../images/backgrounds/contacts.webp') no-repeat center center;
    background-size: cover;
    filter: brightness(15%);
    z-index: -1; /* щоб було під контентом */
    pointer-events: none;
}

.contacts-left {
    flex: 1;
    color: var(--button-text);
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: end;
    font-family: "Inter-Medium", sans-serif;
    position: relative;
    min-height: 30vh;
    width: 50vw;
}

.contacts-left * {
    position: relative;
    z-index: 1;
}

.contacts-left-content {
    max-width: 730px;
    width: 50vw;
    padding: 0px 60px;
}

.contacts-left-content h2 {
    font-family: "Inter-Medium", sans-serif;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.contacts-left-content p {
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
}

.contacts-left-content img.icon {
    width: 1.4rem;
    height: 1.4rem;
    vertical-align: middle;
}

.contacts-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: start;
    background-color: var(--button-text);
    min-height: calc(calc(100vh - 30px) - 80px);
    width: 50vw;
}

.contacts-right-content {
    max-width: 730px;
    width: 50vw;
    padding: 0px 60px;
}

.contacts-right-content h2 {
    font-family: "Inter-Medium", sans-serif;
    color: var(--secondary-text);
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    border: 2px solid var(--secondary-text);
    border-radius: 1rem;
    padding: 0.8rem 1rem;
    font-family: "Inter-Regular", sans-serif;
    font-size: 1rem;
    outline: none;
    width: 100%;
}

.contact-form textarea {
    min-height: 130px;
    resize: vertical;
}

.contact-form button {
    align-self: flex-start;
    background: var(--secondary-text);
    color: var(--button-text);
    border: none;
    border-radius: 2rem;
    padding: 0.8rem 1.5rem;
    font-family: "Inter-Medium", sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

.contact-form button:hover {
    background: var(--logo-blue);
}

.contacts-left .tel{
    color: inherit;
    text-decoration: underline;
}

.contacts-left .tel:focus,.contacts-left .tel:hover{
    color: inherit;
    opacity: .9;
}

.textarea-message {
    height: 20rem;
}

.textarea-contact-info {
    min-height: 3rem !important;
}

@media (max-width: 991px) {
    .contacts-container::before {
        position: absolute;   /* замість fixed */
        top: 0;
        left: 0;
        width: 100%;
        height: 300vh;        /* саме height, не min-height */
        min-height: unset;
    }

    .contacts-container {
        flex-direction: column;
        margin: 2rem 0 0;
    }
    
    .contacts-left {
        width: 100%;
    }
    
    .contacts-right {
        min-height: unset;
        width: 100%;
    }
    
    .contacts-left {
        text-align: left;
    }
    
    .contacts-left-content, .contacts-right-content {
        max-width: 100%;
        width: 100%;
        padding: 2rem 40px;
    }
    
    .contacts-left-content .top-spacer, .contacts-right-content .bottom-spacer {
        display: none;
    }
    
    .contact-form button {
        align-self: center;
        width: 100%;
    }

    .textarea-contact-info {
        height: 7rem !important;
    }
}