/* =========================
   CONTACT MODAL
========================= */

.contact-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    visibility: hidden;
    opacity: 0;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* =========================
   ACTIVE MODAL
========================= */

.contact-modal.active {
    visibility: visible;

    opacity: 1;
}


/* =========================
   OVERLAY
========================= */

.contact-modal-overlay {
    position: absolute;

    inset: 0;

    background: rgba(6, 61, 42, 0.55);

    backdrop-filter: blur(4px);
}


/* =========================
   MODAL BOX
========================= */

.contact-modal-box {
    position: relative;

    z-index: 2;

    width: 100%;

    max-width: 680px;

    max-height: 90vh;

    overflow-y: auto;

    padding: 38px 40px;

    background: #ffffff;

    border-radius: 8px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.18);

    transform: translateY(20px) scale(0.98);

    transition:
        transform 0.3s ease;
}


.contact-modal.active .contact-modal-box {
    transform: translateY(0) scale(1);
}


/* =========================
   CLOSE BUTTON
========================= */

.contact-modal-close {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #d5ddd6;

    border-radius: 50%;

    background: #ffffff;

    color: #145c3b;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}


.contact-modal-close:hover {
    background: #145c3b;

    border-color: #145c3b;

    color: #ffffff;
}


/* =========================
   HEADER
========================= */

.contact-modal-header {
    padding-right: 45px;

    margin-bottom: 28px;
}


.contact-modal-header .section-label {
    margin-bottom: 12px;
}


.contact-modal-header h2 {
    margin: 0 0 12px;

    font-family: Georgia, serif;

    font-size: 34px;

    font-weight: 400;

    line-height: 1.12;

    color: #111111;
}


.contact-modal-header h2 em {
    color: #397c55;

    font-style: italic;
}


.contact-modal-header p:last-child {
    max-width: 480px;

    margin: 0;

    color: #555555;

    font-size: 12px;

    line-height: 1.6;
}


/* =========================
   FORM
========================= */

.contact-form {
    display: flex;

    flex-direction: column;

    gap: 18px;
}


.contact-form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;
}


.contact-form-group {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.contact-form-group label {
    color: #173d2c;

    font-size: 11px;

    font-weight: 700;
}


.contact-form-group input,
.contact-form-group textarea {
    width: 100%;

    padding: 11px 13px;

    border: 1px solid #d2dad3;

    border-radius: 4px;

    outline: none;

    background: #fafbf9;

    color: #111111;

    font-family: inherit;

    font-size: 12px;

    transition:
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}


.contact-form-group input {
    height: 42px;
}


.contact-form-group textarea {
    min-height: 100px;

    resize: vertical;
}


.contact-form-group input::placeholder,
.contact-form-group textarea::placeholder {
    color: #929892;
}


.contact-form-group input:focus,
.contact-form-group textarea:focus {
    border-color: #397c55;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(57, 124, 85, 0.08);
}


/* =========================
   FORM FOOTER
========================= */

.contact-form-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 3px;
}


.contact-form-note {
    margin: 0;

    color: #777777;

    font-size: 10px;
}


.contact-form-note i {
    margin-right: 5px;

    color: #397c55;
}


/* =========================
   SUBMIT BUTTON
========================= */

.contact-submit-btn {
    min-height: 42px;

    padding: 0 18px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 1px solid #145c3b;

    border-radius: 4px;

    background: #145c3b;

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}


.contact-submit-btn:hover {
    background: #063d2a;

    border-color: #063d2a;

    transform: translateY(-2px);
}


.contact-submit-btn i {
    font-size: 10px;
}


/* =========================
   SUCCESS MESSAGE
========================= */

.contact-success {
    display: none;

    text-align: center;

    padding: 35px 10px 10px;
}


.contact-success.active {
    display: block;
}


.contact-success-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #e8f1e9;

    color: #145c3b;

    font-size: 22px;
}


.contact-success h3 {
    margin-bottom: 8px;

    font-family: Georgia, serif;

    font-size: 27px;

    font-weight: 400;

    color: #111111;
}


.contact-success p {
    max-width: 350px;

    margin: 0 auto 22px;

    color: #555555;

    font-size: 12px;

    line-height: 1.6;
}


.contact-success-close {
    min-height: 40px;

    padding: 0 18px;

    border: 1px solid #145c3b;

    border-radius: 4px;

    background: #145c3b;

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;

    cursor: pointer;
}


/* =========================
   BODY LOCK
========================= */

body.contact-modal-open {
    overflow: hidden;
}


/* =========================
   TABLET
========================= */

@media (max-width: 767.98px) {

    .contact-modal {
        padding: 15px;
    }


    .contact-modal-box {
        max-width: 600px;

        padding: 32px 28px;
    }


    .contact-modal-header h2 {
        font-size: 30px;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 575.98px) {

    .contact-modal {
        padding: 10px;
    }


    .contact-modal-box {
        max-height: 92vh;

        padding: 28px 20px 24px;

        border-radius: 6px;
    }


    .contact-modal-header {
        padding-right: 35px;

        margin-bottom: 24px;
    }


    .contact-modal-header h2 {
        font-size: 27px;
    }


    .contact-modal-header p:last-child {
        font-size: 12px;
    }


    .contact-form {
        gap: 15px;
    }


    .contact-form-row {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .contact-form-footer {
        align-items: stretch;

        flex-direction: column;

        gap: 14px;
    }


    .contact-form-note {
        order: 2;
    }


    .contact-submit-btn {
        width: 100%;
    }

}