/* Contact Form Styles */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

.contact-form-heading {
    margin: 0 0 24px 0;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.contact-form .contact-form-heading {
    margin-top: 0;
}

.contact-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
 sv
/* Hide row if not used */
.contact-form-row:empty {
    display: none;
}

.contact-form-group {
    margin-bottom: 12px;
}

.contact-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Screen reader only labels */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.contact-form-group .required {
    color: #e74c3c;
}

.contact-form .contact-form-input,
.contact-form .contact-form-textarea {
    width: 100%;
    padding: 8px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-style: solid !important;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    box-sizing: border-box;
    outline: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.contact-form .contact-form-input:focus,
.contact-form .contact-form-textarea:focus,
.contact-form .contact-form-input:active,
.contact-form .contact-form-textarea:active {
    outline: none !important;
    border: 2px solid #1356E3 !important;
    border-style: solid !important;
    box-shadow: 0 0 0 3px rgba(19, 86, 227, 0.1);
}

.contact-form .contact-form-input:focus-visible,
.contact-form .contact-form-textarea:focus-visible {
    outline: none !important;
}

.contact-form-input:invalid:not(:focus):not(:placeholder-shown),
.contact-form-textarea:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

.contact-form-textarea {
    resize: vertical;
    min-height: 120px;
    padding-left: 20px;
    padding-right: 20px;
}

.contact-form-error-message {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    min-height: 20px;
}

.contact-form-group.has-error .contact-form-input,
.contact-form-group.has-error .contact-form-textarea {
    border-color: #e74c3c;
}

.contact-form-checkbox {
    margin-bottom: 30px;
}

.contact-form-services {
    margin-bottom: 25px;
}

.contact-form-services-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.contact-form-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-form-services-list label {
    margin: 0 !important;
}

.contact-form-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    font-weight: normal;
    padding: 6px 12px;
    margin: 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    line-height: 1.4;
    vertical-align: middle;
}

.contact-form-checkbox-label:hover {
    border-color: #1356E3;
    background-color: #f8f9fa;
}

.contact-form-checkbox-label input[type="checkbox"] + span,
.contact-form-checkbox-label input[type="checkbox"]:checked + span {
    display: inline-block;
    font-weight: normal;
    line-height: 1.4;
    vertical-align: middle;
}

.contact-form-checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
}

.contact-form-checkbox-label input[type="checkbox"]:checked {
    accent-color: #1356E3;
}

.contact-form-checkbox-label:has(input[type="checkbox"]:checked),
.contact-form-checkbox-label.is-checked {
    border-color: #3498db;
    background-color: #e8f4f8;
}

/* Fallback for browsers without :has() support */
.contact-form-checkbox-label input[type="checkbox"]:checked ~ span {
    font-weight: 600;
}

.contact-form-checkbox-label input[type="checkbox"] {
    margin: 0 8px 0 0;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    align-self: center;
    position: relative;
    top: 1px;
    vertical-align: middle;
}

.contact-form-checkbox-label a {
    color: #3498db;
    text-decoration: underline;
}

.contact-form-checkbox-label a:hover {
    color: #2980b9;
}

.contact-form-submit {
    background: #1356E3;
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.contact-form-submit:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.contact-form-submit:active {
    transform: translateY(0);
}

.contact-form-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.contact-form-submit-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.contact-form-message {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-size: 15px;
}

.contact-form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .contact-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-form-row:empty {
        display: none;
    }
    
    .contact-form-services-list {
        flex-direction: column;
        gap: 12px;
    }
    
    .contact-form-checkbox-label {
        width: 100%;
    }
    
    .contact-form-submit {
        padding: 14px 32px;
    }
}

@media (max-width: 480px) {
    
    .contact-form-input,
    .contact-form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Accessibility - Only show outline for keyboard navigation, not mouse clicks */
.contact-form-input:focus-visible,
.contact-form-textarea:focus-visible,
.contact-form-submit:focus-visible {
    outline: 2px solid #1356E3;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .contact-form-container {
        box-shadow: none;
    }
    
    .contact-form-submit {
        display: none;
    }
}

