/* Additional custom styles for McDonald Property Restoration */

/* Smooth scroll offset for fixed navigation */
html {
    scroll-padding-top: 80px;
}

/* Custom focus styles */
*:focus-visible {
    outline: 2px solid #e07a5f;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid #000;
    }
    
    .stat-card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .phone-pulse {
        animation: none !important;
    }
}

/* Ensure proper text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Better image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Selection color */
::selection {
    background-color: #e07a5f;
    color: white;
}

::-moz-selection {
    background-color: #e07a5f;
    color: white;
}

/* Loading state for buttons */
button:disabled,
input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Better touch targets on mobile */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Ensure form inputs have proper styling */
input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
    appearance: none;
    -webkit-appearance: none;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233d3d3d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Better form validation styles */
input:valid,
textarea:valid {
    border-color: #10b981;
}

input:invalid,
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

/* Loading spinner for form submission */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Better focus management for modal/menu */
.mobile-menu:focus {
    outline: none;
}

/* Ensure proper contrast for all text */
.text-charcoal-600 {
    color: #4f4f4f;
}

.text-charcoal-700 {
    color: #3d3d3d;
}

.text-charcoal-800 {
    color: #2d2d2d;
}

.text-charcoal-900 {
    color: #1a1a1a;
}

/* Ensure links are accessible */
a:not(.btn-primary, .btn-secondary, .btn-dark):not([class*="text-"]) {
    color: #e07a5f;
}

a:not(.btn-primary, .btn-secondary, .btn-dark):not([class*="text-"]):hover {
    color: #c96a52;
}

/* Ensure proper spacing in all browsers */
* {
    box-sizing: border-box;
}

/* Better scrollbar for WebKit browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #e07a5f;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c96a52;
}

/* Ensure proper display of inline elements */
img, svg {
    vertical-align: middle;
}

/* Better form field grouping */
.form-group {
    margin-bottom: 1.5rem;
}

/* Ensure proper line heights for readability */
p, li {
    line-height: 1.7;
}

/* Better heading hierarchy */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}

/* Ensure proper spacing around sections */
section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (max-width: 768px) {
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Better card hover effects */
.service-card {
    will-change: transform;
}

.service-card:hover {
    will-change: transform;
}

/* Ensure proper image aspect ratios */
img {
    object-fit: cover;
}

/* Better focus rings for keyboard navigation */
button:focus-visible,
a:focus-visible {
    outline: 3px solid #e07a5f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Ensure proper contrast for disabled states */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Better transition for mobile menu */
.mobile-menu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure proper z-index layering */
.fixed {
    z-index: 50;
}

.sticky {
    z-index: 40;
}

/* Better box shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Ensure proper border radius consistency */
.rounded-sm {
    border-radius: 0.25rem;
}

.rounded {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}
