/* Comprehensive Audit Fixes - Professional Improvements */

/* 1. Enhanced Responsiveness for All Breakpoints */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 2rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
        padding: 0 1.5rem;
    }
    
    .hero-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Fix hero section spacing */
    .hero {
        padding: 2rem 0 !important;
        min-height: auto !important;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        line-height: 1.3 !important;
    }
    
    .hero-subtitle {
        font-size: clamp(0.95rem, 2vw, 1.1rem) !important;
    }
    
    /* Fix service cards */
    .service-card {
        padding: 1.5rem !important;
    }
    
    .service-icon-3d {
        width: 60px !important;
        height: 60px !important;
        font-size: 2rem !important;
    }
    
    /* Fix industry cards */
    .industry-card {
        padding: 1.5rem !important;
    }
    
    .industry-icon-3d {
        width: 70px !important;
        height: 70px !important;
        font-size: 2.5rem !important;
    }
    
    /* Fix stats */
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .stat-item {
        padding: 1rem !important;
    }
    
    .stat-number {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 576px) {
    .hero-stats {
        grid-template-columns: 1fr !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .btn {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
}

/* 2. Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 3. Accessibility Improvements */
:focus-visible {
    outline: 3px solid var(--premium-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--premium-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* 4. Print Styles */
@media print {
    .header,
    .footer,
    .btn,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
}

/* 5. Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 6. Enhanced Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:focus {
    outline: 3px solid var(--premium-primary);
    outline-offset: 2px;
}

/* 7. Improved Form Accessibility */
.form-group input:required + label::after,
.form-group select:required + label::after,
.form-group textarea:required + label::after {
    content: ' *';
    color: #ef4444;
}

/* 8. Better Link Styling */
a:not(.btn) {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

a:not(.btn):hover {
    border-bottom-color: currentColor;
}

/* 9. Enhanced Card Hover States */
.service-card,
.industry-card,
.feature-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:focus-within,
.industry-card:focus-within,
.feature-item:focus-within {
    outline: 3px solid var(--premium-primary);
    outline-offset: 2px;
}

/* 10. Improved Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

/* 11. Better Spacing System */
.section-spacing {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-spacing {
        padding: 3rem 0;
    }
}

/* 12. Enhanced Grid Systems */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-auto-fit {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 13. Improved Image Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 14. Better Error States */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* 15. Enhanced Loading Indicators */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 102, 255, 0.1);
    border-top-color: var(--premium-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 16. Improved Scroll Behavior */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 17. Better Mobile Touch Targets */
@media (max-width: 768px) {
    .btn,
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* 18. Enhanced Footer */
.footer {
    margin-top: 0;
}

.footer .footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer .footer-section ul {
    list-style: none;
    padding: 0;
}

.footer .footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer .footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer .footer-section a:hover {
    color: var(--primary-light);
}

/* 19. Improved CTA Sections */
.pricing-note,
.cta-section {
    position: relative;
    overflow: hidden;
}

/* 20. Better Section Titles */
.section-title {
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* 21. Enhanced Navigation */
.nav-menu a {
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--premium-primary);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 22. Better Table Styling (if any) */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--bg-light);
    font-weight: 600;
}

/* 23. Improved Code Blocks (if any) */
code {
    background: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

pre {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* 24. Better List Styling */

li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* 25. Enhanced Blockquotes (if any) */
blockquote {
    border-left: 4px solid var(--premium-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

/* 26. Better Horizontal Rules */
hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

/* 27. Improved Badge/Tag Styling */
.badge,
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-dark);
}

/* 28. Enhanced Tooltip Support */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--text-dark);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
}

/* 29. Better Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 30. Improved Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

