/* ===========================
   CONTACTS & FORM - contacts-form.css
   Замінений блок з contact_form.html
   =========================== */

.contacts-appointment {
    padding: 60px 0;
    background: #f5f5f5;
}

/* ===========================
   СІТКА КОНТАКТІВ
   =========================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* ===========================
   ІНФОРМАЦІЯ ПРО КОНТАКТИ
   =========================== */

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-card {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--white);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-card:hover {
    background: #e9f5e3;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(145, 208, 114, 0.2);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.contact-card:hover .contact-icon {
    transform: scale(1.1);
}

.contact-icon svg {
    color: white;
}

.contact-text {
    flex: 1;
}

.contact-text h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: 700;
}

.contact-text p {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
}

.contact-text a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.contact-text a:hover {
    color: var(--primary-color);
}

/* ===========================
   КНОПКИ ДІЙ АДРЕСИ
   =========================== */

.address-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.map-btn, .video-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.map-btn {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(145, 208, 114, 0.25);
}

.map-btn:hover {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(145, 208, 114, 0.45);
}

.map-btn svg {
    width: 16px;
    height: 16px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.map-btn:hover svg {
    color: white;
}

.video-btn {
    background: white;
    color: var(--secondary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(145, 208, 114, 0.15);
}

.video-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(145, 208, 114, 0.45);
}

.contact-text .video-btn {
    color: var(--secondary-color);
}

.contact-text .video-btn:hover {
    color: #fff;
}

.video-btn svg {
    width: 16px;
    height: 16px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.video-btn:hover svg {
    color: white;
}

/* ===========================
   ФОРМА ЗАПИСУ
   =========================== */

.appointment-form {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.appointment-form .wpcf7-spinner {
    display: none !important;
}

.appointment-form__content {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.appointment-form.is-processing .appointment-form__content,
.appointment-form.is-success .appointment-form__content {
    filter: blur(3px);
    opacity: 0.4;
    pointer-events: none;
}

.appointment-form__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.appointment-form__overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.appointment-form__overlay-content {
    max-width: 360px;
}

.appointment-form__overlay-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(145, 208, 114, 0.25);
    border-top-color: var(--primary-color);
    margin: 0 auto 16px;
    animation: appointment-spin 0.9s linear infinite;
    display: none;
}

.appointment-form.is-processing .appointment-form__overlay-spinner {
    display: block;
}

.appointment-form__overlay-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.5;
}

.appointment-form.is-error .appointment-form__overlay-text {
    color: #c0392b;
}

@keyframes appointment-spin {
    to {
        transform: rotate(360deg);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-header h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.form-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* ===========================
   ПОЛЯ ФОРМИ
   =========================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #f9fef6;
    box-shadow: 0 0 0 3px rgba(145, 208, 114, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ===========================
   TURNSTILE CAPTCHA
   =========================== */

.turnstile-wrapper {
    margin: 15px auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 78px;
}
.wpcf7 .wpcf7-turnstile {
    margin: 15px auto 15px !important;
    display: flex;
    justify-content: center;
}
.wpcf7 .wpcf7-turnstile > div {
    margin: 0 auto;
}

/* ===========================
   КНОПКА ВІДПРАВКИ
   =========================== */

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover:not(:disabled) {
    background: #7bc05a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(145, 208, 114, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ===========================
   ПРИМІТКА ФОРМИ
   =========================== */

.form-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 15px;
    line-height: 1.6;
}

.form-note a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===========================
   ПОВІДОМЛЕННЯ SUCCESS/ERROR
   =========================== */

.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.message.show {
    display: flex;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===========================
   ВІДЕО МОДАЛЬНЕ ВІКНО
   =========================== */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.video-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-modal-header h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    width: 35px;
    height: 35px;
    border: none;
    background: var(--light-gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.close-modal:hover svg {
    color: white;
}

.close-modal svg {
    color: var(--secondary-color);
    transition: color 0.3s;
}

.video-modal-body {
    padding: 24px;
    display: flex;
    justify-content: center;
    background: #0b0c0f;
}

.video-modal-body video {
    width: min(420px, 100%);
    max-height: calc(100vh - 240px);
    border-radius: 16px;
    background: #000;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

/* ===========================
   АДАПТИВНІСТЬ
   =========================== */

@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .contacts-appointment {
        padding: 40px 0;
    }

    .appointment-form {
        padding: 25px 20px;
    }

    .contact-card {
        padding: 20px;
    }

    .address-actions {
        flex-direction: column;
    }

    .map-btn, .video-btn {
        width: 100%;
        justify-content: center;
    }

    .video-modal-content {
        margin: 0 15px;
    }

    .video-modal-body {
        padding: 16px;
    }

    .video-modal-body video {
        width: 100%;
        max-height: calc(100vh - 180px);
    }
}
