/* ===================
   Блок контакти – основа
=================== */
.contacts-block {
    position: relative;
    width: 100%;
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    color: inherit; /* колір успадковується */
}

/* ===================
   Розмиття фону
=================== */
.contacts-block .contacts-overlay::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
    pointer-events: none;
}

/* Контент поверх розмиття */
.contacts-block .contacts-overlay > * {
    position: relative;
    z-index: 2;
}

/* ===================
   FEEDBACK текст зверху
=================== */
.contacts-block .contacts-feedback {
    text-align: center;
    margin-bottom: 40px;
}

.contacts-block .feedback-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.contacts-block .feedback-title.visible {
    opacity: 1;
    transform: translateX(0);
}

.contacts-block .feedback-description {
    font-size: 16px;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.85;
}

/* ===================
   Контейнер карток та форми
=================== */
.contacts-block .contacts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ===================
   Картки людей
=================== */
.contacts-block .contacts-people {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    flex: 1 1 auto;
}

.contacts-block .contact-person {
    max-width: 280px;
    text-align: center;
    padding: 20px 10px;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contacts-block .contact-person.visible {
    opacity: 1;
    transform: translateY(0);
}

.contacts-block .contact-person img {
    width: 100%;
    max-width: 460px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, box-shadow 0.4s ease;
}

.contacts-block .contact-person img:hover {
    transform: scale(1.06);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.contacts-block .contact-person h3 {
    font-size: 22px;
    margin-bottom: 6px;
}

.contacts-block .contact-person .position,
.contacts-block .contact-person .phone,
.contacts-block .contact-person .email {
    font-size: 16px;
    margin-bottom: 5px;
    opacity: 0.85;
}

/* ===================
   Телефон та email
=================== */
.contacts-block .contact-link {
    color: inherit !important;
    text-decoration: none !important;
    transition: opacity 0.3s ease;
}

.contacts-block .contact-link:hover {
    opacity: 0.8;
}

/* ===================
   Форма
=================== */
.contacts-block .contact-form {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contacts-block .contact-form.visible {
    opacity: 1;
    transform: translateY(0);
}

.contacts-block .contact-form .wpcf7 input,
.contacts-block .contact-form .wpcf7 textarea {
    width: 100%;
    padding: 12px 10px;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: #fff;
    font-size: 15px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.contacts-block .contact-form .wpcf7 input:focus,
.contacts-block .contact-form .wpcf7 textarea:focus {
    outline: none;
    border-bottom: 1px solid #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* ===================
   Кнопка форми (тільки одна)
=================== */
.contacts-block .wpcf7 input[type="submit"]:not(:first-of-type) {
    display: none !important;
}

.contacts-block .wpcf7 input[type="submit"]:first-of-type {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 25px;
    border: 1px solid #fff;
    background: transparent;
    color: #fff !important;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease, transform 0.2s ease;
}

.contacts-block .wpcf7 input[type="submit"]:first-of-type:hover {
    background: #fff;
    color: #000 !important;
    transform: scale(1.05);
}

/* Приховуємо response output CF7, щоб не лізло в дизайн */
.contacts-block .wpcf7-response-output {
    display: none !important;
}

/* ===================
   Мобільна адаптивність
=================== */
@media screen and (max-width: 768px){
    .contacts-block .contacts-container {
        flex-direction: column;
        align-items: center;
        margin: 40px auto;
    }
    .contacts-block .contacts-people {
        justify-content: center;
        gap: 40px;
    }
    .contacts-block .contact-person {
        max-width: 90%;
    }
    .contacts-block .contact-person img {
        max-width: 80%;
    }
    .contacts-block .contact-form {
        flex: 1 1 100%;
        max-width: 100%;
        margin-top: 30px;
    }
}