.cf7-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cf7-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 40px;
    width: 90%;
    max-width: 650px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cf7-close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    line-height: 1;
}

.cf7-close:hover {
    color: #333;
}

.cf7-modal-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #22375a;
}

.cf7-service-title {
    background: #22375a;
    color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 14px;
}

.cf7-service-title strong {
    color: #fff;
    font-weight: 600;
}

/* Stili CF7 Form */
.cf7-modal-content .wpcf7-form p {
    margin-bottom: 15px;
}

.cf7-modal-content .wpcf7-form-control-wrap {
    display: block;
}

.cf7-modal-content input[type="text"],
.cf7-modal-content input[type="email"],
.cf7-modal-content input[type="tel"],
.cf7-modal-content input[type="number"],
.cf7-modal-content textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.cf7-modal-content input:focus,
.cf7-modal-content textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.cf7-modal-content textarea {
    min-height: 100px;
    resize: vertical;
}

.cf7-modal-content .wpcf7-submit {
    width: 100%;
    padding: 15px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cf7-modal-content .wpcf7-submit:hover {
    background-color: #005a87;
}

.cf7-modal-content .wpcf7-response-output {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
}

.cf7-modal-content .wpcf7-mail-sent-ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cf7-modal-content .wpcf7-validation-errors,
.cf7-modal-content .wpcf7-mail-sent-ng {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cf7-modal-content .wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cf7-modal-content {
        margin: 10px;
        padding: 25px 20px;
        width: calc(100% - 20px);
    }
    
    .cf7-close {
        right: 15px;
        top: 15px;
        font-size: 28px;
    }
}