/* =============================================
   MODALS
   ============================================= */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-dialog {
    width: 100%;
    max-width: 680px;
    background: white;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}

.modal-dialog.modal-lg { max-width: 860px; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Close button */
.btn-close-custom {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-close-custom:hover {
    background: rgba(0,0,0,0.85);
    transform: scale(1.1);
}

/* Video modal body */
.modal-body {
    padding: 0;
    position: relative;
}

.ratio-16x9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.ratio-16x9 iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Lead form modal */
.modal-form-body {
    padding: 34px 40px 38px;
}

.modal-form-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.modal-form-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

#leadModal .modal-dialog.modal-callback {
    max-width: 560px;
    border-radius: 18px;
}

#leadModal .modal-form-body {
    padding: 18px 16px 16px;
}

#leadModal .btn-close-custom {
    top: 14px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: transparent;
    color: #777;
    border-radius: 0;
}

#leadModal .btn-close-custom:hover {
    background: transparent;
    color: #333;
    transform: none;
}

#leadModal .modal-form-title {
    font-size: 1.08rem;
    line-height: 1.2;
    margin-bottom: 10px;
    padding-right: 20px;
}

#leadModal .modal-form-sub {
    font-size: 1rem;
    margin-bottom: 22px;
}

#leadModal .modal-lead-form-box {
    max-width: 100%;
    margin-left: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

@media (max-width: 768px) {
    #leadModal .modal-dialog.modal-callback {
        max-width: 96%;
    }

    #leadModal .modal-form-body {
        padding: 16px 14px 14px;
    }

    #leadModal .modal-form-title {
        font-size: 1rem;
    }
}
