/* Overlay */
.lmg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.lmg-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.lmg-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1),
                opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.lmg-modal-overlay.is-active .lmg-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close animation */
.lmg-modal-overlay.is-closing {
    opacity: 0;
    visibility: visible;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.lmg-modal-overlay.is-closing .lmg-modal {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 250ms ease, opacity 250ms ease;
}

/* Close button */
.lmg-modal__close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 200ms ease, color 200ms ease;
    padding: 0;
}

.lmg-modal__close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Image */
.lmg-modal__image {
    width: 45%;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

/* Content */
.lmg-modal__content {
    width: 55%;
    padding: 44px 40px 40px;
    overflow-y: auto;
    max-height: 80vh;
}

.lmg-modal__headline {
    margin: 0 0 8px;
    font-size: 46px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    text-transform: uppercase;
}

.lmg-modal__accent {
    width: 40px;
    height: 3px;
    background: #2d5a87;
    border-radius: 2px;
    margin-bottom: 20px;
}

.lmg-modal__body {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

.lmg-modal__body p:last-child {
    margin-bottom: 0;
}

/* Gravity Forms inside modal */
.lmg-modal__body .gform_wrapper {
    margin: 0;
    padding: 0;
}

.lmg-modal__body .gform_heading {
    display: none;
}

.lmg-modal__body .gform_fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lmg-modal__body .gfield {
    margin: 0;
    padding: 0;
}

.lmg-modal__body .gfield_label,
.lmg-modal__body .gform-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: block;
}

.lmg-modal__body .gform-field-label--type-sub {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    margin-top: 4px;
}

.lmg-modal__body .ginput_container input[type="text"],
.lmg-modal__body .ginput_container input[type="email"],
.lmg-modal__body .ginput_container textarea,
.lmg-modal__body .ginput_container select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    font-size: 14px;
    color: #1a1a1a;
    background: #f9fafb;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    outline: none;
    box-sizing: border-box;
}
.lmg-modal__body .ginput_container textarea{
    max-height: 75px;
}
.lmg-modal__body .ginput_container input[type="text"]:focus,
.lmg-modal__body .ginput_container input[type="email"]:focus,
.lmg-modal__body .ginput_container textarea:focus,
.lmg-modal__body .ginput_container select:focus {
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.12);
    background: #fff;
}

.lmg-modal__body .ginput_container textarea {
    height: 75px;
    resize: vertical;
}

.lmg-modal__body .ginput_complex.ginput_container--name {
    display: flex;
    gap: 12px;
}

.lmg-modal__body .ginput_complex .gform-grid-col {
    flex: 1;
}

.lmg-modal__body .gform-footer,
.lmg-modal__body .gform_footer {
    margin-top: 8px;
    padding: 0;
    border: none;
}

.lmg-modal__body .gform_button,
.lmg-modal__body .gform-footer input[type="submit"] {
    width: 100%;
    padding: 12px 24px;
    background: #2d5a87;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms ease, transform 150ms ease, box-shadow 200ms ease;
    letter-spacing: 0.3px;
}

.lmg-modal__body .gform_button:hover,
.lmg-modal__body .gform-footer input[type="submit"]:hover {
    background: #1a3a5c;
    box-shadow: 0 4px 12px rgba(45, 90, 135, 0.3);
    transform: translateY(-1px);
}

.lmg-modal__body .gform_button:active,
.lmg-modal__body .gform-footer input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: none;
}

/* No image — content goes full width */
.lmg-modal:not(:has(.lmg-modal__image)) .lmg-modal__content {
    width: 100%;
}

/* Mobile */
@media (max-width: 768px) {
    .lmg-modal {
        width: 95%;
        flex-direction: column;
    }

    .lmg-modal__image {
        display: none;
    }

    .lmg-modal__content {
        width: 100%;
        padding: 32px 24px 28px;
    }

    .lmg-modal__headline {
        font-size: 36px;
    }

    .lmg-modal__close {
        top: 12px;
        right: 12px;
    }
}
