/* Modern Contact Form Styles */
.contact-form-modern {
    max-width: 100%;
}

/* Form Controls */
.form-control-modern {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0; /* Square corners */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

/* Validation States */
.form-control-modern.field-valid {
    background-color: #d4edda; /* Light green background */
    border-color: #28a745;
}

.form-control-modern.field-invalid {
    background-color: #f8d7da; /* Light red background */
    border-color: #dc3545;
}

.form-control-modern:focus {
    color: #495057;
    background-color: #fff;
    border-color: #28a745; /* Green border on focus */
    outline: 0;
    box-shadow: none;
}

.form-control-modern::placeholder {
    color: #6c757d;
    opacity: 0.8;
}

/* Character hint */
.character-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Security Section */
.security-section {
    margin-top: 20px;
}

.security-label {
    display: block;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 10px;
    color: #212529;
}

/* Captcha Row */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.captcha-question-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 12px 20px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 0;
    font-size: 14px;
    font-weight: normal;
    color: #212529;
}

.captcha-input {
    flex: 0 0 auto;
    width: 150px !important;
}

.new-question-link {
    color: #dc3545; /* Red color for "New question" */
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.new-question-link:hover {
    opacity: 0.8;
    text-decoration: none;
    color: #dc3545;
}

/* Submit Button */
.btn-submit-modern {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 10px 40px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0; /* Square corners */
    background-color: #dc3545; /* Red background */
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s ease-in-out;
    margin-top: 20px;
}

.btn-submit-modern:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: #fff;
    text-decoration: none;
}

.btn-submit-modern:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.btn-submit-modern:active {
    background-color: #bd2130;
    border-color: #b21f2d;
}

/* Form Group Spacing */
.contact-form-modern .form-group {
    margin-bottom: 20px;
}

.contact-form-modern .form-group:last-of-type {
    margin-bottom: 0;
}

/* Success/Error Messages */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 0;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Responsive Design */
@media (max-width: 576px) {
    .captcha-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .captcha-question-box {
        width: 100%;
        text-align: center;
    }
    
    .captcha-input {
        width: 100% !important;
    }
    
    .new-question-link {
        text-align: center;
        display: block;
        width: 100%;
    }
}