/* Professional Form Styling */
:root {
    --primary-color: #00CC52;
    --primary-dark: #009f3e;
    --secondary-color: #2584C4;
    --text-color: #2D3748;
    --light-gray: #e2e8f0;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --box-shadow: 0 6px 15px rgba(0, 204, 82, 0.15);
}

/* Common Form Styling */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0.9;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #f8f9fa;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 204, 82, 0.15);
    background-color: #fff;
}

textarea.form-control {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-green-dark), var(--color-green-bright));
    border-color: transparent;
    box-shadow: 0 6px 15px rgba(19, 206, 102, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-green-bright), var(--color-green-dark));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(19, 206, 102, 0.3);
}

.btn-secondary {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-orange), #FF6B35);
    border-color: transparent;
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.25);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #FF6B35, var(--color-orange));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
}

.btn-outline {
    color: var(--text-color);
    background: #f8f9fa;
    border: 1px solid var(--light-gray);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

/* Form Validation */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Custom Checkbox and Radio */
.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--light-gray);
    appearance: none;
    print-color-adjust: exact;
    transition: var(--transition);
    position: relative;
}

.form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 204, 82, 0.15);
}

/* File Input */
.form-file {
    position: relative;
    display: inline-block;
    width: 100%;
}

.form-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 1.8rem + 2px);
    margin: 0;
    opacity: 0;
}

.form-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    display: flex;
    height: calc(1.5em + 1.8rem + 2px);
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
}

.form-file-text {
    display: flex;
    align-items: center;
    flex-grow: 1;
    padding: 0.9rem 1.2rem;
    overflow: hidden;
    font-weight: 400;
    color: var(--text-color);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.form-file-button {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-left: inherit;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Form Grid */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.form-col {
    flex: 1 0 0%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        margin-bottom: 1rem;
    }
    
    .form-col:last-child {
        margin-bottom: 0;
    }
}

/* Contact Form Specific */
.contact-form-container {
    max-width: 700px;
}

.contact-form-container .form-group:last-child {
    margin-bottom: 0;
    text-align: center;
}

/* Form Success Message */
.form-success-message {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    background-color: rgba(0, 204, 82, 0.1);
    border-left: 4px solid var(--primary-color);
    color: var(--text-color);
}

/* Form Error Message */
.form-error-message {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
    color: var(--text-color);
}
